/* ══════════════════════════════════════════════════
   BASE
   ══════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #080d15;
  --panel-bg:    #0c1220;
  --card:        #131e30;
  --card-alt:    #17243a;
  --border:      rgba(255,255,255,0.065);
  --text:        #e8edf8;
  --text-2:      #7a90aa;
  --text-3:      #3e5068;
  --blue:        #4a9eff;
  --green:       #2ecc7c;
  --red:         #ff4f4f;
  --yellow:      #ffc94a;
  --orange:      #ff8c42;
  --bus-w:       1100px;
}

html, body {
  width: 1920px;
  height: 1080px;
  overflow: hidden;
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* ══════════════════════════════════════════════════
   SCREEN LAYOUT
   ══════════════════════════════════════════════════ */
.screen {
  display: flex;
  width: 1920px;
  height: 1080px;
}

.weather-panel {
  flex: 1;
  min-width: 0;
  height: 1080px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 26px;
  background: var(--panel-bg);
  border-right: 1px solid var(--border);
  overflow: hidden;
}

.bus-panel {
  width: var(--bus-w);
  height: 1080px;
  display: flex;
  flex-direction: column;
  background: var(--panel-bg);
  overflow: hidden;
}

/* ══════════════════════════════════════════════════
   WEATHER HEADER
   ══════════════════════════════════════════════════ */
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-shrink: 0;
}

.location {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
  padding-top: 6px;
}

.clock-area { text-align: right; }

.clock-time {
  font-size: 58px;
  font-weight: 300;
  letter-spacing: -2px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.clock-date {
  font-size: 15px;
  color: var(--text-2);
  margin-top: 5px;
  text-transform: capitalize;
}

/* ══════════════════════════════════════════════════
   CURRENT CONDITIONS CARD
   ══════════════════════════════════════════════════ */
.current-card {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 24px;
}

.current-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: none;
}

.current-icon {
  font-size: 68px;
  line-height: 1;
  filter: drop-shadow(0 2px 16px rgba(255,200,80,0.25));
  flex-shrink: 0;
}

.current-temp {
  font-size: 80px;
  font-weight: 300;
  letter-spacing: -3px;
  line-height: 0.9;
}

.current-feels {
  font-size: 16px;
  color: var(--text-2);
  margin-top: 8px;
}

.current-desc {
  font-size: 20px;
  color: var(--text-2);
  margin-top: 4px;
  font-weight: 400;
}

.current-details {
  flex: 1;
  display: flex;
  gap: 0;
  margin-left: auto;
  border-left: 1px solid var(--border);
  padding-left: 28px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  padding: 0 16px;
  border-right: 1px solid var(--border);
}
.detail-item:last-child { border-right: none; }

.detail-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-3);
}

.detail-value {
  font-size: 20px;
  font-weight: 500;
  color: var(--text);
}

/* ══════════════════════════════════════════════════
   SECTION LABELS
   ══════════════════════════════════════════════════ */
.section-label {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--text-3);
}

/* ══════════════════════════════════════════════════
   HOURLY SECTION
   ══════════════════════════════════════════════════ */
