

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}




html, body {
    height: 100%;
    width: 100%;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}









body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1a2e;
    color: #eee;
    overflow: hidden;
}
.app-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}



.header {
    background: #0f0f1a !important;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #2a2a3a !important;
    z-index: 10;
    flex-shrink: 0;
}
.header-brand-name {
    color: #ffffff !important;
}
.header-brand-sub {
    color: #aaaabb !important;
}
.header-divider {
    background: rgba(255,255,255,0.15) !important;
}
.header-worldcup {
    color: #ffffff !important;
}



.header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.header-logo {
    height: 38px;
    width: auto;
    display: block;
    flex-shrink: 0;
}
.header-brand-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}






.header-brand-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.01em;
    line-height: 1.1;
}
.header-brand-sub {
    font-size: 0.6rem;
    font-weight: 400;
    font-style: italic;
    color: #aaaabb;
    letter-spacing: 0.03em;
    line-height: 1.1;
}
.header-divider {
    width: 1px;
    height: 28px;
    background: rgba(255,255,255,0.15);
    margin: 0 12px;
    flex-shrink: 0;
}
.header-worldcup {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.04em;
    white-space: nowrap;
}





html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}










@media (max-width: 480px) {
    .header {
        padding: 8px 10px;
    }

    .header-brand {
        gap: 6px;
        min-width: 0;
    }

    .header-logo {
        height: 28px;
    }

    .header-brand-name {
        font-size: 0.88rem;
    }

    .header-brand-sub {
        font-size: 0.5rem;
    }

    .header-divider {
        height: 24px;
        margin: 0 6px;
    }

    .header-worldcup {
        font-size: 0.78rem;
        letter-spacing: 0.03em;
    }

    .theme-toggle {
        gap: 6px;
    }

    .toggle-btn {
        font-size: 1.05rem;
    }

    .made-in-kenya {
        font-size: 1.05rem;
    }
}











.toggle-btn {
    background: none;
    border: none;
    padding: 0;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}





.toggle-btn:hover {
    transform: scale(1.15);
}

.theme-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}



#map {
    flex: 1;
    width: 100%;
    z-index: 1;
}
.footer {
    background: #0f0f1a;
    padding: 6px 12px;
    text-align: center;
    font-size: 0.65rem;
    color: #888;
    border-top: 1px solid #2a2a3a;
    flex-shrink: 0;
}




/* ===== THEME VARIABLES ===== */
body {
    --popup-bg: #1e1e2e;
    --popup-text: #e0e0f0;
    --popup-subtext: #9090b0;
    --popup-border: #2e2e42;
    --popup-pill-bg: #2a2a3e;
    --popup-pill-hover: #35354e;
    --popup-stat-bg: #252538;
    --popup-accent: #C5532B;
    --popup-header-gradient: linear-gradient(135deg, #2a2a3e 0%, #1e1e2e 100%);
}
body.light-theme {
    --popup-bg: #ffffff;
    --popup-text: #111122;
    --popup-subtext: #666680;
    --popup-border: #e0e0ec;
    --popup-pill-bg: #f0f0f8;
    --popup-pill-hover: #e2e2f0;
    --popup-stat-bg: #f7f7fc;
    --popup-accent: #C5532B;
    --popup-header-gradient: linear-gradient(135deg, #f0f0f8 0%, #ffffff 100%);
}




/* ===== LEAFLET POPUP WRAPPER RESET ===== */
.stadium-popup .leaflet-popup-content-wrapper {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    border-radius: 0;
    overflow: visible;
}
.stadium-popup .leaflet-popup-content {
    margin: 0;
    width: auto !important;
    overflow: visible;
}
.stadium-popup .leaflet-popup-tip-container {
    display: none;
}
.stadium-popup .leaflet-popup-close-button {
    display: none;
}

/* ===== POPUP CONTAINER ===== */
.stadium-popup-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 260px;
    max-width: 300px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--popup-text);
}

/* ===== POPUP HEADER CARD ===== */
.popup-header {
    background: var(--popup-bg);
    border: 1px solid var(--popup-border);
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.popup-stadium-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--popup-text);
    line-height: 1.2;
    margin-bottom: 3px;
}    



.popup-location {
    font-size: 0.72rem;
    color: var(--popup-subtext);
}
.popup-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 3px;
}
.popup-weather-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.weather-icon {
    font-size: 0.85rem;
}
.weather-temp {
    font-size: 0.65rem;
    color: var(--popup-subtext);
    white-space: nowrap;
}
.weather-divider {
    font-size: 0.65rem;
    color: var(--popup-border);
}
.weather-clock {
    font-size: 0.65rem;
    color: var(--popup-subtext);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}




/* ===== PILLS CARD ===== */
.popup-pills-card {
    background: var(--popup-bg);
    border: 1px solid var(--popup-border);
    border-radius: 14px;
    padding: 6px;
    display: flex;
    gap: 4px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}



.pill {
    flex: 1;
    background: transparent;
    padding: 7px 4px;
    font-size: 0.68rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    color: var(--popup-subtext);
    border-radius: 10px;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.pill svg {
    flex-shrink: 0;
    opacity: 0.8;
}
.pill.active svg {
    opacity: 1;
}



.pill.active {
    background: var(--popup-accent);
    color: #fff;
}
.pill:hover:not(.active) {
    background: var(--popup-pill-hover);
    color: var(--popup-text);
}

/* ===== PANEL CARD ===== */
.popup-panel-card {
    display: none;
    background: var(--popup-bg);
    border: 1px solid var(--popup-border);
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    overflow: hidden;
}
.popup-panel-card.visible {
    display: block;
}
.panel {
    display: none;
    padding: 12px 14px 14px;
}
.panel.active {
    display: block;
}

/* ===== STAT GRID ===== */
.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.stat-card {
    background: var(--popup-stat-bg);
    border-radius: 10px;
    padding: 8px 10px;
    border: 1px solid var(--popup-border);
}
.stat-label {
    font-size: 0.62rem;
    color: var(--popup-subtext);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}
.stat-value {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--popup-text);
}

/* ===== GALLERY GRID ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 8px;
}
.gallery-item {
    background: var(--popup-stat-bg);
    border: 1px solid var(--popup-border);
    border-radius: 8px;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--popup-subtext);
}
.gallery-caption {
    text-align: center;
    font-size: 0.68rem;
    color: var(--popup-subtext);
}


.stat-card-wide {
    grid-column: 1 / -1;
}
.stat-card-wide .stat-value {
    font-size: 0.75rem;
}


/* ===== MATCH LIST ===== */
.match-stage-label {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--popup-accent);
    margin: 10px 0 4px;
}
.match-stage-label:first-child {
    margin-top: 0;
}
.match-list {
    list-style: none;
    padding-left: 0;
    margin: 0 0 4px;
}
.match-list li {
    padding: 6px 0;
    border-bottom: 1px solid var(--popup-border);
    font-size: 0.75rem;
    color: var(--popup-text);
}
.match-list li:last-child {
    border-bottom: none;
}
.match-top {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}
.match-date {
    font-size: 0.65rem;
    color: var(--popup-subtext);
    white-space: nowrap;
}
.match-group {
    font-size: 0.62rem;
    background: var(--popup-stat-bg);
    border: 1px solid var(--popup-border);
    border-radius: 4px;
    padding: 1px 5px;
    color: var(--popup-subtext);
}
.match-result {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--popup-accent);
    margin-left: auto;
}
.match-time {
    font-size: 0.65rem;
    color: var(--popup-subtext);
    margin-left: auto;
}
.match-teams {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--popup-text);
}


.match-vs {
    font-size: 0.65rem;
    color: var(--popup-subtext);
    margin: 0 3px;
}
.match-user-time {
    font-size: 0.62rem;
    color: var(--popup-subtext);
    margin-top: 1px;
    font-style: italic;
}


/* ===== WEATHER ===== */
.weather-placeholder {
    text-align: center;
    font-size: 0.78rem;
    color: var(--popup-subtext);
    padding: 8px 0;
}




