
:root { --gold:   #FFD200; --black:  #1A1A1A; --white:  #FFFFFF; --bg:     #F5F5F5; --text:   #333333; --muted:  #666666; --border: #E0E0E0; --card:   #FFFFFF; --orig-ncaa: #1a5276; --club:      #6d4c41; --curr-ncaa: #1b5e20; }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Open Sans', sans-serif; background: var(--bg); color: var(--text); font-size: 14px; }

/* HEADER */
.site-header { background: var(--black); padding: 14px 20px; }
.header-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 14px; }
.site-logo { height: 52px; width: auto; }
.header-title { color: var(--gold); font-size: 18px; font-weight: 700; line-height: 1.2; }
.header-sub { color: #aaa; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .8px; }

/* NAV */
.site-nav { background: var(--black); border-top: 2px solid var(--gold); position: sticky; top: 0; z-index: 100; }
.nav-inner { max-width: 1200px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 2px; padding: 0 8px; }
.site-nav a { color: #ccc; text-decoration: none; padding: 10px 12px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; transition: color .15s, border-bottom .15s; border-bottom: 3px solid transparent; }
.site-nav a:hover { color: var(--gold); }
.site-nav a.active { color: var(--gold); border-bottom: 3px solid var(--gold); }
.site-nav a.ext-link { margin-left: auto; color: #888; font-size: 11px; }

/* MAIN */
.main-content { max-width: 1200px; margin: 0 auto; padding: 24px 16px 48px; }

/* PAGE HEADER */
.page-header { margin-bottom: 28px; }
.page-header h1 { font-size: 22px; font-weight: 700; color: var(--black); }
.page-header p { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* SECTION HEADER */
.section-header { margin: 32px 0 16px; border-left: 4px solid var(--gold); padding-left: 12px; }
.section-header h2 { font-size: 16px; font-weight: 700; color: var(--black); text-transform: uppercase; letter-spacing: .5px; }
.section-note { color: var(--muted); font-size: 12px; margin-top: 4px; }

/* RECORD GRID */
.record-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; margin-bottom: 28px; }
.record-card { background: var(--card); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.record-card-title { background: var(--black); color: var(--gold); padding: 8px 12px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; }
.record-note { font-size: 11px; color: var(--muted); padding: 6px 12px 0; }
.record-table-wrap { overflow-x: auto; }
.record-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.record-table thead th { background: #2d2d2d; color: #fff; padding: 6px 10px; text-align: left; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; }
.record-table tbody tr:nth-child(even) { background: #fafafa; }
.record-table tbody tr:hover { background: #fff8e1; }
.record-table td { padding: 6px 10px; border-bottom: 1px solid #f0f0f0; white-space: nowrap; vertical-align: middle; }
.record-table tfoot td { padding: 6px 10px; font-size: 10px; color: var(--muted); border-top: 1px solid var(--border); }
.rank { display: inline-block; background: var(--gold); color: var(--black); font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 3px; min-width: 20px; text-align: center; }
.rank-tied { display: inline-block; font-size: 10px; color: #aaa; padding: 1px 5px; }
.player-name { font-weight: 600; }
.stat-val strong { color: var(--black); }

/* ERA BADGES */
.era-badge { display: inline-block; font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 3px; text-transform: uppercase; letter-spacing: .4px; vertical-align: middle; }
.era-orig-ncaa { background: #d6eaf8; color: var(--orig-ncaa); }
.era-club { background: #f5e6e0; color: var(--club); }
.era-curr-ncaa { background: #d5f5e3; color: var(--curr-ncaa); }

/* ERA EXPLAINER */
.era-explainer { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0 24px; }
.era-card { flex: 1; min-width: 180px; padding: 12px 16px; border-radius: 6px; border: 1px solid var(--border); }
.era-card.orig { border-left: 4px solid var(--orig-ncaa); background: #eaf4fb; }
.era-card.club { border-left: 4px solid var(--club); background: #fdf0ec; }
.era-card.curr { border-left: 4px solid var(--curr-ncaa); background: #eafaf1; }
.era-card h4 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.era-card.orig h4 { color: var(--orig-ncaa); }
.era-card.club h4 { color: var(--club); }
.era-card.curr h4 { color: var(--curr-ncaa); }
.era-card p { font-size: 11px; color: var(--muted); line-height: 1.4; }

/* TEAM HISTORY TABLE */
.history-table-wrap { overflow-x: auto; margin-bottom: 28px; }
.history-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.history-table thead th { background: var(--black); color: var(--gold); padding: 8px 12px; text-align: center; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; }
.history-table thead th:first-child { text-align: left; }
.history-table tbody td { padding: 7px 12px; border-bottom: 1px solid var(--border); text-align: center; }
.history-table tbody td:first-child { text-align: left; font-weight: 600; }
.history-table tbody tr:hover { background: #fff8e1; }
.history-table .era-sep td { background: #f0f0f0; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); text-align: center; padding: 4px 12px; }
.w { color: #1b5e20; font-weight: 700; }
.l { color: #b71c1c; }

/* OPPONENTS TABLE */
.opp-table-wrap { overflow-x: auto; margin-bottom: 28px; }
.opp-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.opp-table thead th { background: var(--black); color: var(--gold); padding: 7px 10px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; cursor: pointer; }
.opp-table thead th:hover { background: #333; }
.opp-table td { padding: 6px 10px; border-bottom: 1px solid #f0f0f0; white-space: nowrap; text-align: center; }
.opp-table td:first-child { text-align: left; font-weight: 600; }
.opp-table tr:hover { background: #fff8e1; }
.pct-green { color: #1b5e20; font-weight: 700; }
.pct-orange { color: #e65100; font-weight: 700; }
.pct-red { color: #b71c1c; font-weight: 700; }
.diff-pos { color: #1b5e20; }
.diff-neg { color: #b71c1c; }
details.series-detail summary { cursor: pointer; color: #666; font-size: 11px; }
details.series-detail ul { margin: 4px 0 0 12px; list-style: none; padding: 0; }
details.series-detail li { font-size: 11px; color: #555; padding: 2px 0; }

/* RESULTS TABLE */
.results-table-wrap { overflow-x: auto; margin-bottom: 28px; }
.results-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.results-table thead th { background: var(--black); color: var(--gold); padding: 7px 10px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; }
.results-table tbody td { padding: 6px 10px; border-bottom: 1px solid #f0f0f0; white-space: nowrap; }
.results-table tbody tr:hover { background: #fff8e1; }
.badge-w { background: #c8e6c9; color: #1b5e20; padding: 1px 6px; border-radius: 3px; font-weight: 700; font-size: 11px; }
.badge-l { background: #ffcdd2; color: #b71c1c; padding: 1px 6px; border-radius: 3px; font-weight: 700; font-size: 11px; }
.badge-t { background: #e0e0e0; color: #555; padding: 1px 6px; border-radius: 3px; font-weight: 700; font-size: 11px; }

/* PLAYER PROFILES */
.profile-layout { display: flex; gap: 20px; align-items: flex-start; }
.profile-sidebar { width: 180px; flex-shrink: 0; position: sticky; top: 70px; max-height: calc(100vh - 90px); overflow-y: auto; }
.sidebar-search { width: 100%; padding: 7px 10px; border: 1px solid var(--border); border-radius: 4px; font-size: 12px; margin-bottom: 10px; }
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar-nav a { font-size: 12px; font-weight: 600; color: var(--muted); text-decoration: none; padding: 4px 8px; border-radius: 3px; }
.sidebar-nav a:hover, .sidebar-nav a.active { background: var(--gold); color: var(--black); }
.profiles-list { flex: 1; min-width: 0; }
.letter-group { margin-bottom: 32px; }
.letter-anchor { font-size: 22px; font-weight: 700; color: var(--black); border-bottom: 3px solid var(--gold); padding-bottom: 4px; margin-bottom: 14px; }
.player-card { background: var(--card); border: 1px solid var(--border); border-radius: 6px; margin-bottom: 16px; overflow: hidden; }
.player-card-header { background: var(--black); color: var(--gold); padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; }
.player-card-header h3 { font-size: 14px; font-weight: 700; }
.player-card-years { font-size: 11px; color: #aaa; }
.player-card-meta { padding: 6px 14px; background: #fafafa; border-bottom: 1px solid var(--border); display: flex; gap: 16px; font-size: 11px; color: var(--muted); flex-wrap: wrap; }
.player-card-meta span { font-weight: 600; color: var(--text); }
.player-card-body { padding: 12px 14px; }
.player-stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; margin-bottom: 12px; }
.player-stat-box { background: #f5f5f5; border-radius: 4px; padding: 8px 10px; text-align: center; }
.player-stat-val { font-size: 18px; font-weight: 700; color: var(--black); }
.player-stat-lbl { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-top: 2px; }
.marks-label { grid-column: 1 / -1; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #888; margin-top: 4px; }
.mark-legend { grid-column: 1 / -1; display: flex; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.marks-grid { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.legend-item { display: flex; align-items: center; gap: 4px; font-size: 11px; color: #888; }
.legend-dot { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }
.mark-chip { display: inline-flex; align-items: center; gap: 5px; background: #fff; border: 1px solid #ddd; border-radius: 3px; padding: 4px 10px; font-size: 12px; }
.mark-chip .mc-rank { background: var(--gold); color: var(--black); font-weight: 700; font-size: 10px; padding: 1px 5px; border-radius: 2px; }
.mark-chip .mc-cat { color: var(--black); font-weight: 600; }
.mark-chip .mc-val { color: #555; }
.mark-chip .mc-type { font-size: 10px; color: #aaa; }
.career-chip { border-color: var(--gold); background: #fffbea; }
.season-chip { border-color: #82e0aa; background: #f1faf4; }
.game-chip { border-color: #85c1e9; background: #f0f7ff; }
.player-season-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #888; margin: 0 0 6px 0; }
.player-season-wrap { margin: 0 0 10px 0; overflow-x: auto; }
.player-season-table { width: 100%; border-collapse: collapse; margin: 0; font-size: 12px; }
.player-season-table th { background: #2d2d2d; color: #fff; padding: 5px 8px; text-align: center; font-weight: 600; font-size: 10px; text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; }
.player-season-table th:first-child { text-align: left; }
.player-season-table td { padding: 5px 8px; text-align: center; border-bottom: 1px solid #f0f0f0; color: #444; white-space: nowrap; }
.player-season-table td:first-child { text-align: left; font-weight: 600; color: var(--black); }
.player-season-table tbody tr:last-child td { border-bottom: none; background: #f5f5f5; font-weight: 700; color: var(--black); border-top: 2px solid #ddd; }
.no-records { font-size: 12px; color: var(--muted); font-style: italic; padding: 8px 0; }

/* AVAILABILITY NOTE */
.availability-note { background: #fff8e1; border: 1px solid #ffe082; border-radius: 6px; padding: 12px 16px; margin-bottom: 20px; font-size: 12px; color: #5d4037; }

/* STAT SUMMARY CARDS (home page) */
.summary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin-bottom: 28px; }
.summary-card { background: var(--card); border: 1px solid var(--border); border-radius: 6px; padding: 16px; text-align: center; }
.summary-val { font-size: 28px; font-weight: 700; color: var(--black); }
.summary-lbl { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); margin-top: 4px; }

/* TIE DROPDOWN */
details.tie-dropdown summary { cursor: pointer; font-weight: 600; color: var(--muted); font-size: 11px; }
ul.tie-list { margin: 4px 0 0 12px; padding: 0; list-style: none; }
ul.tie-list li { font-size: 11px; color: var(--text); padding: 1px 0; }

/* FOOTER */
.site-footer { background: var(--black); color: #888; text-align: center; padding: 16px; font-size: 11px; margin-top: 40px; }

@media (max-width: 680px) { .record-grid { grid-template-columns: 1fr; }
.profile-layout { flex-direction: column; }
.profile-sidebar { width: 100%; position: static; }
.era-explainer { flex-direction: column; }
}
