/* --- Cric Ai Premium Theme --- */
:root {
    --brand-primary: #1a237e;
    /* Deep Indigo */
    --brand-accent: #00e676;
    /* AI Teal/Green */
    --bg-body: #f0f2f5;
    --bg-card: #ffffff;
    --text-primary: #1c1e21;
    --text-secondary: #65676b;
    --border: #e4e6eb;
    --danger: #ff1744;
    --font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    /* Softer, more elevated shadow */
    --hover-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-body);
    font-family: var(--font-family);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- Header --- */
header {
    background: var(--brand-primary);
    color: white;
    height: 64px;
    /* Taller, more substantial header */
    display: flex;
    align-items: center;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 800;
    font-size: 26px;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.logo-icon {
    background: linear-gradient(135deg, var(--brand-accent), #69f0ae);
    color: var(--brand-primary);
    padding: 2px 10px;
    border-radius: 6px;
    font-weight: 900;
    margin-left: 6px;
    text-shadow: none;
}

/* --- Match Strip (Darker Contrast) --- */
.match-strip-container {
    background: #283593;
    /* Slightly lighter than header */
    padding: 20px 0 30px;
    margin-bottom: 30px;
    box-shadow: inset 0 -10px 20px -10px rgba(0, 0, 0, 0.1);
}

.match-strip {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 0 24px;
    padding-bottom: 12px;
    max-width: 100%;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.match-strip::-webkit-scrollbar {
    height: 6px;
}

.match-strip::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

/* --- Match Card --- */
.espn-card {
    background: var(--bg-card);
    min-width: 300px;
    max-width: 300px;
    flex-shrink: 0;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    padding: 16px;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    border: 2px solid transparent;
    /* Prepare for border transition */
    position: relative;
    overflow: hidden;
}

.espn-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--hover-shadow);
}

/* Active Card State */
.active-card {
    border-color: var(--brand-accent) !important;
    box-shadow: 0 0 0 4px rgba(0, 230, 118, 0.2) !important;
    transform: translateY(-2px);
}

.card-header {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.live-red {
    color: var(--danger);
    font-weight: 900;
    margin-right: 6px;
    display: inline-flex;
    align-items: center;
}

.team-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 15px;
}

.team-name {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
}

.team-name img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background: #f5f5f5;
    padding: 2px;
}

.score {
    font-weight: 800;
    font-family: 'Roboto', monospace;
    letter-spacing: -0.5px;
    font-size: 16px;
}

.match-status-text {
    font-size: 12px;
    color: var(--brand-primary);
    font-weight: 600;
    margin-top: 12px;
    margin-bottom: 6px;
}

.card-footer {
    border-top: 1px solid var(--border);
    padding-top: 12px;
    margin-top: 12px;
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 700;
    display: flex;
    gap: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-footer span:hover {
    color: var(--brand-primary);
}

/* --- Detail View --- */
#detail-section {
    display: none;
    max-width: 1000px;
    margin: 30px auto;
    padding: 0 20px;
}

.back-link {
    color: var(--brand-primary);
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 24px;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    background: white;
    padding: 10px 20px;
    border-radius: 30px;
    box-shadow: var(--card-shadow);
    transition: background 0.2s;
}

.back-link:hover {
    background: #f8f9fa;
}

.score-tables-grid {
    display: grid;
    grid-template-columns: 65% 33%;
    /* Aesthetic Ratio */
    gap: 24px;
}

/* Detail Header */
.detail-header-panel {
    background: white;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.detail-header-panel::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
}

.dh-top {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.8px;
}

