*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  height: 100%;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
}

body {
  font-family: 'Inter', sans-serif;
  height: 100dvh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  scroll-snap-align: start;
  background: url('bg.jpg') center center / cover no-repeat;
}

/* ── Forest ambient blobs — twilight light patches ── */
.blob {
  position: absolute; border-radius: 50%;
  filter: blur(100px); pointer-events: none; opacity: 0.45;
  animation: drift 12s ease-in-out infinite;
}
.blob-1 { background: #4ade80; width: 480px; height: 480px; top: -10%; left: -8%; animation-duration: 10s; }
.blob-2 { background: #fbbf24; width: 320px; height: 320px; top: 10%; right: -5%; opacity: 0.25; animation-duration: 14s; animation-delay: -4s; }
.blob-3 { background: #34d399; width: 400px; height: 400px; bottom: -15%; left: 30%; animation-duration: 11s; animation-delay: -7s; }
.blob-4 { background: #7dd3fc; width: 250px; height: 250px; top: 50%; left: -5%; opacity: 0.2; animation-duration: 16s; animation-delay: -2s; }

@keyframes drift {
  0%,100% { transform: translate(0,0) scale(1); }
  33%      { transform: translate(20px,-20px) scale(1.04); }
  66%      { transform: translate(-14px,16px) scale(0.97); }
}

/* ── Firefly canvas fills entire bg ── */
#fireflies {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ── Polaris Star ── */
.polaris {
  position: fixed; top: 28px; right: 32px;
  width: 52px; height: 52px; z-index: 20;
  filter: drop-shadow(0 0 12px rgba(251,191,36,0.8));
  animation: star-pulse 4s ease-in-out infinite;
}
@keyframes star-pulse {
  0%,100% { opacity: 0.75; transform: scale(1) rotate(0deg);    filter: drop-shadow(0 0 10px rgba(251,191,36,0.7)); }
  50%      { opacity: 1;    transform: scale(1.1) rotate(10deg); filter: drop-shadow(0 0 22px rgba(251,191,36,1));   }
}

/* ══════════════════════════════════
   FOREST LIQUID GLASS — Main card
   ══════════════════════════════════ */
.card {
  position: relative; z-index: 10;
  width: 100%; max-width: 440px; margin: 1rem;
  padding: 2.25rem 2rem;
  border-radius: 32px;
  overflow: hidden;

  background: rgba(255, 255, 255, 0);
  backdrop-filter: blur(6px) saturate(110%);
  -webkit-backdrop-filter: blur(6px) saturate(110%);

  border: 0.5px solid rgba(255, 255, 255, 0.5);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 1),
    inset 1px 0 0 rgba(200, 210, 255, 0.25),
    inset -1px 0 0 rgba(200, 210, 255, 0.25),
    inset 0 -1px 0 rgba(255, 255, 255, 0.15),
    0 0 0 0.5px rgba(160, 180, 255, 0.18),
    0 28px 72px rgba(0, 0, 0, 0.35),
    0 4px 16px rgba(0, 20, 60, 0.2);

  animation: rise 0.9s cubic-bezier(.22,1,.36,1);
}

/* Static lens overlay */
.card::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit; pointer-events: none; z-index: 0;
  background: linear-gradient(
    165deg,
    rgba(255,255,255,0.22) 0%,
    rgba(200,210,255,0.06) 30%,
    rgba(240,200,255,0.03) 60%,
    rgba(255,255,255,0.08) 100%
  );
}

/* Spotlight */
.card::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit; pointer-events: none; z-index: 1;
  background: radial-gradient(
    500px circle at var(--mx, 50%) var(--my, 50%),
    rgba(255, 255, 255, 0.18),
    rgba(200, 210, 255, 0.06) 45%,
    transparent 65%
  );
  opacity: 0; transition: opacity 0.35s ease;
}
.card:hover::after { opacity: 1; }
.card > * { position: relative; z-index: 2; }

@keyframes rise {
  from { opacity: 0; transform: translateY(28px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Typography ── */
.title {
  font-family: 'Pacifico', cursive;
  font-size: 2.2rem; font-weight: 400; text-align: center;
  letter-spacing: 0.01em; margin-bottom: 0.4rem;
  display: flex; align-items: center; justify-content: center; gap: 0.45rem;
  background: linear-gradient(135deg, #ffffff 0%, #fde68a 45%, #a3e635 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.6));
}
.title-star {
  width: 1.7rem; height: 1.7rem; flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(251,191,36,0.9));
  animation: star-pulse 3s ease-in-out infinite;
}
.subtitle {
  color: rgba(255, 255, 255, 0.92); font-size: 0.78rem; text-align: center;
  font-weight: 300; letter-spacing: 0.04em; font-style: italic;
  text-shadow: 0 1px 6px rgba(0,0,0,0.8);
}

/* ── Divider ── */
.divider {
  height: 0.5px; margin: 1.5rem 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
}

/* ── Progress ── */
.progress-header { display: flex; justify-content: space-between; margin-bottom: 0.6rem; }
.progress-label  { color: rgba(255,255,255,0.9); font-size: 0.6rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; text-shadow: 0 1px 4px rgba(0,0,0,0.7); }
.progress-value  { color: #fde68a; font-size: 0.68rem; font-weight: 700; text-shadow: 0 1px 4px rgba(0,0,0,0.7); }

.progress-track {
  height: 10px; border-radius: 99px; overflow: hidden;
  background: rgba(255,255,255,0.12);
  border: 0.5px solid rgba(255,255,255,0.2);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}
.progress-fill {
  position: relative; height: 100%; width: 0; border-radius: 99px;
  background: linear-gradient(90deg, #fbbf24, #a3e635, #4ade80);
  box-shadow: 0 0 12px rgba(163,230,53,0.6), 0 0 24px rgba(251,191,36,0.3);
  animation: fill-bar 1.4s cubic-bezier(.22,1,.36,1) 0.5s forwards;
  overflow: hidden;
}
.progress-fill::after {
  content: '';
  position: absolute; top: 0; left: 0; height: 100%; width: 60%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent);
  animation: shimmer-run 1.6s ease-in-out infinite;
}
@keyframes fill-bar { to { width: 85%; } }
@keyframes shimmer-run {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(260%); }
}

/* ── Form ── */
.form-hint { color: rgba(255,255,255,0.88); font-size: 0.7rem; text-align: center; margin-bottom: 0.85rem; font-style: italic; text-shadow: 0 1px 4px rgba(0,0,0,0.7); }
.form { display: flex; flex-direction: column; gap: 0.5rem; }

.email-input {
  width: 100%; padding: 0.72rem 1rem; border-radius: 14px;
  font-size: 0.84rem; font-family: inherit; color: #ffffff;
  background: rgba(10,40,15,0.45);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 0.5px solid rgba(163,230,53,0.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), inset 0 1px 4px rgba(0,0,0,0.2);
  transition: all 0.25s;
}
.email-input::placeholder { color: rgba(255,255,255,0.45); }
.email-input:focus {
  outline: none;
  background: rgba(10,40,15,0.6);
  border-color: rgba(163,230,53,0.65);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 0 0 3px rgba(163,230,53,0.18);
}

.cta-btn {
  position: relative; overflow: hidden; cursor: pointer; border: none;
  border-radius: 14px; padding: 0.82rem 1rem;
  font-size: 0.84rem; font-weight: 600; font-family: inherit;
  color: #fff; letter-spacing: 0.02em;
  background: linear-gradient(135deg, #15803d 0%, #16a34a 50%, #4ade80 100%);
  border: 0.5px solid rgba(255,255,255,0.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 4px 16px rgba(22,163,74,0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-shimmer {
  position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s; pointer-events: none;
}
.cta-btn:hover .btn-shimmer { left: 100%; }
.cta-btn:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 8px 24px rgba(74,222,128,0.45); }
.cta-btn:active { transform: translateY(0); }
.cta-btn.success { background: linear-gradient(135deg, #4ade80, #16a34a); color: #fff; }

/* ── Music player ── */
.player-pill {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: 18px; overflow: hidden; position: relative;
  background: rgba(0,0,0,0.28);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 0.5px solid rgba(255,255,255,0.2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 4px 14px rgba(0,0,0,0.35);
}
.player-pill::before {
  content: '';
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(160deg, rgba(180,160,255,0.06) 0%, transparent 50%);
}
.player-art {
  flex-shrink: 0; position: relative; z-index: 1;
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, #3730a3, #6d28d9, #7c3aed);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.15);
}
.player-info { flex: 1; min-width: 0; position: relative; z-index: 1; }
.player-tag   { display: block; font-size: 0.52rem; font-weight: 600; letter-spacing: 0.14em; color: rgba(253,230,138,0.8); text-transform: uppercase; text-shadow: 0 1px 4px rgba(0,0,0,0.6); }
.player-title { display: block; font-size: 0.78rem; font-weight: 500; color: rgba(255,255,255,0.9); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-style: italic; text-shadow: 0 1px 4px rgba(0,0,0,0.6); }

.player-btn {
  flex-shrink: 0; position: relative; z-index: 1;
  width: 32px; height: 32px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(0,0,0,0.3);
  border: 0.5px solid rgba(255,255,255,0.3);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
  color: #fde68a;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.player-btn:hover { background: rgba(0,0,0,0.45); transform: scale(1.08); }

/* ── Social icons ── */
.social-row { display: flex; justify-content: center; gap: 0.8rem; margin-bottom: 1.2rem; }
.social-btn {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; text-decoration: none;
  color: rgba(255,255,255,0.75);
  background: rgba(0,0,0,0.25);
  border: 0.5px solid rgba(255,255,255,0.25);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15);
  transition: all 0.25s;
}
.social-btn:hover {
  color: #fde68a;
  background: rgba(0,0,0,0.4);
  border-color: rgba(253,230,138,0.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 6px 16px rgba(0,0,0,0.3);
  transform: translateY(-2px) scale(1.06);
}

/* ── Copyright ── */
.copyright { color: rgba(255,255,255,0.6); font-size: 0.62rem; text-align: center; letter-spacing: 0.03em; text-shadow: 0 1px 4px rgba(0,0,0,0.7); }

@media (max-width: 540px) {
  .card { padding: 1.5rem 1.25rem; border-radius: 24px; max-height: calc(100dvh - 2rem); overflow-y: auto; scrollbar-width: none; }
  .card::-webkit-scrollbar { display: none; }
  .title { font-size: 1.75rem; }
  .polaris { top: 16px; right: 16px; width: 38px; height: 38px; }
  .divider { margin: 1.1rem 0; }
}
