/* -----------------------------
   GENERAL PAGE STYLING
----------------------------- */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    background: #f8f8f8;
    color: #222;
}

main {
    padding: 20px;
    padding-top: 0;
}

h1, h2 {
    text-align: center;
    margin-top: 0;
}

h1 {
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 0.03em;
}

/* --- Global Link Styling --- */
a {
    color: #0062B8;
    text-decoration: none;
}

a:hover,
a:focus {
    color: #003E7E;
    text-decoration: underline;
}

a:visited {
    color: #4F2D7F;
}

/* -----------------------------
   NAVIGATION
----------------------------- */
.topnav {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 10px 20px;
    text-align: center;
    border-radius: 0;
    background-color: #0062B8;
    margin-bottom: 25px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.topnav a {
    color: #fff;
    text-decoration: none;
    margin: 0 10px;
    font-weight: bold;
    font-size: 16px;
    transition: color 0.3s;
}

.topnav a:hover {
    color: #BDD6E6;
}

.topnav .separator {
    color: #fff;
}

/* -----------------------------
   GLOBAL TABLE BASE
----------------------------- */
table {
    border-collapse: collapse;
    white-space: nowrap;
    table-layout: auto;
    background: #fff;
    margin: 10px 0;
}

td {
    border: 1px solid #000;
    padding: 6px 8px;
    text-align: center;
}

/* GLOBAL TABLE HEADER */
table th {
    background-color: #0062B8;
    color: white;
    font-weight: bold;
    text-align: center;
    padding: 8px;
    cursor: pointer;
}

/* Zebra stripes */
tr:nth-child(even) { background-color: #ddd; }
tr:nth-child(odd)  { background-color: #fff; }
tr:hover           { background-color: #e6f7ff; }

/* -----------------------------
   SCROLLABLE STAT TABLES
   All major stat table classes
   get overflow scroll so they
   never blow out the page width
----------------------------- */
.stats-table,
.ps-table,
.gl-table,
.yl-table,
.team-stats-table {
    display: block;
    overflow-x: auto;
    max-width: 100%;
    width: auto;
    white-space: nowrap;
    border-collapse: collapse;
    font-size: 0.85rem;
    background: #fff;
    margin: 0;
}

.stats-table th, .stats-table td,
.ps-table th,   .ps-table td,
.gl-table th,   .gl-table td,
.yl-table th,   .yl-table td,
.team-stats-table th, .team-stats-table td {
    border: 1px solid #ccc;
    padding: 4px 6px;
    text-align: center;
    white-space: nowrap;
}

.stats-table th,
.ps-table th,
.gl-table th,
.yl-table th,
.team-stats-table th {
    background-color: #0062B8;
    color: white;
    font-weight: bold;
}

/* Sort indicators */
th.sort-asc::after  { content: ' ▲'; font-size: 0.75em; }
th.sort-desc::after { content: ' ▼'; font-size: 0.75em; }

/* Year gap blue bar */
tr.year-gap td {
    padding: 0;
    height: 3px;
    background-color: #0062B8;
    border: none;
}

/* Team stats section rows */
.team-stats-table tr.stat-section td {
    background-color: #dce9f8;
    font-weight: bold;
    color: #003E7E;
}
.team-stats-table tr.stat-section td:not(:first-child) { text-align: right; }
.team-stats-table tr.stat-sub td:first-child { padding-left: 24px; color: #333; }
.team-stats-table td:not(:first-child) { text-align: right; }

/* -----------------------------
   STATS TABLE CONTAINER
----------------------------- */
.stats-table-container {
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
    margin: 10px 0;
}

.stats-table-title {
    text-align: left;
    margin-bottom: 6px;
    font-size: 1rem;
}

/* -----------------------------
   PLAYER HEADER
----------------------------- */
.player-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.playerNameHeader {
    font-family: Helvetica, Optima;
}

.player-photo-container {
    flex-shrink: 0;
}

.player-photo {
    width: 150px;
    height: auto;
    border: 2px solid #000;
    object-fit: cover;
}

.player-details h1 {
    margin-top: 0;
    margin-bottom: 2px;
    color: #0062B8;
    text-align: left;
}

.player-details p {
    margin: 1px 0;
}

/* -----------------------------
   TABS
----------------------------- */
.tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-button {
    padding: 8px 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #eee;
    cursor: pointer;
}

.tab-button.active {
    background-color: #0062B8;
    color: white;
    font-weight: bold;
}

.tab-content {
    display: none;
    background-color: #fff;
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 0 6px rgba(0,0,0,0.1);
}

.tab-content.active {
    display: block;
}

/* -----------------------------
   SUBTABS
----------------------------- */
.subtabs button {
    display: inline-block;
    margin: 0 5px;
    padding: 6px 12px;
    cursor: pointer;
    border: 1px solid #aaa;
    border-radius: 4px;
    background-color: #eee;
}

.subtabs button.active {
    background-color: #ccc;
    font-weight: bold;
}

.subtab-content { display: none; }
.subtab-content.active { display: block; }

/* -----------------------------
   TWO-COLUMN LAYOUTS
----------------------------- */
.two-col {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    width: 100%;
}

.two-col .col {
    width: 48%;
    min-width: 300px;
}

/* -----------------------------
   FEATURED PLAYER BOXES
----------------------------- */
.featured-player, .games-today {
    border: 2px solid #0062B8;
    border-radius: 8px;
    padding: 15px;
    background: #f7f9ff;
    margin-bottom: 25px;
}

.featured-player img, .featured-photo {
    width: 140px;
    height: auto;
    border-radius: 8px;
    border: 2px solid #0062B8;
    margin-bottom: 10px;
}

/* -----------------------------
   LISTS
----------------------------- */
.games-list {
    list-style: none;
    padding-left: 0;
}

.games-list li {
    margin: 6px 0;
}

.games-list a {
    text-decoration: none;
    font-weight: bold;
    color: #0062B8;
}

/* -----------------------------
   GAME INFO
----------------------------- */
.game-info-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

.game-info-col table {
    width: 100%;
}

.game-summary-text {
    padding: 1rem;
    background: #f7f7f7;
    border-radius: 6px;
}

/* -----------------------------
   COACHING HISTORY
----------------------------- */
.coaching-history {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.coaching-history th {
    background: #0062B8;
    color: white;
    padding: 8px;
    text-align: left;
}

.coaching-history td {
    padding: 6px 8px;
    border-bottom: 1px solid #ddd;
}

.coaching-history tr:nth-child(even) {
    background: #f9f9f9;
}

/* -----------------------------
   AWARD TOOLTIP
----------------------------- */
.award-tooltip {
    position: relative;
    cursor: help;
}

.award-tooltip .tooltip-text {
    visibility: hidden;
    opacity: 0;
    width: max-content;
    max-width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 6px 10px;
    border-radius: 6px;
    position: absolute;
    z-index: 10;
    left: 50%;
    transform: translateX(-50%);
    bottom: 125%;
    transition: opacity 0.2s;
    font-size: 0.85rem;
    white-space: nowrap;
}

.award-tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* -----------------------------
   STAT TABLE (alternate class)
----------------------------- */
.stat-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.stat-table th, .stat-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
    vertical-align: middle;
}

.stat-table th {
    background-color: #0062B8;
    color: white;
}

.stat-table img {
    vertical-align: middle;
    margin-right: 5px;
}

/* -----------------------------
   RESPONSIVE
----------------------------- */
@media (max-width: 700px) {
    .home-columns {
        flex-direction: column;
    }

    .two-col {
        flex-direction: column;
    }

    .two-col .col {
        width: 100%;
    }

    .game-info-two-col {
        grid-template-columns: 1fr;
    }
}