:root { color-scheme: dark; }

* { box-sizing: border-box; }
html, body { height: 100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background:#0b0f17;
  color:#e7eefc;
}

.muted{ color:#9fb0d0; }

/* Layout */
.app{
  height:100vh;
  display:grid;
  grid-template-columns: 260px 1fr 330px;
  gap:14px;
  padding:14px;
}

@media (max-width: 1050px){
  .app{ grid-template-columns: 260px 1fr; }
  .rightPanel{ display:none; }
}
@media (max-width: 820px){
  .app{ grid-template-columns: 1fr; }
  .sidebar{ display:none; }
}

/* Shared card feel */
.sidebar, .rightPanel, .mapCard, .tableCard{
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  overflow:hidden;
}

/* Sidebar */
.sidebar{
  padding:14px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}
.sbTop{ display:flex; flex-direction:column; gap:14px; }

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px;
  border-radius:16px;
  background: rgba(0,0,0,.18);
  border: 1px solid rgba(255,255,255,.08);
}
.brandLogo{
  width:38px; height:38px; border-radius:12px;
  background: linear-gradient(135deg, rgba(255,106,42,.85), rgba(255,106,42,.12));
  border: 1px solid rgba(255,255,255,.12);
}
.brandName{ font-weight: 950; letter-spacing:.2px; }
.brandSub{ margin-top:2px; font-size:12px; color:#9fb0d0; }

.sbBtn{
  width:100%;
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.12);
  color:#e7eefc;
  cursor:pointer;
  font-weight: 850;
}
.sbBtn.active{
  background: rgba(255,106,42,.16);
  border-color: rgba(255,106,42,.22);
}
.sbIcon{ opacity:.9; }

.sbBottom{
  padding:10px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.10);
}
.sbToggle{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  font-size:13px;
}
.sbPill{
  padding:4px 10px;
  border-radius:999px;
  font-weight:950;
  font-size:12px;
  background: rgba(90,230,160,.16);
  border: 1px solid rgba(90,230,160,.22);
}

/* Main */
.main{
  display:flex;
  flex-direction:column;
  gap:14px;
  min-width:0;
}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 8px 6px 0;
}
.title{ display:flex; align-items:baseline; gap:10px; padding-left:6px; }
.cityBtn{
  background:transparent;
  border:none;
  color:#ff6a2a;
  font-size:26px;
  font-weight: 950;
  cursor:pointer;
  display:flex;
  gap:8px;
  align-items:center;
}
.chev{ color:#9fb0d0; font-size:14px; margin-top:6px; }

.iconBtn{
  width:38px; height:38px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
  color:#e7eefc;
  cursor:pointer;
}
.iconBtn:hover{ background: rgba(255,255,255,.06); }

/* Map */
.mapCard{
  position:relative;
  height: 520px;
}
.map{ height:100%; width:100%; }

/* Pills bar */
.layerBar{
  position:absolute;
  top:12px;
  left:50%;
  transform: translateX(-50%);
  display:flex;
  gap:8px;
  padding:8px;
  border-radius:999px;
  background: rgba(0,0,0,.55);
  border:1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(10px);
  z-index: 500;
}
.layerPill{
  border:1px solid rgba(255,255,255,.12);
  background: transparent;
  color:#e7eefc;
  padding:8px 12px;
  border-radius:999px;
  font-weight: 850;
  font-size: 13px;
  cursor:pointer;
  opacity:.95;
}
.layerPill[aria-selected="true"]{
  background: rgba(255,106,42,.18);
  border-color: rgba(255,106,42,.22);
}

/* Search */
.searchBox{
  position:absolute;
  top:74px;
  left:12px;
  width: 330px;
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px 10px;
  border-radius:16px;
  background: rgba(0,0,0,.55);
  border:1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(10px);
  z-index: 500;
}
.sIcon{ opacity:.9; }
.searchBox input{
  flex:1;
  border:none;
  outline:none;
  background:transparent;
  color:#e7eefc;
  font-size:13px;
}
.searchBox button{
  border-radius:12px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.10);
  color:#e7eefc;
  padding:8px 10px;
  font-weight: 850;
  cursor:pointer;
}
.searchBox button:hover{ background: rgba(255,255,255,.14); }

