:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17243b;
  background: #f7f5ef;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  --ink: #17243b;
  --muted: #788093;
  --blue: #324fe1;
  --coral: #ff765e;
  --paper: #fffefa;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  background-color: #f7f5ef;
  background-image:
    radial-gradient(ellipse at 8% 12%, rgba(255, 118, 94, 0.13), transparent 30rem),
    radial-gradient(ellipse at 92% 84%, rgba(50, 79, 225, 0.11), transparent 34rem);
}

body::before {
  content: '';
  position: fixed;
  z-index: -1;
  inset: 0;
  opacity: 0.19;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
}

#root {
  flex: 1;
  width: 100%;
  display: grid;
  place-items: center;
  padding: clamp(2.5rem, 7vw, 6rem) 1.25rem;
}

.container {
  width: min(100%, 980px);
  position: relative;
  padding: clamp(2rem, 7vw, 5.5rem) clamp(1.25rem, 6vw, 5rem);
  overflow: hidden;
  border: 1px solid rgba(23, 36, 59, 0.08);
  border-radius: 1.5rem;
  background: rgba(255, 254, 250, 0.83);
  box-shadow:
    0 2rem 5rem rgba(39, 49, 74, 0.08),
    0 0.3rem 1rem rgba(39, 49, 74, 0.035);
  text-align: center;
  animation: card-arrive 700ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.container::before,
.container::after {
  content: '';
  position: absolute;
  width: 13rem;
  height: 13rem;
  border: 1px solid rgba(50, 79, 225, 0.1);
  border-radius: 50%;
  pointer-events: none;
}

.container::before {
  top: -9rem;
  right: -4rem;
  box-shadow: 0 0 0 1.5rem rgba(50, 79, 225, 0.025), 0 0 0 3rem rgba(50, 79, 225, 0.02);
}

.container::after {
  bottom: -10rem;
  left: -7rem;
  width: 15rem;
  height: 15rem;
  border-color: rgba(255, 118, 94, 0.16);
  box-shadow: 0 0 0 1.5rem rgba(255, 118, 94, 0.025), 0 0 0 3rem rgba(255, 118, 94, 0.02);
}

.eyebrow {
  position: relative;
  z-index: 1;
  margin: 0 0 1.2rem;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  line-height: 1.6;
  text-transform: uppercase;
}

.label {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  font-weight: 600;
  letter-spacing: -0.07em;
  line-height: 1.04;
}

#target-year,
.new-year-message span {
  color: var(--blue);
}

.countdown {
  position: relative;
  z-index: 1;
  margin: clamp(2.5rem, 6vw, 4.5rem) auto 0;
}

.countdown-clock {
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(2.65rem, 10.5vw, 8rem);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  letter-spacing: -0.075em;
  line-height: 1;
}

.countdown-items {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.6rem, 1.8vw, 1.1rem);
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
}

.countdown-item {
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 0.5rem;
  border: 1px solid rgba(23, 36, 59, 0.09);
  border-radius: 0.8rem;
  background: #fff;
  box-shadow: 0 0.4rem 1.2rem rgba(39, 49, 74, 0.035);
}

.countdown-item:nth-child(2n) {
  background: #f5f6ff;
}

.countdown-number {
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(1.65rem, 4vw, 2.7rem);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 1;
}

.countdown-label {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.timezone-note {
  position: relative;
  z-index: 1;
  margin: 1.35rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.celebration {
  padding-block: clamp(3rem, 9vw, 7rem);
}

.new-year-message {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(3rem, 10vw, 8rem);
  font-weight: 600;
  letter-spacing: -0.08em;
  line-height: 1;
}

.subtitle {
  position: relative;
  z-index: 1;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: clamp(0.95rem, 2.2vw, 1.15rem);
}

.celebration-mark {
  position: relative;
  z-index: 1;
  width: 3.5rem;
  height: 3.5rem;
  display: grid;
  place-items: center;
  margin: 2rem auto 0;
  border-radius: 50%;
  background: #fff0ec;
  color: var(--coral);
  font-size: 1.6rem;
  animation: mark-pop 500ms 250ms both, mark-pulse 2.4s 800ms ease-in-out infinite;
}

canvas {
  position: fixed;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#root,
footer {
  z-index: 1;
}

footer {
  width: 100%;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid rgba(23, 36, 59, 0.08);
  background: rgba(255, 254, 250, 0.7);
  text-align: center;
  backdrop-filter: blur(12px);
}

footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.8;
}

footer a {
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
  transition: color 180ms ease;
}

footer a:hover {
  color: var(--coral);
}

.visitor-counter {
  display: inline-block;
  margin-left: 1rem;
  color: var(--ink);
}

.legal-root {
  display: block !important;
  padding: clamp(1.5rem, 5vw, 4rem) 1.25rem !important;
}

.legal-container {
  width: min(100%, 900px);
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 3.5rem);
  border: 1px solid rgba(23, 36, 59, 0.08);
  border-radius: 1.5rem;
  background: rgba(255, 254, 250, 0.9);
  box-shadow: 0 2rem 5rem rgba(39, 49, 74, 0.08);
}

.legal-container h1,
.legal-container h2 {
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.legal-container h1 {
  margin: 0 0 2rem;
  font-size: clamp(2rem, 6vw, 3.5rem);
  letter-spacing: -0.06em;
}

.legal-container h2 {
  margin: 2rem 0 0.65rem;
  font-size: 1.2rem;
}

.legal-container p,
.legal-container li {
  color: #404b60;
  line-height: 1.75;
}

.legal-container a {
  color: var(--blue);
  overflow-wrap: anywhere;
}

.legal-notice {
  padding: 1rem 1.2rem;
  border-left: 3px solid var(--coral);
  background: #fff5f1;
}

@keyframes card-arrive {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes mark-pop {
  from {
    opacity: 0;
    transform: scale(0.65) rotate(-20deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

@keyframes mark-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 118, 94, 0.15);
  }
  50% {
    box-shadow: 0 0 0 0.75rem rgba(255, 118, 94, 0);
  }
}

@media (max-width: 600px) {
  #root {
    padding: 1.5rem 0.8rem;
  }

  .container {
    padding: 3rem 1rem;
    border-radius: 1rem;
  }

  .eyebrow {
    font-size: 0.62rem;
    letter-spacing: 0.15em;
  }

  .countdown-items {
    gap: 0.45rem;
  }

  .countdown-item {
    min-height: 84px;
    padding: 0.7rem 0.2rem;
    border-radius: 0.6rem;
  }

  .countdown-label {
    font-size: 0.53rem;
    letter-spacing: 0.08em;
  }

  .visitor-counter {
    display: block;
    margin: 0.35rem 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