/* ===== LIVE MATCH ===== */
.match-live {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
    color: #00c853;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}
.live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #00c853;
    animation: livePulse 2s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.75); }
}






.match-teams-live {
    color: #00c853 !important;
    font-weight: 600;
}
.match-teams-soon {
    color: #F5A623 !important;
    font-weight: 600;
}
.match-time-soon {
    color: #F5A623 !important;
    font-weight: 600;
}







/* ===== GALLERY STRIP ===== */
.gallery-strip-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
}
.gallery-strip-overflow {
    flex: 1;
    overflow: hidden;
}
.gallery-strip {
    display: flex;
    gap: 6px;
    transition: transform 0.25s ease;
}
.gallery-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--popup-stat-bg);
    border: 1px solid var(--popup-border);
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.15s;
}
.gallery-thumb:hover {
    opacity: 0.85;
}
.gallery-thumb-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    background: rgba(0,0,0,0.4);
    border-radius: 8px;
}
.gallery-strip-prev,
.gallery-strip-next {
    background: var(--popup-pill-bg);
    border: 1px solid var(--popup-border);
    color: var(--popup-text);
    border-radius: 8px;
    width: 26px;
    height: 80px;
    font-size: 1rem;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.gallery-strip-prev:hover,
.gallery-strip-next:hover {
    background: var(--popup-pill-hover);
}
.gallery-empty {
    font-size: 0.75rem;
    color: var(--popup-subtext);
    text-align: center;
    padding: 12px 0;
}

/* ===== LIGHTBOX ===== */
#gallery-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}
.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.88);
}

.lightbox-box {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90vw;
    max-width: 860px;
    max-height: 90vh;
    gap: 8px;
    padding: 0 44px;
}


.lightbox-close {
    position: absolute;
    top: -14px;
    right: 0;
    background: #333;
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background 0.15s;
}


.lightbox-close:hover {
    background: #555;
}
.lightbox-description {
    color: #eee;
    font-size: 0.85rem;
    text-align: center;
    max-width: 600px;
    line-height: 1.4;
}
.lightbox-media {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}


.lightbox-img {
    max-width: 100%;
    max-height: 55vh;
    border-radius: 10px;
    object-fit: contain;
    display: block;
}
.lightbox-iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 55vh;
    border-radius: 10px;
}
.lightbox-video {
    max-width: 100%;
    max-height: 55vh;
    border-radius: 10px;
}


.lightbox-footer {
    display: flex;
    align-items: center;
    gap: 16px;
}
.lightbox-source {
    color: #aaa;
    font-size: 0.75rem;
    text-decoration: none;
    border-bottom: 1px solid #555;
    transition: color 0.15s;
}
.lightbox-source:hover {
    color: #fff;
}




.lightbox-counter {
    color: #777;
    font-size: 0.72rem;
}



.lightbox-strip-wrapper {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    flex-shrink: 0;
}
.lightbox-strip-wrapper::-webkit-scrollbar {
    display: none;
}
.lightbox-strip {
    display: flex;
    gap: 6px;
    justify-content: center;
    padding: 2px 0;
}
.lb-strip-thumb {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    border: 2px solid transparent;
    opacity: 0.5;
    transition: opacity 0.15s, border-color 0.15s;
    background: #222;
}



.lb-strip-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.lb-strip-thumb.active {
    border-color: #fff;
    opacity: 1;
}
.lb-strip-thumb:hover:not(.active) {
    opacity: 0.8;
}
.lb-strip-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #fff;
    background: rgba(0,0,0,0.45);
}




.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: calc(50% - 30px);
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    z-index: 2;
}
.lightbox-prev { left: 0; }
.lightbox-next { right: 0; }
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255,255,255,0.25);
}

@media (max-width: 600px) {
    .lightbox-box { width: 100vw; padding: 0 40px; }
}



/* ===== REMOVE GRID LINES FROM MAP TILES ===== */
.leaflet-tile {
    outline: none;
}
.leaflet-container {
    background: #1a1a2e;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    .header h1 {
        font-size: 1rem;
    }
    .toggle-btn {
        padding: 6px 12px;
        font-size: 0.75rem;
        min-width: 80px;
    }
}



/* ===== CALENDAR TRIGGER BUTTON ===== */

#cal-trigger {
    position: fixed;
    bottom: 36px;
    left: 16px;
    z-index: 1000;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--popup-bg, #1e1e2e);
    border: 2px solid var(--popup-border, #2e2e42);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.35);
    transition: border-color 0.2s, box-shadow 0.2s;
    user-select: none;
    gap: 0;
}
#cal-trigger:hover {
    border-color: var(--popup-accent, #C5532B);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}
#cal-trigger.cal-trigger-active {
    border-color: #00c853;
    box-shadow: 0 0 0 3px rgba(0,200,83,0.2), 0 4px 16px rgba(0,0,0,0.35);
}
.cal-trigger-day {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1;
    color: var(--popup-text, #e0e0f0);
}
.cal-trigger-month {
    font-size: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--popup-subtext, #9090b0);
    line-height: 1;
    margin-top: 2px;
}
#cal-trigger.cal-trigger-active .cal-trigger-day,
#cal-trigger.cal-trigger-active .cal-trigger-month {
    color: #00c853;
}
.cal-trigger-clear {
    display: none;
}


/* ===== CALENDAR PANEL ===== */
#cal-panel {
    position: fixed;
    bottom: 80px;
    left: 16px;
    z-index: 1001;
    background: var(--popup-bg, #1e1e2e);
    border: 1px solid var(--popup-border, #2e2e42);
    border-radius: 16px;
    padding: 14px;
    width: 260px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.cal-month-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--popup-text, #e0e0f0);
}
.cal-nav {
    background: var(--popup-pill-bg, #2a2a3e);
    border: 1px solid var(--popup-border, #2e2e42);
    color: var(--popup-text, #e0e0f0);
    border-radius: 8px;
    width: 28px;
    height: 28px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.cal-nav:disabled {
    opacity: 0.25;
    cursor: default;
}
.cal-nav:not(:disabled):hover {
    background: var(--popup-pill-hover, #35354e);
}
.cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.65rem;
    color: var(--popup-subtext, #9090b0);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}
.cal-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    border-radius: 8px;
    color: var(--popup-subtext, #9090b0);
    cursor: default;
}
.cal-empty { background: transparent; }
.cal-out {
    opacity: 0.2;
}
.cal-valid {
    color: var(--popup-text, #e0e0f0);
    cursor: pointer;
    transition: background 0.15s;
}
.cal-valid:hover {
    background: var(--popup-pill-hover, #35354e);
}
.cal-today {
    border: 1px solid var(--popup-accent, #C5532B);
}
.cal-selected {
    background: #00c853 !important;
    color: #fff !important;
    font-weight: 700;
}







@media (max-width: 480px) {
    #cal-trigger {
        bottom: 26px;
        left: 12px;
        width: 42px;
        height: 42px;
    }

    .cal-trigger-day {
        font-size: 0.92rem;
    }

    .cal-trigger-month {
        font-size: 0.48rem;
        margin-top: 1px;
    }

    #cal-panel {
        bottom: 74px;
        left: 10px;
        width: 236px;
        padding: 12px;
        border-radius: 14px;
    }

    .cal-header {
        margin-bottom: 8px;
    }

    .cal-month-label {
        font-size: 0.78rem;
    }

    .cal-nav {
        width: 24px;
        height: 24px;
        font-size: 0.9rem;
        border-radius: 7px;
    }

    .cal-weekdays {
        font-size: 0.58rem;
        margin-bottom: 5px;
    }

    .cal-grid {
        gap: 2px;
    }

    .cal-cell {
        font-size: 0.68rem;
        border-radius: 7px;
    }
}






















/* ===== SEARCH BAR ===== */

#search-wrapper {
    position: fixed;
    bottom: 36px;
    left: 80px;
    right: 16px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
#search-results {
    pointer-events: all;
}



#search-bar {
    display: flex;
    align-items: center;
    background: var(--popup-bg, #1e1e2e);
    border: 2px solid var(--popup-border, #2e2e42);
    border-radius: 50px;
    padding: 6px 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.35);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.2s,
                padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 44px;
    overflow: hidden;
    pointer-events: all;
}

#search-bar.search-expanded {
    width: 100%;
    max-width: 420px;
    border-color: #00c853;
}


#search-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    color: var(--popup-subtext, #9090b0);
    transition: color 0.2s;
}



@media (max-width: 480px) {
    #search-wrapper {
        bottom: 38px;
        left: 78px;
        right: 12px;
    }

    #search-bar {
        width: 38px;
        min-width: 38px;
        padding: 4px;
        border-width: 2px;
        border-radius: 999px;
    }

    #search-bar.search-expanded {
        max-width: 280px;
    }

    #search-icon-btn {
        width: 24px;
        height: 24px;
    }

    #search-svg {
        width: 15px;
        height: 15px;
    }

    #search-input {
        font-size: 0.74rem;
        padding: 0 8px 0 5px;
    }

    #search-input::placeholder {
        font-size: 0.70rem;
    }

    #search-results {
        bottom: calc(100% + 8px);
        border-radius: 14px;
        max-height: 50vh;
        padding: 6px;
    }
}







