/* Reset & base */
.header {
  width: 100%;
  padding: 15px 0;
  background: linear-gradient(90deg, #0a1a2f, #071b36);
  /* box-shadow: 0 0 40px rgba(0, 180, 255, 0.15) inset; */
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* Kontainer untuk menata logo di tengah */
.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px; /* jarak antar logo */
}

/* Logo */
.header-logo {
  height: 50px; /* semua logo ukurannya sama */
  width: auto;
  /* filter: brightness(1.15) drop-shadow(0 0 8px rgba(0, 200, 255, 0.4)); */
  transition: 0.3s ease;
}

/* Efek hover */
.header-logo:hover {
  transform: scale(1.05);
  filter: brightness(1.3) drop-shadow(0 0 20px rgba(100, 240, 255, 0.8));
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: #ffffff;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px circle at 50% 30%, #0b1c3a 0%, #09152b 40%, #050c19 100%);
  overflow: hidden;
}

#fxCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1; /* di belakang UI utama */
}

.stage {
  position: relative;
  z-index: 2;
  width: 100vw;
  height: 80vh;
  display: grid;
  place-items: center;
  padding: 4vw;
  text-align: center;
}

.headline {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 2.5vw, 3rem);
  letter-spacing: 0.02em;
  text-shadow: 0 8px 28px rgba(0,0,0,0.45);
}
.subtitle {
  margin: 0 0 2rem;
  opacity: 0.8;
  font-size: clamp(1rem, 1.6vw, 1.5rem);
}

/* Tombol utama */
.launch-button {
  --size: min(40vmin, 500px);
  position: relative;
  /* Oval: lebar > tinggi */
  width: calc(var(--size) * 1.8);
  height: calc(var(--size) * 0.9);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  background: radial-gradient(120% 120% at 20% 20%, #1b4cff 0%, #6b9aff 40%, #0f2f75 100%);
  box-shadow:
    0 50px 80px rgba(0, 0, 0, 0.5),
    0 0 0 12px rgba(27, 76, 255, 0.25) inset,
    0 -12px 18px rgba(255,255,255,0.1) inset;
  color: #fff;
  display: grid;
  place-items: center;
  transition: transform 0.4s cubic-bezier(.2,.8,.2,1), filter 0.4s ease;
  animation: pulse 2.4s ease-in-out infinite;
}

.launch-button::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: inherit;
  background: conic-gradient(from 180deg at 50% 50%, #6b9aff, #a4c6ff, #6b9aff);
  filter: blur(18px) saturate(140%);
  opacity: 0.6;
}

.launch-button .label {
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.launch-button:hover { transform: translateY(-2px) scale(1.02); }
.launch-button:active { transform: translateY(1px) scale(0.99); }
.launch-button:focus-visible { outline: 4px solid rgba(164, 198, 255, 0.6); }

@keyframes pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.25); }
}

/* Saat diluncurkan */
.launch-button.launched {
  animation: none;
  transform: scale(1.08);
  background: radial-gradient(120% 120% at 20% 20%, #16d18f 0%, #5ef1c0 40%, #11785b 100%);
}

/* Overlay sukses */
.overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  /* Overlay opak selama countdown agar latar tidak transparan */
  background: #000000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease, background 1s ease;
  z-index: 3;
}
.overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.overlay .overlay-content {
  opacity: 0;
  transform: translateY(16px);
}
.overlay.show-message .overlay-content {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.overlay-content {
  position: relative;
  padding: clamp(16px, 3vw, 40px);
  border-radius: 24px;
  backdrop-filter: blur(10px) saturate(140%);
  background: linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.04));
  box-shadow: 0 40px 80px rgba(0,0,0,0.5);
  text-align: center;
}
.overlay-content h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 3vw, 3rem);
}
.overlay-content p {
  margin: 0;
  opacity: 0.8;
  font-size: clamp(1rem, 1.6vw, 1.4rem);
}
@keyframes rise {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.burst {
  position: absolute;
  inset: -20%;
  border-radius: 24px;
  background: radial-gradient(800px circle at 50% 50%, rgba(255,255,255,0.15), transparent 60%);
  pointer-events: none;
  z-index: 1;
}

/* Countdown besar di tengah */
.countdown {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: clamp(3rem, 14vw, 20rem);
  letter-spacing: -0.02em;
  color: #ffffff;
  text-shadow: 0 0 18px rgba(255,255,255,0.35), 0 0 60px rgba(91, 169, 255, 0.45);
  animation: pulseGlow 1s ease-in-out infinite;
}
.overlay.show-message .countdown { display: none; }

@keyframes pulseGlow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.4); }
}

