/* === Variables === */
:root {
  --primary: #F56B00;
  --dark: #1A1A2E;
  --bg: #F0F2F5;
  --white: #FFFFFF;
  --text: #1A1A2E;
  --muted: #666;
  --border: #E0E0E0;

  --team-mvp:        #27AE60;
  --team-b9-blue:    #1565C0;
  --team-b9-yellow:  #F9A825;
  --team-elev-blue:  #0288D1;
  --team-elev-yellow:#E65100;

  --radius: 12px;
  --shadow: 0 2px 8px rgba(0,0,0,.1);
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
}

a { color: inherit; }

/* === Header === */
header {
  background: var(--dark);
  color: #fff;
  padding: 1.25rem 1rem 1rem;
}
.header-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.logo {
  height: 56px;
  width: auto;
  flex-shrink: 0;
}
.header-text h1 {
  font-size: 1.4rem;
  font-weight: 800;
  color: #FFD600;
  line-height: 1.2;
}
.header-sub {
  color: #bbb;
  font-size: 0.85rem;
  margin-top: 0.15rem;
}
.header-date {
  color: #fff;
  font-size: 0.8rem;
  margin-top: 0.2rem;
  opacity: 0.8;
}

/* === Team Nav === */
.team-nav {
  background: var(--dark);
  border-top: 1px solid rgba(255,255,255,.1);
  position: sticky;
  top: 0;
  z-index: 100;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.team-nav::-webkit-scrollbar { display: none; }

.team-nav-inner {
  display: flex;
  max-width: 900px;
  margin: 0 auto;
  min-width: max-content;
}
.team-tab {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: #999;
  padding: .8rem 1.1rem;
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
  letter-spacing: .02em;
}
.team-tab:hover { color: #fff; }
.team-tab.active { color: #fff; }
.team-tab[data-team="mvp"].active        { border-color: var(--team-mvp); }
.team-tab[data-team="b9-blue"].active    { border-color: var(--team-b9-blue); }
.team-tab[data-team="b9-yellow"].active  { border-color: var(--team-b9-yellow); }
.team-tab[data-team="elev-blue"].active  { border-color: var(--team-elev-blue); }
.team-tab[data-team="elev-yellow"].active{ border-color: var(--team-elev-yellow); }

/* === Main === */
main {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.25rem 1rem 2rem;
}

/* === Team sections === */
.team-section { display: none; }
.team-section.active { display: block; }

/* Team color bar under title */
.team-color-bar {
  height: 5px;
  border-radius: 3px;
  margin-bottom: 1.25rem;
}
.team-mvp        .team-color-bar { background: var(--team-mvp); }
.team-b9-blue    .team-color-bar { background: var(--team-b9-blue); }
.team-b9-yellow  .team-color-bar { background: var(--team-b9-yellow); }
.team-elev-blue  .team-color-bar { background: var(--team-elev-blue); }
.team-elev-yellow.team-color-bar { background: var(--team-elev-yellow); }

.team-section > .team-color-bar { margin-bottom: 1.25rem; }

.team-title {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.1;
}
.team-meta {
  color: var(--muted);
  font-size: .85rem;
  margin-top: .15rem;
  margin-bottom: .75rem;
}
.coach-tag {
  display: inline-block;
  background: #eee;
  border-radius: 20px;
  padding: .15rem .6rem;
  font-size: .8rem;
  font-weight: 600;
  margin-right: .3rem;
}

/* === Grid layout === */
.section-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 600px) {
  .section-grid { grid-template-columns: 1fr 1fr; }
}
.card-full { grid-column: 1 / -1; }

/* === Card === */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem 1.15rem;
}
.card-title {
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: .7rem;
}

/* === Departure === */
.departure-time {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--primary);
}
.departure-place {
  color: var(--muted);
  font-size: .9rem;
  margin: .2rem 0 .75rem;
}
.map-btn {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  padding: .4rem .85rem;
  border-radius: 8px;
  font-size: .82rem;
  font-weight: 700;
  margin-bottom: .85rem;
}
.map-btn:hover { opacity: .88; }

.cars-label {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: .05em;
  margin-bottom: .4rem;
}
.cars-list { display: flex; flex-direction: column; gap: .35rem; }
.car-item {
  background: #f8f9fa;
  border-radius: 8px;
  padding: .45rem .65rem;
  font-size: .82rem;
}
.car-driver { font-weight: 700; }
.car-passengers { color: var(--muted); }

