/* Date Navigator */
.kobit-date-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background-color: #0057b8; /* Main blue color */
    color: #FFFFFF;
}
.kobit-date-nav-btn {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.7);
    color: #FFFFFF;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
    line-height: 1.5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.kobit-date-nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}
.kobit-date-nav-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.kobit-datepicker {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.7);
    color: #FFFFFF;
    border-radius: 4px;
    padding: 7px 10px; /* to match button height */
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    width: 160px;
}
/* Match Filters */
.kobit-match-filters {
    display: flex;
    gap: 8px;
    padding: 8px 16px;
    background-color: #F0F5FA;
    border-bottom: 1px solid #D1D5DB;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
.kobit-filter-btn {
    background-color: #FFFFFF;
    border: 1px solid #D1D5DB;
    color: #212121;
    border-radius: 16px; /* Pill shape */
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}
.kobit-filter-btn.active, .kobit-filter-btn:hover {
    background-color: #0057b8;
    color: #FFFFFF;
    border-color: #0057b8;
}
/* Live Count Badge */
.kobit-live-badge {
    display: inline-block;
    margin-left: 8px;
    background-color: #E53935; /* Live Red */
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    line-height: 1.2;
    vertical-align: middle;
    animation: kobitPulse 1.5s infinite;
}
.kobit-filter-btn.active .kobit-live-badge, .kobit-filter-btn:hover .kobit-live-badge {
    background-color: #FFFFFF;
    color: #0057b8;
    animation: none; /* Stop pulsing on hover/active */
}
@keyframes kobitPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(229, 57, 53, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(229, 57, 53, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(229, 57, 53, 0); }
}
.kobit-league-table th.rank, .kobit-league-table td.rank {
    position: sticky;
    left: 0;
    z-index: 2;
    background-color: #0057b8 !important;
    color: #fff !important;
    width: 40px;
    min-width: 40px;
    text-align: center;
}
.kobit-league-table th.team, .kobit-league-table td.team {
    position: sticky;
    left: 40px;
    z-index: 2;
    background-color: #0057b8 !important;
    color: #fff !important;
    border-right: 1px solid #004494;
}
.kobit-league-table .team-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 5px;
}
/* Player Stats List Table Styles */
.kobit-stats-table { font-size: 14px; }
.kobit-stats-table-header, .kobit-stats-table-row { display: flex; align-items: center; padding: 12px 8px; border-bottom: 1px solid #D1D5DB; }
.kobit-stats-table-header { font-weight: bold; color: #212121; border-bottom-width: 2px; }
.kobit-stats-table-row:hover { background-color: #E3F2FD; }
.col-rank { width: 40px; text-align: center; color: #888; flex-shrink: 0; }
.col-player { width: 45%; display: flex; align-items: center; padding-right: 15px; }
.col-player .player-photo { width: 32px; height: 32px; border-radius: 50%; margin-right: 12px; object-fit: cover; background-color: #F0F5FA; }
.col-team { width: 35%; display: flex; align-items: center; }
.col-team .team-logo { width: 22px; height: 22px; margin-right: 10px; object-fit: contain; }
.col-stat { width: 10%; text-align: right; font-weight: bold; font-size: 16px; padding-right: 10px; flex-shrink: 0; }

/* Player Season Stats Table */
.kobit-player-season-stats { font-size: 14px; }
.kobit-player-season-stats-header, .kobit-player-season-stats-row { display: flex; align-items: center; padding: 12px 8px; border-bottom: 1px solid #D1D5DB; }
.kobit-player-season-stats-header { font-weight: bold; color: #212121; }
.kobit-player-season-stats-row:hover { background-color: #e3f2fd; }
.kobit-player-season-stats .col-competition { flex-grow: 1; display: flex; align-items: center; }
.kobit-player-season-stats .col-competition .competition-logo { width: 20px; height: 20px; margin-right: 8px; object-fit: contain; }
.kobit-player-season-stats .col-stat-icon { width: 50px; text-align: center; flex-shrink: 0; }
.kobit-player-season-stats-header .col-stat-icon { font-size: 12px; }
.kobit-player-season-stats-header .col-stat-icon i { font-size: 16px; }
.kobit-player-season-stats-header .col-stat-icon .is-yellow-card { color: #ffc107; }
.kobit-player-season-stats-header .col-stat-icon .is-red-card { color: #dc3545; }
.kobit-player-season-stats a.col-competition { text-decoration: none; color: inherit; }
.kobit-player-season-stats a.col-competition:hover { color: #0057b8; }
.kobit-player-season-stats a.col-competition:hover span { text-decoration: underline; }

/* Modern Career Summary */
.kobit-career-summary.modern { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-top: 20px; }
.kobit-summary-card { background-color: #F0F5FA; border: 1px solid #D1D5DB; border-radius: 8px; padding: 20px; text-align: center; transition: transform 0.2s, box-shadow 0.2s; }
.kobit-summary-card:hover { transform: translateY(-3px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.kobit-summary-card-icon { font-size: 28px; color: #0057b8; margin-bottom: 12px; }
.kobit-summary-card-value { font-size: 36px; font-weight: 700; color: #212121; line-height: 1.2; }
.kobit-summary-card-label { font-size: 14px; color: #555; margin-top: 4px; }

/* Modern Transfer History (Responsive) */
.kobit-transfer-history.modern { display: flex; flex-direction: column; gap: 12px; }
.kobit-transfer-header { 
    display: grid; 
    grid-template-columns: 100px 1fr 100px; 
    padding: 0 16px 8px 16px; 
    font-weight: 600; 
    color: #757575; 
    font-size: 13px;
    border-bottom: 1px solid #D1D5DB;
    transition: border-color 0.3s ease, color 0.3s ease;
}
.kobit-transfer-header .th-movement { text-align: center; }
.kobit-transfer-header .th-type { text-align: right; }

.kobit-transfer-card { 
    background-color: #E3F2FD; 
    color: #000000;
    border: 1px solid #D1D5DB; 
    border-radius: 8px; 
    padding: 16px; 
    display: grid;
    grid-template-columns: 100px 1fr 100px;
    align-items: center;
    gap: 16px;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.transfer-meta { display: flex; flex-direction: column; gap: 4px; }
.transfer-date { font-size: 13px; color: #757575; }
.transfer-type-badge { display: inline-block; background-color: #FFFFFF; color: #212121; padding: 4px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; text-transform: uppercase; width: fit-content; }

.transfer-movement { display: flex; align-items: center; justify-content: center; gap: 12px; flex: 1; }
.transfer-team { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; width: 45%; }
.transfer-team img { width: 32px; height: 32px; object-fit: contain; }
.transfer-team span { font-size: 13px; font-weight: 500; line-height: 1.2; }
.transfer-arrow { color: #BDBDBD; font-size: 14px; }

/* Mobile Transfers */
@media (max-width: 767px) {
    .kobit-transfer-header { display: none; }
    .kobit-transfer-card {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .transfer-meta { 
        flex-direction: row; 
        justify-content: space-between; 
        align-items: center; 
        border-bottom: 1px solid #F0F5FA; 
        padding-bottom: 8px; 
    }
    .transfer-movement { justify-content: space-between; }
    .transfer-team { flex-direction: row; width: auto; gap: 8px; text-align: left; }
    .transfer-team.from { justify-content: flex-start; }
    .transfer-team.to { justify-content: flex-end; flex-direction: row-reverse; text-align: right; }
}

/* Match Filters */
body.kobit-dark-mode .kobit-match-filters {
    background-color: #2c2c2c;
    border-bottom-color: #333;
}
body.kobit-dark-mode .kobit-filter-btn {
    background-color: #1e1e1e;
    border-color: #444;
    color: #e0e0e0;
}
body.kobit-dark-mode .kobit-filter-btn.active, body.kobit-dark-mode .kobit-filter-btn:hover {
    background-color: #4dabf5;
    border-color: #4dabf5;
    color: #fff;
}

/* Transfer History */
body.kobit-dark-mode .kobit-transfer-header {
    border-bottom-color: #333;
    color: #a0a0a0;
}
body.kobit-dark-mode .kobit-transfer-card {
    background-color: #2c2c2c;
    border-color: #444;
    color: #e0e0e0;
}
body.kobit-dark-mode .transfer-meta { border-bottom-color: #333; }
body.kobit-dark-mode .transfer-type-badge { background-color: #333; color: #4dabf5; }
body.kobit-dark-mode .transfer-arrow { color: #666; }

/* Sticky Table Columns in Dark Mode */
body.kobit-dark-mode .kobit-league-table th.rank,
body.kobit-dark-mode .kobit-league-table td.rank,
body.kobit-dark-mode .kobit-league-table th.team,
body.kobit-dark-mode .kobit-league-table td.team {
    background-color: #1e1e1e !important;
    color: #fff !important;
    border-right-color: #333;
}

/* Highlighted Sticky Columns in Dark Mode */
body.kobit-dark-mode .kobit-league-table tr.highlighted td.rank,
body.kobit-dark-mode .kobit-league-table tr.highlighted td.team {
    background-color: #333 !important;
}