:root {
  color-scheme: light;
  --bg: #f7f0f1;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: #fffafa;
  --text: #2b1723;
  --muted: #785f6b;
  --accent: #9b4f69;
  --accent-strong: #713349;
  --border: rgba(155, 79, 105, 0.18);
  --line: rgba(43, 23, 35, 0.14);
  --shadow: 0 20px 45px rgba(113, 51, 73, 0.12);
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #21151e;
  --surface: rgba(53, 31, 44, 0.86);
  --surface-strong: #38212e;
  --text: #fff0f3;
  --muted: #d4b6c1;
  --accent: #e79ab1;
  --accent-strong: #f6bed0;
  --border: rgba(231, 154, 177, 0.2);
  --line: rgba(255, 240, 243, 0.16);
  --shadow: 0 24px 50px rgba(10, 4, 8, 0.4);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: radial-gradient(circle at 12% 8%, rgba(231, 154, 177, 0.25), transparent 30%), radial-gradient(circle at 90% 75%, rgba(155, 79, 105, 0.11), transparent 28%), var(--bg);
  font-family: 'Inter', sans-serif;
  transition: background 0.3s ease, color 0.3s ease;
}
body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: '';
  opacity: 0.26;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}
.countdown-shell { display: flex; flex-direction: column; width: min(1200px, calc(100% - 48px)); min-height: 100vh; margin: 0 auto; padding: 24px 0 40px; }
.topline, footer { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 0.11em; text-transform: uppercase; }
.topline { padding: 14px 18px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); backdrop-filter: blur(16px); box-shadow: var(--shadow); }
.status-dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; }
.topline-rule, .footer-line { height: 1px; flex: 1; background: var(--line); }
#current-time { white-space: nowrap; }
.theme-toggle { padding: 7px 11px; border: 1px solid var(--border); border-radius: 999px; color: var(--text); background: var(--surface-strong); font: inherit; font-size: 10px; cursor: pointer; }
.hero { padding: 88px 0 76px; }
.eyebrow { margin: 0 0 12px; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: 0.24em; text-transform: uppercase; }
h1 { max-width: 850px; margin: 0; font-size: clamp(4.5rem, 15vw, 12rem); font-weight: 800; letter-spacing: -0.08em; line-height: 0.82; }
.countdown + h1 { margin-top: clamp(36px, 6vh, 72px); }
h1 span { color: var(--accent); }
.subtitle { margin: 26px 0 0; color: var(--muted); font-size: 15px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.countdown { display: flex; align-items: flex-start; gap: clamp(14px, 3vw, 42px); margin-top: clamp(64px, 10vh, 112px); }
.time-block strong { display: block; color: var(--text); font: 500 clamp(2.6rem, 7vw, 6.6rem) 'DM Mono', monospace; letter-spacing: -0.08em; line-height: 0.95; }
.time-block span { display: block; margin-top: 14px; color: var(--muted); font: 700 10px 'DM Mono', monospace; letter-spacing: 0.14em; text-transform: uppercase; }
.separator { color: var(--accent); font: 500 clamp(2rem, 5vw, 4rem) 'DM Mono', monospace; line-height: 0.9; }
.note { margin: 36px 0 0; color: var(--muted); font-size: 13px; }
.flight-section { padding: 34px 0 60px; border-top: 1px solid var(--line); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.section-heading h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2.25rem); letter-spacing: -0.04em; }
.refresh-label { color: var(--muted); font-size: 12px; font-weight: 600; }
.flight-board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.flight-card { padding: 22px; border: 1px solid var(--border); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); backdrop-filter: blur(16px); }
.flight-card__topline, .flight-card__footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.flight-code { color: var(--accent-strong); font-size: 18px; font-weight: 800; }
.flight-status { padding: 6px 9px; border-radius: 999px; color: var(--accent-strong); background: rgba(155, 79, 105, 0.12); font-size: 10px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.flight-status--active, .flight-status--landed { color: #236b52; background: rgba(69, 171, 126, 0.15); }
.flight-card__route { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; padding: 36px 0 28px; }
.flight-card__route strong, .flight-card__route span { display: block; }
.flight-card__route strong { overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.flight-card__route div > span { margin-top: 5px; color: var(--muted); font-size: 11px; }
.route-destination { text-align: right; }
.route-arrow { color: var(--accent); font-size: 24px; }
.flight-card__footer { padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.flight-card__footer a { color: var(--accent-strong); font-weight: 800; text-decoration: none; }
footer { margin-top: auto; padding-top: 30px; }
@media (max-width: 700px) {
  .countdown-shell { width: min(100% - 32px, 1200px); }
  .topline { flex-wrap: wrap; border-radius: 20px; }
  .topline-rule { display: none; }
  #current-time { margin-left: auto; }
  .hero { padding: 72px 0 64px; }
  h1 { font-size: clamp(4.1rem, 21vw, 7rem); }
  .countdown { gap: 8px; justify-content: space-between; }
  .time-block strong { font-size: clamp(2rem, 11vw, 3.5rem); }
  .time-block span { font-size: 8px; letter-spacing: 0.07em; }
  .separator { font-size: 1.8rem; }
  .section-heading, .flight-board { display: block; }
  .refresh-label { display: block; margin-top: 12px; }
  .flight-card + .flight-card { margin-top: 14px; }
}