#search-bar.search-expanded #search-icon-btn {
    color: #ff4444;
}



#search-svg {
    width: 18px;
    height: 18px;
    display: block;
}

#search-input-wrapper {
    flex: 1;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.2s ease 0.1s;
}

#search-bar.search-expanded #search-input-wrapper {
    opacity: 1;
}


#search-input {
    width: 100%;
    background: none;
    border: none;
    outline: none;
    color: var(--popup-text, #e0e0f0);
    font-size: 0.82rem;
    padding: 0 10px 0 8px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    caret-color: #00c853;
}



#search-input::placeholder {
    color: var(--popup-subtext, #9090b0);
    font-size: 0.78rem;
}













/* ===== SEARCH RESULTS ===== */
#search-results {
    display: none;
    position: absolute;
    bottom: calc(100% + 10px);
    left: 0;
    right: 0;
    background: var(--popup-bg, #1e1e2e);
    border: 1px solid var(--popup-border, #2e2e42);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    max-height: 55vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--popup-border) transparent;
    padding: 8px;
    gap: 6px;
    flex-direction: column;
}
#search-results.visible {
    display: flex;
}
.sr-card {
    background: var(--popup-stat-bg, #252538);
    border: 1px solid var(--popup-border, #2e2e42);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}
.sr-card-header {
    display: grid;
    grid-template-columns: 20px 1fr;
    grid-template-rows: auto auto;
    column-gap: 8px;
    align-items: start;
}


.sr-icon {
    grid-row: 1 / 3;
    font-size: 1rem;
    padding-top: 1px;
    color: var(--popup-subtext, #9090b0);
    display: flex;
    align-items: center;
}


.sr-card-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--popup-text, #e0e0f0);
    line-height: 1.2;
}
.sr-card-sub {
    font-size: 0.68rem;
    color: var(--popup-subtext, #9090b0);
    margin-top: 1px;
}
.sr-highlight {
    color: #00c853;
    font-weight: 800;
}
.sr-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.sr-btn {
    background: var(--popup-pill-bg, #2a2a3e);
    border: 1px solid var(--popup-border, #2e2e42);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--popup-text, #e0e0f0);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}
.sr-btn:hover {
    background: var(--popup-pill-hover, #35354e);
}
.sr-btn-active {
    background: #00c853 !important;
    border-color: #00c853 !important;
    color: #fff !important;
}
.sr-expand {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 2px;
}
.sr-expand-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    border: 1px solid var(--popup-border, #2e2e42);
    background: var(--popup-bg, #1e1e2e);
}
.sr-expand-item:hover {
    background: var(--popup-pill-hover, #35354e);
}
.sr-expand-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--popup-text, #e0e0f0);
}
.sr-expand-sub {
    font-size: 0.65rem;
    color: var(--popup-subtext, #9090b0);
    margin-top: 1px;
}


.sr-fix-row {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    align-items: center;
    gap: 8px;
}
.sr-fix-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}


.sr-fix-stage {
    font-size: 0.58rem;
    color: var(--popup-accent, #C5532B);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 64px;
}
body.light-theme .sr-fix-stage {
    color: #111122;
}


.sr-fix-date {
    font-size: 0.65rem;
    color: var(--popup-subtext, #9090b0);
    white-space: nowrap;
}
.sr-fix-teams {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--popup-text, #e0e0f0);
}
.sr-fix-vs {
    font-size: 0.65rem;
    color: var(--popup-subtext, #9090b0);
    margin: 0 3px;
}
.sr-fix-result {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--popup-accent, #C5532B);
    white-space: nowrap;
}
.sr-fix-time {
    font-size: 0.65rem;
    color: var(--popup-subtext, #9090b0);
    white-space: nowrap;
}
.sr-empty {
    text-align: center;
    font-size: 0.78rem;
    color: var(--popup-subtext, #9090b0);
    padding: 16px 8px;
}










/* ===== MAP LEGEND ===== */
#map-legend {
    position: fixed;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.legend-row {
    display: flex;
    align-items: center;
    gap: 7px;
}
.legend-marker svg {
    display: block;
}
.legend-label {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.62rem;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.7);
    white-space: nowrap;
}
body.light-theme .legend-label {
    color: #111111;
    text-shadow: 0 1px 3px rgba(255,255,255,0.7);
}

@media (max-width: 480px) {
    #map-legend {
        top: auto;
        bottom: 120px;
        transform: none;
        left: 10px;
        gap: 7px;
    }
    .legend-marker svg {
        width: 22px;
        height: 22px;
    }
    .legend-label {
        font-size: 0.55rem;
    }
}











/* ===== TAGLINE FLOATING ===== */
#tagline {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 500;
    transition: opacity 0.3s ease;
    text-align: center;
    padding: 7px 20px;
    font-size: 0.92rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #ccccdd;
    background: rgba(15, 15, 26, 0.72);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 30px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.35);
}
#tagline strong {
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.06em;
}
#tagline-trophy {
    color: #FFD700;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}
body.light-theme #tagline {
    color: #444455;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
body.light-theme #tagline strong {
    color: #111122;
}
body.light-theme #tagline-trophy {
    color: #c8930a;
    text-shadow: 0 0 10px rgba(200, 147, 10, 0.35);
}








@media (max-width: 480px) {
    #tagline {
        font-size: 0.62rem;
        letter-spacing: 0.04em;
        padding: 5px 10px;
        top: 8px;
        max-width: 78vw;
        white-space: normal;
        text-align: center;
        line-height: 1.28;
        border-radius: 22px;
    }
}







/* ===== CUSTOM ZOOM CONTROL ===== */
#custom-zoom {
    position: absolute;
    bottom: 90px;
    right: 16px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 4px;
    pointer-events: all;
}
#custom-zoom button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(15, 15, 26, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 300;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.35);
    transition: background 0.15s, transform 0.1s;
    line-height: 1;
}
#custom-zoom button:hover {
    background: rgba(40, 40, 60, 0.9);
    transform: scale(1.08);
}
#custom-zoom button:active {
    transform: scale(0.95);
}
body.light-theme #custom-zoom button {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(0,0,0,0.1);
    color: #111122;
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}
body.light-theme #custom-zoom button:hover {
    background: rgba(235, 235, 245, 0.95);
}

@media (max-width: 480px) {
    #custom-zoom {
        bottom: 110px;
        right: 12px;
    }
    #custom-zoom button {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
}








/* ===== FLOATING MAP LOGO ===== */




















/* ===== MAP LOGOS ===== */
#map-logos-wrap {
    position: absolute;
    top: 34px;
    left: 34px;
    z-index: 500;
    width: 42px;
    height: 42px;
}

