:root {
  color-scheme: light dark;
  --bg: #f3efe6;
  --bg-accent: #e4ddcf;
  --card: rgba(255, 255, 255, 0.7);
  --text: #1f1b16;
  --muted: #6f665c;
  --accent: #d15a3a;
  --border: rgba(31, 27, 22, 0.12);
  --shadow: 0 30px 80px rgba(31, 27, 22, 0.15);
  --page-bg: radial-gradient(circle at top, var(--bg-accent), var(--bg));
}

[data-theme="dark"] {
  --bg: #0f1113;
  --bg-accent: #1b2126;
  --card: rgba(21, 24, 27, 0.85);
  --text: #f3ede4;
  --muted: #b6ada1;
  --accent: #ff7a4a;
  --border: rgba(243, 237, 228, 0.12);
  --shadow: 0 35px 90px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  min-height: 100svh;
  min-height: 100dvh;
  background: var(--page-bg);
  background-attachment: fixed;
}

body {
  margin: 0;
  min-height: 100svh;
  min-height: 100dvh;
  font-family: "Space Grotesk", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--page-bg);
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 32px;
  position: relative;
  overflow: hidden;
}

body::before,
body::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(209, 90, 58, 0.18), transparent 70%);
  border-radius: 50%;
  filter: blur(0.5px);
  z-index: 0;
}

body::before {
  top: -140px;
  right: -160px;
}

body::after {
  bottom: -180px;
  left: -140px;
  background: radial-gradient(circle, rgba(255, 122, 74, 0.18), transparent 70%);
}

.countdown-wrap {
  text-align: center;
  z-index: 1;
  width: min(100%, 420px);
  display: grid;
  gap: 20px;
  justify-items: center;
}

h1 {
  margin: 0;
  font-size: clamp(24px, 6vw, 32px);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.segment {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 10px 12px;
  min-height: 96px;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  animation: rise 600ms ease-out both;
  display: grid;
  gap: 6px;
  align-content: center;
}

.segment:nth-child(2) {
  animation-delay: 60ms;
}

.segment:nth-child(3) {
  animation-delay: 120ms;
}

.segment:nth-child(4) {
  animation-delay: 180ms;
}

.segment:nth-child(5) {
  animation-delay: 240ms;
}

.segment:nth-child(6) {
  animation-delay: 300ms;
}

.value {
  display: block;
  font-family: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: clamp(22px, 8vw, 32px);
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--accent);
}

.label {
  margin-top: 2px;
  display: block;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.status {
  margin: 0;
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
}

@media (min-width: 600px) {
  body {
    padding: 32px 24px 48px;
  }

  body::before,
  body::after {
    width: 420px;
    height: 420px;
  }

  .countdown-wrap {
    gap: 24px;
    width: min(100%, 720px);
  }

  h1 {
    font-size: clamp(28px, 4vw, 40px);
  }

  .countdown {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }

  .segment {
    border-radius: 18px;
    padding: 18px 12px 16px;
    min-height: 110px;
  }

  .value {
    font-size: clamp(26px, 4vw, 40px);
    letter-spacing: 0.04em;
  }

  .label {
    font-size: 11px;
    letter-spacing: 0.2em;
  }

  .status {
    font-size: 14px;
  }
}

@media (min-width: 900px) {
  body::before,
  body::after {
    width: 520px;
    height: 520px;
  }

  .countdown-wrap {
    width: min(100%, 960px);
  }

  .countdown {
    grid-template-columns: repeat(6, minmax(120px, 1fr));
  }
}

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