/* ============================================================
   NYALA GAGASAN — tema "Energy Neon" (turunan game Pertamina)
   ============================================================ */
:root {
    --bg: #050A18;
    --red: #ED1C2E;   --red-n: #FF4D5E;
    --blue: #006CB7;  --blue-n: #2E9BFF;
    --green: #ACC42A; --green-n: #C9E64A;
    --cyan: #2CE6E6;
    --amber: #FFB02E;
    --text: #F4F7FF;
    --muted: #93A3C4;
    --glass: linear-gradient(160deg, rgba(255,255,255,.10), rgba(255,255,255,.03));
    --glass-border: rgba(255,255,255,.14);
    --font: 'Bahnschrift', 'Saira Semi Condensed', 'Segoe UI', 'Arial Narrow', sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { min-height: 100%; background: #03060F; }
body { font-family: var(--font); color: var(--text); }
img { -webkit-user-drag: none; }
button { font-family: inherit; border: none; cursor: pointer; background: none; color: inherit; }

/* ---------- BACKGROUND ENERGI ---------- */
.bg-layer { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
    background: radial-gradient(ellipse 110% 70% at 50% 0%, #10224A 0%, #071026 45%, #03060F 100%); }
.gl { position: absolute; border-radius: 50%; filter: blur(110px); opacity: .30; animation: glDrift 22s ease-in-out infinite; will-change: transform; }
.g-red   { width: 46vmax; height: 46vmax; background: var(--red);    top: -14vmax; left: -16vmax; }
.g-blue  { width: 54vmax; height: 54vmax; background: var(--blue-n); top: 30vh;  right: -26vmax; animation-delay: -7s; }
.g-green { width: 42vmax; height: 42vmax; background: var(--green);  bottom: -16vmax; left: -10vmax; animation-delay: -14s; opacity: .2; }
@keyframes glDrift { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(8vmax,5vmax) scale(1.12); } 66% { transform: translate(-4vmax,9vmax) scale(.92); } }

.sk { position: absolute; left: -10%; width: 120%; height: 3px; border-radius: 4px; opacity: 0; animation: streak 9s linear infinite; }
.s1 { top: 22%; background: linear-gradient(90deg, transparent, var(--red-n), transparent); }
.s2 { top: 55%; background: linear-gradient(90deg, transparent, var(--blue-n), transparent); animation-delay: -3s; animation-duration: 10s; }
.s3 { top: 82%; background: linear-gradient(90deg, transparent, var(--green-n), transparent); animation-delay: -6s; }
@keyframes streak { 0% { transform: rotate(-24deg) translateX(-110%); opacity: 0; } 10% { opacity: .7; } 45% { opacity: .7; } 55%,100% { transform: rotate(-24deg) translateX(110%); opacity: 0; } }

.grid-floor {
    position: absolute; left: 0; bottom: 0; width: 100%; height: 34vh; perspective: 420px; overflow: hidden;
    -webkit-mask-image: linear-gradient(to top, #000 20%, transparent 95%); mask-image: linear-gradient(to top, #000 20%, transparent 95%);
}
.grid-plane {
    position: absolute; left: -60%; width: 220%; height: 260%; bottom: -10%;
    transform-origin: 50% 100%; transform: rotateX(74deg);
    background-image: linear-gradient(rgba(44,230,230,.38) 2px, transparent 2px), linear-gradient(90deg, rgba(46,155,255,.32) 2px, transparent 2px);
    background-size: 70px 70px; animation: gridMove 2.2s linear infinite;
}
@keyframes gridMove { from { background-position: 0 0; } to { background-position: 0 70px; } }
#bgfx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

/* ---------- LOGO MERAKIT (potongan simbol Pertamina) ---------- */
.emblem { position: relative; margin: 0 auto; }
.emblem .halo { position: absolute; border-radius: 50%; inset: 0; }
.emblem .h1 {
    inset: 8%; border: 3px solid transparent;
    background: conic-gradient(from 0deg, var(--red-n), transparent 30%, var(--blue-n) 50%, transparent 70%, var(--green-n) 90%, var(--red-n)) border-box;
    -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
    animation: spin 7s linear infinite; filter: drop-shadow(0 0 10px rgba(46,155,255,.8));
}
.emblem .h2 { inset: 0; border: 2px dashed rgba(44,230,230,.35); animation: spin 30s linear infinite reverse; }
.emblem .h3 { inset: 24%; background: radial-gradient(circle, rgba(46,155,255,.4), transparent 70%); animation: haloBreath 3s ease-in-out infinite; }
.emblem .logo { position: absolute; top: 50%; left: 50%; width: 46%; aspect-ratio: 620/460; transform: translate(-50%,-50%); animation: logoGlow 3s 1.6s ease-in-out infinite; }
.emblem .pc { position: absolute; inset: 0; width: 100%; height: 100%; }
.emblem .pc-red   { animation: pcInRed   .9s .35s cubic-bezier(.2,.9,.25,1.15) both; }
.emblem .pc-blue  { animation: pcInBlue  .9s .55s cubic-bezier(.2,.9,.25,1.15) both; }
.emblem .pc-green { animation: pcInGreen .9s .75s cubic-bezier(.2,.9,.25,1.15) both; }
@keyframes pcInRed   { 0% { opacity: 0; transform: translate(160%,-190%) rotate(35deg) scale(1.6); } 100% { opacity: 1; transform: none; } }
@keyframes pcInBlue  { 0% { opacity: 0; transform: translate(-190%,180%) rotate(-30deg) scale(1.6); } 100% { opacity: 1; transform: none; } }
@keyframes pcInGreen { 0% { opacity: 0; transform: translate(200%,160%) rotate(25deg) scale(1.6); } 100% { opacity: 1; transform: none; } }
@keyframes logoGlow { 0%,100% { filter: drop-shadow(0 0 8px rgba(255,255,255,.25)); } 50% { filter: drop-shadow(0 0 28px rgba(46,155,255,.95)); } }
@keyframes haloBreath { 0%,100% { transform: scale(.9); opacity: .6; } 50% { transform: scale(1.15); opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- TEKS ---------- */
.shine {
    background: linear-gradient(110deg, #fff 38%, #8FD3FF 46%, #C9E64A 50%, #FF7A88 54%, #fff 62%); background-size: 300% 100%;
    -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 0 20px rgba(46,155,255,.55));
    animation: shineMove 4s 1.5s linear infinite;
}
@keyframes shineMove { from { background-position: 100% 0; } to { background-position: -200% 0; } }
.tri-line { height: 5px; border-radius: 6px; background: linear-gradient(90deg, var(--red), var(--blue-n), var(--green)); box-shadow: 0 0 18px rgba(46,155,255,.8); animation: lineGrow 1s 1.1s cubic-bezier(.2,.9,.3,1) both; }
@keyframes lineGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- KOMPONEN ---------- */
.glass {
    background: var(--glass); border: 1.5px solid var(--glass-border); border-radius: 26px;
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 24px 60px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.18);
}
.btn-neon {
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px;
    padding: 18px 34px; border-radius: 16px; white-space: nowrap;
    font-size: 20px; font-weight: 700; letter-spacing: 2px; color: #fff;
    background: linear-gradient(100deg, #C8102E 0%, #FF3D55 50%, #C8102E 100%); background-size: 200% 100%;
    box-shadow: 0 0 0 2px rgba(255,120,140,.5), 0 0 30px rgba(237,28,46,.5), 0 14px 30px rgba(0,0,0,.4);
    animation: btnFlow 3s linear infinite; overflow: hidden; transition: transform .12s, filter .2s;
}
.btn-neon::after { content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent); transform: skewX(-20deg); animation: btnShine 3.2s ease-in-out infinite; }
.btn-neon:active { transform: scale(.96); filter: brightness(.9); }
.btn-neon[disabled] { filter: grayscale(.6) brightness(.7); cursor: wait; }
@keyframes btnFlow { to { background-position: -200% 0; } }
@keyframes btnShine { 0%,55% { left: -60%; } 100% { left: 130%; } }
.btn-glass {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 16px 28px; border-radius: 16px; font-size: 18px; font-weight: 700; letter-spacing: 2px;
    background: rgba(255,255,255,.08); border: 1.5px solid rgba(255,255,255,.22); transition: background .2s;
}
.btn-glass:hover { background: rgba(255,255,255,.16); }

/* ---------- PERCIKAN ---------- */
.sparkle { position: fixed; width: 12px; height: 12px; border-radius: 50%; pointer-events: none; z-index: 200; box-shadow: 0 0 14px currentColor, 0 0 4px #fff; animation: sparkFly .8s cubic-bezier(.1,.8,.3,1) forwards; }
@keyframes sparkFly { 0% { transform: translate(0,0) scale(1.2); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; } }
.burst-ring { position: fixed; width: 40px; height: 40px; border-radius: 50%; border: 4px solid #fff; pointer-events: none; z-index: 200; box-shadow: 0 0 24px var(--blue-n); animation: ringOut .7s ease-out forwards; }
@keyframes ringOut { 0% { transform: scale(.3); opacity: 1; } 100% { transform: scale(5); opacity: 0; } }
#burstCanvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 150; }

@media (prefers-reduced-motion: reduce) {
    .gl, .sk, .grid-plane, .emblem .h1, .emblem .h2, .emblem .h3, .shine, .btn-neon, .btn-neon::after { animation: none !important; }
}
