:root {
  --bg-0: #05060a;
  --bg-1: #0c1020;
  --ink: #f4f6ff;
  --muted: rgba(244, 246, 255, 0.62);
  --gold: #ffd56a;
  --cyan: #3ef0d4;
  --magenta: #ff4d9d;
  --glass: rgba(255, 255, 255, 0.06);
  --stroke: rgba(255, 255, 255, 0.12);
  --glow-gold: 0 0 40px rgba(255, 213, 106, 0.35);
  --font-display: "Bebas Neue", Impact, sans-serif;
  --font-body: "Outfit", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg-0);
  overflow-x: hidden;
  min-height: 100dvh;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 50% -10%, rgba(62, 240, 212, 0.16), transparent 55%),
    radial-gradient(900px 600px at 85% 20%, rgba(255, 77, 157, 0.18), transparent 50%),
    radial-gradient(800px 500px at 10% 80%, rgba(255, 213, 106, 0.12), transparent 45%),
    linear-gradient(180deg, var(--bg-1), var(--bg-0) 55%, #020308);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  animation: drift 14s ease-in-out infinite;
}

.orb-a {
  width: 42vw;
  height: 42vw;
  max-width: 520px;
  max-height: 520px;
  left: -8%;
  top: 18%;
  background: rgba(62, 240, 212, 0.35);
}

.orb-b {
  width: 36vw;
  height: 36vw;
  max-width: 460px;
  max-height: 460px;
  right: -6%;
  top: 8%;
  background: rgba(255, 77, 157, 0.32);
  animation-delay: -4s;
}

.orb-c {
  width: 30vw;
  height: 30vw;
  max-width: 380px;
  max-height: 380px;
  left: 35%;
  bottom: -10%;
  background: rgba(255, 213, 106, 0.22);
  animation-delay: -8s;
}

.grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
  opacity: 0.5;
}

#confetti {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.stage {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.85rem;
  padding: 2.5rem 1.25rem 3rem;
  text-align: center;
}

.eyebrow {
  margin: 0;
  font-size: clamp(0.72rem, 1.6vw, 0.85rem);
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cyan);
  animation: fadeUp 0.9s ease both;
}

.brand {
  margin: 0;
  line-height: 0.85;
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.04em;
  font-size: clamp(7rem, 28vw, 14rem);
  background: linear-gradient(120deg, #fff 10%, var(--gold) 45%, var(--cyan) 75%, #fff 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 0 28px rgba(255, 213, 106, 0.25));
  animation: fadeUp 1s ease both, shimmer 6s linear infinite;
}

.brand-unit {
  color: transparent;
  opacity: 0.92;
}

.tagline {
  margin: 0.15rem 0 1.4rem;
  max-width: 28rem;
  font-size: clamp(1rem, 2.4vw, 1.25rem);
  font-weight: 300;
  color: var(--muted);
  animation: fadeUp 1.1s ease both;
}

.clock {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(0.35rem, 1.5vw, 0.85rem);
  padding: 1.35rem 1.5rem 1.2rem;
  border: 1px solid var(--stroke);
  border-radius: 1.4rem;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(18px);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  animation: fadeUp 1.2s ease both, pulseGlow 3.5s ease-in-out infinite;
}

.unit {
  min-width: clamp(3.6rem, 12vw, 6.2rem);
  display: grid;
  gap: 0.35rem;
}

.digits {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 11vw, 5.4rem);
  line-height: 0.9;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-shadow: 0 0 24px rgba(62, 240, 212, 0.25);
  font-variant-numeric: tabular-nums;
}

.digits-ms {
  font-size: clamp(1.7rem, 6vw, 2.8rem);
  color: var(--gold);
  min-width: 2.2ch;
}

.unit-ms {
  min-width: clamp(2.4rem, 7vw, 3.6rem);
  align-self: flex-end;
  padding-bottom: 0.15rem;
}

.label {
  font-size: clamp(0.62rem, 1.5vw, 0.75rem);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.sep {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 9vw, 4.2rem);
  line-height: 0.9;
  color: rgba(255, 255, 255, 0.35);
  padding-bottom: 1.35rem;
  animation: blink 1.2s steps(1) infinite;
}

.sep-ms {
  font-size: clamp(1.4rem, 5vw, 2.2rem);
  padding-bottom: 1.55rem;
  color: rgba(255, 213, 106, 0.45);
  animation: none;
}

.meta {
  margin: 1.1rem 0 0;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: rgba(244, 246, 255, 0.45);
  animation: fadeUp 1.35s ease both;
}

.celebrate {
  margin-top: 1.5rem;
  padding: 1.25rem 1.75rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 213, 106, 0.35);
  background: rgba(255, 213, 106, 0.08);
  box-shadow: var(--glow-gold);
  animation: popIn 0.7s cubic-bezier(0.2, 0.9, 0.2, 1.2) both;
}

.celebrate-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 8vw, 4rem);
  letter-spacing: 0.12em;
  color: var(--gold);
}

.celebrate-sub {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-weight: 300;
}

body.done .tagline {
  color: var(--gold);
}

body.done .clock {
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.45),
    0 0 50px rgba(255, 213, 106, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

body.done .digits {
  color: var(--gold);
  text-shadow: 0 0 30px rgba(255, 213, 106, 0.45);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(3%, -4%) scale(1.08);
  }
}

@keyframes blink {
  50% {
    opacity: 0.25;
  }
}

@keyframes pulseGlow {
  0%,
  100% {
    box-shadow:
      0 20px 60px rgba(0, 0, 0, 0.45),
      inset 0 1px 0 rgba(255, 255, 255, 0.12);
  }
  50% {
    box-shadow:
      0 20px 60px rgba(0, 0, 0, 0.45),
      0 0 40px rgba(62, 240, 212, 0.18),
      inset 0 1px 0 rgba(255, 255, 255, 0.12);
  }
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@media (max-width: 520px) {
  .clock {
    flex-wrap: wrap;
    max-width: 22rem;
    gap: 0.4rem 0.55rem;
  }

  .sep {
    display: none;
  }

  .unit {
    min-width: 4.6rem;
  }

  .unit-ms {
    width: 100%;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