.hourly-section {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.chart-wrap {
  height: 52px;
  overflow: hidden;
}

.temp-chart {
  width: 100%;
  height: 52px;
  display: block;
}

.hourly-scroll {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.hourly-scroll::-webkit-scrollbar { display: none; }

.hour-card {
  flex: 0 0 66px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-align: center;
  cursor: default;
}

.hour-card.now {
  background: var(--card-alt);
  border-color: rgba(74,158,255,0.5);
  box-shadow: 0 0 0 1px rgba(74,158,255,0.2);
}

.hour-time {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
}

.hour-icon { font-size: 20px; }

.hour-temp {
  font-size: 15px;
  font-weight: 700;
}

.hour-rain {
  font-size: 11px;
  color: #6ab4ff;
  font-weight: 500;
}

/* ══════════════════════════════════════════════════
   DAILY GRID
   ══════════════════════════════════════════════════ */
.daily-grid {
  flex: 1;
  min-height: 0;
  display: flex;
  gap: 7px;
  overflow: hidden;
}

.day-card {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 6px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: center;
  overflow: hidden;
}

.day-card.today {
  background: var(--card-alt);
  border-color: rgba(74,158,255,0.4);
}

.day-name {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: capitalize;
  color: var(--text-2);
}

.day-date-str {
  font-size: 11px;
  color: var(--text-3);
}

.day-icon { font-size: 28px; }

.day-high {
  font-size: 22px;
  font-weight: 600;
}

.day-low {
  font-size: 15px;
  color: var(--text-2);
}

.day-rain {
  font-size: 11px;
  color: #6ab4ff;
  font-weight: 500;
}

/* ══════════════════════════════════════════════════
   BUS PANEL
   ══════════════════════════════════════════════════ */
.bus-panel-header {
  flex-shrink: 0;
  padding: 22px 26px 16px;
  border-bottom: 1px solid var(--border);
}

.stop-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
}

.stop-title svg { color: var(--text-2); flex-shrink: 0; }

.bus-subtitle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-3);
  margin-top: 5px;
  padding-left: 2px;
}

.bus-refresh-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-3);
  display: inline-block;
  transition: background 0.3s;
}
.bus-refresh-dot.active { background: var(--green); }

/* Table header */
.table-head {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 62px 1fr 56px 50px 70px 30px;
  gap: 8px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-3);
}

/* Departures list */
.departures-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
}
.departures-list::-webkit-scrollbar { display: none; }

.dep-placeholder {
  padding: 36px 26px;
  font-size: 17px;
  color: var(--text-3);
}

.dep-row {
  display: grid;
  grid-template-columns: 62px 1fr 56px 50px 70px 30px;
  gap: 8px;
  align-items: center;
  padding: 0 18px;
  height: 62px;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}

.dep-row:hover { background: rgba(255,255,255,0.018); }

.dep-row.imminent { background: rgba(255,100,50,0.045); }

/* Line badge */
.line-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 9px;
  border-radius: 7px;
  font-size: 17px;
  font-weight: 700;
  min-width: 50px;
  letter-spacing: 0.3px;
}

/* Destination */
.dep-dest {
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

/* Scheduled time */
.dep-time {
  font-size: 19px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

/* Minutes */
.dep-mins {
  font-size: 19px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.dep-mins.now    { color: var(--green); }
.dep-mins.urgent { color: var(--red); animation: blink 1s infinite; }
.dep-mins.soon   { color: var(--yellow); }

/* Status badge */
.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.status.on-time { color: var(--green);  background: rgba(46,204,124,0.12); }
.status.late    { color: var(--red);    background: rgba(255,79,79,0.12);  }
.status.early   { color: var(--yellow); background: rgba(255,201,74,0.12); }
.status.no-rt   { color: var(--text-3); }

/* ══════════════════════════════════════════════════
   PLATFORM SECTIONS
   ══════════════════════════════════════════════════ */
.platforms-row {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: row;
  overflow: hidden;
}

.platform-section {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.platform-head {
  flex-shrink: 0;
  padding: 10px 18px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--text-3);
}

.platform-divider {
  flex-shrink: 0;
  width: 1px;
  background: var(--border);
}

.dep-row.cancelled { opacity: 0.45; }

/* Bell alert button */
.bell-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  opacity: 0.15;
  padding: 0;
  line-height: 1;
  border-radius: 4px;
  transition: opacity 0.2s, filter 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.bell-btn:hover  { opacity: 0.55; }
.bell-btn.active { opacity: 0.8;  filter: drop-shadow(0 0 4px rgba(255,255,255,0.5)); }
.bell-btn.warn   { opacity: 1;    filter: drop-shadow(0 0 6px rgba(255,201,74,1.0)); }
.bell-btn.alert  { opacity: 1;    filter: drop-shadow(0 0 6px rgba(255,79,79,1.0)); animation: blink 0.8s infinite; }

/* ══════════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════════ */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

/* ══════════════════════════════════════════════════
   TEMP COLOUR HELPERS  (applied inline via JS)
   ══════════════════════════════════════════════════ */