/* Efek fade + glow pada halaman selama countdown */
body.prelaunch .stage {
  opacity: 0.7;
  filter: blur(1.5px) brightness(1.15) saturate(1.1);
  transition: opacity 0.6s ease, filter 0.6s ease;
}
body.prelaunch::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  background: radial-gradient(700px circle at 50% 50%, rgba(120, 180, 255, 0.12), transparent 60%),
              radial-gradient(900px circle at 50% 40%, rgba(22, 209, 143, 0.08), transparent 70%);
  pointer-events: none;
}

/* Aksesibilitas: kurangi animasi bila preferensi reduce motion aktif */
@media (prefers-reduced-motion: reduce) {
  .launch-button { animation: none; }
  .overlay-content { animation: none; }
  .launch-button, .overlay { transition: none; }
}
/* Sembunyikan UI utama saat peluncuran resmi */
body.launched-phase .stage {
  opacity: 0;
  pointer-events: none;
  filter: blur(2px) brightness(0.9);
  transition: opacity 0.6s ease, filter 0.6s ease;
}
/* Gradien berbeda untuk setiap langkah countdown */
.overlay.gradient-5 { background: radial-gradient(1200px circle at 50% 50%, #0f2027 0%, #203a43 50%, #2c5364 100%); }
.overlay.gradient-4 { background: radial-gradient(1200px circle at 50% 50%, #ff512f 0%, #dd2476 100%); }
.overlay.gradient-3 { background: radial-gradient(1200px circle at 50% 50%, #11998e 0%, #38ef7d 100%); }
.overlay.gradient-2 { background: radial-gradient(1200px circle at 50% 50%, #7F00FF 0%, #E100FF 100%); }
.overlay.gradient-1 { background: radial-gradient(1200px circle at 50% 50%, #f7971e 0%, #ffd200 100%); }
.overlay.gradient-final { background: radial-gradient(1400px circle at 50% 50%, #1ce3a8 0%, #128865 40%, #052d24 100%);}
/* Logo aplikasi */
.app-logo {
  width: clamp(240px, 18vmin, 240px);
  height: auto;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.8s ease, transform 0.8s ease;
  margin-bottom: clamp(12px, 2vmin, 24px);
  filter: drop-shadow(0 12px 30px rgba(0,0,0,0.45));
  position: relative;
  z-index: 2;
}
.overlay.logo-visible .app-logo {
  opacity: 1;
  transform: scale(1);
}
/* Sparkling background overlay */
.overlay.sparkling::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.9;
  background-image:
    radial-gradient(2px 2px at 8% 12%, rgba(255,255,255,0.95), rgba(255,255,255,0)),
    radial-gradient(1.8px 1.8px at 18% 78%, rgba(255,215,0,0.9), rgba(255,215,0,0)),
    radial-gradient(1.6px 1.6px at 28% 38%, rgba(173,216,230,0.9), rgba(173,216,230,0)),
    radial-gradient(2px 2px at 42% 16%, rgba(255,255,255,0.9), rgba(255,255,255,0)),
    radial-gradient(1.7px 1.7px at 56% 66%, rgba(255,105,180,0.85), rgba(255,105,180,0)),
    radial-gradient(1.6px 1.6px at 72% 22%, rgba(255,255,255,0.9), rgba(255,255,255,0)),
    radial-gradient(1.8px 1.8px at 84% 58%, rgba(255,215,0,0.9), rgba(255,215,0,0)),
    radial-gradient(1.5px 1.5px at 92% 32%, rgba(173,216,230,0.85), rgba(173,216,230,0)),
    radial-gradient(1.6px 1.6px at 14% 54%, rgba(255,255,255,0.9), rgba(255,255,255,0)),
    radial-gradient(1.7px 1.7px at 36% 86%, rgba(255,105,180,0.85), rgba(255,105,180,0));
  background-repeat: no-repeat;
  animation: twinkle 3.5s ease-in-out infinite alternate, drift 28s linear infinite;
}

.overlay .overlay-content { position: relative; z-index: 1; }
.overlay .burst { position: relative; z-index: 1; }
.overlay .app-logo { position: relative; z-index: 2; }

@keyframes twinkle {
  0% { filter: brightness(0.7) contrast(0.9); }
  50% { filter: brightness(1.25) contrast(1.05); }
  100% { filter: brightness(0.95) contrast(1); }
}

@keyframes drift {
  0% {
    background-position:
      0px 0px, 0px 0px, 0px 0px, 0px 0px, 0px 0px,
      0px 0px, 0px 0px, 0px 0px, 0px 0px, 0px 0px;
  }
  100% {
    background-position:
      6px -4px, -5px 3px, 4px 6px, -6px -5px, 5px -3px,
      -4px 5px, 7px 2px, -3px -6px, 5px 4px, -6px 3px;
  }
}
