/* KOBIT Sports - SofaScore Style Theme
 * Version: 1.2.0
 */

/* 1. GLOBAL UI & TYPOGRAPHY
-------------------------------------------------- */
.kobit-sports-match-list {
    /* Using Inter or Roboto as primary font, with fallbacks */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #FFFFFF;
    color: #212121;
}

/* Smooth Theme Transition */
body, .kobit-sports-match-list {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Sport Tabs Navigation */
.kobit-sport-tabs-nav {
    display: flex;
    background-color: #0057b8; /* Blue */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0;
    margin-bottom: 0;
    transition: background-color 0.3s ease;
}
.kobit-sport-tabs-nav::-webkit-scrollbar {
    display: none;
}
.kobit-sport-tab {
    flex: 1;
    min-width: 80px;
    text-align: center;
    padding: 12px 16px;
    color: #FFFFFF;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    border-bottom: 4px solid transparent;
    transition: background-color 0.2s;
    white-space: nowrap;
}
.kobit-sport-tab i {
    font-size: 20px;
    color: #FFC107; /* Yellow */
}
.kobit-sport-tab.active {
    background-color: rgba(255, 255, 255, 0.1);
    border-bottom-color: #FFC107;
}
.kobit-sport-tab:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #FFFFFF;
}
.kobit-tab-icon-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
}
.kobit-tab-live-badge {
    position: absolute;
    top: -4px;
    right: -8px;
    background-color: #E53935;
    color: #FFFFFF;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 4px;
    border-radius: 8px;
    min-width: 14px;
    text-align: center;
    line-height: 1;
    z-index: 1;
}

/* 2. LEAGUE/COMPETITION HEADER
-------------------------------------------------- */
.kobit-competition-group {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 16px;
    overflow: hidden;
}

.kobit-competition-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 12px 8px 12px;
    border-bottom: 1px solid #D1D5DB;
}

.kobit-competition-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.kobit-competition-name {
    font-size: 14px;
    font-weight: 600;
    color: #212121;
}

/* 3. & 4. MATCH ROW LAYOUT & STYLE
-------------------------------------------------- */
.kobit-match-row {
    display: grid;
    grid-template-columns: 50px 1fr 40px;
    gap: 12px;
    align-items: center;
    height: 60px;
    padding: 0 12px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #D1D5DB;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.kobit-match-row:last-child {
    border-bottom: none;
}

.kobit-match-row:hover {
    background-color: #E3F2FD;
}

/* Left Column: Time / Status Badge */
.kobit-match-time-status {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
}

.kobit-match-time-status .match-time {
    color: #0057b8; /* Blue for upcoming */
}

/* Middle Column: Teams & Score */
.kobit-match-teams-score {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    overflow: hidden;
}

.kobit-team {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.kobit-team.home {
    justify-content: flex-end;
}

.kobit-team.away {
    justify-content: flex-start;
}

.kobit-team-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kobit-team-name.short-name {
    display: none;
    text-transform: uppercase;
}

.kobit-team-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    background-color: transparent;
}

.kobit-match-score {
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    min-width: 50px;
}

/* Right Column: Short Status */
.kobit-match-status-short {
    font-size: 12px;
    font-weight: 500;
    color: #757575;
    text-align: right;
}

/* 5. STATUS COLORS & BADGES
-------------------------------------------------- */
.match-status-badge {
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    color: #FFFFFF;
    text-transform: uppercase;
}

