* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --gold: #f5d78e;
  --gold-soft: #e8c979;
  --ink: #eef2ff;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  background: radial-gradient(ellipse at 50% 30%, #182247 0%, #0b1029 45%, #05060f 100%);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: relative;
}

#stars, #fireworks {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#fireworks { pointer-events: none; z-index: 2; }

.wrap {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 2rem;
  animation: rise 1.4s ease both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.eyebrow {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1rem, 2.6vw, 1.6rem);
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: rgba(238, 242, 255, 0.65);
  margin-bottom: 0.4rem;
}

.year {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: clamp(3.6rem, 13vw, 9rem);
  line-height: 1;
  letter-spacing: 0.06em;
  background: linear-gradient(180deg, #fff8e6 0%, var(--gold) 55%, #b98f3c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 60px rgba(245, 215, 142, 0.25);
  margin-bottom: 2.4rem;
}

.timer {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(0.4rem, 1.6vw, 1.4rem);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
}

.digit-box {
  position: relative;
  min-width: clamp(3.6rem, 15vw, 8rem);
  padding: clamp(0.6rem, 1.8vw, 1.2rem) clamp(0.4rem, 1.4vw, 1rem);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(255,255,255,0.09), rgba(255,255,255,0.02));
  border: 1px solid rgba(245, 215, 142, 0.18);
  box-shadow: 0 20px 50px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.08);
  backdrop-filter: blur(6px);
}

.digit {
  display: block;
  font-size: clamp(2.4rem, 9vw, 5.6rem);
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 0 24px rgba(245, 215, 142, 0.35);
}

.digit.flip {
  animation: flip 0.5s ease;
}

@keyframes flip {
  0%   { transform: translateY(0);   opacity: 1; }
  45%  { transform: translateY(-40%) scale(0.96); opacity: 0; }
  55%  { transform: translateY(40%)  scale(0.96); opacity: 0; }
  100% { transform: translateY(0);   opacity: 1; }
}

.label {
  font-size: clamp(0.6rem, 1.5vw, 0.85rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(238, 242, 255, 0.55);
}

.sep {
  font-size: clamp(2rem, 7vw, 4.4rem);
  font-weight: 300;
  color: var(--gold-soft);
  align-self: flex-start;
  margin-top: clamp(0.4rem, 1.4vw, 1rem);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* Celebration */
.celebrate {
  display: none;
  animation: rise 1s ease both;
}

.happy {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: clamp(2.8rem, 11vw, 7rem);
  line-height: 1.05;
  background: linear-gradient(180deg, #fff8e6, var(--gold), #cf9d47);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 70px rgba(245, 215, 142, 0.4);
}

.wish {
  margin-top: 1.2rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.1rem, 3vw, 1.7rem);
  color: rgba(238, 242, 255, 0.8);
  letter-spacing: 0.04em;
  max-width: 30ch;
  margin-left: auto;
  margin-right: auto;
}

body.done .timer,
body.done .eyebrow,
body.done .year {
  display: none;
}

body.done .celebrate {
  display: block;
}