#map-logo-main {
    position: absolute;
    top: 0;
    left: 0;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.3s ease;
}
#map-logo-main.logos-open {
    opacity: 0;
    pointer-events: none;
}

#map-logo-expanded {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
#map-logo-expanded.logos-visible {
    opacity: 1;
    pointer-events: all;
    transform: translateX(0);
}    








#map-logo-main-img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    display: block;
    position: relative;
    z-index: 1;
    transition: transform 0.2s ease;
}
#map-logo-main:hover #map-logo-main-img {
    transform: scale(1.08);
}
#map-logo-main-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 3.5px dashed #C5532B;
    animation: logoRingSpin 6s linear infinite;
    opacity: 0.85;
    transition: border-color 0.4s ease;
}
#map-logo-main.state-home #map-logo-main-ring {
    border-color: #00c853;
    animation-duration: 5s;
}
#map-logo-main.state-f1 #map-logo-main-ring {
    border-color: #a855f7;
    animation-direction: reverse;
    animation-duration: 5s;
}
#map-logo-main:hover #map-logo-main-ring {
    border-color: #FFD700;
    opacity: 1;
}

/* ── Main superscript hint ── */
#map-logo-main-hint {
    position: absolute;
    top: -5px;
    right: -8px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #C5532B;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
    z-index: 2;
    font-size: 0.55rem;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.4s ease;
}
#map-logo-main.state-home #map-logo-main-hint {
    opacity: 1;
    background: #00c853;
}
#map-logo-main.state-f1 #map-logo-main-hint {
    opacity: 1;
    background: #a855f7;
}

/* ── Expanded pair ── */
#map-logo-expanded {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
#map-logo-expanded.logos-visible {
    opacity: 1;
    pointer-events: all;
    transform: translateX(0);
}

#map-logo-link,
#map-f1-link {
    position: relative;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    flex-shrink: 0;
}
#map-logo-img,
#map-f1-img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    display: block;
    position: relative;
    z-index: 1;
    transition: transform 0.2s ease;
}
#map-logo-link:hover #map-logo-img,
#map-f1-link:hover #map-f1-img {
    transform: scale(1.1);
}

/* Home ring — green */
#map-logo-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2.5px dashed #00c853;
    animation: logoRingSpin 5s linear infinite;
    opacity: 0.9;
}
#map-logo-link:hover #map-logo-ring {
    border-color: #FFD700;
    opacity: 1;
}

/* F1 ring — purple reverse */
#map-f1-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2.5px dashed #a855f7;
    animation: logoRingSpin 5s linear infinite reverse;
    opacity: 0.9;
}
#map-f1-link:hover #map-f1-ring {
    border-color: #FFD700;
    opacity: 1;
}

/* ── Expanded badges ── */
#map-logo-home-badge {
    position: absolute;
    top: -5px;
    right: -7px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #00c853;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
    z-index: 2;
}
#map-f1-badge {
    position: absolute;
    top: -5px;
    right: -7px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #a855f7;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
    z-index: 2;
    font-size: 0.5rem;
}

@keyframes logoRingSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}




@media (max-width: 480px) {
    #map-logos-wrap {
        top: 10px;
        left: 10px;
        width: 34px;
        height: 34px;
    }
    #map-logo-main {
        width: 34px;
        height: 34px;
    }
    #map-logo-main-img {
        width: 34px;
        height: 34px;
    }


    #map-logo-link,
    #map-f1-link {
        width: 21px;
        height: 21px;
    }
    #map-logo-img,
    #map-f1-img {
        width: 21px;
        height: 21px;
    }
}




























/* ===== MAP SIDE ACTION BUTTONS ===== */
#map-side-actions {
    position: absolute;
    right: 14px;
    top: 33%;
    transform: translateY(-50%);
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.map-side-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(15, 15, 26, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ccccdd;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    transition: background 0.2s, color 0.2s, transform 0.2s, border-color 0.2s;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: 0;
}
.map-side-btn:hover {
    background: rgba(40, 40, 60, 0.9);
    color: #ffffff;
    transform: scale(1.08);
}
.map-side-btn.active {
    background: #C5532B;
    border-color: #C5532B;
    color: #ffffff;
    transform: scale(1.08);
}
body.light-theme .map-side-btn {
    background: rgba(255,255,255,0.82);
    border: 1px solid rgba(0,0,0,0.1);
    color: #333344;
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}
body.light-theme .map-side-btn:hover {
    background: rgba(235,235,245,0.95);
    color: #111122;
}
body.light-theme .map-side-btn.active {
    background: #C5532B;
    border-color: #C5532B;
    color: #ffffff;
}

/* ===== MAP SIDE CARDS ===== */






.map-side-card {
    position: absolute;
    right: 56px;
    z-index: 600;
    width: 260px;
    max-height: 60vh;
    display: flex;
    flex-direction: column;
    background: rgba(15, 15, 26, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.45);
    padding: 14px 16px;
    color: #ccccdd;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    pointer-events: all;
    overflow: hidden;

    /* animation */
    opacity: 0;
    transform: translateX(12px) scale(0.96);
    transition: opacity 0.25s cubic-bezier(0.4,0,0.2,1),
                transform 0.25s cubic-bezier(0.4,0,0.2,1);
}
.map-side-card-title {
    flex-shrink: 0;
}


.map-side-card-body {
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(197,83,43,0.4) transparent;
    padding-right: 4px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
}




.map-side-card-body::-webkit-scrollbar {
    width: 4px;
}
.map-side-card-body::-webkit-scrollbar-track {
    background: transparent;
}
.map-side-card-body::-webkit-scrollbar-thumb {
    background: rgba(197,83,43,0.4);
    border-radius: 4px;
}

@media (max-width: 480px) {
    .map-side-card {
        max-height: 50vh;
        width: 210px;
        right: 48px;
    }
}




















.map-side-card.card-visible {
    opacity: 1;
    transform: translateX(0) scale(1);
}
.map-side-card.card-hidden {
    opacity: 0;
    transform: translateX(12px) scale(0.96);
    pointer-events: none;
}
body.light-theme .map-side-card {
    background: rgba(255,255,255,0.94);
    border: 1px solid rgba(0,0,0,0.08);
    color: #333344;
    box-shadow: 0 8px 32px rgba(0,0,0,0.14);
}
.map-side-card-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #C5532B;
    margin-bottom: 8px;
}
.map-side-card-body {
    font-size: 0.73rem;
    line-height: 1.55;
    color: #aaaabc;
}
body.light-theme .map-side-card-body {
    color: #555566;
}
.map-side-card-body a {
    color: #C5532B;
    text-decoration: none;
    border-bottom: 1px solid rgba(197,83,43,0.35);
    transition: border-color 0.15s, color 0.15s;
    word-break: break-all;
}
.map-side-card-body a:hover {
    color: #e8693a;
    border-color: #e8693a;
}
.map-side-card-divider {
    height: 1px;
    background: rgba(255,255,255,0.07);
    margin: 10px 0;
}
body.light-theme .map-side-card-divider {
    background: rgba(0,0,0,0.07);
}
.map-side-card-footer {
    font-size: 0.62rem;
    color: #666677;
    margin-top: 8px;
    font-style: italic;
}




@media (max-width: 480px) {
    #map-side-actions {
        right: 10px;
        top: 39%;
    }

    .map-side-btn {
        width: 30px;
        height: 30px;
        font-size: 0.74rem;
    }

    .map-side-card {
        width: 210px;
        right: 46px;
        font-size: 0.68rem;
    }
}








.credits-source-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #C5532B;
    margin-top: 8px;
    margin-bottom: 4px;
}
.map-side-card-body a {
    display: block;
    margin-bottom: 4px;
}













/* ===== MATCH TICKER ===== */
#match-ticker {
    position: absolute;
    top: 58px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 499;
    pointer-events: none;
}