/* === Roster === */
.roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: .4rem;
}
.player {
  display: flex;
  align-items: center;
  gap: .4rem;
  background: #f8f9fa;
  border-radius: 8px;
  padding: .35rem .5rem;
  font-size: .82rem;
}
.player-nr {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 800;
  flex-shrink: 0;
  color: #fff;
}
.player-name { font-weight: 500; line-height: 1.2; }

/* Team-colored numbers */
.team-mvp        .player-nr { background: var(--team-mvp); }
.team-b9-blue    .player-nr { background: var(--team-b9-blue); }
.team-b9-yellow  .player-nr { background: var(--team-b9-yellow); color: #333; }
.team-elev-blue  .player-nr { background: var(--team-elev-blue); }
.team-elev-yellow .player-nr { background: var(--team-elev-yellow); }

/* MVP without numbers */
.player.no-nr { padding-left: .75rem; }
.player.no-nr::before {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--team-mvp);
  flex-shrink: 0;
}

/* === Schedule table === */
.schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .83rem;
}
.schedule-table th {
  text-align: left;
  padding: .3rem .5rem;
  color: var(--muted);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 2px solid var(--border);
}
.schedule-table td {
  padding: .5rem .5rem;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}
.schedule-table tr:last-child td { border-bottom: none; }

.day-badge {
  font-size: .7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
  white-space: nowrap;
}
.day-fri { background: #E3F2FD; color: #1565C0; }
.day-sat { background: #FFF3E0; color: #E65100; }

.match-teams { font-weight: 500; }
.match-teams strong { color: var(--primary); }

/* === Info note === */
.info-note {
  background: #E8F5E9;
  border-left: 4px solid var(--team-mvp);
  padding: .65rem .9rem;
  border-radius: 0 8px 8px 0;
  font-size: .875rem;
  margin-bottom: .75rem;
}

/* === Accordion === */
.accordion {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.accordion-item + .accordion-item { border-top: 1px solid var(--border); }

.accordion-btn {
  width: 100%;
  background: var(--white);
  border: none;
  padding: .8rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: .88rem;
  font-weight: 600;
  text-align: left;
  transition: background .1s;
}
.accordion-btn:hover { background: #fafafa; }
.accordion-icon {
  font-style: normal;
  font-size: .75rem;
  color: #aaa;
  transition: transform .2s;
}
.accordion-item.open .accordion-icon { transform: rotate(180deg); }

.accordion-body {
  display: none;
  padding: .75rem 1rem 1rem;
  background: #fafafa;
  font-size: .865rem;
}
.accordion-item.open .accordion-body { display: block; }
.accordion-body ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.accordion-body ul li::before {
  content: '✓ ';
  color: #27AE60;
  font-weight: 700;
}
.accordion-body .note {
  margin-top: .6rem;
  font-size: .82rem;
  color: var(--muted);
  font-style: italic;
}

/* === Links section === */
.links-row {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.link-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .55rem 1rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: .85rem;
  transition: opacity .15s;
}
.link-btn:hover { opacity: .85; }
.btn-music  { background: #1DB954; color: #fff; }
.btn-photo  { background: #4285F4; color: #fff; }
.btn-results { background: var(--dark); color: #fff; }
.btn-placeholder { background: #e0e0e0; color: #888; cursor: default; }

/* === Shared info section === */
.shared-info {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--border);
}
.shared-info h2 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.info-blocks {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 600px) {
  .info-blocks { grid-template-columns: 1fr 1fr; }
}

/* Merch */
.merch-list {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.merch-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .875rem;
  padding: .35rem 0;
  border-bottom: 1px solid #f0f0f0;
}
.merch-item:last-child { border-bottom: none; }
.merch-price {
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  margin-left: .5rem;
}

/* Hotel */
.hotel-address {
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: .4rem;
}
.hotel-note {
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: .3rem;
}

/* Pickup */
.pickup-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .5rem;
}
.pickup-chip {
  background: #FFF3E0;
  color: #E65100;
  border-radius: 20px;
  padding: .25rem .7rem;
  font-size: .83rem;
  font-weight: 700;
}

/* === Footer === */
footer {
  text-align: center;
  padding: 2rem 1rem 2.5rem;
  color: var(--muted);
  font-size: .83rem;
  border-top: 1px solid var(--border);
  margin-top: 1rem;
}
footer a { color: var(--primary); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* === Responsive tweaks === */
@media (max-width: 380px) {
  .header-text h1 { font-size: 1.15rem; }
  .team-tab { padding: .75rem .8rem; font-size: .78rem; }
}