.match-status-badge.live { background-color: #E53935; }
.match-status-badge.ht { background-color: #F57C00; } /* Half-Time */
.match-status-badge.ft { background-color: #212121; } /* Finished */
.match-status-badge.postponed { background-color: #9E9E9E; }

/* 6. RESPONSIVE RULES (Desktop)
-------------------------------------------------- */
@media (min-width: 768px) {
    .kobit-competition-header {
        padding: 16px 16px 12px 16px;
    }

    .kobit-competition-name {
        font-size: 16px;
    }

    .kobit-match-row {
        grid-template-columns: 60px 1fr 50px;
        height: 64px;
        padding: 0 16px;
        gap: 16px;
    }

    .kobit-team {
        font-size: 15px;
        gap: 12px;
    }

    .kobit-team-logo {
        width: 32px;
        height: 32px;
    }

    .kobit-match-score {
        font-size: 18px;
    }
}

@media (max-width: 767px) {
    .kobit-team-name.full-name,
    .kobit-team-name-large.full-name {
        display: none;}
    .kobit-team-name.short-name,
    .kobit-team-name-large.short-name {
        display: inline;
    }

    /* Mobile Header Team Name Logic */
    .kobit-match-details-header .kobit-team-name-large.full-name {
        display: inline-block !important;
        font-size: 12px;
        white-space: nowrap;
        min-width: 100%;
        animation: kobitSmartScroll 17s linear infinite;
    }
    .kobit-match-details-header .kobit-team-name-large.full-name:hover,
    .kobit-match-details-header .kobit-team-name-large.full-name:active {
        animation-play-state: paused;
    }
    .kobit-match-details-header .kobit-team-name-large.short-name {
        display: none !important;
    }

    /* Mobile Table Team Name Logic */
    .kobit-league-table .kobit-team-name.full-name {
        display: inline-block !important;
        font-size: 12px;
        white-space: nowrap;
        min-width: 100%;
        animation: kobitSmartScroll 17s linear infinite;
    }
    .kobit-league-table .kobit-team-name.full-name:hover,
    .kobit-league-table .kobit-team-name.full-name:active {
        animation-play-state: paused;
    }
    .kobit-league-table .kobit-team-name.short-name {
        display: none !important;
    }
    .kobit-league-table .kobit-name-scroller {
        width: 35vw;
    }
    
    .kobit-name-scroller {
        width: 30vw;
        overflow: hidden;
        mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
        -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    }
    
    @keyframes kobitSmartScroll {
        0%, 58% { transform: translateX(0); } /* Wait 10s */
        70% { transform: translateX(calc(30vw - 100%)); } /* Scroll 2s */
        88% { transform: translateX(calc(30vw - 100%)); } /* Wait 3s */
        100% { transform: translateX(0); } /* Scroll back 2s */
}
}

/* 7. MATCH DETAILS PAGE
-------------------------------------------------- */
.kobit-match-details-container {
    background-color: #F0F5FA;
    padding: 16px 0;
}

/* Details Header */
.kobit-match-details-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    background-color: #FFFFFF;
    padding: 24px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin: 0 12px 16px 12px;
}

@media (max-width: 767px) {
    .kobit-match-details-header {
        margin-left: 0;
        margin-right: 0;
        border-radius: 0;
    }
}

/* Sticky Header Logic */
.kobit-match-details-header {
    position: sticky;
    top: 0;
    z-index: 999;
    transition: padding 0.2s ease, box-shadow 0.2s ease, background-color 0.3s ease, color 0.3s ease;
}
.kobit-match-details-header.is-stuck {
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: 0; /* Remove top margin when stuck to sit flush */
    padding-top: 12px;
    padding-bottom: 12px;
}
@media (max-width: 767px) {
    .kobit-match-details-header.is-stuck { border-radius: 0; }
}
.kobit-match-details-header.is-stuck .kobit-header-scorers {
    display: none;
}
.kobit-match-details-header.is-stuck .kobit-team-logo-large {
    width: 40px;
    height: 40px;
}
.kobit-match-details-header.is-stuck .kobit-match-score-large {
    font-size: 24px;
}
#kobit-sticky-sentinel { position: absolute; top: -1px; height: 1px; width: 100%; visibility: hidden; pointer-events: none; }

.kobit-team-header {
    text-align: center;
}

.kobit-team-header a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.kobit-team-logo-large {
    width: 64px;
    height: 64px;
    object-fit: contain;
    transition: width 0.2s ease, height 0.2s ease;
}

.kobit-team-name-large {
    font-size: 16px;
    font-weight: 600;
}

.kobit-name-scroller {
    display: block;
    max-width: 100%;
    text-align: center;
}

.kobit-league-table .kobit-name-scroller {
    display: inline-block;
    vertical-align: middle;
    text-align: left;
}

.kobit-score-center {
    text-align: center;
    align-self: center;
    margin: 0 16px;
}

.kobit-match-score-large {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -1px;
    transition: font-size 0.2s ease;
}

.kobit-match-status-full {
    font-size: 12px;
    font-weight: 600;
    color: #757575;
    text-transform: uppercase;
}
/* Status colors for match details header */
.kobit-match-status-full.live,
.kobit-match-status-full.status-q1,
.kobit-match-status-full.status-q2,
.kobit-match-status-full.status-q3,
.kobit-match-status-full.status-q4,
.kobit-match-status-full.status-ot,
.kobit-match-status-full.status-bt { color: #E53935; }
.kobit-match-status-full.ns { color: #0057b8; } /* Not Started */
.kobit-match-status-full.ft { color: #212121; } /* Finished */
.kobit-match-status-full.ht { color: #F57C00; } /* Half-Time */
.kobit-match-status-full.postponed { color: #9E9E9E; }

/* Header Scorers */
.kobit-header-scorers {
    margin-top: 8px;
    font-size: 12px;
    color: #555;
    line-height: 1.3;
    text-align: center;
    align-self: start;
}
.kobit-header-scorers.home {
    grid-column: 1;
    grid-row: 2;
}
.kobit-header-scorers.away {
    grid-column: 3;
    grid-row: 2;
}
.kobit-header-scorers .scorer-item {
    display: block;
}
.kobit-header-scorers .scorer-item i {
    font-size: 10px;
    margin-right: 5px;
    color: #4CAF50;
}
.kobit-header-scorers .scorer-item i.is-own-goal {
    color: #F57C00;
}

/* Live Pulse Dot */
.kobit-live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #E53935;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
    animation: kobitPulse 1.5s infinite;
}

/* Match Info Bar */
.kobit-match-info-bar {
    background-color: #FFFFFF;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin: 0 12px 16px 12px;
    font-size: 13px;
    color: #757575;
}

.kobit-info-content {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.kobit-info-toggle-header {
    display: none;
}

@media (max-width: 767px) {
    .kobit-info-toggle-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        cursor: pointer;
        font-weight: 600;
        color: #212121;
        padding: 4px 0;
        border-bottom: 1px solid transparent;
        transition: padding-bottom 0.3s ease, border-bottom-color 0.3s ease, margin-bottom 0.3s ease;
    }
    .kobit-info-toggle-header .fa-chevron-down { transition: transform 0.3s ease; }
    .kobit-match-info-bar.active .kobit-info-toggle-header {
        padding-bottom: 12px;
        border-bottom-color: #eee;
        margin-bottom: 12px;
    }
    .kobit-info-content {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        width: 100%;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-in-out, opacity 0.4s ease-in-out;
    }
    .kobit-match-info-bar.active .kobit-info-content {
        max-height: 500px;
        opacity: 1;
    }
    .kobit-match-info-bar.active .fa-chevron-down { transform: rotate(180deg); }
    .kobit-info-item { width: 100%; }
}

.kobit-match-info-bar .kobit-info-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.kobit-match-info-bar .kobit-info-icon {
    width: 16px;
    height: 16px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Details Section (Info, Events, etc.) */
.kobit-details-section {
    background-color: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin: 0 12px 16px 12px;
    overflow: hidden; /* For rounded corners on children */
}

.kobit-section-header {
    padding: 12px 16px;
    border-bottom: 1px solid #D1D5DB;
    background-color: #FFFFFF; /* Ensure header background is white */
}

.kobit-section-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.kobit-info-item {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.kobit-info-label {
    color: #757575;
}

.kobit-info-value {
    font-weight: 500;
}

/* Match Video Embed */
.kobit-match-video-container {
    margin-bottom: 20px;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.kobit-video-header {
    padding: 8px 12px;
    background-color: #212121;
    display: flex;
    align-items: center;
}
.kobit-video-badge {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 4px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
}
.kobit-video-badge.live {
    background-color: #E53935;
    animation: kobitPulse 1.5s infinite;
}
.kobit-video-badge.highlight {
    background-color: #0057b8;
}
.kobit-video-embed {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
}
.kobit-video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Admin Video Form */
.kobit-admin-video-form-container {
    margin-bottom: 20px;
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 6px;
    padding: 10px;
}
.kobit-admin-toggle-btn {
    background: none;
    border: none;
    color: #856404;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    width: 100%;
    text-align: left;
}
.kobit-admin-video-form {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #ffeeba;
}
.kobit-form-group {
    margin-bottom: 12px;
}
.kobit-form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #856404;
}
.kobit-form-group select,
.kobit-form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    font-family: monospace;
}
.kobit-btn-save {
    background-color: #0057b8;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}
.kobit-btn-save:hover {
    background-color: #004494;
}

/* 8. EVENT / TIMELINE SECTION
-------------------------------------------------- */
.kobit-events-list {
    position: relative;
    padding: 16px 0; /* Vertical padding for the timeline */
    background-color: #FFFFFF; /* Ensure background is white */
}
.kobit-events-list::before { /* The central timeline bar */
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background-color: #D1D5DB;
}

.kobit-event-row {
    display: flex;
    justify-content: flex-start; /* Default for home */
    align-items: center;
    position: relative;
    padding: 4px 0;
    width: 50%;
    min-height: 50px;
    box-sizing: border-box;
}

.kobit-event-row.away {
    margin-left: 50%; /* Push away events to the right side */
}

.kobit-event-details {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 14px;
    width: calc(100% - 40px);
    box-sizing: border-box;
    background-color: #F0F5FA;
    border-radius: 6px;
    position: relative;
}

.kobit-event-row.home .kobit-event-details {
    justify-content: flex-end;
    text-align: right;
    margin-right: 40px;
}

/* Pointer arrow for the card */
.kobit-event-details::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

.kobit-event-row.away .kobit-event-details {
    justify-content: flex-start;
    text-align: left;
    margin-left: 40px;
}

.kobit-event-row.home .kobit-event-details::after {
    left: 100%;
    border-left: 6px solid #F0F5FA;
}
.kobit-event-row.away .kobit-event-details::after {
    right: 100%;
    border-right: 6px solid #F0F5FA;
}

/* Order icon and player name based on team */
.kobit-event-row.home .kobit-event-details {
    flex-direction: row-reverse;
}
.kobit-event-row.home .kobit-event-player-names { text-align: right; }
.kobit-event-row.away .kobit-event-player-names { text-align: left; }

.kobit-event-minute {
    font-weight: 600;
    font-size: 13px;
    color: #757575;
    margin-left: auto; /* Pushes the minute to the far right */
    padding-left: 10px;
    border-left: 1px solid #D1D5DB;
    white-space: nowrap;
}

.kobit-event-row.home .kobit-event-minute {
    order: -1; /* Moves minute to the far left for home team events */
    padding-left: 0;
    padding-right: 10px;
    border-left: none;
    border-right: 1px solid #D1D5DB;
}

.kobit-event-team-logo {
    display: none; /* Hide on desktop by default */
}
.kobit-event-team-logo img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.kobit-event-player-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.kobit-event-player-names {
    display: flex;
    flex-direction: column;
}
.kobit-event-player-main {
    font-weight: 600;
}
.kobit-event-player-sub {
    font-size: 0.85em;
    color: #757575;
}
.kobit-event-player-sub i {
    font-size: 0.9em;
}
.kobit-event-player-sub.in { color: #4CAF50; }
.kobit-event-player-sub.out { color: #E53935; }
.kobit-event-detail-text {
    font-size: 0.9em;
    color: #757575;
}

.kobit-event-icon {
    width: 18px;
    height: 18px;
    display: inline-block;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
    position: relative; /* For penalty badge positioning */
}

.kobit-player-photo-small {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #F0F5FA;
    border: 1px solid #D1D5DB;
}

/* Event Icons */
.kobit-event-icon.fa-futbol.normal-goal {
    color: #4CAF50; /* Green */
}
.kobit-event-icon.fa-futbol.own-goal {
    color: #f57c00; /* Orange */
}
.kobit-event-icon.fa-futbol.penalty {
    color: #4CAF50; /* Green */
}
.kobit-event-icon.fa-futbol.missed-penalty,
.kobit-event-icon.fa-futbol.goal-disallowed-offside,
.kobit-event-icon.fa-futbol.goal-cancelled {
    color: #BDBDBD; /* Grey for cancelled/missed events */
}

/* 'X' overlay for missed/cancelled goals */
.kobit-event-icon.missed-penalty::before,
.kobit-event-icon.goal-disallowed-offside::before,
.kobit-event-icon.goal-cancelled::before {
    content: '\00d7'; /* Multiplication sign '×' */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #E53935; /* Red */
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 0 2px #fff;
}

/* Subscript text for PEN or VAR */
.kobit-event-icon.missed-penalty::after,
.kobit-event-icon.goal-disallowed-offside::after,
.kobit-event-icon.goal-cancelled::after {
    position: absolute;
    bottom: -4px;
    right: -6px;
    font-size: 9px;
    font-weight: 700;
    color: #E53935;
    line-height: 1;
}
.kobit-event-icon.missed-penalty::after { content: 'PEN'; }
.kobit-event-icon.goal-disallowed-offside::after,
.kobit-event-icon.goal-cancelled::after { content: 'VAR'; }

/* Subscript for successful penalty goals */
.kobit-event-icon.fa-futbol.penalty::after {
    content: 'PEN';
    position: absolute;
    bottom: -4px;
    right: -6px;
    font-size: 9px;
    font-weight: 700;
    color: #212121; /* Dark text for contrast */
    line-height: 1;
}

/* Subscript for VAR-confirmed goals */
.kobit-event-icon.fa-futbol.var-goal-confirmed::after {
    content: 'VAR';
    position: absolute;
    bottom: -4px;
    right: -6px;
    font-size: 9px;
    font-weight: 700;
    color: #212121; /* Dark text for contrast */
    line-height: 1;
}

.kobit-event-icon.yellow-card {
    width: 14px;
    height: 18px;
    background-color: #FFCA28;
    border-radius: 2px;
}
.kobit-event-icon.red-card {
    width: 14px;
    height: 18px;
    background-color: #E53935;
    border-radius: 2px;
}
.kobit-event-icon[class*="substitution"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23E53935' d='m12 5.83-3.17 3.17 1.41 1.41L12 8.66l1.76 1.76-1.41 1.41L12 10.41V3h-2v7.41L7.41 7.59 6 9l6 6z'/%3E%3Cpath fill='%234CAF50' d='m18 15-6-6-1.41 1.41L12 11.83l-1.76-1.76 1.41-1.41L12 10.08V15h2v-4.92l2.59 2.59L18 15z'/%3E%3C/svg%3E");
}
.kobit-event-icon.var {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230057b8'%3E%3Cpath d='M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-5 14H4V6h11v12z'/%3E%3Cpath d='M18 12.5V9h-2v3.5h-1V9h-2v3.5h-1V9h-2v3.5c0 .83.67 1.5 1.5 1.5h5c.83 0 1.5-.67 1.5-1.5z'/%3E%3C/svg%3E"); /* Blue VAR screen */
}
.kobit-event-icon.goal-cancelled {
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23BDBDBD' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolygon points='12 7 9 9 10 12 14 12 15 9 12 7'/%3E%3Cpolyline points='9 9 5.5 10.5 6.5 14.5 10 12'/%3E%3Cpolyline points='15 9 18.5 10.5 17.5 14.5 14 12'/%3E%3Cpolyline points='10 12 7.5 16 12 17.5 16.5 16 14 12'/%3E%3Cpath d='M4.22 4.22l15.56 15.56' stroke='red' stroke-width='2'/%3E%3C/svg%3E"); /* Crossed-out ball */
}
.kobit-event-icon.injury-time, .kobit-event-icon.injury {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23757575'%3E%3Cpath d='M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-1 11h-4v4h-2v-4H8v-2h4V8h2v4h4v2z'/%3E%3C/svg%3E"); /* Medical cross */
}

/* Animation for new event flash */
@keyframes newEventFlash {
    0% {
        background-color: #FFF59D; /* Yellow flash */
    }
    100% {
        background-color: #F0F5FA; /* Back to original gray */
    }
}
.kobit-event-row.flash .kobit-event-details {
    animation: newEventFlash 2s ease-out;
}

@media (max-width: 767px) {
    .kobit-events-list::before {
        left: 24px; /* Move timeline bar to the left */
    }
    .kobit-event-row,
    .kobit-event-row.away {
        width: 100%;
        margin-left: 0;
        justify-content: flex-start;
    }
    .kobit-event-minute {
        /* This is now handled by flexbox inside the details card */
    }
    .kobit-event-details {
        width: calc(100% - 40px); /* Adjust width to account for timeline */
        padding-left: 12px;
        padding-right: 16px;
    }
    .kobit-event-details::after {
        right: 100%;
        border-right: 6px solid #F0F5FA;
        border-left: none;
    }
    .kobit-event-row.home .kobit-event-details,
    .kobit-event-row.away .kobit-event-details {
        text-align: left;
        margin-right: 0;
        flex-direction: row; /* Always icon first */
    }
    .kobit-event-row.home .kobit-event-minute {
        order: 1; /* Reset order for mobile to always be on the right */
        padding-left: 10px;
        padding-right: 0;
        border-left: 1px solid #D1D5DB;
        border-right: none;
    }
    .kobit-event-row.home .kobit-event-player-info {
        order: 0;
    }
    .kobit-event-team-logo {
        display: block; /* Show on mobile */
        order: 2; /* Place it after the timestamp */
    }

    /* --- Mobile Lineup Tabs Refactor --- */
    .kobit-lineups-desktop-layout {
        display: none; /* Hide desktop layouts on mobile */
    }

    .kobit-lineup-mobile-tabs {
        display: flex; /* Use flexbox for the main container */
        flex-direction: column;
    }

    .kobit-lineup-mobile-tabs .kobit-tabs-nav {
        display: flex;
        justify-content: center;
        border-bottom: 1px solid #D1D5DB;
        padding: 0;
        margin: 0;
    }

    .kobit-lineup-mobile-tabs .kobit-tab-item {
        flex: 1 1 50%; /* Each tab takes 50% width */
        padding: 12px 8px;
        border-bottom: 2px solid transparent;
        text-align: center;
    }

    .kobit-lineup-mobile-tabs .kobit-tab-item.active {
        border-bottom-color: #0057b8;
        background-color: #F0F5FA; /* Add a subtle background to the active tab */
    }

    .kobit-lineup-mobile-tabs .kobit-team-logo {
        width: 32px;
        height: 32px;
    }

    .kobit-lineup-mobile-tabs .kobit-tabs-content {
        background-color: #F0F5FA; /* Match active tab background */
    }

    .kobit-lineup-mobile-tabs .kobit-tab-panel {
        width: 100%;
        display: none;
    }

    .kobit-lineup-mobile-tabs .kobit-tab-panel.active {
        display: block;
    }

    /* Ensure lineup content inside mobile tabs is visible */
    .kobit-lineup-mobile-tabs .kobit-lineups-container {
        display: block;
    }
    .kobit-lineup-mobile-tabs .kobit-lineup-team {
        display: flex;
    }

    /* --- End Mobile Lineup Tabs Refactor --- */
}

@media (min-width: 768px) {
    .kobit-match-details-header, .kobit-details-section {
        margin: 0 auto 16px auto;
        max-width: 800px;
    }

    .kobit-lineups-desktop-layout {
        display: block; /* Show desktop layout */
    }

    .kobit-lineup-mobile-tabs {
        display: none; /* Hide mobile tabs on desktop */
    }
}

/* 8. TABS
-------------------------------------------------- */
.kobit-tabs-container {
    position: relative;
    background-color: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin: 0 12px 16px 12px;
}

.kobit-tabs-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0 8px;
    border-bottom: 1px solid #D1D5DB;
    overflow-x: auto;
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}
.kobit-tabs-nav::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.kobit-tabs-container > .kobit-tabs-nav {
    position: sticky;
    top: 64px;
    z-index: 990;
    background-color: #FFFFFF;
    transition: box-shadow 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.kobit-tabs-container > .kobit-tabs-nav.is-stuck {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    animation: kobitStickySlide 0.3s ease-out forwards;
}

@media (max-width: 767px) {
    .kobit-tabs-container > .kobit-tabs-nav {
        top: 92px; /* Adjust for taller mobile header (Logo + Gap + Name + Padding) */
    }
}

@keyframes kobitStickySlide {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

#kobit-tabs-sticky-sentinel {
    position: absolute;
    top: -1px;
    width: 100%;
    height: 1px;
    visibility: hidden;
    pointer-events: none;
}

.kobit-tab-item {
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #757575;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px; /* Overlap border */
    white-space: nowrap;
    transition: color 0.2s, border-color 0.2s;
}

.kobit-tab-item:hover {
    color: #212121;
}

.kobit-tab-item.active {
    color: #0057b8;
    border-bottom-color: #0057b8;
}

.kobit-tab-panel {
    display: none;
    padding: 16px;
}

.kobit-tab-panel.active {
    display: block;
}
.kobit-tab-panel > p {
    text-align: center;
    color: #757575;
    padding: 24px 0;
}

/* 10. LINEUPS TAB
-------------------------------------------------- */
.kobit-lineups-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.kobit-lineup-header {
    font-size: 13px;
    font-weight: 600;
    color: #757575;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #D1D5DB;
}
.kobit-lineup-section h5 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 12px 0;
}
.kobit-player-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}
.player-list-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.player-name-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
}
.player-name-wrapper.on-pitch {
    flex-direction: column;
}
.kobit-player-list li {
    display: flex;
    align-items: center;
    font-size: 14px;
}
.kobit-player-photo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #F0F5FA;
    margin-right: 8px;
}
.kobit-player-list li .player-name {
    font-weight: 500;
}
.player-number {
    font-weight: 600;
    color: #757575;
    width: 24px;
    text-align: right;
    margin-right: 8px;
}

.player-pos {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    color: #fff;
    margin-right: 8px;
    text-align: center;
}

.kobit-player-rating {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 4px;
    background-color: #e0e0e0;
    color: #212121;
    margin-left: 6px;
}
.kobit-player-rating.high { background-color: #4CAF50; color: #fff; }
/* Position-specific colors */
.player-pos.pos-g { background-color: #f57c00; } /* Goalkeeper - Orange */
.player-pos.pos-d { background-color: #1976d2; } /* Defender - Blue */
.player-pos.pos-m { background-color: #388e3c; } /* Midfielder - Green */
.player-pos.pos-f { background-color: #d32f2f; } /* Forward - Red */
.player-pos.pos-c { background-color: #7B1FA2; } /* Center - Purple */

/* 10. STATISTICS TAB (Refactored)
-------------------------------------------------- */
.kobit-stats-grid {
    display: flex;
    flex-direction: column;
    gap: 20px; /* Increased gap for better spacing */
}
.kobit-stats-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.stat-bar-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
    color: #757575;
}
.stat-bar-label .stat-value {
    font-weight: 700;
    color: #212121;
}
.stat-bar-label span:nth-child(2) { /* The text label */
    text-align: center;
    white-space: nowrap;
}
.stat-bar-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}
.stat-bar-container {
    background-color: #F0F5FA;
    border-radius: 4px;
    overflow: hidden;
    height: 8px;
}
.stat-bar-container.away {
    direction: rtl; /* Makes the bar fill from right to left */
}
.stat-bar-container .stat-bar {
    width: 0; /* Start at 0 for animation */
    height: 100%;
    border-radius: 4px;
    transition: width 1s cubic-bezier(0.22, 1, 0.36, 1); /* Smooth ease-out */
}
.stat-bar-container.filled .stat-bar {
    width: var(--perc, 50%);
}
.stat-bar-container.home .stat-bar {
    background-color: var(--team-color, #0057b8); /* Blue for home team */
}
.stat-bar-container.away .stat-bar {
    background-color: var(--team-color, #FFCA28); /* Yellow for away team */
}

/* Possession Row Specifics */
.possession-row .stat-bar-label {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 4px;
}
.possession-row .stat-bar-wrapper {
    display: flex; /* Override grid to make bars touch */
    gap: 0;
    height: 14px; /* Thicker bar */
    border-radius: 7px;
    overflow: hidden;
    background-color: #e0e0e0;
}
.possession-row .stat-bar-container {
    height: 100%;
    background-color: transparent;
    border-radius: 0;
    width: 0; /* Start at 0 for animation */
    transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}
.possession-row .stat-bar-container.filled {
    width: var(--perc); /* Use the percentage for container width */
}
.possession-row .stat-bar-container .stat-bar {
    width: 100%; /* Fill the container completely */
    border-radius: 0;
}


/* 11. H2H TAB (Refactored)
-------------------------------------------------- */
.kobit-h2h-tab {
    padding: 16px 0 0 0 !important; /* Override default panel padding */
}
.kobit-h2h-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
}
.kobit-h2h-summary-team {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}
.kobit-h2h-summary-team .team-name {
    font-weight: 600;
    font-size: 14px;
}
.kobit-h2h-summary-team.away {
    align-items: flex-end;
}
.kobit-h2h-summary-team.away .form-pills {
    justify-content: flex-end;
}

/* H2H Win Summary Bar */
.kobit-h2h-win-summary {
    display: flex;
    height: 32px;
    border-radius: 6px;
    overflow: hidden;
    margin: 0 16px 24px 16px;
    background-color: #F0F5FA;
}
.h2h-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-weight: 700;
    font-size: 14px;
    transition: width 0.5s ease-out;
}
.h2h-bar.home { background-color: #0057b8; }
.h2h-bar.draw { background-color: #757575; }
.h2h-bar.away { background-color: #FFCA28; }
.h2h-bar-value {
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* H2H Results List */
.kobit-h2h-results {
    display: flex;
    flex-direction: column;
}
.kobit-h2h-match-card {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-top: 1px solid #D1D5DB;
    font-size: 13px;
    color: #757575;
}
.kobit-h2h-match-card:last-child {
    border-bottom: none;
}
.kobit-h2h-match-card.home-win .h2h-team.home .h2h-team-name,
.kobit-h2h-match-card.away-win .h2h-team.away .h2h-team-name {
    font-weight: 700;
    color: #212121;
}
.h2h-match-date {
    width: 70px;
    flex-shrink: 0;
}
.h2h-match-teams {
    flex-grow: 1;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
}
.h2h-team {
    display: flex;
    align-items: center;
    gap: 8px;
}
.h2h-team.home { justify-content: flex-end; }
.h2h-team.away { justify-content: flex-start; }
.h2h-team-logo {
    width: 20px;
    height: 20px;
}
.h2h-team-name {
    font-weight: 500;
    color: #212121;
}
.h2h-score {
    font-weight: 700;
    font-size: 14px;
    color: #212121;
    background-color: #F0F5FA;
    padding: 2px 8px;
    border-radius: 4px;
}
.h2h-match-competition {
    flex: 1;
    text-align: left;
}

.form-pills {
    display: flex;
    align-items: center;
    gap: 6px;
}
.kobit-form-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%; /* Circular pills */
    font-size: 12px;
    font-weight: 700;
    color: #FFFFFF;
}
.kobit-form-pill.w { background-color: #4CAF50; } /* Win - Green */
.kobit-form-pill.d { background-color: #757575; } /* Draw - Gray */
.kobit-form-pill.l { background-color: #E53935; } /* Loss - Red */

/* Mobile Optimization for H2H */
@media (max-width: 767px) {
    .kobit-h2h-summary {
        padding: 12px;
    }
    .kobit-form-pill {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
    .kobit-h2h-match-card {
        flex-wrap: wrap;
        padding: 10px 12px;
        gap: 6px 0;
    }
    .h2h-match-date {
        order: 1;
        width: auto;
        font-size: 11px;
        color: #999;
        margin-right: auto;
    }
    .h2h-match-competition {
        order: 2;
        flex: 0 1 auto;
        width: auto;
        text-align: right;
        font-size: 11px;
        max-width: 60%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .h2h-match-teams {
        order: 3;
        width: 100%;
        margin-top: 4px;
    }
    .h2h-team-name {
        font-size: 13px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 90px;
    }
}

/* 12. LEAGUE TABLE TAB */
.kobit-league-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background-color: #FFFFFF;
}
.kobit-league-table th, .kobit-league-table td {
    padding: 10px 8px;
    text-align: left;
    border-bottom: 1px solid #D1D5DB;
}
.kobit-league-table th {
    font-size: 12px;
    font-weight: 600;
    color: #757575;
    text-transform: uppercase;
}
.kobit-league-table td.rank {
    text-align: center;
    font-weight: 500;
}
.kobit-league-table td:nth-child(2) { /* Team Name */
    font-weight: 500;
}
.kobit-league-table tr.highlighted td {
    background-color: #E3F2FD; /* Light blue highlight */
    font-weight: 600;
}

/* 13. ODDS TABLE TAB
-------------------------------------------------- */
.kobit-odds-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.kobit-odds-table th, .kobit-odds-table td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid #D1D5DB;
    vertical-align: middle;
}
.kobit-odds-table th {
    font-size: 12px;
    font-weight: 600;
    color: #757575;
    text-transform: uppercase;
}
.kobit-odds-table th:not(:first-child) {
    text-align: center;
}
.kobit-odds-table td:first-child {
    font-weight: 500;
}
.kobit-odds-table td.odds-value {
    text-align: center;
    font-weight: 700;
    color: #0057b8;
    background-color: #F0F5FA;
    border-radius: 4px;
    padding: 6px 10px;
}
.kobit-odds-table tbody tr:hover td {
    background-color: #E3F2FD;
}

/* 13. FORMATION BOARD (Existing styles, moved for organization)
-------------------------------------------------- */
.kobit-formation-board {
    background-color: var(--pitch-bg-color, #3A7E3D); /* A nice pitch green */
    border-radius: 6px;
    margin-bottom: 10px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Pitch Markings */
.pitch {
	position: relative;
	width: 100%;
	aspect-ratio: 7 / 10;
	background-color: var(--pitch-bg-color, #3A7E3D); /* Moved from parent for encapsulation */
	--line-color: rgba(255, 255, 255, 0.3);
	background-image: 
		/* Penalty Spots */
		radial-gradient(circle at 50% 11.5%, var(--line-color) 0.8%, transparent 0.8%), 
		radial-gradient(circle at 50% 88.5%, var(--line-color) 0.8%, transparent 0.8%), 
		/* Center Spot */
		radial-gradient(circle at 50% 50%, var(--line-color) 0.8%, transparent 0.8%), 
		/* Center Circle */
		radial-gradient(circle at 50% 50%, transparent 12%, var(--line-color) 12%, var(--line-color) 12.5%, transparent 12.5%), 
		/* Goal Areas */
		linear-gradient(to right, transparent 30%, var(--line-color) 30%, var(--line-color) 70%, transparent 70%), 
		linear-gradient(to bottom, transparent 0%, var(--line-color) 0, var(--line-color) 6%, transparent 6%), 
		linear-gradient(to bottom, transparent 94%, var(--line-color) 94%, var(--line-color) 100%, transparent 100%), 
		/* Penalty Boxes */
		linear-gradient(to right, transparent 15%, var(--line-color) 15%, var(--line-color) 85%, transparent 85%), 
		linear-gradient(to bottom, transparent 0, var(--line-color) 0, var(--line-color) 17%, transparent 17%), 
		linear-gradient(to bottom, transparent 83%, var(--line-color) 83%, var(--line-color) 100%, transparent 100%), 
		/* Center Line */
		linear-gradient(to bottom, transparent 0%, transparent 49.7%, var(--line-color) 49.7%, var(--line-color) 50.3%, transparent 50.3%, transparent 100%);
}
.player-dot {
    position: absolute;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 60px; /* Give it a fixed width */
}
.player-image-wrapper {
    position: relative;
    width: 40px;
    height: 40px;
}
.player-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    background-color: #e0e0e0;
}
.player-number {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background-color: #212121;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    border: 1px solid #fff;
}
.player-dot .player-name {
    font-size: 12px;
    color: #fff;
    font-weight: 500;
    background-color: rgba(0,0,0,0.6);
    padding: 1px 5px;
    border-radius: 3px;
    white-space: nowrap;
}
.player-dot .lineup-player-icons {
    position: absolute;
    top: 0;
    left: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    margin-left: 4px;
}
.player-dot .lineup-event-icon {
    width: 14px;
    height: 14px;
}
.player-dot .lineup-event-icon.is-sub-out,
.player-dot .lineup-event-icon.is-sub-in {
    font-size: 10px;
}

.kobit-lineup-team {
	display: flex;
	flex-direction: column;
}

.lineup-player-icons {
    display: flex;
    gap: 4px;
    align-items: center;
}

.lineup-event-icon {
    font-size: 12px;
}

.lineup-event-icon.is-goal { color: #4CAF50; }
.lineup-event-icon.is-own-goal { color: #f57c00; } /* Orange for Own Goal */
.lineup-event-icon.is-assist { color: #2196F3; }
.lineup-event-icon.is-captain { color: #FFC107; font-size: 11px; } /* Gold C */
.lineup-event-icon.is-yellow-card { color: #FFCA28; }
.lineup-event-icon.is-red-card { color: #E53935; }

.lineup-event-icon.is-sub-in,
.lineup-event-icon.is-sub-out {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 11px;
}
.lineup-event-icon.is-sub-in { color: #4CAF50; }
.lineup-event-icon.is-sub-out { color: #E53935; }

/* 10. LINEUPS TAB (Refactored)
-------------------------------------------------- */
.kobit-lineups-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.kobit-lineup-team {
    display: flex;
    flex-direction: column;
    gap: 16px; /* Space between formation and lists */
}

.kobit-player-list li {
    padding: 6px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.kobit-player-list li:nth-child(odd) {
    background-color: #F0F5FA;
}

.kobit-player-list li:hover {
    background-color: #E3F2FD;
}

/* Center Line */
.kobit-formation-board::before {
    width: 100%;
    height: 2px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.3);
}
/* Center Circle */
.kobit-formation-board::after {
    width: 25%;
    padding-bottom: 25%; /* Maintain aspect ratio */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-width: 2px;
    border-radius: 50%;
}

.player-event-icon.sub-out {
    color: #E53935;
}

/* 15. MAN OF THE MATCH CARD
-------------------------------------------------- */
.kobit-motm-card {
    background-color: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin: 0 12px 16px 12px;
    overflow: hidden;
}

.kobit-motm-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-bottom: 1px solid #D1D5DB;
}

.kobit-motm-icon {
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FFC107'%3E%3Cpath d='M19 4h-4L12 1 9 4H5C3.9 4 3 4.9 3 6v13c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-7 2c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm0 13c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.kobit-motm-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #212121;
}

.kobit-motm-body {
    display: flex;
    align-items: center;
    padding: 16px;
    gap: 16px;
}

.kobit-motm-player-photo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #FFC107; /* Gold border */
}

.kobit-motm-player-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.kobit-motm-player-name {
    font-size: 18px;
    font-weight: 700;
}

.kobit-motm-team-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #757575;
}

.kobit-motm-team-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

@media (min-width: 768px) {
    .kobit-motm-card {
        margin: 0 auto 16px auto;
        max-width: 1200px;
    }
}

/* 14. RESPONSIVENESS RULES
-------------------------------------------------- */
@media (min-width: 768px) {
    .kobit-match-details-header,
    .kobit-match-info-bar,
    .kobit-tabs-container,
    .kobit-details-section {
        margin: 0 auto 16px auto;
        max-width: 1200px; /* Constrain width on larger screens */
    }

    .kobit-team-name-large.short-name {
        display: none;
    }

    .kobit-tabs-nav {
        justify-content: center; /* Center main tabs on desktop */
    }

    /* Stats: Hide mobile tabs, show desktop grid */
    .kobit-stats-mobile-tabs {
        display: none;
    }
    .kobit-stats-desktop-grid {
        display: grid;
        grid-template-columns: 1fr; /* Single column for stats rows */
        gap: 12px;
    }
    .kobit-stats-row {
        grid-template-columns: 50px 1fr 50px; /* Adjust column widths for desktop */
        gap: 8px 16px;
    }
    .kobit-stats-row .stat-bar-label {
        font-size: 14px;
    }

    /* Events: Wider spacing */
    .kobit-events-list {
        padding: 20px 0;
    }
    .kobit-event-row {
        padding: 10px 0;
    }
    .kobit-event-row.home .kobit-event-details {
        margin-right: 40px; /* More space from center line */
    }
    .kobit-event-row.away .kobit-event-details {
        margin-left: 40px; /* More space from center line */
    }

    /* Lineups: Adjust player list spacing */
    .kobit-player-list {
        gap: 8px;
    }
}

/* Icons for Match Info Bar (placeholders) */
.icon-competition { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23757575'%3E%3Cpath d='M12 2L4 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-8-3zm0 10.99h-1V10h1v2.99zm0-5.98h-1V7h1v-.01z'/%3E%3C/svg%3E"); }
.icon-time { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23757575'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z'/%3E%3C/svg%3E"); }
.icon-stadium { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23757575'%3E%3Cpath d='M12 12c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6zm0 2c4.42 0 8 3.58 8 8v2H4v-2c0-4.42 3.58-8 8-8z'/%3E%3C/svg%3E"); }
.icon-round { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23757575'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-1-13h2v6h-2zm0 8h2v2h-2z'/%3E%3C/svg%3E"); }
.icon-referee { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23757575'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-1-13h2v6h-2zm0 8h2v2h-2z'/%3E%3C/svg%3E"); }

@media (min-width: 768px) {
    .kobit-tabs-container {
        margin: 0 auto 16px auto;
        max-width: 1200px;
    }
    .kobit-tabs-nav {
        justify-content: center;
    }
}

/* 16. PLAYER DETAILS PAGE
-------------------------------------------------- */
.kobit-player-details-container {
    max-width: 800px;
    margin: 16px auto;
    padding: 16px;
    background-color: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.kobit-player-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #D1D5DB;
    margin-bottom: 16px;
}

.kobit-player-photo-large {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #FFFFFF;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.kobit-player-name {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 4px 0;
}

.kobit-player-bio {
    display: flex;
    gap: 24px;
    margin-left: auto; /* Pushes bio info to the right */
    text-align: center;
}

.kobit-bio-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.kobit-bio-label {
    font-size: 12px;
    color: #757575;
}

.kobit-bio-value {
    font-size: 16px;
    font-weight: 600;
}

.kobit-player-nationality {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: #757575;
    margin-bottom: 8px;
}

.kobit-player-bio-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px 16px;
    padding: 16px;
    background-color: #F0F5FA;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}
.kobit-bio-detail-item strong {
    color: #757575;
    margin-right: 6px;
}

.kobit-career-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    background-color: transparent;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 20px;
}
.kobit-summary-item {
    background-color: #F0F5FA;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    padding: 20px 16px;
    text-align: center;
    transition: transform 0.2s;
}
.kobit-summary-item:hover { transform: translateY(-2px); }
.kobit-summary-value {
    font-size: 24px;
    font-weight: 700;
    color: #0057b8;
}
.kobit-summary-label {
    font-size: 13px;
    color: #757575;
    font-weight: 500;
}

.kobit-player-team-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 500;
    color: #757575;
}
.kobit-player-team-logo {
    width: 24px;
    height: 24px;
}

.kobit-season-selector-wrapper {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.kobit-season-selector {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #D1D5DB;
    font-size: 14px;
}

.kobit-chart-container {
    position: relative;
    height: 300px;
    margin-top: 24px;
}

.kobit-player-stats-table {
    width: 100%;
    border-collapse: collapse;
}
.kobit-player-stats-table th, .kobit-player-stats-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #D1D5DB;
}
.kobit-player-stats-table th {
    font-size: 12px;
    color: #757575;
    text-transform: uppercase;
}
.kobit-player-stats-table td:not(:first-child) {
    text-align: center;
    font-weight: 600;
}
.competition-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}
.competition-logo {
    width: 24px;
    height: 24px;
}
.transfer-team {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}
.transfer-team.from { justify-content: flex-end; text-align: right; }
.transfer-team.to { justify-content: flex-start; text-align: left; }
.transfer-team img {
    width: 28px;
    height: 28px;
}

/* 18. FLOATING SHARE BUTTON
-------------------------------------------------- */
.kobit-share-fab-container {
    position: fixed;
    top: 50%;
    left: 0;
    right: auto;
    bottom: auto;
    transform: translateY(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 0;
}
.kobit-share-toggle-btn {
    width: 48px;
    height: 48px;
    border-radius: 0 8px 8px 0;
    background-color: #0057b8;
    color: #fff;
    border: none;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: background-color 0.3s, width 0.2s;
    animation: kobitSharePulse 2s infinite;
}
.kobit-share-toggle-btn:hover {
    background-color: #004494;
    width: 54px;
}
.kobit-share-toggle-btn .fa-times { display: none; }
.kobit-share-fab-container.active .kobit-share-toggle-btn .fa-share-nodes { display: none; }
.kobit-share-fab-container.active .kobit-share-toggle-btn .fa-times { display: block; }
.kobit-share-fab-container.active .kobit-share-toggle-btn { animation: none; }

@keyframes kobitSharePulse {
    0% { box-shadow: 2px 2px 8px rgba(0,0,0,0.2), 0 0 0 0 rgba(0, 87, 184, 0.7); }
    70% { box-shadow: 2px 2px 8px rgba(0,0,0,0.2), 0 0 0 10px rgba(0, 87, 184, 0); }
    100% { box-shadow: 2px 2px 8px rgba(0,0,0,0.2), 0 0 0 0 rgba(0, 87, 184, 0); }
}

.kobit-share-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-left: 10px;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.kobit-share-fab-container.active .kobit-share-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.kobit-share-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #fff;
    color: #555;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.2s;
    font-size: 18px;
    cursor: pointer;
}
.kobit-share-btn:hover { transform: scale(1.1); }
.kobit-share-btn.facebook { color: #1877F2; }
.kobit-share-btn.twitter { color: #000; }
.kobit-share-btn.whatsapp { color: #25D366; }
.kobit-share-btn.copy-link { color: #757575; }

@media (prefers-color-scheme: dark) {
    .kobit-share-btn {
        background-color: #2c2c2c;
        border-color: #444;
    }
    .kobit-share-btn.copy-link { color: #ccc; }
    .kobit-share-btn.twitter { color: #fff; }
}

/* 19. SHARE FLASHCARD (Hidden)
-------------------------------------------------- */
.kobit-share-card {
    position: fixed;
    left: -9999px;
    top: 0;
    width: 800px;
    height: auto; /* Allow growth */
    min-height: 418px;
    background: linear-gradient(135deg, #0057b8 0%, #003b7e 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow: visible;
}
.kobit-card-header {
    display: flex;
    justify-content: center;
    align-items: center;
    height: auto;
    margin-bottom: 20px;
    gap: 15px;
}
.kobit-card-header .site-logo { height: 50px; object-fit: contain; z-index: 1; }

.kobit-card-watermark {
    position: absolute;
    bottom: -30px;
    right: -30px;
    width: 250px;
    height: 250px;
    opacity: 0.1;
    transform: rotate(-15deg);
    pointer-events: none;
    z-index: 0;
    object-fit: contain;
}

.kobit-card-content {
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex-grow: 1;
    z-index: 1;
}
.card-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 250px;
    text-align: center;
}
.card-team img { width: 100px; height: 100px; object-fit: contain; background: #fff; border-radius: 50%; padding: 10px; box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.card-team span { font-size: 20px; font-weight: 700; line-height: 1.2; }

.card-score-box { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.card-score { font-size: 64px; font-weight: 800; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.card-status { background: rgba(255,255,255,0.2); padding: 4px 12px; border-radius: 20px; font-weight: 600; font-size: 14px; text-transform: uppercase; }

.kobit-card-footer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    opacity: 1;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 20px;
    z-index: 1;
}
.kobit-card-footer-row {
    display: flex;
    justify-content: center;
    gap: 24px;
    align-items: center;
}
.kobit-card-footer-row.details {
    font-size: 14px;
    opacity: 0.9;
}
.kobit-card-footer-row.url {
    font-weight: 700;
    font-size: 16px;
    opacity: 0.8;
    margin-top: 8px;
    text-transform: lowercase;
}
.kobit-card-footer-row.details span { display: flex; align-items: center; gap: 6px; }
.kobit-share-btn.download-image { color: #E91E63; }

/* 17. TEAM DETAILS PAGE
-------------------------------------------------- */
.kobit-team-details-container {
    max-width: 800px;
    margin: 16px auto;
}

.kobit-team-details-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 16px;
}
.kobit-team-details-header .team-logo {
    width: 80px;
    height: 80px;
}
.kobit-team-details-header h1 {
    margin: 0 0 4px 0;
    font-size: 28px;
}
.kobit-team-details-header .team-meta {
    font-size: 14px;
    color: #757575;
}

/* Squad List */
.kobit-squad-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}
.kobit-player-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background-color: #F0F5FA;
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s;
}
.kobit-player-card:hover {
    background-color: #e3f2fd;
}
.kobit-player-card .player-photo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}
.kobit-player-card .player-info {
    display: flex;
    flex-direction: column;
}
.kobit-player-card .player-name {
    font-weight: 600;
}
.kobit-player-card .player-position {
    font-size: 13px;
    color: #757575;
}

/* Venue Details */
.kobit-venue-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.kobit-venue-details .venue-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}
.kobit-venue-details .venue-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
}
.kobit-venue-details .venue-meta-item strong {
    color: #757575;
    margin-right: 8px;
}

.kobit-team-name-large, .kobit-motm-team-name, .kobit-h2h-summary-team .team-name, .kobit-odds-table .odds-team-name, .kobit-league-table .team-name {
    text-transform: uppercase;
}

/* Mobile Horizontal Scroll for Stats Tables */
@media (max-width: 767px) {
    .kobit-stats-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .kobit-stats-table-header,
    .kobit-stats-table-row {
        min-width: 500px; /* Ensure content is wide enough to scroll */
    }
    /* Sticky Rank Column */
    .col-rank {
        position: sticky;
        left: 0;
        background-color: #FFFFFF;
        z-index: 2;
        box-shadow: 2px 0 4px rgba(0,0,0,0.05);
    }
    @media (prefers-color-scheme: dark) {
        .col-rank {
            background-color: #212121;
        }
    }
}

/* 20. COMPETITION DETAILS LAYOUT
-------------------------------------------------- */
/* Mobile: Maximize width for competition details */
@media (max-width: 767px) {
    .kobit-competition-details-container .kobit-tabs-container {
        margin-left: 0;
        margin-right: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    .kobit-competition-details-header {
        padding: 0 12px;
    }
}

/* Desktop: Increase width constraint */
@media (min-width: 768px) {
    .kobit-competition-details-container {
        max-width: 1200px;
        margin: 0 auto;
    }
    
    .kobit-competition-details-container .kobit-tabs-container {
        max-width: 100%;
    }
}

/* 21. NO MATCHES STATE
-------------------------------------------------- */
.kobit-no-matches-state {
    text-align: center;
    padding: 40px 20px;
    background-color: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-top: 16px;
}
.kobit-no-matches-icon {
    font-size: 48px;
    color: #BDBDBD;
    margin-bottom: 16px;
}
.kobit-no-matches-state h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: #212121;
}
.kobit-no-matches-state p {
    color: #757575;
    margin: 0 0 24px 0;
    font-size: 14px;
}
.kobit-find-next-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #0057b8;
    color: #FFFFFF;
    padding: 10px 24px;
    border-radius: 24px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background-color 0.2s;
}
.kobit-find-next-btn:hover {
    background-color: #004494;
    color: #FFFFFF;
}

/* 22. EXPANDABLE MATCH ROWS
-------------------------------------------------- */
.kobit-match-row.expandable {
    cursor: pointer;
}
.kobit-match-row.expandable::after {
    /* Optional: Add an indicator icon */
}
.kobit-match-expanded-details {
    background-color: #F9FAFB;
    border-bottom: 1px solid #D1D5DB;
    padding: 12px 16px;
    animation: slideDown 0.2s ease-out;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}
.kobit-expanded-goals-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 12px;
    position: relative;
}
.kobit-expanded-goals-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background-color: #D1D5DB;
    transform: translateX(-50%);
}
.kobit-expanded-goals-column {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: #424242;
}
.kobit-expanded-goals-column.home {
    align-items: flex-end;
    text-align: right;
}
.kobit-expanded-goals-column.away {
    align-items: flex-start;
    text-align: left;
}
.goal-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.goal-player-wrapper {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.kobit-expanded-goals-column.home .goal-player-wrapper { align-items: flex-end; }
.kobit-expanded-goals-column.away .goal-player-wrapper { align-items: flex-start; }
.goal-assist {
    font-size: 11px;
    color: #757575;
}
.goal-assist i, .kobit-event-assist i {
    color: #2196F3;
    font-size: 10px;
    margin-right: 3px;
}
.goal-time { font-weight: 600; color: #757575; font-size: 12px; min-width: 20px; }
.goal-item .fa-futbol { font-size: 12px; color: #4CAF50; }
.goal-item .fa-futbol.own-goal { color: #F57C00; }

.kobit-full-details-link {
    text-align: center;
    margin-top: 12px;
    border-top: 1px solid #eee;
    padding-top: 12px;
}
.kobit-btn-full-details {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: #0057b8;
    text-decoration: none;
}
.kobit-btn-full-details:hover { text-decoration: underline; }
.kobit-loading-spinner { text-align: center; color: #757575; padding: 10px; }

/* SKELETON LOADING
-------------------------------------------------- */
@keyframes kobitSkeletonShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.kobit-skeleton {
    background: #e0e0e0;
    background-image: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: kobitSkeletonShimmer 1.5s infinite;
    border-radius: 4px;
    display: inline-block;
}

.kobit-match-skeleton {
    display: grid;
    grid-template-columns: 50px 1fr 40px;
    gap: 12px;
    align-items: center;
    height: 60px;
    padding: 0 12px;
    border-bottom: 1px solid #D1D5DB;
    background-color: #FFFFFF;
}
@media (min-width: 768px) {
    .kobit-match-skeleton {
        grid-template-columns: 60px 1fr 50px;
        height: 64px;
        padding: 0 16px;
        gap: 16px;
    }
}
.kobit-match-skeleton .time { width: 40px; height: 12px; margin: 0 auto; }
.kobit-match-skeleton .teams-score-skeleton { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; width: 100%; }
.kobit-match-skeleton .team { display: flex; align-items: center; gap: 8px; }
.kobit-match-skeleton .team.home { justify-content: flex-end; }
.kobit-match-skeleton .team.away { justify-content: flex-start; }
.kobit-match-skeleton .logo { width: 24px; height: 24px; border-radius: 50%; }
.kobit-match-skeleton .name { width: 60%; height: 12px; }
.kobit-match-skeleton .score { width: 30px; height: 20px; }
.kobit-match-skeleton .status { width: 30px; height: 10px; margin-left: auto; }

/* DARK MODE SUPPORT
 * Applied via body class .kobit-dark-mode
 -------------------------------------------------- */

/* Toggle Button */
.kobit-dark-mode-toggle {
    background: none;
    border: 1px solid currentColor;
    color: inherit;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.kobit-dark-mode-toggle .sun { display: none; }
body.kobit-dark-mode .kobit-dark-mode-toggle .moon { display: none; }
body.kobit-dark-mode .kobit-dark-mode-toggle .sun { display: inline-block; }

/* Global Backgrounds & Text */
body.kobit-dark-mode .kobit-sports-match-list, body.kobit-dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

/* Site Header & Footer (Generic Theme Support) */
body.kobit-dark-mode header,
body.kobit-dark-mode footer,
body.kobit-dark-mode .site-header,
body.kobit-dark-mode .site-footer,
body.kobit-dark-mode #masthead,
body.kobit-dark-mode #colophon,
body.kobit-dark-mode .ast-primary-header-bar,
body.kobit-dark-mode .site-below-footer-wrap[data-section="section-below-footer-builder"] {
    background-color: #1e1e1e !important;
    color: #e0e0e0 !important;
    border-color: #333 !important;
}
body.kobit-dark-mode header a,
body.kobit-dark-mode footer a,
body.kobit-dark-mode .site-header a,
body.kobit-dark-mode .site-footer a,
body.kobit-dark-mode #masthead a,
body.kobit-dark-mode #colophon a,
body.kobit-dark-mode .ast-primary-header-bar a,
body.kobit-dark-mode .site-below-footer-wrap[data-section="section-below-footer-builder"] a {
    color: #e0e0e0 !important;
}

/* Cards & Containers */
body.kobit-dark-mode .kobit-match-details-header,
body.kobit-dark-mode .kobit-match-info-bar,
body.kobit-dark-mode .kobit-details-section,
body.kobit-dark-mode .kobit-motm-card,
body.kobit-dark-mode .kobit-team-details-header,
body.kobit-dark-mode .kobit-player-details-container,
body.kobit-dark-mode .kobit-competition-group,
body.kobit-dark-mode .kobit-tabs-container,
body.kobit-dark-mode .kobit-tabs-nav,
body.kobit-dark-mode .kobit-tabs-container > .kobit-tabs-nav,
body.kobit-dark-mode .kobit-section-header,
body.kobit-dark-mode .kobit-league-table,
body.kobit-dark-mode .kobit-no-matches-state,
body.kobit-dark-mode .kobit-events-list,
body.kobit-dark-mode .kobit-sport-tabs-nav,
body.kobit-dark-mode .kobit-match-details-header.is-stuck {
    background-color: #1e1e1e;
    color: #e0e0e0;
    border-color: #333;
}

/* Secondary Backgrounds */
body.kobit-dark-mode .kobit-match-details-container,
body.kobit-dark-mode .kobit-match-expanded-details,
body.kobit-dark-mode .kobit-event-details,
body.kobit-dark-mode .kobit-player-list li:nth-child(odd),
body.kobit-dark-mode .kobit-player-bio-details,
body.kobit-dark-mode .kobit-summary-item,
body.kobit-dark-mode .kobit-player-card,
body.kobit-dark-mode .kobit-odds-table td.odds-value,
body.kobit-dark-mode .kobit-h2h-win-summary,
body.kobit-dark-mode .kobit-h2h-score,
body.kobit-dark-mode .kobit-team-logo,
body.kobit-dark-mode .kobit-player-photo,
body.kobit-dark-mode .kobit-player-photo-small,
body.kobit-dark-mode .kobit-lineup-mobile-tabs .kobit-tab-item.active,
body.kobit-dark-mode .kobit-lineup-mobile-tabs .kobit-tabs-content {
    background-color: #2c2c2c;
    border-color: #444;
}

/* Borders */
body.kobit-dark-mode .kobit-competition-header,
body.kobit-dark-mode .kobit-match-row,
body.kobit-dark-mode .kobit-section-header,
body.kobit-dark-mode .kobit-tabs-nav,
body.kobit-dark-mode .kobit-league-table th,
body.kobit-dark-mode .kobit-league-table td,
body.kobit-dark-mode .kobit-odds-table th,
body.kobit-dark-mode .kobit-odds-table td,
body.kobit-dark-mode .kobit-player-stats-table th,
body.kobit-dark-mode .kobit-player-stats-table td,
body.kobit-dark-mode .kobit-motm-header,
body.kobit-dark-mode .kobit-lineup-header,
body.kobit-dark-mode .kobit-event-minute,
body.kobit-dark-mode .kobit-event-row.home .kobit-event-minute,
body.kobit-dark-mode .kobit-match-info-bar .kobit-info-toggle-header {
    border-color: #333;
}

/* Skeleton Dark Mode */
body.kobit-dark-mode .kobit-skeleton {
    background: #2c2c2c;
    background-image: linear-gradient(90deg, #2c2c2c 25%, #3a3a3a 50%, #2c2c2c 75%);
}
body.kobit-dark-mode .kobit-match-skeleton {
    background-color: #1e1e1e;
    border-bottom-color: #333;
}

/* Text Colors - Primary (White/Light) */
body.kobit-dark-mode .kobit-competition-name,
body.kobit-dark-mode .kobit-match-score,
body.kobit-dark-mode .kobit-team-name-large,
body.kobit-dark-mode .kobit-motm-title,
body.kobit-dark-mode .kobit-motm-player-name,
body.kobit-dark-mode .kobit-lineup-section h5,
body.kobit-dark-mode .kobit-section-header h3,
body.kobit-dark-mode .stat-bar-label .stat-value,
body.kobit-dark-mode .h2h-team-name,
body.kobit-dark-mode .h2h-score,
body.kobit-dark-mode .kobit-no-matches-state h3,
body.kobit-dark-mode .kobit-league-table th,
body.kobit-dark-mode .kobit-info-toggle-header,
body.kobit-dark-mode .kobit-section-header,
body.kobit-dark-mode .kobit-match-score-large,
body.kobit-dark-mode .kobit-odds-table th,
body.kobit-dark-mode .kobit-player-stats-table th,
body.kobit-dark-mode h1,
body.kobit-dark-mode h2,
body.kobit-dark-mode h3,
body.kobit-dark-mode h4,
body.kobit-dark-mode h5,
body.kobit-dark-mode h6 {
    color: #fff;
}

/* Text Colors - Secondary (Gray) */
body.kobit-dark-mode .kobit-match-status-short,
body.kobit-dark-mode .kobit-match-status-full,
body.kobit-dark-mode .kobit-header-scorers,
body.kobit-dark-mode .kobit-info-label,
body.kobit-dark-mode .kobit-info-text,
body.kobit-dark-mode .kobit-tab-item,
body.kobit-dark-mode .kobit-lineup-header,
body.kobit-dark-mode .player-number,
body.kobit-dark-mode .stat-bar-label,
body.kobit-dark-mode .kobit-bio-label,
body.kobit-dark-mode .kobit-bio-detail-item strong,
body.kobit-dark-mode .kobit-summary-label,
body.kobit-dark-mode .kobit-player-team-info,
body.kobit-dark-mode .kobit-player-nationality,
body.kobit-dark-mode .kobit-player-card .player-position,
body.kobit-dark-mode .kobit-venue-details .venue-meta-item strong,
body.kobit-dark-mode .kobit-no-matches-state p,
body.kobit-dark-mode .kobit-event-minute,
body.kobit-dark-mode .kobit-event-player-sub,
body.kobit-dark-mode .kobit-event-detail-text,
body.kobit-dark-mode .kobit-motm-team-info,
body.kobit-dark-mode .goal-assist,
body.kobit-dark-mode .goal-time,
body.kobit-dark-mode .kobit-expanded-goals-column {
    color: #a0a0a0;
}

/* Hover States */
body.kobit-dark-mode .kobit-match-row:hover,
body.kobit-dark-mode .kobit-player-list li:hover,
body.kobit-dark-mode .kobit-player-card:hover,
body.kobit-dark-mode .kobit-odds-table tbody tr:hover td {
    background-color: #333;
}

/* Highlighted Table Row */
body.kobit-dark-mode .kobit-league-table tr.highlighted td {
    background-color: #333;
    color: #fff;
}

/* Active States & Accents */
body.kobit-dark-mode .kobit-tab-item:hover {
    color: #fff;
}
body.kobit-dark-mode .kobit-tab-item.active {
    color: #4dabf5;
    border-bottom-color: #4dabf5;
}
body.kobit-dark-mode .kobit-match-time-status .match-time,
body.kobit-dark-mode .kobit-match-status-full.ns,
body.kobit-dark-mode .kobit-summary-value,
body.kobit-dark-mode .kobit-odds-table td.odds-value,
body.kobit-dark-mode .kobit-btn-full-details {
    color: #4dabf5;
}
body.kobit-dark-mode .kobit-lineup-mobile-tabs .kobit-tab-item.active {
    border-bottom-color: #4dabf5;
}

/* Event Details Arrow Fix */
body.kobit-dark-mode .kobit-event-row.home .kobit-event-details::after {
    border-left-color: #2c2c2c;
}
body.kobit-dark-mode .kobit-event-row.away .kobit-event-details::after {
    border-right-color: #2c2c2c;
}
@media (max-width: 767px) {
    body.kobit-dark-mode .kobit-event-details::after {
        border-right-color: #2c2c2c;
        border-left-color: transparent;
    }
}

/* Shadows */
body.kobit-dark-mode .kobit-match-details-header.is-stuck,
body.kobit-dark-mode .kobit-tabs-container > .kobit-tabs-nav.is-stuck {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* Expanded Goals Divider */
body.kobit-dark-mode .kobit-expanded-goals-container::after {
    background-color: #333;
}

/* Share Button */
body.kobit-dark-mode .kobit-share-options {
    background-color: #2c2c2c;
    border: 1px solid #444;
}
body.kobit-dark-mode .kobit-share-btn {
    background-color: #333;
    border-color: #555;
    color: #e0e0e0;
}
body.kobit-dark-mode .kobit-share-btn:hover {
    background-color: #444;
}
body.kobit-dark-mode .kobit-share-btn.facebook { color: #4dabf5; }
body.kobit-dark-mode .kobit-share-btn.twitter { color: #fff; }
body.kobit-dark-mode .kobit-share-btn.whatsapp { color: #25D366; }

/* --- News Grid Container --- */
.kobit-news-grid {
    display: grid;
    /* Creates a responsive grid that fits as many 300px columns as possible */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* --- News Card Styling --- */
.kobit-news-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kobit-news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Thumbnail */
.kobit-news-thumbnail a {
    display: block;
    height: 180px;
    overflow: hidden;
}

.kobit-news-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.kobit-news-card:hover .kobit-news-thumbnail img {
    transform: scale(1.05);
}

/* Content Body */
.kobit-news-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Meta Data (Date & Category) */
.kobit-news-meta {
    font-size: 0.85em;
    color: #888;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kobit-news-category {
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 4px;
    color: #555;
    font-size: 0.9em;
    font-weight: 500;
}

/* Title */
.kobit-news-title {
    font-size: 1.1em;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.kobit-news-title a {
    color: #333;
    text-decoration: none;
}

.kobit-news-title a:hover {
    color: #0057b8; /* Adjust to your primary color */
}

/* Excerpt */
.kobit-news-excerpt {
    font-size: 0.95em;
    color: #666;
    margin-bottom: 15px;
    flex-grow: 1;
    /* Limit to 3 lines */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Read More Link */
.kobit-news-read-more {
    font-size: 0.9em;
    font-weight: 600;
    color: #0057b8; /* Adjust to your primary color */
    text-decoration: none;
    align-self: flex-start;
}

.kobit-news-read-more i {
    font-size: 0.8em;
    margin-left: 4px;
    transition: margin-left 0.2s;
}

.kobit-news-read-more:hover i {
    margin-left: 8px;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .kobit-news-grid {
        /* On tablets, ensure at least 2 columns if space permits, or drop to 1 */
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .kobit-news-grid {
        /* Force single column on small mobile screens */
        grid-template-columns: 1fr;
    }

    /* Make the filter dropdown full width on mobile */
    .kobit-news-filter-bar {
        display: block !important; /* Override flex */
    }
    
    .kobit-news-category-filter {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* News Filter & Load More */
.kobit-news-filter-bar {
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
.kobit-news-category-filter,
.kobit-news-sort-filter {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background-color: #fff;
    color: #333;
}
.kobit-load-more-container {
    text-align: center;
    margin-top: 20px;
}
.kobit-load-more-news {
    /* Basic button styling if theme doesn't provide button-secondary */
    padding: 10px 20px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background-color: #f7f7f7;
    color: #333;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.kobit-load-more-news:hover {
    background-color: #e0e0e0;
}

/* Dark Mode for News List */
body.kobit-dark-mode .kobit-news-card {
    background-color: #1e1e1e;
    border-color: #333;
}
body.kobit-dark-mode .kobit-news-title a {
    color: #e0e0e0;
}
body.kobit-dark-mode .kobit-news-title a:hover {
    color: #4dabf5;
}
body.kobit-dark-mode .kobit-news-meta,
body.kobit-dark-mode .kobit-news-excerpt {
    color: #a0a0a0;
}
body.kobit-dark-mode .kobit-news-category {
    background-color: #333;
    color: #ccc;
}
body.kobit-dark-mode .kobit-news-category-filter, 
body.kobit-dark-mode .kobit-news-sort-filter,
body.kobit-dark-mode .kobit-load-more-news {
    background-color: #1e1e1e;
    color: #e0e0e0;
    border-color: #333;
}
body.kobit-dark-mode .kobit-load-more-news:hover {
    background-color: #2c2c2c;
}

/* Single News Article */
.kobit-news-single-container {
    padding: 20px 0;
    max-width: 800px;
    margin: 0 auto;
}
.kobit-back-to-news {
    margin-bottom: 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.kobit-news-single-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
}
.kobit-news-single-title {
    font-size: 28px;
    margin-bottom: 16px;
    line-height: 1.3;
}
.kobit-news-single-content {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}
.kobit-news-single-content img {
    max-width: 100%;
    height: auto;
    margin: 10px 0;
}

/* Dark Mode for Single Article */
body.kobit-dark-mode .kobit-news-single-content {
    color: #e0e0e0;
}
body.kobit-dark-mode .kobit-news-single-title {
    color: #fff;
}

/* Related Articles */
.kobit-related-articles {
    margin-top: 40px;
    border-top: 1px solid #D1D5DB;
    padding-top: 24px;
}
.kobit-related-articles h3 {
    font-size: 20px;
    margin-bottom: 16px;
    color: #212121;
}
body.kobit-dark-mode .kobit-related-articles {
    border-top-color: #333;
}
body.kobit-dark-mode .kobit-related-articles h3 {
    color: #fff;
}

/* Article Share Section */
.kobit-news-share {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #D1D5DB;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.kobit-news-share span {
    font-weight: 600;
    color: #757575;
}
.kobit-share-buttons {
    display: flex;
    gap: 10px;
}
body.kobit-dark-mode .kobit-news-share {
    border-top-color: #333;
}
body.kobit-dark-mode .kobit-news-share span {
    color: #a0a0a0;
}

/* Basketball Quarters Table */
.kobit-basketball-quarters {
    margin-top: 8px;
    margin-bottom: 8px;
    font-size: 12px;
}
.kobit-basketball-quarters table {
    margin: 0 auto;
    border-collapse: collapse;
}
.kobit-basketball-quarters th,
.kobit-basketball-quarters td {
    padding: 2px 6px;
    text-align: center;
    color: #757575;
}
.kobit-basketball-quarters td:first-child {
    font-weight: 600;
    color: #212121;
    text-align: right;
}
body.kobit-dark-mode .kobit-basketball-quarters td:first-child {
    color: #e0e0e0;
}
body.kobit-dark-mode .kobit-basketball-quarters th,
body.kobit-dark-mode .kobit-basketball-quarters td {
    color: #a0a0a0;
}

/* Box Score Table */
.kobit-box-score-team {
    margin-bottom: 24px;
}
.kobit-box-score-team h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: #212121;
    border-left: 4px solid #0057b8;
    padding-left: 12px;
}
.kobit-box-score-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 500px; /* Ensure scroll on mobile */
}
.kobit-box-score-table th,
.kobit-box-score-table td {
    padding: 8px;
    text-align: center;
    border-bottom: 1px solid #eee;
}
.kobit-box-score-table th {
    font-weight: 600;
    color: #757575;
    background-color: #F9FAFB;
}
.kobit-box-score-table th.player-name,
.kobit-box-score-table td.player-name {
    text-align: left;
    width: 40%;
}
.kobit-box-score-table .player-name .number {
    display: inline-block;
    width: 20px;
    color: #757575;
    font-size: 11px;
}
.kobit-box-score-table .player-name .name {
    font-weight: 500;
    color: #212121;
}

/* Dark Mode for Box Score */
body.kobit-dark-mode .kobit-box-score-team h4 {
    color: #fff;
}
body.kobit-dark-mode .kobit-box-score-table th {
    background-color: #2c2c2c;
    color: #a0a0a0;
    border-bottom-color: #444;
}
body.kobit-dark-mode .kobit-box-score-table td {
    border-bottom-color: #333;
    color: #e0e0e0;
}
body.kobit-dark-mode .kobit-box-score-table .player-name .name {
    color: #fff;
}

/* Play-by-Play Quarter Header */
.kobit-pbp-quarter-header {
    background-color: #e0e0e0;
    color: #212121;
    font-weight: 700;
    padding: 6px 12px;
    text-align: center;
    border-radius: 4px;
    margin: 16px 0 8px 0;
    font-size: 13px;
    position: relative;
    z-index: 1;
}
body.kobit-dark-mode .kobit-pbp-quarter-header {
    background-color: #333;
    color: #fff;
}

/* Stats Section Headers */
.kobit-stats-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #757575;
    margin: 20px 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.kobit-stats-section-title:first-child {
    margin-top: 0;
}
.kobit-key-stats {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #D1D5DB;
}
body.kobit-dark-mode .kobit-stats-section-title {
    color: #a0a0a0;
}
body.kobit-dark-mode .kobit-key-stats {
    border-bottom-color: #333;
}

/* Match Layout (Sidebar) */
.kobit-match-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin: 0 12px 16px 12px;
    max-width: 1200px;
}

@media (min-width: 992px) {
    .kobit-match-layout {
        grid-template-columns: 1fr 320px;
        margin: 0 auto 16px auto;
    }
    /* Reset margins for tabs container when inside layout */
    .kobit-match-layout .kobit-tabs-container {
        margin: 0 0 16px 0;
        max-width: 100%;
    }
}

/* Sidebar Widget */
.kobit-sidebar-widget {
    background-color: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 24px;
}
.kobit-widget-header {
    padding: 12px 16px;
    border-bottom: 1px solid #D1D5DB;
    background-color: #F9FAFB;
}
.kobit-widget-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #212121;
    text-transform: uppercase;
}
.kobit-widget-content {
    padding: 0;
}
.kobit-mini-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.kobit-mini-table th,
.kobit-mini-table td {
    padding: 8px 12px;
    text-align: center;
    border-bottom: 1px solid #eee;
}
.kobit-mini-table th {
    font-weight: 600;
    color: #757575;
    background-color: #fff;
    font-size: 11px;
}
.kobit-mini-table td.team-name {
    text-align: left;
    font-weight: 500;
}
.kobit-mini-table .flex-center {
    display: flex;
    align-items: center;
    gap: 8px;
}
.kobit-mini-table .mini-logo {
    width: 20px;
    height: 20px;
}
.kobit-mini-table tr.highlighted td {
    background-color: #E3F2FD;
}
.kobit-widget-footer {
    padding: 10px;
    text-align: center;
    border-top: 1px solid #eee;
}
.kobit-view-full-table {
    font-size: 12px;
    font-weight: 600;
    color: #0057b8;
    text-decoration: none;
}
.kobit-no-data-small {
    padding: 16px;
    text-align: center;
    color: #757575;
    font-size: 13px;
    margin: 0;
}

/* Dark Mode for Sidebar */
body.kobit-dark-mode .kobit-sidebar-widget,
body.kobit-dark-mode .kobit-mini-table th {
    background-color: #1e1e1e;
    border-color: #333;
}
body.kobit-dark-mode .kobit-widget-header {
    background-color: #2c2c2c;
    border-bottom-color: #333;
}
body.kobit-dark-mode .kobit-widget-header h4 {
    color: #fff;
}
body.kobit-dark-mode .kobit-mini-table td {
    border-bottom-color: #333;
    color: #e0e0e0;
}
body.kobit-dark-mode .kobit-mini-table tr.highlighted td {
    background-color: #333;
    color: #fff;
}
body.kobit-dark-mode .kobit-widget-footer {
    border-top-color: #333;
}

/* Box Score Player of the Game */
.kobit-box-score-motm {
    background: linear-gradient(135deg, #0057b8 0%, #003b7e 100%);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 87, 184, 0.2);
}
.motm-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #FFC107;
}
.motm-content {
    display: flex;
    align-items: center;
    gap: 16px;
}
.motm-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #FFC107;
    background-color: #fff;
}
.motm-info {
    flex-grow: 1;
}
.motm-name {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 4px;
}
.motm-team {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    opacity: 0.9;
}
.motm-team img { width: 16px; height: 16px; object-fit: contain; }
.motm-stats {
    display: flex;
    gap: 16px;
}
.motm-stat-item { display: flex; flex-direction: column; align-items: center; }
.motm-stat-item .val { font-size: 20px; font-weight: 700; line-height: 1; }
.motm-stat-item .lbl { font-size: 10px; opacity: 0.8; font-weight: 600; }

/* Share League Button */
.kobit-share-league-btn {
    background: none;
    border: none;
    color: #757575;
    cursor: pointer;
    font-size: 16px;
    margin-left: auto;
    padding: 4px 8px;
    transition: color 0.2s;
}
.kobit-share-league-btn:hover {
    color: #0057b8;
}

/* Share Modal */
.kobit-modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}
.kobit-modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
    text-align: center;
}
.kobit-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}
.kobit-modal-close:hover { color: #000; }
#kobit-generated-image-preview img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
}
.kobit-modal-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}
.kobit-share-note {
    font-size: 12px;
    color: #757575;
}
.kobit-modal-social-share {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 15px 0;
}

/* Dark Mode for Modal */
body.kobit-dark-mode .kobit-modal-content {
    background-color: #1e1e1e;
    color: #e0e0e0;
}
body.kobit-dark-mode .kobit-share-league-btn {
    color: #a0a0a0;
}
body.kobit-dark-mode .kobit-share-league-btn:hover {
    color: #4dabf5;
}

/* Share Card Adjustments */
.kobit-card-content-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    padding: 0 20px;
}
.kobit-card-league-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 10px;
}
.kobit-card-league-info img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    background: #fff;
    border-radius: 50%;
    padding: 4px;
}
.kobit-card-matches.two-cols {
    column-count: 2;
    column-gap: 15px;
}
.kobit-card-matches.three-cols {
    column-count: 3;
    column-gap: 15px;
}
.kobit-card-matches .kobit-match-row {
    background: rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    margin-bottom: 4px;
    border-radius: 4px;
    break-inside: avoid; /* Prevent rows from breaking across columns */
}
.kobit-card-matches.two-cols .kobit-match-row {
    height: 50px;
    font-size: 13px;
    grid-template-columns: 45px 1fr 35px;
    height: 52px;
    font-size: 12px;
    grid-template-columns: 40px 1fr 30px;
    padding: 0 8px;
    gap: 8px;
}
.kobit-card-matches.two-cols .kobit-team-logo {
    width: 24px;
    height: 24px;
    width: 22px;
    height: 22px;
}
.kobit-card-matches.two-cols .kobit-match-score {
    font-size: 14px;
    min-width: 30px;
}
.kobit-card-matches.three-cols .kobit-match-row {
    height: 45px;
    font-size: 11px;
    grid-template-columns: 35px 1fr 25px;
    height: 46px;
    font-size: 10px;
    grid-template-columns: 30px 1fr 20px;
    padding: 0 6px;
    gap: 8px;
    gap: 4px;
}
.kobit-card-matches.three-cols .kobit-team-logo {
    width: 20px;
    height: 20px;
    width: 16px;
    height: 16px;
}
.kobit-card-matches.three-cols .kobit-match-score {
    font-size: 13px;
    min-width: 30px;
    font-size: 12px;
    min-width: 20px;
}
.kobit-card-matches.three-cols .kobit-team {
    gap: 4px;
    gap: 3px;
}
/* Ensure truncation works in tight spaces */
.kobit-card-matches .kobit-team {
    min-width: 0;
}
.kobit-card-matches .kobit-match-time-status .match-time {
    color: #FFC107;
}