.ticker-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 20px 10px;
    pointer-events: all;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.6s ease;
    white-space: nowrap;
    background: rgba(15, 15, 26, 0.65);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 20px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.ticker-card.ticker-visible {
    opacity: 1;
}
body.light-theme .ticker-card {
    background: rgba(255,255,255,0.75);
    border: 1px solid rgba(0,0,0,0.07);
}




.ticker-location {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.58rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #aaaabc;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}
body.light-theme .ticker-location {
    color: #444455;
    text-shadow: 0 1px 4px rgba(255,255,255,0.9);
}
.ticker-location-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #aaaabc;
    animation: livePulse 2s ease-in-out infinite;
    flex-shrink: 0;
}
body.light-theme .ticker-location-dot {
    background: #444455;
}
.ticker-teams {
    display: flex;
    align-items: center;
    gap: 10px;
}
.ticker-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 72px;
}
.ticker-team-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 4px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8), 0 0 12px rgba(0,0,0,0.6);
}
body.light-theme .ticker-team-name {
    color: #111122;
    text-shadow: 0 1px 4px rgba(255,255,255,0.9), 0 0 12px rgba(255,255,255,0.7);
}
.ticker-team-name.live {
    color: #00c853 !important;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}
.ticker-team-name.soon {
    color: #F5A623 !important;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}
.ticker-score {
    font-size: 0.68rem;
    font-weight: 600;
    color: #ccccdd;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}
body.light-theme .ticker-score {
    color: #333344;
    text-shadow: 0 1px 4px rgba(255,255,255,0.9);
}
.ticker-score.live {
    color: #00c853 !important;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}
.ticker-score.soon {
    color: #F5A623 !important;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}
.ticker-vs {
    font-size: 0.72rem;
    font-weight: 700;
    color: #aaaabc;
    padding-bottom: 14px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}
body.light-theme .ticker-vs {
    color: #444455;
    text-shadow: 0 1px 4px rgba(255,255,255,0.9);
}

@media (max-width: 480px) {
    #match-ticker {
        top: 98px;
    }
    .ticker-card {
        padding: 6px 14px 8px;
    }
    .ticker-team-name {
        font-size: 0.68rem;
    }
    .ticker-score {
        font-size: 0.6rem;
    }
    .ticker-location {
        font-size: 0.52rem;
    }
}
















/* ===== STAGE PROGRESS BAR ===== */
#stage-progress {
    position: absolute;
    left: 14px;
    top: 90px;
    z-index: 500;
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.stage-node-wrap {
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-start;
}
.stage-row {
    display: flex;
    align-items: center;
    gap: 7px;
    height: 22px;
}
.stage-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    transition: background 0.3s ease;
}
.stage-dot.complete {
    background: #C5532B;
}
.stage-dot.current {
    background: #C5532B;
    box-shadow: 0 0 0 3px rgba(197, 83, 43, 0.25);
    animation: stageGlow 2s ease-in-out infinite;
}
.stage-dot.upcoming {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.2);
}
body.light-theme .stage-dot.upcoming {
    border: 2px solid rgba(0,0,0,0.15);
}
@keyframes stageGlow {
    0%, 100% { box-shadow: 0 0 0 3px rgba(197, 83, 43, 0.25); }
    50%       { box-shadow: 0 0 0 6px rgba(197, 83, 43, 0.5); }
}
.stage-label {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.58rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0,0,0,0.7);
}
.stage-label.complete {
    color: #C5532B;
}
.stage-label.current {
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.7);
}
.stage-label.upcoming {
    color: rgba(255,255,255,0.3);
}
body.light-theme .stage-label.complete {
    color: #C5532B;
    text-shadow: 0 1px 3px rgba(255,255,255,0.7);
}
body.light-theme .stage-label.current {
    color: #111122;
    text-shadow: 0 1px 3px rgba(255,255,255,0.7);
}
body.light-theme .stage-label.upcoming {
    color: rgba(0,0,0,0.25);
    text-shadow: none;
}
.stage-trophy {
    font-size: 0.7rem;
    margin-left: 3px;
}
.stage-line {
    width: 2px;
    height: 14px;
    margin-left: 3.5px;
    border-radius: 2px;
    transition: background 0.3s ease;
}
.stage-line.complete {
    background: #C5532B;
}
.stage-line.upcoming {
    background: rgba(255,255,255,0.12);
}
body.light-theme .stage-line.upcoming {
    background: rgba(0,0,0,0.1);
}

@media (max-width: 480px) {
    #stage-progress {
        top: 80px;
        left: 10px;
    }
    .stage-dot {
        width: 7px;
        height: 7px;
    }
    .stage-label {
        font-size: 0.5rem;
    }
    .stage-line {
        height: 12px;
        margin-left: 2.5px;
    }
}












/* ===== COUNTDOWN ===== */
#match-countdown {
    position: absolute;
    top: 14px;
    right: 60px;
    z-index: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}
#match-countdown.countdown-visible {
    opacity: 1;
}



.countdown-clock svg .clock-track {
    stroke: rgba(255,255,255,0.12);
}
.countdown-clock svg .clock-progress {
    stroke: #ffffff;
    transition: stroke-dashoffset 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}
.countdown-clock svg .clock-center {
    fill: #ffffff;
    stroke: none;
}
body.light-theme .countdown-clock svg .clock-track {
    stroke: rgba(0,0,0,0.1);
}
body.light-theme .countdown-clock svg .clock-progress {
    stroke: #111122;
}
body.light-theme .countdown-clock svg .clock-center {
    fill: #111122;
}





.countdown-label {
    font-size: 0.5rem;
    font-style: italic;
    color: rgba(255,255,255,0.5);
    text-shadow: 0 1px 3px rgba(0,0,0,0.7);
    letter-spacing: 0.04em;
    margin-top: 1px;
}
body.light-theme .countdown-label {
    color: rgba(0,0,0,0.4);
    text-shadow: 0 1px 3px rgba(255,255,255,0.7);
}
.countdown-times {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    line-height: 1.1;
}
.countdown-hours {
    font-size: 1.4rem;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
    letter-spacing: -0.02em;
}
.countdown-minutes {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}
.countdown-seconds {
    font-size: 0.72rem;
    font-weight: 400;
    color: rgba(255,255,255,0.6);
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}
body.light-theme .countdown-hours {
    color: #111122;
    text-shadow: 0 1px 4px rgba(255,255,255,0.9);
}
body.light-theme .countdown-minutes {
    color: rgba(17,17,34,0.8);
    text-shadow: 0 1px 4px rgba(255,255,255,0.9);
}
body.light-theme .countdown-seconds {
    color: rgba(17,17,34,0.55);
    text-shadow: 0 1px 4px rgba(255,255,255,0.9);
}





@media (max-width: 480px) {
    #match-countdown {
        top: 8px;
        right: 10px;
    }

    .countdown-label {
        font-size: 0.44rem;
    }

    .countdown-hours {
        font-size: 1rem;
    }

    .countdown-minutes {
        font-size: 0.76rem;
    }

    .countdown-seconds {
        font-size: 0.56rem;
    }
}








/* ===== GROUP STANDINGS CARD ===== */
#card-groups {
    width: 320px !important;
}



#card-groups .map-side-card-body {
    padding-right: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#card-groups .group-tabs {
    flex-shrink: 0;
}
#card-groups .group-tables {
    overflow-y: auto;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: rgba(197,83,43,0.4) transparent;
}
#card-groups .group-tables::-webkit-scrollbar {
    width: 4px;
}
#card-groups .group-tables::-webkit-scrollbar-thumb {
    background: rgba(197,83,43,0.4);
    border-radius: 4px;
}



