/* ---- Base / Baseball-Reference style clone ---- */
* { box-sizing: border-box; }
body {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    color: #000;
    background: #fff;
    margin: 0;
    padding: 0;
}
a { color: #0033CC; text-decoration: none; }
a:hover { text-decoration: underline; color: #6622CC; }

/* Top site header */
.site-header {
    background: #002950;
    color: #fff;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 18px;
}
.site-header a.brand {
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 0.5px;
}
.site-header nav a {
    color: #cfe0f4;
    font-size: 12px;
    margin-right: 14px;
}
.site-header nav a:hover { color: #fff; }

/* Search box */
.search-box {
    position: relative;
    margin-left: auto;
    width: 260px;
}
.search-box input {
    width: 100%;
    padding: 6px 10px;
    font-size: 12px;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    border: 1px solid #001830;
    border-radius: 3px;
    outline: none;
}
.search-box input:focus {
    box-shadow: 0 0 0 2px #6d9dd6;
}
.search-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: #fff;
    border: 1px solid #cdd7e0;
    border-radius: 3px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.18);
    max-height: 340px;
    overflow-y: auto;
    z-index: 100;
}
.search-results.open { display: block; }
.search-result {
    display: flex;
    flex-direction: column;
    padding: 6px 10px;
    color: #000;
    text-decoration: none;
    border-bottom: 1px solid #eee;
}
.search-result:last-child { border-bottom: none; }
.search-result:hover, .search-result.active {
    background: #eef4fb;
    text-decoration: none;
}
.search-result-name { font-size: 12.5px; font-weight: bold; color: #0033CC; }
.search-result-meta { font-size: 10.5px; color: #777; }
.search-empty { padding: 8px 10px; color: #888; font-size: 11.5px; }

.breadcrumb {
    background: #e8e8e8;
    padding: 6px 16px;
    font-size: 11px;
    border-bottom: 1px solid #ccc;
}
.breadcrumb a { color: #0033CC; }

.container {
    max-width: 1220px;
    margin: 0 auto;
    padding: 14px 16px 40px 16px;
}

h1.page-title {
    font-size: 22px;
    margin: 6px 0 2px 0;
    border-bottom: 2px solid #002950;
    padding-bottom: 6px;
}
.masthead-image {
    display: block;
    width: 100%;
    height: auto;
    margin: 6px auto 12px auto;
}
.subtitle {
    color: #555;
    font-size: 12px;
    margin-bottom: 14px;
}

h2.section-title {
    background: #002950;
    color: #fff;
    font-size: 13px;
    padding: 5px 8px;
    margin: 22px 0 0 0;
}

/* Tables */
table.stats {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 4px;
    font-size: 11.5px;
}
table.stats th {
    background: #dce6f1;
    border-bottom: 2px solid #9fb6cc;
    border-top: 1px solid #9fb6cc;
    padding: 4px 6px;
    text-align: center;
    font-weight: bold;
    white-space: nowrap;
    position: sticky;
    top: 0;
}
table.stats th.left, table.stats td.left { text-align: left; }
table.stats th.sortable-col {
    cursor: pointer;
    user-select: none;
    position: relative;
}
table.stats th.sortable-col:hover { background: #c9d9ea; }
table.stats th.sorted-asc::after { content: " \25B2"; font-size: 9px; }
table.stats th.sorted-desc::after { content: " \25BC"; font-size: 9px; }
table.stats td {
    padding: 3px 6px;
    text-align: center;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
}
table.stats tbody tr:nth-child(odd) { background: #f4f7fb; }
table.stats tbody tr:hover { background: #fff2c8; }
table.stats tfoot td {
    font-weight: bold;
    border-top: 2px solid #9fb6cc;
    background: #eef2f7;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid #cdd7e0;
}

/* Linescore table: keep every inning (and the R/H/E) column the same width,
   even in extra-inning games where two-digit inning numbers (10, 11, ...)
   would otherwise widen just those columns under auto table layout. */
table.stats th.inn-col, table.stats td.inn-col,
table.stats th.rhe-col, table.stats td.rhe-col {
    width: 28px;
    min-width: 28px;
    max-width: 28px;
    box-sizing: border-box;
}

/* Standings specific */
.standings-note { font-size: 11px; color: #555; margin: 4px 0 14px 0; }

/* Championship banner on home page */
.champion-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #fff6d8, #fde7a8);
    border: 1px solid #e0c366;
    border-radius: 5px;
    padding: 12px 18px;
    margin: 10px 0 16px 0;
}
.champion-cup-icon {
    width: 42px;
    height: 49px;
    flex-shrink: 0;
}
.champion-banner-text {
    font-size: 13px;
    color: #4a3b00;
    line-height: 1.5;
}
.champion-banner-text a {
    font-weight: bold;
}

/* Play-by-play collapsible innings */
.pbp-inning {
    border: 1px solid #cdd7e0;
    border-radius: 3px;
    margin-bottom: 6px;
    padding: 0;
}
.pbp-inning summary {
    background: #dce6f1;
    padding: 6px 10px;
    cursor: pointer;
    font-weight: bold;
    font-size: 12px;
    list-style: revert;
}
.pbp-inning summary:hover { background: #c9d9ea; }
.pbp-inning ul {
    margin: 0;
    padding: 8px 24px;
    font-size: 12px;
    line-height: 1.6;
}
.pbp-mini-score {
    margin: 0 24px 10px 24px;
    border-collapse: collapse;
    font-size: 12px;
}
.pbp-mini-score td {
    border: 1px solid #cdd7e0;
    padding: 3px 10px;
    text-align: center;
}
.pbp-mini-score td.left {
    text-align: left;
    font-weight: bold;
}

/* Badge row on player pages - All-Star + Award pills */
.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 4px 0 8px 0;
}
.allstar-line, .award-line {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
}
.allstar-line {
    color: #8a6d00;
    background: #fff8e1;
    border: 1px solid #f0dfa0;
}
.award-line {
    color: #0b3d68;
    background: #e7f0fa;
    border: 1px solid #b9d3ec;
}

/* Transactions list on player pages */
.transactions-list {
    list-style: none;
    padding: 0;
    margin: 6px 0;
    font-size: 12px;
}
.transactions-list li {
    padding: 5px 8px;
    border-bottom: 1px solid #eee;
}
.transactions-list li:last-child { border-bottom: none; }

/* Team color bar */
.team-bar {
    height: 6px;
    width: 100%;
    margin-bottom: 8px;
}

/* Two-column league layout */
.league-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.league-columns > div {
    min-width: 0;
}
@media (max-width: 820px) {
    .league-columns { grid-template-columns: 1fr; }
}

/* Team grid on home page */
.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 10px;
}
@media (max-width: 820px) {
    .team-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .team-grid { grid-template-columns: 1fr; }
}
.team-card {
    border: 1px solid #cdd7e0;
    border-radius: 3px;
    padding: 8px 10px;
    background: #fafbfc;
}
.team-card a { font-weight: bold; font-size: 13px; }
.team-card .rec { color: #555; font-size: 11px; }

footer {
    text-align: center;
    color: #888;
    font-size: 10.5px;
    padding: 20px 0 30px 0;
}

.draft-via {
    color: #666;
    font-size: 0.9em;
    font-style: italic;
}
.draft-via a {
    color: #666;
}

/* Player profile photo with hover zoom */
.player-photo {
    max-width: 150px;
    flex-shrink: 0;
    border: 1px solid #ccc;
    position: relative;
    z-index: 1;
    cursor: zoom-in;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    transform-origin: top left;
}
.player-photo:hover {
    transform: scale(2.6);
    z-index: 50;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

/* ---- Baseball-Reference-style player page ---- */
.bref-player { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 18px; align-items: start; }
.player-nav { position: sticky; top: 10px; align-self: start; background: #f7f7f7; border: 1px solid #ddd;
    border-radius: 4px; padding: 8px 0; font-size: 12px; max-height: calc(100vh - 20px); overflow-y: auto; }
.player-nav-title { font-weight: bold; padding: 2px 12px 6px; border-bottom: 1px solid #ddd; margin-bottom: 4px; color: #333; }
.player-nav ul { list-style: none; margin: 0; padding: 0; }
.player-nav li a { display: block; padding: 4px 12px; color: #1a5490; text-decoration: none; }
.player-nav li a:hover { background: #e8eef5; }
.player-nav-top { border-top: 1px solid #ddd; margin-top: 4px; padding: 6px 12px 0; }
.player-main { min-width: 0; }
.player-info { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 10px; }
.player-media { text-align: center; }
.photo-credit { font-size: 0.8em; color: #888; margin-top: 2px; }
.player-meta { flex: 1; min-width: 240px; }
.player-meta p { margin: 3px 0; line-height: 1.45; }
.player-meta .page-title { margin-bottom: 6px; }
.muted { color: #777; font-style: italic; }
.stats-pullout { display: flex; flex-wrap: nowrap; border: 1px solid #ccc; border-radius: 4px; background: #fff;
    margin: 6px 0 16px; overflow-x: auto; }
.stats-pullout > div { text-align: center; padding: 6px 10px; border-right: 1px solid #eee; min-width: 52px; }
.stats-pullout > div > div { line-height: 1.6; }
.stats-pullout .pullout-head { text-align: right; color: #777; font-size: 11px; background: #fafafa; }
.stats-pullout .pullout-head > div:first-child { font-weight: bold; }
.stats-pullout .pl { font-weight: bold; color: #900; border-bottom: 1px solid #ddd; }
.section-title[id] { scroll-margin-top: 10px; }
table.stats tr.combined-row td { font-weight: bold; background: #f7f4e8; }
table.stats tr.career-row td { font-weight: bold; background: #eef2f7; }
.lb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.lb-box { border: 1px solid #ddd; border-radius: 4px; padding: 6px 10px; background: #fff; }
.lb-box h3 { font-size: 12px; margin: 0 0 4px; padding-bottom: 3px; border-bottom: 1px solid #eee; color: #333; }
.lb-box ul { margin: 0; padding-left: 16px; }
.lb-box li { margin: 2px 0; }
.lb-honors { background: #fffbea; }
.lb-val { font-weight: bold; }
@media (max-width: 820px) {
    .bref-player { grid-template-columns: 1fr; }
    .player-nav { position: static; max-height: none; }
    .player-nav ul { display: flex; flex-wrap: wrap; }
    .player-nav-top { display: none; }
}
.leader-anchor, .section-title[id] { scroll-margin-top: 10px; }
/* Player pages: wider canvas so Standard Batting / Standard Fielding fit without side-scrolling */
.container:has(.bref-player) { max-width: 1440px; }
.bref-player { grid-template-columns: 170px minmax(0, 1fr); }
.bref-player table.stats th, .bref-player table.stats td { padding-left: 4px; padding-right: 4px; }
