@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'JetBrains Mono', 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
  background: #0c0c0c;
  color: #f5d547;
  max-width: 620px;
  margin: 0 auto;
  padding: 0 12px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header — clock */
header {
  padding: 16px 0 10px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  border-bottom: 2px solid #222;
}

#clock {
  font-size: 2.2rem;
  font-weight: 700;
  color: #f5d547;
  letter-spacing: 0.04em;
}

.refresh-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  opacity: 0;
  transition: opacity 0.3s;
  flex-shrink: 0;
  position: relative;
  top: -2px;
}

.refresh-indicator.active {
  opacity: 1;
  animation: pulse-dot 1s ease-in-out;
}

@keyframes pulse-dot {
  0% { opacity: 0; transform: scale(0.5); }
  30% { opacity: 1; transform: scale(1.3); }
  100% { opacity: 0; transform: scale(1); }
}

/* Status messages */
#status {
  text-align: center;
  padding: 40px 0;
  color: #666;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

#status:empty {
  display: none;
}

/* Disruptions banner */
#disruptions:empty {
  display: none;
}

.disruption-banner {
  background: #1a1200;
  border-left: 3px solid #f59e0b;
  padding: 10px 14px;
  margin: 8px 0;
  border-radius: 2px;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #fbbf24;
}

.disruption-banner strong {
  display: block;
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Stop cards — board sections */
.stop-card {
  background: #111;
  margin: 8px 0;
  overflow: hidden;
  border: 1px solid #222;
  border-radius: 2px;
}

/* Column headers row */
.stop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #1a1a1a;
  border-bottom: 1px solid #222;
}

.stop-name {
  font-weight: 700;
  font-size: 0.8rem;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stop-type {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 2px 8px;
  border-radius: 2px;
}

.stop-type-tram {
  background: #78be20;
  color: #000;
}

.stop-type-bus {
  background: #ff8200;
  color: #000;
}

/* Column labels */
.board-columns {
  display: flex;
  align-items: center;
  padding: 4px 12px;
  gap: 12px;
  font-size: 0.6rem;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-bottom: 1px solid #1a1a1a;
}

.board-columns .col-route { min-width: 44px; text-align: center; }
.board-columns .col-tram-icon { width: 48px; }
.board-columns .col-status { flex: 1; }
.board-columns .col-eta   { min-width: 70px; text-align: right; }

/* Departure rows — flip-board style */
.departure-row {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid #1a1a1a;
  gap: 12px;
  transition: background 0.1s;
}

.departure-row:last-child {
  border-bottom: none;
}

.departure-row:hover {
  background: #1a1a1a;
}

/* Route badges — solid, sharp */
.route-badge {
  font-weight: 700;
  font-size: 0.9rem;
  min-width: 44px;
  text-align: center;
  padding: 3px 6px;
  border-radius: 2px;
  flex-shrink: 0;
}

.route-badge.tram {
  background: #78be20;
  color: #000;
}

.route-badge.bus {
  background: #ff8200;
  color: #000;
}

/* Tram icon cell */
.tram-icon-cell {
  width: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tram-icon {
  width: 48px;
  height: 22px;
}

/* Departure info */
.departure-info {
  flex: 1;
  min-width: 0;
}

.departure-time-detail {
  font-size: 0.7rem;
  color: #999;
  letter-spacing: 0.04em;
}

/* Minutes display */
.departure-mins {
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
  text-align: right;
  min-width: 70px;
  letter-spacing: 0.02em;
}

.departure-mins.realtime {
  color: #4ade80;
}

.departure-mins.scheduled {
  color: #666;
}

.departure-mins .label {
  display: block;
  font-size: 0.55rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.6;
}

/* "Now" — bright and pulsing */
.departure-mins.now.realtime {
  color: #4ade80;
  animation: pulse-now 1.5s ease-in-out infinite;
}

.departure-mins.now.scheduled {
  color: #f5d547;
  animation: pulse-now 1.5s ease-in-out infinite;
}

@keyframes pulse-now {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Footer */
footer {
  margin-top: auto;
  padding: 14px 0;
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  color: #333;
  border-top: 1px solid #222;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Loading spinner */
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #222;
  border-top-color: #f5d547;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