.dh-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.dh-team {
    font-size: 22px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dh-team img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.dh-score {
    font-size: 32px;
    font-weight: 900;
    color: var(--brand-primary);
    text-align: right;
}

.dh-status-bar {
    font-size: 16px;
    color: var(--danger);
    font-weight: 700;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* Tabs */
.tabs-espn {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    background: transparent;
    border: none;
    z-index: 90;
}

.tab-btn {
    padding: 12px 28px;
    border: none;
    background: white;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    border-radius: 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
}

.tab-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    color: var(--brand-primary);
}

.tab-btn.active {
    background: var(--brand-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(26, 35, 126, 0.4);
}

/* Match strip tabs (Live / Upcoming / Finished) */
.match-tab-btn {
    padding: 6px 14px;
    border: 1px solid rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.15);
    color: white;
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
    cursor: pointer;
}
.match-tab-btn:hover {
    background: rgba(255,255,255,0.25);
}
.match-tab-btn.active {
    background: white;
    color: var(--brand-primary);
    border-color: white;
}

/* Tables */
.espn-table-card {
    background: white;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.table-header {
    padding: 18px 24px;
    background: linear-gradient(to right, #fbfbfc, #f0f2f5);
    border-bottom: 1px solid var(--border);
    font-weight: 800;
    font-size: 15px;
    color: var(--brand-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.espn-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.espn-table th {
    background: white;
    color: var(--text-secondary);
    font-weight: 600;
    text-align: left;
    padding: 14px 24px;
    border-bottom: 2px solid var(--bg-body);
    font-size: 13px;
    text-transform: uppercase;
}

.espn-table td {
    padding: 14px 24px;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}

.espn-table tr:last-child td {
    border-bottom: none;
}

.espn-table tr:hover {
    background-color: #f8f9fa;
}

.espn-table .bold {
    font-weight: 700;
    color: var(--text-primary);
}

.espn-table .meta {
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 4px;
}

/* Loader */
.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--brand-accent);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    animation: spin 1s linear infinite;
    margin: 40px auto;
}

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

    100% {
        transform: rotate(360deg);
    }
}


/* --- Ball By Ball Styles (New) --- */
.bbb-container {
    background: #f4f5f7;
    padding: 10px;
    padding-bottom: 40px;
}

.bbb-card {
    background: #fff;
    margin-bottom: 12px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

.bbb-header {
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.bbb-header:active {
    background: #f9f9f9;
}

.bbb-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bbb-over-num {
    font-weight: 700;
    font-size: 14px;
    color: #333;
    background: #000;
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
}

.bbb-over-runs {
    font-weight: 600;
    font-size: 14px;
    color: #009688;
}

.bbb-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bbb-team-score {
    font-weight: 700;
    font-size: 14px;
    color: #333;
}

.bbb-team-score .highlight {
    color: #009688;
}

.arrow-icon {
    font-style: normal;
    color: #888;
    font-size: 12px;
    transition: transform 0.3s;
}

.bbb-content {
    display: block;
    /* Default open state handled by JS */
}

.bbb-row {
    padding: 12px 15px;
    /* More breathing room */
    border-bottom: 1px solid #f9f9f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bbb-col-time {
    width: 20%;
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
}

.bbb-col-score {
    display: flex;
    align-items: center;
    width: 45%;
    gap: 15px;
}

.bbb-run-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 14px;
}

.run-0 {
    background: #f0f0f0;
    color: #888;
}

.run-123 {
    background: #2196f3;
    color: #fff;
}

.run-4 {
    background: #4caf50;
    color: #fff;
}

.run-6 {
    background: #9c27b0;
    color: #fff;
}

.run-w {
    background: #f44336;
    color: #fff;
}

.bbb-score-text {
    font-weight: 700;
    font-size: 14px;
    color: #1a237e;
}

.bbb-overs-text {
    color: #888;
    font-size: 12px;
}

.bbb-col-odds {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    width: 35%;
    gap: 6px;
}

.bbb-odds-box {
    display: flex;
    gap: 4px;
    font-size: 11px;
    align-items: center;
}

.bbb-odds-box .label {
    color: #555;
    margin-right: 4px;
    font-weight: 500;
}

.bbb-odds-box .back {
    background: #e3f2fd;
    color: #0d47a1;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 700;
    min-width: 35px;
    text-align: center;
}

.bbb-odds-box .lay {
    background: #ffebee;
    color: #b71c1c;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 700;
    min-width: 35px;
    text-align: center;
}

.bbb-odds-box.session .back {
    background: #eceff1;
    color: #37474f;
}

.bbb-odds-box.session .lay {
    background: #eceff1;
    color: #37474f;
}



/* Home Extra Grid (Responsive) */
.home-extra-grid {
    margin-top: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 0 20px;
    margin-bottom: 40px;
}

/* --- Mobile View Tweaks (Cricbuzz Style) --- */
@media (max-width: 768px) {
    body {
        background: #f7f7f7;
        /* Very light gray for mobile app feel */
    }

    header {
        height: 56px;
        padding: 0 16px;
    }

    .match-strip-container {
        padding: 10px 0 20px;
        margin-bottom: 10px;
    }

    /* Detail View Styling */
    #detail-section {
        margin: 0;
        padding: 0;
        max-width: 100%;
        background: #fff;
    }

    .detail-header-panel {
        border-radius: 0;
        box-shadow: none;
        border: none;
        border-bottom: 1px solid #e0e0e0;
        margin-bottom: 0;
        padding: 20px 16px;
    }

    .detail-header-panel::before {
        display: none;
    }

    .back-link {
        display: inline-flex;
        /* Show back link on mobile */
        margin-bottom: 15px;
        font-size: 13px;
        padding: 8px 16px;
    }

    /* Sticky Tabs */
    .tabs-espn {
        position: sticky;
        top: 56px;
        /* Below header */
        background: white;
        margin-bottom: 0;
        padding: 10px 16px;
        overflow-x: auto;
        border-bottom: 1px solid #e0e0e0;
        gap: 10px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }

    /* Make tabs simpler pills */
    .tab-btn {
        padding: 8px 16px;
        font-size: 13px;
        white-space: nowrap;
        background: #f5f5f5;
        box-shadow: none;
        color: #555;
    }

    .tab-btn.active {
        background: #1a237e;
        color: white;
        box-shadow: none;
    }

    /* Stack grid */
    .score-tables-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* Tables on mobile */
    .espn-table-card {
        border-radius: 0;
        border: none;
        box-shadow: none;
        border-top: 10px solid #f4f5f7;
        /* Separator */
        margin-bottom: 0;
    }

    .espn-table th,
    .espn-table td {
        padding: 12px 16px;
        font-size: 13px;
    }

    /* Ball By Ball Tweaks */
    .bbb-container {
        padding: 0;
        background: #f4f5f7;
    }

    .bbb-card {
        margin-bottom: 8px;
        /* Tighter gap */
        border-radius: 0;
        /* Full width edge to edge */
        border-left: none;
        border-right: none;
    }

    .bbb-header {
        padding: 10px 16px;
    }

    .bbb-row {
        padding: 10px 16px;
    }

    /* Adjust Columns for Mobile */
    .bbb-col-time {
        display: none;
        /* Hide time to save space on mobile? or make generic */
    }

    .bbb-col-score {
        width: 60%;
    }

    .bbb-col-odds {
        width: 40%;
    }

    /* Stack Home Extra Grid */
    .home-extra-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 16px;
    }
}

/* --- Fixtures Screen Styles --- */
/* --- Fixtures Screen Styles (Premium Polish) --- */

.fixtures-content-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: block;
    /* Ensure vertical stacking */
}

