:root {
    /* Color Palette matching reference image */
    --bg-main: #2A3340;
    --gold: #D4B680;
    --gold-dark: #BFA06C;
    --gold-light: #E0C89C;

    --blue-header: #67809C;
    --blue-stat: #425164;

    --gray-row: #94A6B8;
    --gray-row-alt: #8B9EA8;
    --gray-active: #5E6976;

    --text-light: #FFFFFF;
    --text-dark: #1A1A1A;
    --text-muted: #D1D5DB;

    --red-alert: #D62828;
    --map-bg: #EAEAEA;

    /* Panel Colors */
    --panel-blue: #637B97;
    --panel-blue-row: #E5E5E5;
    --panel-gold: #DE9B52;
    --panel-white-row: #E8ECEF;
    --panel-white-alt: #F3F5F6;

    font-family: 'Outfit', 'Kanit', sans-serif;

    /* Missing variables used in admin.html / final.html */
    --border-color: rgba(255, 255, 255, 0.12);
    --primary: #4A6FA5;
    --radius-md: 6px;
    --font-body: 'Outfit', 'Kanit', sans-serif;
    --font-heading: 'Outfit', 'Kanit', sans-serif;
    --bg-dark: #1A2230;
    --accent: #D4B680;
    --accent-glow: rgba(212, 182, 128, 0.5);
}

[v-cloak] {
    display: none;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-light);
    font-size: 14px;
    padding: 20px;
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.font-bold {
    font-weight: 700;
}

.font-italic {
    font-style: italic;
}

.text-muted {
    color: var(--text-muted);
}