/* Info card */
.infoCard{
  position:absolute;
  top:94px;
  right:12px;
  width: 280px;
  border-radius:16px;
  background: rgba(0,0,0,.62);
  border:1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(10px);
  padding:12px;
  z-index: 500;
}
.infoTop{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.bigTemp{
  font-size:44px;
  font-weight: 950;
  letter-spacing:-1px;
}
.deg{ font-size:30px; vertical-align: top; }
.wxIcon{ filter: drop-shadow(0 10px 22px rgba(0,0,0,.35)); }

.infoGrid{
  margin-top:10px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:8px;
}
.kv{
  display:flex;
  flex-direction:column;
  gap:2px;
  padding:8px;
  border-radius:12px;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.06);
}
.k{ font-size:12px; color:#9fb0d0; }
.v{ font-size:13px; font-weight: 850; }

/* Timeline */
.timeline{
  position:absolute;
  left:12px;
  right:12px;
  bottom:12px;
  display:flex;
  gap:10px;
  align-items:center;
  padding:10px 10px;
  border-radius:16px;
  background: rgba(0,0,0,.55);
  border:1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(10px);
  z-index: 550;
}
.tlBtn{
  width:40px; height:36px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.08);
  color:#e7eefc;
  cursor:pointer;
  font-size:18px;
  font-weight: 900;
}
.tlBtn:hover{ background: rgba(255,255,255,.12); }
.tlTrack{ flex:1; min-width: 0; }
.timeline input[type="range"]{ width:100%; }
.tlTicks{
  margin-top:6px;
  display:flex;
  justify-content:space-between;
  font-size:12px;
  color:#9fb0d0;
  gap:10px;
  overflow:hidden;
}
.tlTicks span{ white-space:nowrap; }

/* Toast */
.toast{
  position:absolute;
  bottom: 74px;
  left: 12px;
  padding:10px 12px;
  border-radius:14px;
  background: rgba(0,0,0,.60);
  border:1px solid rgba(255,255,255,.10);
  color:#e7eefc;
  font-size:13px;
  z-index: 600;
}

/* Bottom “table” forecast */
.tableCard{ padding:12px; }
.tableHeader{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
}
.thTitle{ font-weight: 950; letter-spacing:.2px; }

.forecastGrid{
  margin-top: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.12);
  overflow:auto;
}

/* Grid rows like screenshot */
.fRow{
  display:grid;
  grid-template-columns: 170px repeat(6, 120px);
  border-top: 1px solid rgba(255,255,255,.06);
}
.fRow:first-child{ border-top:none; }

.fCell{
  padding: 12px 10px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}
.fHead{
  justify-content:flex-start;
  color:#9fb0d0;
  font-weight: 850;
}
.fTime{ font-weight: 900; }
.fIcon{ width: 30px; height: 30px; }
.fValue{ font-weight: 950; font-size: 16px; }
.small{ font-size: 12px; color:#9fb0d0; }

/* Right panel */
.rightPanel{ padding:12px; display:flex; flex-direction:column; gap:12px; }
.rpTop{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.rpDate{ font-weight: 950; }
.rpTabs{ display:flex; gap:8px; }
.rpTab{
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background: transparent;
  color:#e7eefc;
  padding:8px 12px;
  font-weight: 850;
  cursor:pointer;
}
.rpTab.active{ background: rgba(255,106,42,.16); border-color: rgba(255,106,42,.22); }

.rpBlock{
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 12px;
}
.rpTitle{ font-weight: 950; margin-bottom: 10px; }

.eventsList{ display:flex; flex-direction:column; gap:10px; }
.event{
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.12);
}
.eventTitle{ font-weight: 950; }
.eventMeta{ margin-top:4px; font-size:12px; color:#9fb0d0; }
.badge{
  display:inline-flex;
  align-items:center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 950;
  border: 1px solid rgba(255,255,255,.10);
  margin-right: 8px;
}
.bWarn{ background: rgba(255, 210, 90, .16); }
.bDanger{ background: rgba(255, 80, 80, .16); }
.bInfo{ background: rgba(90, 180, 255, .16); }
