:root{
  --bg0:#060b12;
  --bg1:#0a1220;
  --bg2:#0c1b2f;
  --card:#0b1220cc;
  --text:#e9eef7;
  --muted:#a7b3c7;
  --line:#1d2a40;
  --accent:#D71921;
  --accent2:#ff4050;
  --good:#2ecc71;
  --warn:#f1c40f;
  --bad:#e74c3c;
  --shadow: 0 12px 40px rgba(0,0,0,.35);
  --radius:16px;
  --radius2:999px;
  --max: 1120px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

html[data-theme="light"]{
  --bg0:#f5f7fb;
  --bg1:#eef2f8;
  --bg2:#e6edf7;
  --card:#ffffffcc;
  --text:#0a1220;
  --muted:#44546a;
  --line:#d6deea;
  --shadow: 0 10px 28px rgba(10,18,32,.10);
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family:var(--font);
  color:var(--text);
  background:
    radial-gradient(1200px 600px at 50% 20%, rgba(20,62,120,.28), transparent 60%),
    radial-gradient(900px 500px at 20% 0%, rgba(215,25,33,.14), transparent 55%),
    linear-gradient(180deg, var(--bg0), var(--bg2));
  min-height:100vh;
}
a{color:inherit; text-decoration:none}
.container{max-width:var(--max); margin:0 auto; padding:0 20px}
.spacer{height:16px}

/* Header */
.topbar{
  position:sticky; top:0; z-index:30;
  background:rgba(5,8,14,.72);
  backdrop-filter: blur(10px);
  border-bottom:1px solid rgba(255,255,255,.06);
}
html[data-theme="light"] .topbar{
  background:rgba(255,255,255,.75);
  border-bottom:1px solid rgba(10,18,32,.10);
}
.nav{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 0;
  gap:14px;
}
.brand{display:flex; align-items:center; gap:12px}
.brand img{width:42px; height:42px; border-radius:12px; object-fit:cover}
.brand .title{display:flex; flex-direction:column; line-height:1.05}
.brand .title b{font-size:14px}
.brand .title span{font-size:12px; color:var(--muted)}
.navlinks{
  display:flex; align-items:center; gap:12px;
  color:var(--muted);
  font-size:14px;
}
.navlinks a:hover{color:var(--text)}
.controls{display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:flex-end}

.btn{
  border:none;
  background: rgba(255,255,255,.08);
  color: var(--text);
  border:1px solid rgba(255,255,255,.14);
  padding:10px 14px;
  border-radius: var(--radius2);
  cursor:pointer;
  white-space:nowrap;
  font-size:13px;
}
html[data-theme="light"] .btn{
  background: rgba(10,18,32,.03);
  border:1px solid rgba(10,18,32,.12);
}
.btn.primary{
  background: var(--accent);
  border-color: transparent;
}
.btn:hover{filter:brightness(1.05)}
.btn.primary:hover{filter:brightness(1.07)}
.pill{
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: var(--text);
  border-radius: var(--radius2);
  padding:10px 12px;
  display:flex; align-items:center; gap:10px;
  cursor:pointer;
  user-select:none;
  font-size:13px;
}
html[data-theme="light"] .pill{
  border:1px solid rgba(10,18,32,.12);
  background: rgba(10,18,32,.03);
}
.pill .dot{
  width:10px; height:10px; border-radius:999px; background:var(--accent);
  box-shadow:0 0 0 4px rgba(215,25,33,.15);
}

/* Announcement strip */
.announcement{
  margin-top:14px;
  background:
    radial-gradient(700px 120px at 30% 50%, rgba(215,25,33,.20), transparent 60%),
    linear-gradient(90deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border:1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
html[data-theme="light"] .announcement{
  border:1px solid rgba(10,18,32,.10);
  background:
    radial-gradient(700px 120px at 30% 50%, rgba(215,25,33,.14), transparent 60%),
    linear-gradient(90deg, rgba(10,18,32,.03), rgba(10,18,32,.01));
}
.announcement-inner{
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 14px;
  gap:12px;
}
.badge{
  border:1px solid rgba(215,25,33,.35);
  background: rgba(215,25,33,.12);
  color: var(--text);
  padding:8px 12px;
  border-radius: var(--radius2);
  font-size:12px;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.announcement h4{margin:0; font-size:14px}
.announcement p{margin:2px 0 0; color:var(--muted); font-size:13px}

/* Layout */
.hero{padding:22px 0 26px}
.grid{
  display:grid;
  grid-template-columns: 1fr;
  gap:14px;
}
.kicker{
  letter-spacing:.25em;
  text-transform:uppercase;
  color:var(--muted);
  font-size:12px;
}
h1{margin:0; font-size:24px}
.sub{color:var(--muted); font-size:14px; margin-top:6px; line-height:1.55}

/* Cards */
.card{
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border:1px solid rgba(255,255,255,.10);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
html[data-theme="light"] .card{
  border:1px solid rgba(10,18,32,.10);
  background: rgba(255,255,255,.80);
}
.panel{padding:14px}

/* Weekly strip */
.weekbar{
  display:flex; align-items:center; gap:10px;
}
.weekstrip{
  display:flex;
  gap:10px;
  overflow:auto;
  padding:6px 2px 2px;
  scroll-snap-type:x mandatory;
}
.daycard{
  scroll-snap-align:start;
  min-width:150px;
  padding:12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  cursor:pointer;
}
html[data-theme="light"] .daycard{
  border:1px solid rgba(10,18,32,.10);
  background: rgba(10,18,32,.03);
}
.daycard.active{
  background: rgba(215,25,33,.16);
  border-color: rgba(215,25,33,.35);
}
.daycard .d2{font-size:12px; color:var(--muted)}
.daycard .d1{font-weight:800; margin-top:2px}
.daycard .d3{font-size:12px; margin-top:10px; color:var(--muted)}
.daycard.active .d3{color:var(--text)}

/* Filters */
.filters{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}
.input, select{
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  color: var(--text);
  border-radius: 12px;
  padding:10px 12px;
  font-family:var(--font);
  font-size:13px;
}
html[data-theme="light"] .input, html[data-theme="light"] select{
  background: rgba(10,18,32,.03);
  border:1px solid rgba(10,18,32,.12);
  color: var(--text);
}
.input::placeholder{color:rgba(167,179,199,.85)}
select option{color:#111}

/* Flight cards list */
.flightlist{display:flex; flex-direction:column; gap:12px}
.flightcard{
  border-radius: var(--radius);
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  overflow:hidden;
  cursor:pointer;
}
html[data-theme="light"] .flightcard{
  border:1px solid rgba(10,18,32,.10);
  background: rgba(255,255,255,.75);
}
.flightcard:hover{filter:brightness(1.03)}
.flightrow{
  display:grid;
  grid-template-columns: 240px 1fr 240px;
  gap:0;
  align-items:stretch;
}
@media (max-width: 980px){
  .flightrow{grid-template-columns:1fr}
}
.side{
  padding:14px;
  display:flex;
  gap:12px;
  align-items:center;
}
.side .logo{
  width:44px; height:44px; border-radius:12px; object-fit:cover;
  background: rgba(255,255,255,.10);
}
.side .meta{display:flex; flex-direction:column; gap:2px}
.side .meta b{font-size:14px}
.side .meta span{font-size:12px; color:var(--muted); text-transform:uppercase; letter-spacing:.08em}

.mid{
  position:relative;
  padding:14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  background:
    radial-gradient(1200px 300px at 50% 40%, rgba(0,0,0,.06), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
}
html[data-theme="light"] .mid{
  background:
    radial-gradient(1200px 300px at 50% 40%, rgba(10,18,32,.05), transparent 60%),
    linear-gradient(180deg, rgba(10,18,32,.01), rgba(10,18,32,.00));
}
.mid::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at 30% 50%, rgba(215,25,33,.12), transparent 30%),
    radial-gradient(circle at 70% 50%, rgba(215,25,33,.12), transparent 30%);
  pointer-events:none;
}
.route{
  display:flex; align-items:center; gap:10px;
}
.airport{
  display:flex; flex-direction:column;
}
.airport .time{font-size:22px; font-weight:900; letter-spacing:.02em}
.airport .code{font-size:13px; color:var(--muted); margin-top:2px}
.route .line{
  width:100%;
  height:2px;
  background: rgba(215,25,33,.35);
  border-radius:999px;
  position:relative;
  min-width:110px;
}
.route .line::before,
.route .line::after{
  content:"";
  width:10px; height:10px; border-radius:999px;
  background: var(--accent);
  position:absolute; top:50%; transform:translateY(-50%);
  box-shadow:0 0 0 4px rgba(215,25,33,.12);
}
.route .line::before{left:0}
.route .line::after{right:0}

.right{
  padding:14px;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  justify-content:center;
  gap:10px;
}
.chip{
  font-size:12px;
  padding:8px 10px;
  border-radius:999px;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  color: var(--muted);
}
html[data-theme="light"] .chip{
  background: rgba(10,18,32,.03);
  border:1px solid rgba(10,18,32,.10);
}
.status{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  font-size:12px;
  color: var(--text);
}
html[data-theme="light"] .status{
  border:1px solid rgba(10,18,32,.12);
  background: rgba(10,18,32,.03);
}
.status .s-dot{width:9px; height:9px; border-radius:999px}
.status.good .s-dot{background:var(--good); box-shadow:0 0 0 4px rgba(46,204,113,.12)}
.status.warn .s-dot{background:var(--warn); box-shadow:0 0 0 4px rgba(241,196,15,.12)}
.status.bad  .s-dot{background:var(--bad);  box-shadow:0 0 0 4px rgba(231,76,60,.12)}
.status.neut .s-dot{background:var(--accent); box-shadow:0 0 0 4px rgba(215,25,33,.12)}

.notice{
  padding:12px 14px;
  border-radius: 12px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  color: var(--muted);
  font-size:13px;
}
html[data-theme="light"] .notice{
  border:1px solid rgba(10,18,32,.10);
  background: rgba(10,18,32,.03);
}

.footer{
  padding:24px 0 38px;
  color: var(--muted);
  font-size:13px;
}
.footer a{color:var(--text); opacity:.9}
.footer a:hover{opacity:1}
