:root {
  --bg-primary: #0f0f1a;
  --bg-surface: #1e1e2e;
  --bg-surface-2: #2a2a3e;
  --accent: #bb86fc;
  --accent-dark: #6200ee;
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0b0;
  --error: #cf6679;
  --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
}

/* ── Header ── */
.header {
  background: linear-gradient(135deg, #1a0533 0%, #2d0b69 100%);
  padding: 24px 16px 20px;
  text-align: center;
}

.header__title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 3px;
  text-transform: uppercase;
}

.header__subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ── Main content ── */
.main {
  padding: 20px 16px 40px;
}

/* ── Services grid ── */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── Service section ── */
.service-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.service-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.5px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--bg-surface-2);
}

/* ── Loading ── */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 160px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--bg-surface-2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ── Departure cards ── */
.departures-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.departure-card {
  background-color: var(--bg-surface);
  border-radius: 10px;
  padding: 16px 18px;
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  gap: 12px;
}

.departure-time {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
}

.departure-status {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-left: auto;
}

.departure-badge {
  background-color: var(--accent-dark);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  margin-left: auto;
  white-space: nowrap;
}

/* ── Empty state ── */
.no-departures {
  text-align: center;
  color: var(--text-secondary);
  padding: 40px 16px;
  font-size: 0.95rem;
}

/* ── Error state ── */
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 16px;
}

.error-message {
  color: var(--error);
  text-align: center;
  font-size: 0.95rem;
}

.retry-btn {
  background: none;
  border: 1px solid var(--error);
  color: var(--error);
  border-radius: 6px;
  padding: 8px 20px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.retry-btn:hover {
  background-color: var(--error);
  color: #fff;
}
