/* ---- Palette — pulled from the actual game jersey (red/white/blue) ---- */
:root {
  --rink-navy: #13314c;
  --rink-navy-light: #1f4a6d;
  --rink-blue: #2f7aa5;
  --rink-ice: #f7fafc;
  --rink-red: #c8283a;
  --rink-steel: #6b7684;
  --border-radius: 10px;
  --max-width: 1100px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--rink-ice);
  color: var(--rink-navy);
}

h1, h2, h3, .section-title, .score, .btn, nav.tabs button, .league-switch button {
  font-family: 'Oswald', 'Inter', -apple-system, sans-serif;
}

a { color: inherit; }

header.site-header {
  background: var(--rink-navy);
  color: white;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 20;
}
header.site-header img.logo {
  height: 44px;
  width: 44px;
  object-fit: contain;
  border-radius: 50%;
  background: var(--rink-ice);
  box-shadow: 0 0 0 2px var(--rink-blue);
}
header.site-header h1 {
  font-size: 1.2rem;
  margin: 0;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
}

.cover-photo {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}
@media (min-width: 700px) {
  .cover-photo { height: 260px; }
}

nav.tabs {
  display: flex;
  background: var(--rink-navy-light);
  overflow-x: auto;
}
nav.tabs button {
  flex: 1;
  min-width: 90px;
  background: none;
  border: none;
  color: #cfe0f0;
  padding: 12px 8px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  border-bottom: 3px solid transparent;
}
nav.tabs button.active {
  color: white;
  border-bottom-color: var(--rink-red);
}

.league-switch {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 16px auto 0;
  max-width: var(--max-width);
  padding: 0 12px;
}
.league-switch button {
  flex: 1;
  max-width: 220px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 2px solid var(--rink-navy);
  background: white;
  color: var(--rink-navy);
  font-weight: 700;
  cursor: pointer;
}
.league-switch button.active {
  background: var(--rink-navy);
  color: white;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 12px 48px;
}

select, input[type=text], input[type=password], input[type=number], input[type=date], input[type=time], input[type=datetime-local] {
  padding: 8px 10px;
  border: 1px solid #c7d2dc;
  border-radius: 6px;
  font-size: 1rem;
  width: 100%;
}

.controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.controls-row > * { flex: 1; min-width: 150px; }

.card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: 0 1px 3px rgba(11,31,58,0.12);
  padding: 14px;
  margin-bottom: 14px;
}

.team-badge {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  background: var(--rink-blue);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th, td {
  padding: 8px 6px;
  text-align: left;
  border-bottom: 1px solid #e5eaf0;
  white-space: nowrap;
}
th { color: var(--rink-steel); font-weight: 700; font-size: 0.78rem; text-transform: uppercase; }
tbody tr:hover { background: #f0f6fb; }
.table-scroll { overflow-x: auto; }

.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}
.pill-w { background: #e3f6e9; color: #1c7c3f; }
.pill-l { background: #fbe6e9; color: var(--rink-red); }
.pill-otl { background: #fff2d6; color: #a06c00; }
.pill-t { background: #e6edf7; color: var(--rink-navy); }

.schedule-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #e5eaf0;
}
.schedule-item:last-child { border-bottom: none; }
.schedule-item .teams { font-weight: 600; }
.schedule-item .meta { font-size: 0.8rem; color: var(--rink-steel); }
.score { font-weight: 800; font-size: 1.05rem; color: var(--rink-navy); }

.clickable { cursor: pointer; text-decoration: underline dotted; }

.section-title {
  font-size: 1.3rem;
  margin: 4px 0 10px;
  color: var(--rink-navy);
  border-left: 4px solid var(--rink-red);
  padding-left: 10px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-weight: 500;
}

.empty-state {
  text-align: center;
  color: var(--rink-steel);
  padding: 30px 10px;
}

.btn {
  background: var(--rink-navy);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
}
.btn.secondary { background: white; color: var(--rink-navy); border: 2px solid var(--rink-navy); }
.btn.danger { background: var(--rink-red); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.error-banner {
  background: #fbe6e9;
  color: var(--rink-red);
  border: 1px solid var(--rink-red);
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 12px;
  font-size: 0.9rem;
}
.success-banner {
  background: #e3f6e9;
  color: #1c7c3f;
  border: 1px solid #1c7c3f;
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
}

.h2h-modal-backdrop {
  position: fixed; inset: 0; background: rgba(11,31,58,0.55);
  display: flex; align-items: flex-end; justify-content: center; z-index: 50;
}
@media (min-width: 640px) {
  .h2h-modal-backdrop { align-items: center; }
}
.h2h-modal {
  background: white; border-radius: 14px 14px 0 0; padding: 18px; width: 100%; max-width: 480px; max-height: 85vh; overflow-y: auto;
}
@media (min-width: 640px) {
  .h2h-modal { border-radius: 14px; }
}
.h2h-modal h3 { margin-top: 0; }