.fixtures-series-title {
    font-size: 15px;
    font-weight: 800;
    color: #1a237e;
    margin: 32px 0 16px 0;
    padding-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fixtures-series-title::before {
    content: '';
    display: block;
    width: 4px;
    height: 18px;
    background: #00e676;
    border-radius: 2px;
}

.series-group-container {
    margin-bottom: 40px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 24px;
}

.series-group-container:last-child {
    border-bottom: none;
}

.fixtures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
    width: 100%;
}

.match-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #f0f2f5;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.match-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* Header */
.match-card-header {
    background: linear-gradient(135deg, #e3f2fd, #f5faff);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e1f5fe;
}

.match-title {
    font-size: 12px;
    font-weight: 600;
    color: #0277bd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.match-status-text {
    font-size: 11px;
    font-weight: 700;
    color: #0288d1;
    background: rgba(2, 136, 209, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
}

/* Body */
.match-card-body {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.match-teams-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 50%;
}

.match-team-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.match-team-row img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 50%;
    padding: 2px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    border: 1px solid #f5f5f5;
}

.team-name-lg {
    font-weight: 800;
    font-size: 17px;
    color: #1c1e21;
    letter-spacing: -0.3px;
}

.match-divider {
    width: 1px;
    height: 70px;
    background: linear-gradient(to bottom, transparent, #eee, transparent);
    margin: 0 16px;
}

.match-venue-section {
    width: 45%;
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}

.match-venue-text {
    font-size: 11px;
    color: #78909c;
    line-height: 1.4;
    font-weight: 500;
}

.match-time-text {
    font-size: 14px;
    font-weight: 700;
    color: #263238;
}

/* Footer */
.match-card-footer {
    background: #1a237e;
    /* Premium Dark Blue */
    color: white;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.footer-actions {
    display: flex;
    gap: 10px;
}

.footer-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.footer-btn:hover {
    background: #00e676;
    border-color: #00e676;
    color: #1a237e;
    font-weight: 700;
}

.footer-odds {
    display: flex;
    gap: 8px;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px 8px;
    border-radius: 6px;
    color: white;
    font-size: 12px;
    font-weight: 700;
}

.odds-box {
    background: #00e676;
    color: #1a237e;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.odds-val {
    padding: 0 2px;
    font-family: 'Roboto Mono', monospace;
}

@media (max-width: 600px) {
    .fixtures-grid {
        grid-template-columns: 1fr;
    }

    .match-card-body {
        padding: 16px;
    }

    .match-venue-section {
        width: 40%;
    }

    .match-teams-section {
        width: 55%;
    }

    .date-pill {
        padding: 8px 14px;
        font-size: 12px;
    }
}

/* --- Fan Subscription Styles --- */
.sub-options-container {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
    border: 1px solid #e0e0e0;
}

.sub-title {
    font-size: 14px;
    font-weight: 700;
    color: #1a237e;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sub-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.sub-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #424242;
    font-weight: 500;
    cursor: pointer;
}

.sub-checkbox input {
    accent-color: #1a237e;
    width: 16px;
    height: 16px;
}

.sub-btn {
    background: #1a237e;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    margin-top: 16px;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s;
}

.sub-btn:hover {
    background: #0d47a1;
}

/* --- Toast Notifications --- */
#toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast-notif {
    background: white;
    border-left: 5px solid #00e676;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    padding: 16px;
    width: 300px;
    animation: slideIn 0.3s ease-out;
    display: flex;
    flex-direction: column;
}

.toast-title {
    font-weight: 800;
    color: #1a237e;
    font-size: 14px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast-msg {
    color: #333;
    font-size: 13px;
    line-height: 1.4;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }

    /* --- Match Detail View (Premium Polish) --- */

    .back-link {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 8px 16px;
        background: white;
        border-radius: 20px;
        color: var(--brand-primary);
        font-weight: 700;
        font-size: 13px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        margin-bottom: 20px;
        cursor: pointer;
        transition: all 0.2s;
    }

    .back-link:hover {
        transform: translateX(-4px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    }

    .detail-header-panel {
        background: white;
        border-radius: 16px;
        padding: 24px;
        box-shadow: var(--card-shadow);
        margin-bottom: 24px;
        position: relative;
        overflow: hidden;
    }

    .detail-header-panel::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 4px;
        background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
    }

    .dh-top {
        font-size: 12px;
        color: var(--text-secondary);
        text-transform: uppercase;
        letter-spacing: 0.8px;
        font-weight: 600;
        margin-bottom: 20px;
        border-bottom: 1px solid #f0f0f0;
        padding-bottom: 12px;
    }

    .dh-main {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 16px;
    }

    .dh-team {
        display: flex;
        align-items: center;
        gap: 12px;
        font-weight: 800;
        font-size: 18px;
        color: var(--text-primary);
        width: 50%;
    }

    .dh-team img {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        border: 3px solid #f5f5f5;
    }

    .dh-score {
        text-align: right;
        font-family: 'Roboto', monospace;
        font-weight: 800;
        font-size: 20px;
        color: var(--brand-primary);
        letter-spacing: -0.5px;
    }

    .dh-status-bar {
        display: inline-block;
        padding: 4px 12px;
        background: rgba(0, 230, 118, 0.1);
        color: #00c853;
        font-weight: 700;
        font-size: 12px;
        border-radius: 12px;
        margin-top: 10px;
    }

    /* Mobile Tweaks for Header */
    @media (max-width: 600px) {
        .dh-team {
            font-size: 15px;
        }

        .dh-team img {
            width: 36px;
            height: 36px;
        }

        .dh-score {
            font-size: 18px;
        }
    }

/* --- AI Analytics (Insights + Verdict) --- */
.ai-analytics-wrap {
    text-align: left;
    max-width: 100%;
}
.ai-section {
    margin-bottom: 24px;
}
.ai-section:last-child {
    margin-bottom: 0;
}
.ai-section-title {
    margin: 0 0 12px 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--brand-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.ai-section-icon {
    font-size: 20px;
}
.ai-insights-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ai-insight-card {
    padding: 12px 14px 12px 16px;
    background: #e3f2fd;
    border-radius: 12px;
    border-left: 4px solid var(--brand-primary);
    font-size: 14px;
    line-height: 1.5;
    color: #1c1e21;
}
.ai-verdict-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: rgba(26, 35, 126, 0.08);
    border-radius: 12px;
    border: 1px solid rgba(26, 35, 126, 0.35);
}
.ai-verdict-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-primary);
    color: white;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
}
.ai-verdict-text {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
    color: #1c1e21;
}
.ai-fallback-card {
    padding: 16px;
    background: #f9f9f9;
    border-radius: 12px;
    border: 1px solid #eee;
    font-size: 14px;
    line-height: 1.6;
}