.group-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 10px;
    flex-shrink: 0;
}
.group-tab {
    background: var(--popup-pill-bg, #2a2a3e);
    border: 1px solid var(--popup-border, #2e2e42);
    border-radius: 6px;
    color: var(--popup-subtext, #9090b0);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 4px 7px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.group-tab:hover:not(.active) {
    background: var(--popup-pill-hover, #35354e);
    color: var(--popup-text, #e0e0f0);
}
.group-tab.active {
    background: #C5532B;
    border-color: #C5532B;
    color: #ffffff;
}

.group-tables {
    flex: 1;
    overflow: hidden;
}
.group-table-wrap {
    display: none;
}
.group-table-wrap.active {
    display: block;
}

.group-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.72rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.group-table thead tr {
    border-bottom: 1px solid var(--popup-border, #2e2e42);
}
.group-table th {
    color: var(--popup-subtext, #9090b0);
    font-weight: 600;
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 4px 4px 6px;
    text-align: center;
    white-space: nowrap;
}
.group-table th.group-col-team {
    text-align: left;
    padding-left: 6px;
}
.group-table td {
    padding: 6px 4px;
    text-align: center;
    color: var(--popup-text, #e0e0f0);
    border-bottom: 1px solid var(--popup-border, #2e2e42);
    white-space: nowrap;
}
.group-table tbody tr:last-child td {
    border-bottom: none;
}
.group-col-team {
    text-align: left !important;
    padding-left: 6px !important;
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.group-col-pts {
    font-weight: 700;
    color: var(--popup-accent, #C5532B) !important;
}
.group-row-qualify td:first-child {
    border-left: 3px solid rgba(0, 200, 83, 0.6);
    padding-left: 4px !important;
}
.group-empty {
    font-size: 0.72rem;
    color: var(--popup-subtext, #9090b0);
    text-align: center;
    padding: 16px 0;
}

body.light-theme .group-tab {
    background: var(--popup-pill-bg, #f0f0f8);
    border-color: var(--popup-border, #e0e0ec);
    color: var(--popup-subtext, #666680);
}
body.light-theme .group-tab.active {
    background: #C5532B;
    border-color: #C5532B;
    color: #ffffff;
}






@media (max-width: 480px) {
    #card-groups {
        width: 250px !important;
        max-width: 78vw !important;
    }

    .group-table {
        font-size: 0.63rem;
    }

    .group-col-team {
        max-width: 72px;
    }
}




.ticker-status-live {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #00c853 !important;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding-bottom: 14px;
}
.ticker-status-soon {
    color: #F5A623 !important;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding-bottom: 14px;
}


















/* ===== BLOG PANEL ===== */
#card-blog {
    width: 320px !important;
}
#card-blog .map-side-card-body {
    padding-right: 2px;
}

.blog-card {
    background: var(--popup-stat-bg, #252538);
    border: 1px solid var(--popup-border, #2e2e42);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 8px;
    transition: border-color 0.2s;
}
.blog-card:last-child {
    margin-bottom: 0;
}
.blog-card-tag {
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #C5532B;
    margin-bottom: 5px;
}
.blog-card-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--popup-text, #e0e0f0);
    margin-bottom: 6px;
    line-height: 1.3;
}
.blog-card-body {
    font-size: 0.72rem;
    line-height: 1.6;
    color: var(--popup-subtext, #9090b0);
}
.blog-card-action {
    margin-top: 10px;
}
.blog-x-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--popup-pill-bg, #2a2a3e);
    border: 1px solid var(--popup-border, #2e2e42);
    border-radius: 20px;
    padding: 6px 14px 6px 10px;
    text-decoration: none;
    color: var(--popup-text, #e0e0f0);
    font-size: 0.75rem;
    font-weight: 600;
    transition: background 0.15s, border-color 0.15s;
}
.blog-x-link:hover {
    background: var(--popup-pill-hover, #35354e);
    border-color: var(--popup-accent, #C5532B);
}
.blog-inline-link {
    color: #C5532B;
    text-decoration: none;
    border-bottom: 1px solid rgba(197,83,43,0.35);
    transition: color 0.15s, border-color 0.15s;
}
.blog-inline-link:hover {
    color: #e8693a;
    border-color: #e8693a;
}

body.light-theme .blog-card {
    background: var(--popup-stat-bg, #f7f7fc);
    border-color: var(--popup-border, #e0e0ec);
}
body.light-theme .blog-x-link {
    background: var(--popup-pill-bg, #f0f0f8);
    border-color: var(--popup-border, #e0e0ec);
    color: var(--popup-text, #111122);
}
body.light-theme .blog-x-link:hover {
    background: var(--popup-pill-hover, #e2e2f0);
}

@media (max-width: 480px) {
    #card-blog {
        width: 270px !important;
    }
    .blog-card-title {
        font-size: 0.76rem;
    }
    .blog-card-body {
        font-size: 0.68rem;
    }
}













/* ===== TOURNAMENT STATUS DOT ===== */
.tournament-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
    margin-left: 4px;
}
.dot-active {
    background: #00c853;
    box-shadow: 0 0 0 2px rgba(0, 200, 83, 0.2);
    animation: tournamentPulse 2s ease-in-out infinite;
}
.dot-over {
    background: #ff4444;
    box-shadow: none;
    animation: none;
}
@keyframes tournamentPulse {
    0%, 100% { box-shadow: 0 0 0 2px rgba(0, 200, 83, 0.2); }
    50%       { box-shadow: 0 0 0 5px rgba(0, 200, 83, 0.4); }
}
























/* ===== TEAM FLAMES PANEL ===== */
#card-flames {
    width: 320px !important;
}
#card-flames .map-side-card-body {
    padding-right: 2px;
}

.flames-continent-header {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #C5532B;
    padding: 10px 0 5px;
    border-bottom: 1px solid var(--popup-border, #2e2e42);
    margin-bottom: 4px;
}
.flames-continent-header:first-child {
    padding-top: 0;
}
.flames-team-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 4px;
    border-radius: 8px;
    transition: background 0.15s;
    min-height: 36px;
}
.flames-team-row:hover {
    background: var(--popup-pill-hover, #35354e);
}
.flames-eliminated {
    opacity: 0.35;
    filter: grayscale(1);
}
.flames-flag {
    font-size: 1rem;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}
.flames-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--popup-text, #e0e0f0);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.flames-eliminated .flames-name {
    color: var(--popup-subtext, #9090b0);
}







.flames-fire {
    width: 20px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    flex-shrink: 0;
    min-height: 28px;
}
.flame-svg {
    display: block;
}






/* ── Flame animations — multi-layer organic fire ── */

/* DYING */
.flame-anim-dying {
    animation: fDyingOuter 3.2s ease-in-out infinite alternate;
}
.flame-anim-dying-petal {
    animation: fDyingPetal 2.8s ease-in-out infinite alternate-reverse;
}
.flame-anim-dying-core {
    animation: fDyingCore 3s ease-in-out infinite alternate;
}
.flame-anim-dying-tip {
    animation: fDyingTip 2.5s ease-in-out infinite alternate-reverse;
}
@keyframes fDyingOuter {
    0%   { transform: scaleY(1)    scaleX(1)    rotate(0deg); }
    100% { transform: scaleY(0.72) scaleX(0.88) rotate(1.5deg); }
}
@keyframes fDyingPetal {
    0%   { transform: scaleY(1)   rotate(-1deg); }
    100% { transform: scaleY(0.8) rotate(1.5deg); }
}
@keyframes fDyingCore {
    0%   { transform: scaleY(1)    scaleX(1)   translateY(0); }
    100% { transform: scaleY(0.65) scaleX(0.9) translateY(2px); }
}
@keyframes fDyingTip {
    0%   { transform: scaleY(1);   opacity: 0.6; }
    100% { transform: scaleY(0.5); opacity: 0.2; }
}

/* STRUGGLING */
.flame-anim-struggling {
    animation: fStrugOuter 2.6s cubic-bezier(0.45,0.05,0.55,0.95) infinite alternate;
}
.flame-anim-struggling-petal {
    animation: fStrugPetal 2.1s ease-in-out infinite alternate-reverse;
}
.flame-anim-struggling-core {
    animation: fStrugCore 1.9s ease-in-out infinite alternate;
}
.flame-anim-struggling-tip {
    animation: fStrugTip 1.4s ease-in-out infinite alternate-reverse;
}
@keyframes fStrugOuter {
    0%   { transform: scaleY(1)    scaleX(1)    rotate(-2deg) translateY(0); }
    50%  { transform: scaleY(1.05) scaleX(0.95) rotate(0deg)  translateY(-1px); }
    100% { transform: scaleY(0.88) scaleX(1.08) rotate(2.5deg) translateY(1px); }
}
@keyframes fStrugPetal {
    0%   { transform: scaleY(1)    rotate(-3deg); }
    100% { transform: scaleY(0.85) rotate(3deg); }
}
@keyframes fStrugCore {
    0%   { transform: scaleY(1)    scaleX(1)    translateY(0); }
    100% { transform: scaleY(0.78) scaleX(1.1)  translateY(1px); }
}
@keyframes fStrugTip {
    0%   { transform: scaleY(1) translateY(0); opacity: 0.8; }
    100% { transform: scaleY(0.6) translateY(2px); opacity: 0.3; }
}

/* CONTENTION */
.flame-anim-contention {
    animation: fContOuter 2.0s cubic-bezier(0.4,0,0.6,1) infinite alternate;
}
.flame-anim-contention-petal {
    animation: fContPetal 1.7s ease-in-out infinite alternate-reverse;
}
.flame-anim-contention-core {
    animation: fContCore 1.5s ease-in-out infinite alternate;
}
.flame-anim-contention-tip {
    animation: fContTip 1.1s ease-in-out infinite alternate-reverse;
}
@keyframes fContOuter {
    0%   { transform: scaleY(1)    scaleX(1)    rotate(-3deg) translateY(0); }
    33%  { transform: scaleY(1.06) scaleX(0.94) rotate(0deg)  translateY(-1.5px); }
    100% { transform: scaleY(0.91) scaleX(1.1)  rotate(3.5deg) translateY(1px); }
}
@keyframes fContPetal {
    0%   { transform: scaleY(1)    scaleX(1)   rotate(-4deg); }
    100% { transform: scaleY(0.88) scaleX(1.1) rotate(4deg); }
}
@keyframes fContCore {
    0%   { transform: scaleY(1)    translateY(0)   scaleX(1); }
    100% { transform: scaleY(0.82) translateY(1px) scaleX(1.08); }
}
@keyframes fContTip {
    0%   { transform: scaleY(1.1) translateY(-1px); opacity: 1; }
    100% { transform: scaleY(0.7) translateY(2px);  opacity: 0.5; }
}

/* STRONG */
.flame-anim-strong {
    animation: fStrongOuter 1.5s cubic-bezier(0.4,0,0.6,1) infinite alternate;
}
.flame-anim-strong-petal {
    animation: fStrongPetal 1.2s ease-in-out infinite alternate-reverse;
}
.flame-anim-strong-core {
    animation: fStrongCore 1.1s ease-in-out infinite alternate;
}
.flame-anim-strong-tip {
    animation: fStrongTip 0.8s ease-in-out infinite alternate-reverse;
}
@keyframes fStrongOuter {
    0%   { transform: scaleY(1)    scaleX(1)    rotate(-4deg) translateY(0); }
    25%  { transform: scaleY(1.08) scaleX(0.93) rotate(-1deg) translateY(-2px); }
    75%  { transform: scaleY(1.04) scaleX(0.96) rotate(2deg)  translateY(-1px); }
    100% { transform: scaleY(0.93) scaleX(1.12) rotate(4.5deg) translateY(1px); }
}
@keyframes fStrongPetal {
    0%   { transform: scaleY(1)    scaleX(1)    rotate(-5deg); }
    50%  { transform: scaleY(1.1)  scaleX(0.92) rotate(0deg); }
    100% { transform: scaleY(0.9)  scaleX(1.12) rotate(5deg); }
}
@keyframes fStrongCore {
    0%   { transform: scaleY(1)    scaleX(1)    translateY(0); }
    50%  { transform: scaleY(1.1)  scaleX(0.9)  translateY(-2px); }
    100% { transform: scaleY(0.88) scaleX(1.1)  translateY(1px); }
}
@keyframes fStrongTip {
    0%   { transform: scaleY(1.2) translateY(-2px); opacity: 1; }
    50%  { transform: scaleY(0.9) translateY(1px);  opacity: 0.8; }
    100% { transform: scaleY(1.1) translateY(-1px); opacity: 1; }
}

/* DOMINANT */
.flame-anim-dominant {
    animation: fDomOuter 0.95s cubic-bezier(0.25,0.46,0.45,0.94) infinite alternate;
}
.flame-anim-dominant-petal {
    animation: fDomPetal 0.75s ease-in-out infinite alternate-reverse;
}
.flame-anim-dominant-core {
    animation: fDomCore 0.7s ease-in-out infinite alternate;
}
.flame-anim-dominant-tip {
    animation: fDomTip 0.45s ease-in-out infinite alternate-reverse;
}
@keyframes fDomOuter {
    0%   { transform: scaleY(1)    scaleX(1)    rotate(-5deg) translateY(0); }
    20%  { transform: scaleY(1.1)  scaleX(0.91) rotate(-2deg) translateY(-3px); }
    60%  { transform: scaleY(1.06) scaleX(0.94) rotate(1deg)  translateY(-2px); }
    100% { transform: scaleY(0.94) scaleX(1.14) rotate(5.5deg) translateY(1px); }
}
@keyframes fDomPetal {
    0%   { transform: scaleY(1)    scaleX(1)    rotate(-6deg); }
    30%  { transform: scaleY(1.14) scaleX(0.88) rotate(0deg); }
    100% { transform: scaleY(0.92) scaleX(1.15) rotate(6deg); }
}
@keyframes fDomCore {
    0%   { transform: scaleY(1)    scaleX(1)    translateY(0); }
    40%  { transform: scaleY(1.15) scaleX(0.88) translateY(-3px); }
    100% { transform: scaleY(0.9)  scaleX(1.12) translateY(1px); }
}
@keyframes fDomTip {
    0%   { transform: scaleY(1.3) translateY(-3px) rotate(-3deg); opacity: 1; }
    50%  { transform: scaleY(0.8) translateY(2px)  rotate(2deg);  opacity: 0.9; }
    100% { transform: scaleY(1.2) translateY(-2px) rotate(-2deg); opacity: 1; }
}












body.light-theme .flames-continent-header {
    border-bottom-color: var(--popup-border, #e0e0ec);
}
body.light-theme .flames-team-row:hover {
    background: var(--popup-pill-hover, #e2e2f0);
}

@media (max-width: 480px) {
    #card-flames {
        width: 270px !important;
    }
    .flames-name {
        font-size: 0.68rem;
    }
    .flames-state-label {
        font-size: 0.52rem;
        min-width: 50px;
    }
}








/* ===== MADE IN KENYA ===== */
.made-in-kenya {
    font-size: 1.2rem;
    line-height: 1;
    cursor: default;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}
.made-in-kenya:hover {
    transform: scale(1.2);
}












/* ===== BLOG NEW CONTENT ALERT ===== */
.map-side-btn.btn-new-content {
    animation: newContentPulse 1.5s ease-in-out infinite;
    border-color: #00c853 !important;
}
@keyframes newContentPulse {
    0%, 100% { box-shadow: 0 0 0 2px rgba(0,200,83,0.2); }
    50%       { box-shadow: 0 0 0 6px rgba(0,200,83,0.45); transform: scale(1.12); }
}
.btn-new-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #00c853;
    border: 1.5px solid rgba(15,15,26,0.9);
    pointer-events: none;
}
body.light-theme .btn-new-badge {
    border-color: rgba(255,255,255,0.9);
}


/* ===== BLOG NEW CARD HIGHLIGHT ===== */
.blog-card-new {
    border-color: #00c853 !important;
    border-left: 3px solid #00c853 !important;
    box-shadow: 0 0 0 1px rgba(0,200,83,0.15), 0 4px 16px rgba(0,200,83,0.1);
    animation: blogCardGlow 2s ease-in-out 3;
}
@keyframes blogCardGlow {
    0%, 100% { box-shadow: 0 0 0 1px rgba(0,200,83,0.15), 0 4px 16px rgba(0,200,83,0.1); }
    50%       { box-shadow: 0 0 0 3px rgba(0,200,83,0.3), 0 4px 20px rgba(0,200,83,0.2); }
}




/* ===== APP SPLASH SCREEN ===== */
#app-splash {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #0f0f1a;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    transition: opacity 0.4s ease;
}
#app-splash.splash-hidden {
    opacity: 0;
    pointer-events: none;
}
#splash-logo-wrap {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}
#splash-ring {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 3px dashed #C5532B;
    animation: splashRingSpin 4s linear infinite;
    opacity: 0.9;
}
@keyframes splashRingSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
#splash-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    display: block;
    position: relative;
    z-index: 1;
}
#splash-title {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.06em;
    margin-top: 8px;
}
#splash-sub {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.65rem;
    font-weight: 400;
    font-style: italic;
    color: #aaaabc;
    letter-spacing: 0.08em;
}
#splash-dots {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
#splash-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #C5532B;
    animation: splashDotBounce 1.2s ease-in-out infinite;
}
#splash-dots span:nth-child(2) {
    animation-delay: 0.2s;
}
#splash-dots span:nth-child(3) {
    animation-delay: 0.4s;
}
@keyframes splashDotBounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
    40%            { transform: translateY(-8px); opacity: 1; }
}

#splash-flags {
    font-size: 1.6rem;
    letter-spacing: 0.3em;
    line-height: 1;
}













/* ===== KNOCKOUT ROUNDS PANEL ===== */



#card-knockouts {
    width: 320px !important;
}



#card-knockouts .map-side-card-body {
    padding-right: 2px;
}








#card-knockouts .ko-tabs {
    flex-shrink: 0;
}
#card-knockouts .ko-panels {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(197,83,43,0.4) transparent;
}
#card-knockouts .ko-panels::-webkit-scrollbar {
    width: 4px;
}
#card-knockouts .ko-panels::-webkit-scrollbar-thumb {
    background: rgba(197,83,43,0.4);
    border-radius: 4px;
}










.ko-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 10px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(15, 15, 26, 0.95);
    padding-bottom: 6px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

body.light-theme .ko-tabs {
    background: rgba(255, 255, 255, 0.95);
}









/* ===== LEGAL LINKS ===== */



#legal-links {
    position: absolute;
    bottom: 24px;
    right: 8px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 6px;
    pointer-events: all;
}




#legal-links a {
    font-size: 0.58rem;
    color: rgba(255,255,255,0.45);
    text-decoration: underline;
    font-style: italic;
    font-weight: 700;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: color 0.15s;
}




#legal-links a:hover {
    color: rgba(255,255,255,0.8);
}
#legal-links span {
    font-size: 0.58rem;
    color: rgba(255,255,255,0.25);
}
body.light-theme #legal-links a {
    color: rgba(0,0,0,0.35);
}
body.light-theme #legal-links a:hover {
    color: rgba(0,0,0,0.65);
}
body.light-theme #legal-links span {
    color: rgba(0,0,0,0.2);
}

























