/* ============================================
   PLAYERS PAGE - ROSTER LIST
   ============================================ */

:root {
    --predators-gold: #FFB81C;
    --predators-navy: #041E42;
}

.page-players {
    background: #f8f9fa;
    min-height: 100vh;
}

/* ============================================
   PAGE HEADER
   ============================================ */

.players-page-header {
    background: linear-gradient(135deg, var(--predators-navy) 0%, #052a5c 100%);
    color: white;
    padding: 24px 24px 20px;
}

.players-header-content {
    max-width: 1400px;
    margin: 0 auto;
}

.players-page-header h1 {
    font-size: 32px;
    font-weight: 900;
    margin: 0 0 8px 0;
}

.season-subtitle {
    font-size: 16px;
    opacity: 0.9;
    margin: 0;
}

/* ============================================
   ROSTER CONTAINER
   ============================================ */

.roster-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px;
}

.roster-section {
    margin-bottom: 48px;
}

.section-heading {
    font-size: 24px;
    font-weight: 800;
    color: var(--predators-navy);
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--predators-gold);
}

/* ============================================
   ROSTER TABLE
   ============================================ */

.roster-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    align-items: start;
}

.roster-table-wrapper {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.roster-sidebar {
    position: sticky;
    top: 20px;
}

.roster-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-top: 4px solid var(--predators-gold);
}

.roster-card-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--predators-navy);
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--predators-gold);
}

.spotlight-player {
    text-align: center;
    margin-bottom: 20px;
}

.spotlight-headshot {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--predators-gold);
    margin: 0 auto 12px;
    object-fit: cover;
}

.spotlight-name {
    font-size: 18px;
    font-weight: 800;
    color: var(--predators-navy);
    margin: 0 0 4px 0;
}

.spotlight-info {
    font-size: 13px;
    color: #6b7280;
    font-weight: 600;
}

.fun-facts-section {
    margin-top: 20px;
}

.fun-facts-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--predators-navy);
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fun-fact-item {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 3px solid var(--predators-gold);
}

.fun-fact-item:last-child {
    margin-bottom: 0;
}

.fun-fact-label {
    font-size: 11px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    margin-bottom: 4px;
}

.fun-fact-value {
    font-size: 13px;
    color: var(--predators-navy);
    font-weight: 600;
    line-height: 1.4;
}

.roster-table {
    width: 100%;
    border-collapse: collapse;
}

.roster-table thead {
    background: var(--predators-navy);
    position: sticky;
    top: 0;
    z-index: 10;
}

.roster-table th {
    color: white;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 16px 12px;
    text-align: left;
    background: var(--predators-navy);
    border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.roster-table th:last-child {
    border-right: none;
}

.roster-table th.text-center {
    text-align: center;
}

.roster-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background 0.2s ease;
}

.roster-table tbody tr:hover {
    background: #f8f9fa;
}

.roster-table tbody tr.section-header {
    background: linear-gradient(to right, rgba(255, 184, 28, 0.15), rgba(255, 184, 28, 0.05));
    font-weight: 700;
}

.roster-table tbody tr.section-header:hover {
    background: linear-gradient(to right, rgba(255, 184, 28, 0.2), rgba(255, 184, 28, 0.08));
}

.roster-table tbody tr.section-header td {
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 700;
    color: var(--predators-navy);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: auto;
}

.roster-table td {
    padding: 14px 12px;
    font-size: 14px;
    color: #1a1a1a;
    border-right: 1px solid #e9ecef;
}

.roster-table td:last-child {
    border-right: none;
}

.roster-table td.text-center {
    text-align: center;
}

/* Player Name Cell with Headshot */
.player-name-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.player-headshot-small {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid var(--predators-gold);
    object-fit: cover;
    background: white;
}

.player-info-wrapper {
    display: flex;
    flex-direction: column;
}

.player-name {
    font-weight: 700;
    color: var(--predators-navy);
    font-size: 15px;
}

.player-number-inline {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
}

/* Position Badge */
.position-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.position-badge.forward {
    background: rgba(59, 130, 246, 0.15);
    color: #1e40af;
}

.position-badge.defense {
    background: rgba(239, 68, 68, 0.15);
    color: #991b1b;
}

.position-badge.goalie {
    background: rgba(34, 197, 94, 0.15);
    color: #15803d;
}

/* Shoots/Catches */
.shoots-catches {
    font-weight: 600;
}

/* Country Flag */
.country-flag {
    width: 24px;
    height: 18px;
    object-fit: cover;
    border-radius: 2px;
    margin-right: 6px;
    vertical-align: middle;
}

/* Section Icon */
.section-icon {
    font-size: 20px;
    margin-right: 8px;
}

/* ============================================
   LOADING & ERROR STATES
   ============================================ */

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 16px;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--predators-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    color: #6b7280;
    font-size: 14px;
}

.error-message {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
    font-size: 16px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    .roster-with-sidebar {
        grid-template-columns: 1fr;
    }

    .roster-sidebar {
        position: static;
    }

    .roster-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .roster-table {
        min-width: 900px;
    }
}

@media (max-width: 768px) {
    .players-page-header {
        padding: 20px 16px 16px;
    }

    .players-page-header h1 {
        font-size: 24px;
    }

    .roster-container {
        padding: 24px 16px;
    }

    .section-heading {
        font-size: 20px;
    }

    .roster-table th,
    .roster-table td {
        padding: 12px 8px;
        font-size: 14px;
    }

    .player-headshot-small {
        width: 40px;
        height: 40px;
    }

    .player-name-cell {
        gap: 8px;
    }

    .player-name {
        font-size: 15px;
    }

    /* Enable horizontal scroll for tables on tablets/landscape */
    .roster-table-wrapper {
        position: relative;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Visual indicator for horizontal scrolling */
    .roster-table-wrapper::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 40px;
        background: linear-gradient(to left, rgba(255, 255, 255, 0.95), transparent);
        pointer-events: none;
        z-index: 5;
    }

    /* Make first column (Player name) sticky for tablets/landscape */
    .roster-table th:first-child,
    .roster-table td:first-child {
        position: sticky;
        left: 0;
        z-index: 10;
        background-color: #ffffff;
        box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
    }

    .roster-table thead th:first-child {
        z-index: 11;
        background-color: #041E42;
    }

    .roster-table tbody tr.section-header td:first-child {
        background-color: #f8f9fa;
    }
}

@media (max-width: 480px) {
    .roster-table-wrapper {
        position: relative;
        overflow-x: auto;
    }

    .roster-table {
        min-width: 700px;
    }

    .player-headshot-small {
        width: 36px;
        height: 36px;
    }

    .roster-table th,
    .roster-table td {
        padding: 10px 6px;
        font-size: 12px;
    }

    /* Make first column (Player name) sticky */
    .roster-table th:first-child,
    .roster-table td:first-child {
        position: sticky;
        left: 0;
        z-index: 10;
        background-color: #ffffff;
        box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
        max-width: 120px;
        min-width: 120px;
        width: 120px;
        padding: 8px 4px !important;
    }

    .roster-table thead th:first-child {
        z-index: 11;
        background-color: #041E42;
    }

    /* Section headers also sticky */
    .roster-table tbody tr.section-header td:first-child {
        background-color: #f8f9fa;
        font-weight: 700;
    }

    .player-name {
        font-size: 11px;
    }

    .player-name-cell {
        gap: 4px;
        min-width: 120px;
        max-width: 120px;
    }

    .player-headshot-small {
        width: 28px !important;
        height: 28px !important;
    }
}
