/* Base theme tokens */
:root {
  --brand: #FF0000; /* red */
  --bg: #FFF8E7; /* off-white */
  --text: #1a1a1a;
  --muted: #5f5f5f;
  --card: #ffffff;
  --outline: rgba(0,0,0,0.08);
  --accent: var(--brand);
  --shadow: 0 10px 30px rgba(0,0,0,0.12);
}

/* Dark theme overrides */
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --bg: #0f0f10;
    --text: #ECECEC;
    --muted: #A1A1A1;
    --card: #171719;
    --outline: rgba(255,255,255,0.08);
    --shadow: 0 10px 30px rgba(0,0,0,0.4);
  }
}

:root[data-theme="light"] {
  --bg: #FFF8E7;
  --text: #1a1a1a;
  --muted: #5f5f5f;
  --card: #ffffff;
  --outline: rgba(0,0,0,0.08);
}

:root[data-theme="dark"] {
  --bg: #0f0f10;
  --text: #ECECEC;
  --muted: #A1A1A1;
  --card: #171719;
  --outline: rgba(255,255,255,0.08);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, 'Apple Color Emoji', 'Segoe UI Emoji';
  background: radial-gradient(1200px 600px at 10% -10%, rgba(255,0,0,0.08), transparent 40%),
              radial-gradient(1000px 500px at 110% 10%, rgba(255,0,0,0.08), transparent 40%),
              var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container { max-width: 960px; margin: 0 auto; padding: 0 20px; }

.site-header {
  position: sticky;
  top: 0;
  backdrop-filter: saturate(180%) blur(8px);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  border-bottom: 1px solid var(--outline);
  z-index: 10;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.brand { display: flex; gap: 12px; align-items: center; }
.logo { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: #ffebeb; color: var(--brand); font-size: 20px; box-shadow: inset 0 0 0 1px rgba(255,0,0,0.25); }
:root[data-theme="dark"] .logo, :root[data-theme="auto"]:has(.dark) .logo { background: #2a1b1b; }
.brand-name { margin: 0; line-height: 1; font-size: 18px; }
.brand-tag { margin: 2px 0 0; font-size: 12px; color: var(--muted); }

.theme-toggle {
  border: 1px solid var(--outline);
  background: var(--card);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow);
}
.theme-toggle:hover { border-color: rgba(255,0,0,0.4); }

.main { display: grid; place-items: center; padding: 48px 0; }
.card {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--outline);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.hero { text-align: center; margin-bottom: 20px; }
.hero-icon { font-size: 52px; margin-bottom: 10px; }
.hero h2 { margin: 0 0 8px; font-size: clamp(22px, 4vw, 30px); }
.hero p { margin: 0; color: var(--muted); font-size: 15px; }

.countdown { margin-top: 24px; }
.countdown .time { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.unit { background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 6%, var(--card)), var(--card)); border: 1px solid var(--outline); border-radius: 12px; padding: 14px; text-align: center; }
.unit span { display: block; font-size: clamp(22px, 6vw, 34px); font-weight: 700; color: var(--brand); }
.unit small { display: block; color: var(--muted); font-weight: 600; letter-spacing: 0.02em; }

.eta { text-align: center; margin: 14px 0 10px; color: var(--muted); }
.progress { height: 10px; background: color-mix(in srgb, var(--brand) 10%, var(--card)); border: 1px solid var(--outline); border-radius: 999px; overflow: hidden; }
.bar { height: 100%; background: linear-gradient(90deg, var(--brand), #ff4d4d); width: 0%; transition: width 0.6s ease; }

.help { margin-top: 18px; text-align: center; }
.help a { color: var(--brand); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--brand) 50%, transparent); }
.help a:hover { border-bottom-color: var(--brand); }

.site-footer { border-top: 1px solid var(--outline); margin-top: 40px; }
.footer-inner { padding: 18px 0; text-align: center; color: var(--muted); }

/* Responsive tweaks */
@media (max-width: 640px) {
  .header-inner { padding: 12px 0; }
  .logo { width: 38px; height: 38px; font-size: 18px; }
  .card { padding: 20px; }
  .countdown .time { grid-template-columns: repeat(2, 1fr); }
}
