* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: #ffffff;
}

.card {
  text-align: center;
  padding: 3rem 2rem;
  max-width: 42rem;
}

h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  margin: 0 0 1rem;
}

p {
  font-size: 1.15rem;
  opacity: 0.9;
}

.countdown-label {
  margin-bottom: 0.25rem;
}

.countdown {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* Waiting page: night neon theme, drifting stars */
#stars-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

body.waiting {
  background: radial-gradient(ellipse at 50% 40%, #1a0b2e 0%, #05010f 70%);
  color: #e8f6ff;
  overflow: hidden;
}

body.waiting::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.03) 0,
    rgba(255, 255, 255, 0.03) 1px,
    transparent 1px,
    transparent 4px
  );
}

body.waiting .card {
  position: relative;
  z-index: 1;
  background: rgba(5, 1, 15, 0.55);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 12px;
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.15),
    inset 0 0 30px rgba(0, 240, 255, 0.05);
  backdrop-filter: blur(4px);
}

body.waiting h1 {
  background: linear-gradient(90deg, #00f0ff, #b967ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 12px rgba(0, 240, 255, 0.45));
}

body.waiting .countdown {
  color: #00f0ff;
  animation: neon-pulse 2s ease-in-out infinite;
}

/* Group page (26/11): cyberpunk Rubik's cube theme */
body.group {
  background: radial-gradient(ellipse at 50% 40%, #1a0b2e 0%, #05010f 70%);
  color: #e8f6ff;
  overflow: hidden;
}

#rubiks-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

body.group::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.03) 0,
    rgba(255, 255, 255, 0.03) 1px,
    transparent 1px,
    transparent 4px
  );
}

body.group .card {
  position: relative;
  z-index: 1;
  background: rgba(5, 1, 15, 0.55);
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: 12px;
  box-shadow: 0 0 40px rgba(255, 42, 109, 0.25),
    inset 0 0 30px rgba(0, 240, 255, 0.08);
  backdrop-filter: blur(4px);
}

body.group h1 {
  background: linear-gradient(90deg, #00f0ff, #ff2a6d, #f9f871);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 14px rgba(0, 240, 255, 0.55));
}

body.group .countdown {
  font-size: 3rem;
  color: #00f0ff;
  animation: neon-pulse 2s ease-in-out infinite;
}

body.group .teaser {
  font-size: 1rem;
  max-width: 34rem;
  margin: 1.25rem auto 0;
  opacity: 0.85;
}

/* Closed page: closed for the night, same neon universe, dimmed */
body.closed {
  background: radial-gradient(ellipse at 50% 40%, #120924 0%, #030109 75%);
  color: #b9c4d0;
  overflow: hidden;
}

body.closed .card {
  position: relative;
  z-index: 1;
  background: rgba(3, 1, 9, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.08),
    inset 0 0 30px rgba(148, 163, 184, 0.04);
  backdrop-filter: blur(4px);
}

body.closed h1 {
  background: linear-gradient(90deg, #6b7b9a, #00f0ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.3));
}

body.closed p {
  opacity: 0.7;
}

/* Birthday page (27/11): joyful fireworks theme */
#fireworks-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

body.birthday {
  background:
    radial-gradient(1px 1px at 8% 18%, rgba(255, 255, 255, 0.9), transparent 60%),
    radial-gradient(1px 1px at 22% 64%, rgba(255, 255, 255, 0.7), transparent 60%),
    radial-gradient(1.5px 1.5px at 34% 12%, rgba(255, 255, 255, 0.8), transparent 60%),
    radial-gradient(1px 1px at 55% 78%, rgba(255, 255, 255, 0.6), transparent 60%),
    radial-gradient(1px 1px at 74% 30%, rgba(255, 255, 255, 0.8), transparent 60%),
    radial-gradient(1.5px 1.5px at 88% 68%, rgba(255, 255, 255, 0.7), transparent 60%),
    radial-gradient(1px 1px at 93% 10%, rgba(255, 255, 255, 0.6), transparent 60%),
    linear-gradient(180deg, #0d0333 0%, #2c0a4d 50%, #52104e 100%);
  color: #ffffff;
  overflow: hidden;
}

body.birthday .card {
  position: relative;
  z-index: 1;
  background: rgba(13, 3, 51, 0.45);
  border: 1px solid rgba(255, 209, 102, 0.55);
  border-radius: 12px;
  backdrop-filter: blur(4px);
  box-shadow: 0 0 50px rgba(255, 93, 162, 0.3),
    inset 0 0 30px rgba(255, 209, 102, 0.08);
}

body.birthday h1 {
  font-size: 3.2rem;
  background: linear-gradient(90deg, #ffd166, #ff5da2, #7bf1ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: birthday-glow 2.4s ease-in-out infinite;
}

@keyframes birthday-glow {
  0%,
  100% {
    filter: drop-shadow(0 0 14px rgba(255, 209, 102, 0.7));
  }
  50% {
    filter: drop-shadow(0 0 28px rgba(255, 93, 162, 0.9));
  }
}

@keyframes neon-pulse {
  0%,
  100% {
    text-shadow: 0 0 18px rgba(0, 240, 255, 0.8),
      0 0 40px rgba(0, 240, 255, 0.4);
  }
  50% {
    text-shadow: 0 0 28px rgba(255, 42, 109, 0.9),
      0 0 60px rgba(255, 42, 109, 0.5);
  }
}
