/* ── Reset & Base ─────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f5f5f5;
  font-family: system-ui, -apple-system, sans-serif;
  color: #222;
}

/* ── Container ────────────────────────────────────────── */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* ── Day Header ───────────────────────────────────────── */
.day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

#date-label {
  flex: 1;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
}

.nav-btn {
  padding: 0.5rem 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.15s;
  white-space: nowrap;
}

.nav-btn:hover:not(:disabled) {
  background: #e8e8e8;
}

.nav-btn:disabled {
  color: #aaa;
  border-color: #ddd;
  cursor: not-allowed;
  background: #fff;
}

/* ── Spinner ──────────────────────────────────────────── */
.spinner {
  margin: 2rem auto;
  text-align: center;
  color: #666;
}

.spinner-ring {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid #e0e0e0;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 0.5rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Event List ───────────────────────────────────────── */
.event-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

/* ── Event Card ───────────────────────────────────────── */
.event-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s;
}

.event-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.event-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.875rem;
  color: #666;
  margin-bottom: 0.4rem;
}

.event-source {
  font-size: 0.8rem;
}

.event-source a {
  color: #666;
  text-decoration: none;
}

.event-source a:hover {
  text-decoration: underline;
}

/* ── Empty State ──────────────────────────────────────── */
.no-events {
  text-align: center;
  color: #888;
  font-style: italic;
  padding: 2rem 0;
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 600px) {
  .container {
    padding: 1rem;
  }

  .day-header {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  #date-label {
    width: 100%;
    order: -1;
    font-size: 1.1rem;
  }
}