.text-shadow {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.text-red {
    color: var(--red-alert);
}

.text-dark {
    color: var(--text-dark);
}

.text-white {
    color: white;
}

.bg-blue {
    background-color: var(--blue-header);
    color: white;
}

.bg-beige {
    background-color: var(--gold-light);
    color: var(--text-dark);
}

.bg-beige-dark {
    background-color: var(--gold-dark);
    color: var(--text-dark);
}

.bg-red {
    background-color: var(--red-alert);
    color: white;
}

/* Prompt / Loading */
.loading-screen,
.select-prompt {
    text-align: center;
    margin-top: 100px;
}

.select-prompt p {
    margin-bottom: 30px;
    color: var(--text-muted);
}

.leaderboard-full-view {
    max-width: 600px;
    margin: 0 auto 30px auto;
}

.btn-demo {
    background: var(--blue-stat);
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 4px;
}

/* Dashboard Wrapper */
.dashboard-wrapper {
    max-width: 1700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: filter 0.3s ease;
}

.blur-background {
    filter: blur(5px) brightness(0.7);
    pointer-events: none;
}

/* Top Header */
.top-header {
    display: flex;
    height: 80px;
    background-color: transparent;
    border-bottom: 2px solid var(--text-light);
    margin-bottom: 15px;
}

.team-title {
    background-color: var(--team-color, var(--gold));
    width: 40%;
    display: flex;
    align-items: center;
    padding-left: 30px;
    clip-path: polygon(0 0, 95% 0, 100% 100%, 0% 100%);
}

.team-title h1 {
    font-size: 2.2rem;
    font-style: italic;
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.team-summary {
    display: flex;
    background-color: var(--blue-stat);
    margin-left: auto;
    padding: 0 20px;
    align-items: center;
    gap: 20px;
}

.header-action-btns {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-col {
    text-align: center;
}

.stat-label {
    font-size: 0.8rem;
    font-weight: 700;
    font-style: italic;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
}

/* Main Grid Layout */
.main-grid {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}


/* -------------------------------------
 * LEFT COLUMN: Panel Match Data (Mockup Style)
 * ------------------------------------- */
.col-left {
    flex: 0 0 38%;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.game-panel {
    width: 100%;
    background-color: var(--panel-gold);
    /* Base background for the left team column */
    border: 1px solid #333;
}

.game-panel-header {
    display: flex;
    background-color: var(--panel-blue);
    color: white;
    font-weight: 700;
    font-style: italic;
    padding: 6px 12px;
    align-items: center;
}

.game-panel-title {
    flex: 1;
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.game-panel-stats {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    align-items: baseline;
}

.game-panel-stats span {
    display: inline-block;
}

/* Base table style for panels */
.panel-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    font-style: italic;
    table-layout: fixed;
}

.panel-table td {
    padding: 5px 6px;
    text-align: center;
    vertical-align: middle;
}

/* The name block on the left */
.panel-table td.col-name {
    width: 35%;
    font-weight: 500;
    color: white;
    background-color: var(--team-color, var(--gold-light));
    text-align: left;
    padding-left: 10px !important;
}

/* Total score column */
.panel-table .cell-total {
    background-color: var(--panel-blue-row);
    font-weight: 700;
    border-right: 1px solid #ccc;
    color: var(--text-dark);
}

/* Header row */
.panel-table .header-row td {
    background-color: var(--blue-stat);
    color: white;
    font-weight: 700;
}

.panel-table .header-row .col-name {
    background-color: var(--blue-stat);
    color: white;
}

.panel-table .header-row .cell-total {
    background-color: var(--blue-header);
    color: white;
}

/* Score rows — uniform white for R1-R5, no dividing lines between players */
.panel-table .score-row td:not(.col-name),
.panel-table .score-row-alt td:not(.col-name) {
    background-color: #ffffff;
    color: var(--text-dark);
    border-bottom: none;
}

/* TOTAL column — always gray, override white row background (td specificity match) */
.panel-table .score-row td.cell-total,
.panel-table .score-row-alt td.cell-total {
    background-color: var(--panel-blue-row);
}

/* SOLO_FFA: cell-total same white as R1-R5 cells */
.panel-table .solo-ffa-row td.cell-total {
    background-color: #ffffff;
}

/* Équipe/total row */
.panel-table .equipe-row td:not(.col-name) {
    background-color: #D8DDE2;
    color: var(--text-dark);
    font-weight: 800;
    border-top: 2px solid #333;
}

.panel-table .equipe-row .cell-total {
    background-color: var(--panel-blue-row);
    border-top: 2px solid #333;
}

/* Rank rows — all beige across entire row */
.panel-table .rank-row td {
    background-color: var(--team-color, var(--gold-light));
    color: white;
    font-weight: 700;
}

/* End Left Column */


/* Center Column */
.col-center {
    flex: 0 0 28%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    background-color: rgba(255, 255, 255, 0.02);
    padding: 15px;
    border-radius: 8px;
}

.logo-box {
    margin: 10px 0;
}

.shield-logo {
    width: 120px;
    height: 140px;
    background: linear-gradient(to bottom, #2E4562, #9C333D);
    border: 4px solid var(--gold);
    border-radius: 10px 10px 60px 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.shield-text {
    font-size: 2rem;
    font-weight: 800;
    color: white;
}

.shield-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    border-radius: inherit;
}

.duel-bar {
    width: 100%;
    text-align: center;
    padding: 8px;
    text-transform: uppercase;
    font-size: 1.1rem;
    background: var(--red-alert);
}

.maps-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.game-group-title {
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.map-row {
    display: flex;
    width: 100%;
    min-height: 34px;
}

.map-target {
    width: 38px;
    min-width: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-weight: 700;
    font-size: 0.9rem;
    text-align: center;
}

.map-target.clickable {
    transition: filter 0.2s;
    cursor: pointer;
}

.map-target.clickable:hover {
    filter: brightness(1.2);
}

.map-desc {
    flex: 1;
    background-color: var(--map-bg);
    color: var(--text-dark);
    display: flex;
    align-items: center;
    padding-left: 10px;
    padding-right: 5px;
    font-size: 0.8rem;
    font-weight: 600;
}

.map-links-container {
    width: auto;
    min-width: 70px;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid #ccc;
    padding: 0 5px;
    gap: 5px;
}

.mini-link-btn {
    font-size: 0.75rem;
    background-color: var(--blue-stat);
    color: white;
    text-decoration: none;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: bold;
    transition: 0.2s;
    white-space: nowrap;
}

.mini-link-btn:hover {
    background-color: var(--red-alert);
    transform: scale(1.05);
}

/* Right Column */
.col-right {
    flex: 1;
    min-width: 0;
}

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

.table-board th,
.table-board td {
    padding: 6px 10px;
}

.th-gold {
    background-color: var(--team-color, var(--gold));
    color: white;
    text-align: right;
    font-size: 1.2rem;
    font-style: italic;
    font-weight: 800;
}

.th-sub {
    background-color: var(--gray-row-alt);
    font-style: italic;
    font-size: 0.8rem;
    color: white;
}

.table-board tbody tr {
    background-color: var(--gray-row);
    transition: background-color 0.2s;
}

.table-board tbody tr:nth-child(even) {
    background-color: var(--gray-row-alt);
}

.table-board tbody tr.row-clickable {
    cursor: pointer;
}

.table-board tbody tr.row-clickable:hover {
    filter: brightness(1.1);
}

.table-board tbody tr.active-row {
    background-color: var(--gray-active);
    color: white;
}

.table-board tbody tr.active-row .team-name-cell {
    font-weight: 800;
}

.team-name-cell {
    font-weight: 500;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background-color: var(--map-bg);
    width: 900px;
    max-width: 95vw;
    max-height: 90vh;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

.modal-header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
}

.modal-close:hover {
    color: var(--gold-light);
}

.modal-tabs {
    display: flex;
    background: var(--gray-active);
    padding: 0 20px;
}

.modal-tabs button {
    background: transparent;
    border: none;
    padding: 12px 20px;
    color: var(--text-muted);
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: bold;
    font-size: 1rem;
}

.modal-tabs button.active {
    background: var(--map-bg);
    color: var(--text-dark);
    border-radius: 6px 6px 0 0;
}

.modal-tabs button:hover:not(.active) {
    color: white;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    color: var(--text-dark);
}

.modal-ext-link {
    display: flex;
    align-items: center;
    color: var(--gold-light);
    text-decoration: none;
    font-size: 0.85rem;
}

.modal-ext-link:hover {
    text-decoration: underline;
}

.active-row-modal td {
    background-color: rgba(42, 51, 64, 0.15);
    font-weight: bold;
}

.active-row-modal td:first-child {
    border-left: 4px solid var(--red-alert);
}

/* ── Shared UI Components (admin + final) ── */
.glass-panel {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 30px;
    backdrop-filter: blur(8px);
}

.panel-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.panel-header h2 {
    font-size: 1.3rem;
    font-style: italic;
    letter-spacing: 1px;
    margin-bottom: 5px;
    color: var(--gold-light);
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    letter-spacing: 1px;
    transition: background 0.2s, transform 0.1s;
}

.btn-primary:hover {
    background: #5A80BA;
}

.btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-text {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: 0.2s;
}

.btn-text:hover {
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.rule-box {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    padding: 12px 16px;
    border-radius: var(--radius-md);
}

.text-sm {
    font-size: 0.85rem;
}

/* Logo style (used in admin + final) */
.logo {
    font-size: 1.8rem;
    font-weight: 800;
    font-style: italic;
    letter-spacing: 3px;
    color: var(--text-light);
}

.logo span {
    color: var(--gold);
}

/* Background glow orbs (final.html) */
.background-glow {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.25;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: var(--primary);
    top: -100px;
    left: -100px;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--gold-dark);
    bottom: -80px;
    right: -80px;
}

.final-layout {
    position: relative;
    z-index: 1;
}

/* ═══════════════════════════ TVT STYLES ═══════════════════════════ */

.tvt-wrapper {
    max-width: 1800px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.tvt-header {
    display: flex;
    align-items: stretch;
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.tvt-team-name {
    flex: 1;
    padding: 20px 30px;
    font-size: 1.6rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.tvt-team-a {
    text-align: left;
}

.tvt-team-b {
    text-align: right;
}

.tvt-score-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 30px;
    background: var(--dark-bg);
}

.tvt-score {
    font-size: 2.5rem;
    font-weight: 900;
    color: white;
}

.tvt-dash {
    font-size: 2rem;
    color: var(--text-muted);
}

.tvt-grid {
    display: grid;
    /* Increased middle column width from 280px to 340px */
    grid-template-columns: 1fr 340px 1fr;
    gap: 15px;
    align-items: start;
}

.tvt-col {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Game Panel */
.tvt-game-panel {
    border-radius: 8px;
    overflow: hidden;
    background: var(--dark-panel);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tvt-game-title {
    padding: 8px 12px;
    font-weight: 700;
    font-style: italic;
    font-size: 0.85rem;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Panel Table */
.tvt-panel-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.tvt-panel-table th,
.tvt-panel-table td {
    padding: 5px 6px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.tvt-score-header {
    background: var(--gray-row-alt);
    font-size: 0.72rem;
    color: var(--text-muted);
}

.tvt-th-name {
    text-align: left;
    width: 28%;
    /* Reduced from 35% */
}

.tvt-col-name {
    text-align: left;
    font-weight: 500;
    color: white;
    padding-left: 8px !important;
}

/* Mirrored panel (Team B) */
.tvt-panel-mirrored .tvt-col-name {
    text-align: right;
    padding-right: 8px !important;
    padding-left: 6px !important;
}

.tvt-panel-mirrored .tvt-th-name {
    text-align: right;
}

/* Team total row */
.tvt-total-row {
    background: rgba(255, 255, 255, 0.06);
    font-weight: 600;
}

/* Round win highlight */
.round-win {
    font-weight: 700 !important;
    background: rgba(255, 245, 120, 0.35) !important;
    /* Lighter yellow */
    color: #1a1a2e !important;
}

/* TVT Summary Row */
.tvt-summary-row td {
    color: white !important;
    font-weight: 700;
    padding: 6px 8px !important;
    font-size: 0.82rem;
}

.tvt-summary-row .tvt-val-box {
    display: inline-block;
    background: var(--dark-bg);
    color: white;
    padding: 2px 10px;
    border-radius: 3px;
    font-weight: 800;
    min-width: 28px;
    text-align: center;
}

/* Colored Result Boxes */
.tvt-summary-row .tvt-res-win {
    background: #22c55e;
    color: white;
}

.tvt-summary-row .tvt-res-lose {
    background: #ef4444;
    color: white;
}

.tvt-summary-row .tvt-res-draw {
    background: #eab308;
    color: #1a1a2e;
}

/* Seed summary (SOLO_SPLIT) */
.tvt-seed-summary-row td {
    padding: 4px 8px;
}

.tvt-seed-score {
    width: 40px;
    text-align: center;
    font-weight: 600;
}

.tvt-seed-result {
    width: 40px;
    text-align: center;
    font-weight: 700;
    font-size: 0.75rem;
    border-radius: 4px;
}

.seed-win {
    color: #22c55e;
}

.seed-lose {
    color: #ef4444;
}

.tvt-seeds-won {
    padding: 6px 10px;
    font-weight: 600;
    font-size: 0.82rem;
    color: white;
    text-align: center;
}

/* Game Summary Row */
.tvt-game-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
}

.tvt-result-badge {
    padding: 2px 12px;
    border-radius: 4px;
    font-weight: 800;
    font-size: 0.78rem;
}

.result-win {
    background: rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.result-lose {
    background: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.result-draw {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

/* VS Badge */
.tvt-vs-badge {
    text-align: center;
    padding: 20px 0;
}

.tvt-vs-badge span {
    font-size: 2rem;
    font-weight: 900;
    color: var(--gold);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* ═══════════════════════ RESPONSIVE ═══════════════════════ */

/* Tablet: stack center column below, keep left + right side by side */
@media (max-width: 1200px) {
    .main-grid {
        flex-wrap: wrap;
    }

    .col-left {
        flex: 0 0 48%;
    }

    .col-center {
        flex: 0 0 100%;
        order: 3;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .col-right {
        flex: 0 0 48%;
    }

    .tvt-grid {
        grid-template-columns: 1fr 200px 1fr;
    }

    .tvt-grid .col-left {
        flex: unset;
    }

    .tvt-grid .col-center {
        flex: unset;
    }

    .team-title h1 {
        font-size: 1.6rem;
    }

    .top-header {
        height: 60px;
    }

    .team-summary {
        padding: 0 15px;
        gap: 15px;
    }
}

/* Small tablet / Large phone: full-width columns stacked */
/* 1025px–900px: intermediate range — tab bar not yet active, but tighten layout */
@media (max-width: 900px) and (min-width: 1025px) {
    body {
        padding: 10px;
    }

    .dashboard-wrapper {
        max-width: 100%;
    }

    .tvt-wrapper {
        padding: 10px;
    }
}

/* Modals and overlays — keep compact on any narrow screen */
@media (max-width: 900px) {

    /* Modals */
    .modal-content {
        width: 98vw;
        max-height: 95vh;
    }

    .htp-modal {
        width: 98vw;
    }
}

/* Phone: compact everything */
@media (max-width: 600px) {
    body {
        padding: 5px;
        font-size: 12px;
    }

    .game-panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
        padding: 5px 8px;
    }

    .game-panel-title {
        font-size: 0.95rem;
    }

    .game-panel-stats {
        font-size: 0.75rem;
        flex-wrap: wrap;
        gap: 8px;
    }

    .panel-table {
        font-size: 0.72rem;
    }

    .panel-table td {
        padding: 3px 3px;
    }

    .panel-table td.col-name {
        width: 28%;
        font-size: 0.7rem;
        padding-left: 5px !important;
    }

    .table-board th,
    .table-board td {
        padding: 4px 4px;
        font-size: 0.72rem;
    }

    .team-title h1 {
        font-size: 1.1rem;
        letter-spacing: 1px;
    }

    .shield-logo {
        width: 80px;
        height: 95px;
    }

    .shield-text {
        font-size: 1.4rem;
    }

    .duel-bar {
        font-size: 0.85rem;
        padding: 5px;
    }

    .map-desc {
        font-size: 0.7rem;
    }

    .mini-link-btn {
        font-size: 0.65rem;
        padding: 2px 4px;
    }

    .modal-tabs button {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .htp-trigger-btn {
        font-size: 0.75rem;
        padding: 4px 10px;
    }

    .tvt-team-name {
        font-size: 1rem;
        padding: 8px 10px;
    }

    .tvt-score {
        font-size: 1.4rem;
    }

    .tvt-dash {
        font-size: 1rem;
    }
}

/* ── Skeleton Loader ────────────────────────────── */
.skeleton-container {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 28px 32px;
    min-width: 320px;
    text-align: center;
}

.skeleton-header {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.skeleton-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skeleton-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.skeleton-bar {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
}

@keyframes skeletonPulse {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }
}

.skeleton-pulse {
    animation: skeletonPulse 1.5s ease-in-out infinite;
}

/* ── Methodology Modal ──────────────────────────── */
.methodology-btn {
    position: fixed;
    bottom: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    cursor: pointer;
    z-index: 100;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
}

.methodology-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.methodology-modal {
    background: #ffffff;
    border-radius: 14px;
    max-width: 680px;
    width: 92vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: modalSlideIn 0.25s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.methodology-body {
    overflow-y: auto;
    padding: 0;
    flex: 1;
}

.meth-section {
    padding: 18px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.meth-heading {
    margin: 0 0 10px 0;
    font-size: 1rem;
    font-weight: 700;
    color: #1a202c;
    font-family: var(--font-heading);
}

.meth-subheading {
    margin: 0 0 8px 0;
    font-size: 0.88rem;
    font-weight: 600;
    color: #4a5568;
}

.meth-text {
    font-size: 0.85rem;
    line-height: 1.7;
    color: #4a5568;
    margin: 0 0 8px 0;
}

.meth-list {
    margin: 8px 0 12px 0;
    padding-left: 22px;
    font-size: 0.84rem;
    line-height: 1.8;
    color: #4a5568;
}

.meth-list code {
    background: rgba(99, 102, 241, 0.1);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.82rem;
    color: #4338ca;
}

.meth-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    margin-top: 6px;
}

.meth-table th {
    background: #f7fafc;
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    color: #2d3748;
    border-bottom: 2px solid #e2e8f0;
}

.meth-table td {
    padding: 7px 12px;
    border-bottom: 1px solid #edf2f7;
    color: #4a5568;
    vertical-align: top;
}

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

.meth-credit {
    background: rgba(99, 102, 241, 0.04);
    border-radius: 8px;
    padding: 14px 16px;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.meth-credit-title {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #a0aec0;
    margin-bottom: 4px;
}

.meth-credit-link {
    font-size: 1rem;
    font-weight: 700;
    color: #4338ca;
    text-decoration: none;
    transition: color 0.2s;
}

.meth-credit-link:hover {
    color: #6366f1;
    text-decoration: underline;
}

/* ── Team Logos ──────────────────────────────────── */

/* FFA Header Logo */
.team-logo-display {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
}

.team-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

.team-logo-fallback {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.25);
}

/* TVT Header Logos */
.tvt-header-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 4px;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));
    vertical-align: middle;
    margin: 0 6px;
}

.tvt-header-tag {
    font-size: 0.7rem;
    font-weight: 700;
    opacity: 0.7;
    margin: 0 6px;
    letter-spacing: 1px;
}

/* VS Badge Logos */
.tvt-vs-badge {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vs-logo {
    width: 68px;
    height: 68px;
    flex-shrink: 0;
}

.vs-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

.vs-logo-fallback {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* ═══════════════════════════════════════════════════════════════
 * MOBILE TAB NAVIGATION  (≤ 1024px)
 * ═══════════════════════════════════════════════════════════════ */

/* ── Tab bar (fixed bottom) ── */
.mobile-tab-bar {
    display: none;
    /* hidden on desktop */
}

@media (max-width: 1024px) {

    /* Show tab bar */
    .mobile-tab-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 500;
        background: rgba(15, 22, 38, 0.97);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(12px);
        height: 56px;
    }

    .tab-btn {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        background: transparent;
        border: none;
        color: rgba(255, 255, 255, 0.4);
        font-family: var(--font-body);
        font-size: 0.6rem;
        font-weight: 600;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        cursor: pointer;
        transition: color 0.2s, background 0.2s;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    .tab-btn .tab-icon {
        font-size: 1.1rem;
        line-height: 1;
    }

    .tab-btn.active {
        color: var(--gold-light);
        background: rgba(212, 182, 128, 0.08);
        border-top: 2px solid var(--gold-light);
        margin-top: -1px;
    }

    .tab-btn:not(.active):hover {
        color: rgba(255, 255, 255, 0.7);
    }

    /* Add bottom padding to page content so tab bar doesn't overlap */
    body {
        padding-bottom: 66px !important;
    }

    /* ── Override existing responsive styles at 1024px ── */

    /* Dashboard wrapper */
    .dashboard-wrapper {
        max-width: 100%;
        gap: 0;
    }

    /* Top header — compact on mobile */
    .top-header {
        height: auto;
        flex-direction: column;
        margin-bottom: 8px;
    }

    .team-title {
        width: 100%;
        clip-path: none;
        padding: 10px 16px;
        gap: 10px;
    }

    .team-title h1 {
        font-size: 1.3rem;
        letter-spacing: 1px;
    }

    .team-summary {
        width: 100%;
        padding: 8px 16px;
        gap: 20px;
        justify-content: flex-start;
        margin-left: 0;
    }

    .stat-value {
        font-size: 1.2rem;
    }

    /* Main grid — each col fills full width, shown/hidden via v-show */
    .main-grid {
        display: block;
        gap: 0;
    }

    .col-left,
    .col-center,
    .col-right {
        width: 100%;
    }

    .col-left {
        padding-bottom: 12px;
    }

    .col-center {
        padding: 12px 8px;
    }

    /* Panel table — tighten on mobile */
    .panel-table {
        font-size: 0.78rem;
    }

    .panel-table td {
        padding: 5px 4px;
    }

    .panel-table td.col-name {
        width: 32%;
        font-size: 0.75rem;
        padding-left: 7px !important;
    }

    .game-panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        padding: 5px 8px;
    }

    .game-panel-title {
        font-size: 0.95rem;
    }

    .game-panel-stats {
        font-size: 0.72rem;
        gap: 8px;
        flex-wrap: wrap;
    }

    /* Leaderboard table */
    .table-board th,
    .table-board td {
        padding: 5px 5px;
        font-size: 0.78rem;
    }

    /* ── TVT mobile ── */
    .tvt-wrapper {
        padding: 8px;
        padding-bottom: 0;
    }

    .tvt-header {
        flex-direction: column;
        border-radius: 8px;
        margin-bottom: 12px;
    }

    .tvt-team-name {
        text-align: center;
        padding: 10px 12px;
        font-size: 1.15rem;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    .tvt-score-box {
        padding: 6px 0;
        justify-content: center;
    }

    .tvt-score {
        font-size: 2rem;
    }

    .tvt-dash {
        font-size: 1.4rem;
    }

    .tvt-grid {
        display: block;
    }

    /* ── methodology btn — move up above tab bar ── */
    .methodology-btn {
        bottom: 64px;
    }

    /* ── tournament switcher — stays top-right ── */
    .tournament-switcher {
        top: 8px;
        right: 8px;
    }

    /* ── last updated — move above tab bar ── */
    [style*="position:fixed"][style*="bottom:8px"] {
        bottom: 64px !important;
    }
}

/* ── mob-hidden: hides on mobile only, visible on desktop ── */
@media (max-width: 1024px) {
    .mob-hidden {
        display: none !important;
    }
}

/* ── Seed header row (COOP multi-seed expanded) ── */
.seed-header-row td {
    background: var(--team-color, var(--gold-light));
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.72rem;
    font-style: italic;
    font-weight: 700;
    padding: 3px 10px;
    letter-spacing: 0.5px;
    border-top: 2px solid rgba(0, 0, 0, 0.12);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

/* ══════════════════════════════════════════════════════
 * TEAM ROSTER & STATS BOX (RIGHT COLUMN)
 * ══════════════════════════════════════════════════════ */
.team-meta-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
    width: 100%;
}

.team-meta-section {
    background: #354050;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.meta-header {
    background-color: var(--team-color, var(--gold));
    color: white;
    font-size: 0.92rem;
    font-style: italic;
    font-weight: 800;
    padding: 6px 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Roster Chips — ล็อกความสูงคงที่ 2 บรรทัดถ้วน (74px) */
.roster-chips-wrap {
    padding: 8px 10px;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 6px;
    background: #252D38;
    height: 74px;
    min-height: 74px;
    max-height: 74px;
    overflow-y: auto;
}

.roster-player-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 7px;
    height: 26px;
    border-radius: 4px;
    background: #3E4B5D;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #F1F5F9;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    box-sizing: border-box;
}

.roster-player-chip:hover {
    border-color: rgba(255, 255, 255, 0.35);
}

.roster-name-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #F1F5F9;
    text-decoration: none;
    transition: color 0.15s;
}

.roster-name-link:hover {
    color: #FFFFFF;
}

.roster-arrow {
    font-size: 0.65rem;
    opacity: 0.5;
    transition: opacity 0.15s;
}

.roster-name-link:hover .roster-arrow {
    opacity: 1;
}

/* Stream Badge inside Roster Chip */
.roster-stream-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 18px;
    padding: 0 5px;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.stream-pulse-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    display: inline-block;
    animation: streamDotPulse 1.4s infinite ease-in-out;
}

@keyframes streamDotPulse {
    0%, 100% { transform: scale(0.8); opacity: 0.6; }
    50% { transform: scale(1.3); opacity: 1; }
}

.stream-icon-svg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.stream-badge-text {
    font-size: 0.62rem;
    line-height: 1;
}

/* Twitch Badge */
.stream-twitch {
    background: rgba(145, 70, 255, 0.25);
    color: #bf94ff;
    border: 1px solid rgba(145, 70, 255, 0.55);
}

.stream-twitch:hover {
    background: #9146ff;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(145, 70, 255, 0.6);
}

/* YouTube Badge */
.stream-youtube {
    background: rgba(255, 0, 0, 0.22);
    color: #ff8080;
    border: 1px solid rgba(255, 0, 0, 0.55);
}

.stream-youtube:hover {
    background: #ff0000;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.6);
}

/* Kick / General Stream Badge */
.stream-kick,
.stream-stream {
    background: rgba(34, 197, 94, 0.22);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.55);
}

.stream-kick:hover,
.stream-stream:hover {
    background: #22c55e;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.6);
}

.roster-empty {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
    padding: 4px 2px;
}

/* แถบอันดับ (G1-G6 + อันดับรวม) */
.mini-games-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 6px 10px;
    background: #252D38;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mini-game-chip {
    display: flex;
    align-items: center;
    background: #3A4656;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    font-size: 0.72rem;
    overflow: hidden;
}

.mini-game-chip.rank-highlight {
    border-color: var(--gold);
}

.mini-game-chip.rank-highlight .mini-g-label {
    background: var(--gold-dark);
    color: #1A1A1A;
    font-weight: 800;
}

.mini-game-chip.rank-highlight .mini-g-val {
    color: var(--gold-light);
    font-weight: 900;
}

.mini-g-label {
    padding: 2px 5px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-weight: 700;
}

.mini-g-val {
    padding: 2px 6px;
    color: #FFFFFF;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

/* 4 Key Metrics (ตาราง 2x2) */
.stats-metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 8px 10px;
    background: #2D3745;
}

.metric-card {
    background: #384556;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    padding: 7px 6px;
    text-align: center;
}

.metric-val {
    font-size: 1.25rem;
    font-weight: 900;
    line-height: 1.1;
    color: #FFFFFF;
    font-variant-numeric: tabular-nums;
}

.metric-val.text-gold {
    color: var(--gold);
}

.metric-lbl {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
    font-weight: 600;
}

.mini-g-sub {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-left: 3px;
    font-weight: 600;
    opacity: 0.85;
}

/* ── TvT Matrix Styles (FFA Mode) ───────────────────────── */
.matrix-trigger-btn {
    border-color: rgba(212, 182, 128, 0.4);
    color: var(--gold);
    background: rgba(212, 182, 128, 0.08);
}

.matrix-trigger-btn:hover {
    background: rgba(212, 182, 128, 0.2);
    border-color: var(--gold);
    color: #fff;
    box-shadow: 0 0 12px rgba(212, 182, 128, 0.3);
}

.matrix-modal {
    max-width: 1040px;
    width: 95vw;
    background: #1f2733;
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.65);
}

.matrix-modal-body {
    padding: 16px 20px 20px;
    max-height: 80vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.matrix-table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.45);
}

.matrix-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 4px;
    font-size: 0.85rem;
    font-family: var(--font-body);
}

.matrix-th-corner {
    background: #273242;
    padding: 10px 14px;
    text-align: left;
    border-radius: 6px;
    min-width: 150px;
}

.matrix-axis-labels {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.matrix-axis-row {
    color: var(--gold);
}

.matrix-axis-col {
    color: #94a3b8;
}

.matrix-th-team {
    background: #273242;
    padding: 8px 6px;
    text-align: center;
    border-radius: 6px;
    min-width: 68px;
}

.matrix-col-header {
    display: flex;
    justify-content: center;
    align-items: center;
}

.matrix-team-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #111;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.matrix-th-stat {
    background: #2e3a4e;
    color: var(--gold);
    padding: 8px 10px;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 800;
    border-radius: 6px;
    min-width: 55px;
}

.matrix-td-team {
    background: #273242;
    padding: 6px 12px;
    border-radius: 6px;
    white-space: nowrap;
}

.matrix-row-team-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.matrix-team-tag-pill {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid;
    font-size: 0.72rem;
    font-weight: 700;
    min-width: 38px;
    text-align: center;
    background: rgba(0, 0, 0, 0.25);
}

.matrix-team-name-text {
    font-weight: 600;
    color: #fff;
    font-size: 0.82rem;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Cells: ONLY SCORE AND COLOR */
.matrix-td-cell {
    text-align: center;
    padding: 8px 4px;
    border-radius: 6px;
    transition: all 0.15s ease;
    user-select: none;
    min-width: 68px;
}

.matrix-cell-interactive {
    cursor: pointer;
}

.matrix-cell-interactive:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.matrix-cell-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.matrix-cell-score {
    font-size: 0.95rem;
    font-weight: 800;
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
}

/* Outcome Color Themes */
.matrix-cell-win {
    background: rgba(34, 197, 94, 0.22);
    border: 1px solid rgba(34, 197, 94, 0.45);
    color: #4ade80;
}

.matrix-cell-loss {
    background: rgba(239, 68, 68, 0.22);
    border: 1px solid rgba(239, 68, 68, 0.45);
    color: #f87171;
}

.matrix-cell-draw {
    background: rgba(148, 163, 184, 0.18);
    border: 1px solid rgba(148, 163, 184, 0.35);
    color: #cbd5e1;
}

.matrix-cell-self {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.2);
}

.matrix-cell-unplayed {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.35);
}

.matrix-td-stat {
    background: #252f3e;
    text-align: center;
    padding: 8px 6px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.82rem;
}

.matrix-stat-record {
    color: #cbd5e1;
}

.matrix-stat-pts {
    color: var(--gold);
    font-size: 0.95rem;
    font-weight: 900;
}

/* Legend */
.matrix-footer-legend {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 6px 4px 0;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.matrix-legend-items {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.matrix-legend-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.72rem;
}

.badge-win {
    background: rgba(34, 197, 94, 0.25);
    border: 1px solid rgba(34, 197, 94, 0.5);
    color: #4ade80;
}

.badge-draw {
    background: rgba(148, 163, 184, 0.2);
    border: 1px solid rgba(148, 163, 184, 0.4);
    color: #cbd5e1;
}

.badge-loss {
    background: rgba(239, 68, 68, 0.25);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #f87171;
}

.badge-self {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.35);
}

.matrix-legend-hint {
    color: var(--text-muted);
    font-size: 0.75rem;
    opacity: 0.85;
}

/* ── Matchup Detail Modal ────────────────────────────── */
.matrix-detail-modal {
    max-width: 680px;
    width: 90vw;
    background: #1d2532;
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.75);
}

.matrix-detail-body {
    padding: 14px 18px;
    max-height: 75vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.matrix-matchup-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(39, 50, 66, 0.7), rgba(26, 34, 48, 0.7));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 16px;
    gap: 12px;
}

.matrix-banner-team {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
}

.matrix-banner-badge {
    padding: 3px 10px;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: 800;
    color: #111;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.matrix-banner-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.matrix-banner-score-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.matrix-banner-score {
    font-size: 1.7rem;
    font-weight: 900;
    font-family: var(--font-heading);
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e2e8f0;
    line-height: 1;
}

.matrix-banner-score .score-leader {
    color: #4ade80;
}

.matrix-banner-score .score-sep {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
}

.matrix-banner-subscore {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.matrix-banner-status-badge {
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.status-win {
    background: rgba(34, 197, 94, 0.25);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.4);
}

.status-loss {
    background: rgba(239, 68, 68, 0.25);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.status-draw {
    background: rgba(148, 163, 184, 0.2);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.status-unplayed {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Games list in detail popup */
.matrix-games-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.matrix-game-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.matrix-game-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.matrix-game-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.matrix-game-num {
    background: var(--blue-stat);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
}

.matrix-game-title {
    font-weight: 700;
    color: #fff;
    font-size: 0.85rem;
}

.matrix-game-outcome-pill {
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pill-a {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #4ade80;
}

.pill-b {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
}

.pill-draw {
    background: rgba(148, 163, 184, 0.18);
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: #cbd5e1;
}

.matrix-game-rounds-count {
    opacity: 0.8;
    font-size: 0.7rem;
}

/* Seeds sub-table in game card */
.matrix-seeds-table-wrap {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    padding: 4px 8px;
    margin-top: 2px;
}

.matrix-seeds-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
}

.matrix-seeds-table th {
    color: var(--text-muted);
    font-size: 0.68rem;
    padding: 4px 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.matrix-seeds-table td {
    padding: 4px 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

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

.seed-name-cell {
    color: #cbd5e1;
    font-weight: 500;
}

.seed-score-cell {
    text-align: center;
    font-family: var(--font-heading);
    font-weight: 600;
    color: #94a3b8;
}

.seed-score-cell.score-winner {
    color: #4ade80;
    font-weight: 800;
}

.seed-winner-cell {
    text-align: center;
}

.badge-win-seed {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 700;
    font-size: 0.68rem;
}

.badge-draw-seed {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.68rem;
}