:root {
  --bg-color: #121214;
  --card-bg: #1c1c1e;
  --card-border: #2c2c2e;
  --text-primary: #ffffff;
  --text-secondary: #98989d;
  --accent-red: #e31837;
  --accent-green: #30d158;
  --accent-orange: #ff9f0a;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

.header {
  background-color: var(--accent-red);
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-left {
  display: flex;
  flex-direction: column;
}

.header h1 { margin: 0; font-size: 1.3rem; font-weight: 800; letter-spacing: -0.5px; }
.clock { font-size: 0.75rem; font-weight: 500; opacity: 0.9; margin-top: 2px; font-variant-numeric: tabular-nums; }

select.lang-select {
  background: rgba(0,0,0,0.2);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.stop-header {
  padding: 12px 20px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background-color: var(--bg-color);
  gap: 12px;
  flex-wrap: wrap;
}

.controls-container { display: flex; gap: 10px; flex: 1; min-width: 260px; }

.gps-btn {
  background: #2c2c2e; color: #fff; border: 1px solid #3a3a3c;
  width: 48px; height: 72px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; cursor: pointer; transition: all 0.2s; flex-shrink: 0;
}
.gps-btn:active { background: #3a3a3c; }

.selectors { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }

select.stop-input {
  background: #2c2c2e; color: #fff; border: 1px solid #3a3a3c;
  padding: 8px 32px 8px 12px; border-radius: 8px;
  font-size: 0.9rem; font-weight: 600; outline: none;
  width: 100%; appearance: none; -webkit-appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg fill="%2398989d" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
  background-repeat: no-repeat; background-position: right 8px center;
  text-overflow: ellipsis; white-space: nowrap; overflow: hidden;
}

.status-bar { display: flex; flex-direction: column; align-items: flex-end; }
.refresh-timer { font-size: 0.8rem; color: var(--text-secondary); font-weight: 400; font-variant-numeric: tabular-nums; }
.gps-status { font-size: 0.75rem; color: var(--text-secondary); font-weight: 600; margin-top: 4px; text-align: right; }

#routeList { display: flex; flex-direction: column; min-height: 50vh; }

.route-card {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--card-border);
}

.route-left { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; padding-right: 10px; }
.route-no { font-size: 1.8rem; font-weight: 900; width: 60px; letter-spacing: -0.5px; flex-shrink: 0; }

.route-info { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.route-dest { font-size: 1.05rem; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }

.eta-container { display: flex; gap: 12px; align-items: center; flex-shrink: 0; }
.eta-box { display: flex; flex-direction: column; align-items: flex-end; min-width: 50px; }
.eta-label { font-size: 0.65rem; text-transform: uppercase; color: var(--text-secondary); font-weight: 700; margin-bottom: 2px; }

.official-eta { font-size: 1.05rem; font-weight: 600; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.smart-eta { font-size: 1.45rem; font-weight: 800; color: var(--accent-green); font-variant-numeric: tabular-nums; }
.smart-eta.adjusted { color: var(--accent-blue); }

.compact-occupancy { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.bar-segments { display: flex; gap: 3px; }
.segment { width: 8px; height: 12px; border-radius: 2px; background-color: #2c2c2e; }
.segment.active-green { background-color: var(--accent-green); }
.segment.active-orange { background-color: var(--accent-orange); }
.segment.active-red { background-color: var(--accent-red); }

.occupancy-pct-text { font-size: 0.75rem; font-weight: 600; }