.ko-tab {
    background: var(--popup-pill-bg, #2a2a3e);
    border: 1px solid var(--popup-border, #2e2e42);
    border-radius: 6px;
    color: var(--popup-subtext, #9090b0);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 4px 8px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    white-space: nowrap;
}
.ko-tab:hover:not(.active) {
    background: var(--popup-pill-hover, #35354e);
    color: var(--popup-text, #e0e0f0);
}
.ko-tab.active {
    background: #C5532B;
    border-color: #C5532B;
    color: #ffffff;
}





.ko-panels {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(197,83,43,0.4) transparent;
}
.ko-panels::-webkit-scrollbar {
    width: 4px;
}
.ko-panels::-webkit-scrollbar-thumb {
    background: rgba(197,83,43,0.4);
    border-radius: 4px;
}







.ko-panel {
    display: none;
}






.ko-panel.active {
    display: block;
    overflow-y: auto;
    padding-bottom: 20px;
    scrollbar-width: thin;
    scrollbar-color: rgba(197,83,43,0.4) transparent;
}






.ko-panel.active::-webkit-scrollbar {
    width: 4px;
}
.ko-panel.active::-webkit-scrollbar-thumb {
    background: rgba(197,83,43,0.4);
    border-radius: 4px;
}




.ko-match-row {
    padding: 8px 4px;
    border-bottom: 1px solid var(--popup-border, #2e2e42);
}
.ko-match-row:last-child {
    border-bottom: none;
}
.ko-match-live {
    background: rgba(0, 200, 83, 0.05);
    border-radius: 8px;
}
.ko-match-soon {
    background: rgba(245, 166, 35, 0.05);
    border-radius: 8px;
}
.ko-match-date {
    font-size: 0.6rem;
    color: var(--popup-subtext, #9090b0);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.ko-match-teams {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 3px;
}
.ko-team {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}
.ko-team-away {
    justify-content: flex-end;
    text-align: right;
}
.ko-team-away .ko-flag {
    order: 2;
}
.ko-team-away .ko-name {
    order: 1;
}
.ko-team-placeholder .ko-name {
    color: var(--popup-subtext, #9090b0);
    font-style: italic;
    font-size: 0.65rem;
}
.ko-flag {
    font-size: 0.9rem;
    flex-shrink: 0;
}
.ko-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--popup-text, #e0e0f0);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90px;
}
.ko-vs {
    font-size: 0.62rem;
    color: var(--popup-subtext, #9090b0);
    flex-shrink: 0;
    padding: 0 2px;
}
.ko-match-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.ko-result {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--popup-accent, #C5532B);
}
.ko-live {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #00c853;
    font-size: 0.65rem;
    font-weight: 700;
}
.ko-time {
    font-size: 0.62rem;
    color: var(--popup-subtext, #9090b0);
}
.ko-time-soon {
    color: #F5A623 !important;
    font-weight: 600;
}
.ko-venue {
    font-size: 0.58rem;
    color: var(--popup-subtext, #9090b0);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
    text-align: right;
}
.ko-empty {
    font-size: 0.75rem;
    color: var(--popup-subtext, #9090b0);
    text-align: center;
    padding: 20px 0;
}

body.light-theme .ko-tab {
    background: var(--popup-pill-bg, #f0f0f8);
    border-color: var(--popup-border, #e0e0ec);
    color: var(--popup-subtext, #666680);
}
body.light-theme .ko-tab.active {
    background: #C5532B;
    border-color: #C5532B;
    color: #ffffff;
}





@media (max-width: 480px) {
    #card-knockouts {
        width: 270px !important;
    }
    .ko-name {
        font-size: 0.68rem;
        max-width: 72px;
    }
    .ko-venue {
        max-width: 80px;
    }
}



@media (max-width: 480px) {
    .leaflet-control-attribution {
        font-size: 0.52rem !important;
        padding: 2px 5px !important;
        line-height: 1.2 !important;
        opacity: 0.82;
    }

    .leaflet-control-attribution a {
        font-size: inherit !important;
    }
}










.match-pen {
    display: block;
    font-size: 0.58rem;
    font-weight: 600;
    color: var(--popup-subtext);
    margin-top: 1px;
}
.ko-pen {
    display: block;
    font-size: 0.58rem;
    font-weight: 600;
    color: var(--popup-subtext);
    margin-top: 1px;
}
.ticker-pen {
    font-size: 0.58rem;
    color: rgba(255,255,255,0.55);
    letter-spacing: 0.04em;
    margin-top: 1px;
}
body.light-theme .ticker-pen {
    color: rgba(0,0,0,0.4);
}