/* ==========================================================================
   LOL ESPORTS AI PREDICTOR V5.5 // RIOT HEXTECH DESIGN SYSTEM
   ========================================================================== */

:root {
    /* Hextech Dark Palette */
    --bg-abyss: #030711;
    --bg-deep: #070e1e;
    --bg-surface: rgba(11, 22, 44, 0.82);
    --bg-surface-elevated: rgba(16, 30, 58, 0.92);
    --bg-surface-hover: rgba(22, 41, 78, 0.95);
    --bg-glass: rgba(9, 18, 36, 0.78);

    /* Hextech Metallic Gold & Magic Cyan */
    --accent-gold: #c8aa6e;
    --accent-gold-bright: #f0e6d2;
    --accent-gold-dark: #785a28;
    --accent-cyan: #0ac8b9;
    --accent-cyan-bright: #00f5d4;
    --accent-blue: #38bdf8;
    --accent-purple: #8b5cf6;
    --accent-red: #f43f5e;
    --accent-emerald: #10b981;

    /* Text Hierarchy */
    --text-main: #f1f5f9;
    --text-bright: #ffffff;
    --text-Gold: #f0e6d2;
    --text-muted: #94a3b8;
    --text-dim: #64748b;

    /* Borders & Lines */
    --border-subtle: rgba(148, 163, 184, 0.16);
    --border-gold: rgba(200, 170, 110, 0.42);
    --border-cyan: rgba(10, 200, 185, 0.45);
    --line-color: rgba(100, 116, 139, 0.45);
    --line-ai-color: rgba(200, 170, 110, 0.55);
    --line-highlight: #0ac8b9;
    --line-gold-highlight: #c8aa6e;

    /* Typography */
    --font-display: 'Cinzel', serif;
    --font-hud: 'Chakra Petch', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;

    /* Shadows */
    --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.6);
    --shadow-glow-cyan: 0 0 22px rgba(10, 200, 185, 0.28);
    --shadow-glow-gold: 0 0 24px rgba(200, 170, 110, 0.3);
}

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

html, body {
    height: 100%;
    background-color: var(--bg-abyss);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(3, 7, 17, 0.8);
}
::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.45);
    border-radius: 4px;
    border: 1px solid rgba(200, 170, 110, 0.2);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-gold);
}

.text-accent {
    color: var(--accent-cyan);
}

.gold-gradient-text {
    background: linear-gradient(135deg, #f0e6d2 0%, #c8aa6e 50%, #d4af37 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hidden {
    display: none !important;
}

/* ==========================================================================
   AMBIENT HEXTECH BACKGROUND LAYER
   ========================================================================== */
.hextech-bg-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at 15% 15%, rgba(10, 200, 185, 0.09) 0%, transparent 45%),
        radial-gradient(circle at 85% 12%, rgba(200, 170, 110, 0.1) 0%, transparent 45%),
        radial-gradient(circle at 50% 90%, rgba(56, 189, 248, 0.06) 0%, transparent 50%),
        linear-gradient(180deg, #030711 0%, #061024 55%, #030711 100%);
}

.bg-grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(200, 170, 110, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(10, 200, 185, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.85) 20%, transparent 85%);
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.35;
}
.bg-orb-cyan {
    width: 420px;
    height: 420px;
    background: rgba(10, 200, 185, 0.22);
    top: -120px;
    left: -100px;
}
.bg-orb-gold {
    width: 460px;
    height: 460px;
    background: rgba(200, 170, 110, 0.18);
    top: -150px;
    right: -100px;
}
.bg-orb-purple {
    width: 500px;
    height: 500px;
    background: rgba(99, 102, 241, 0.12);
    bottom: -200px;
    left: 35%;
}

/* ==========================================================================
   APP SHELL & TOP HEXTECH COMMAND HEADER
   ========================================================================== */
.app-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    padding: 0.7rem 1.75rem;
    background: rgba(5, 11, 24, 0.88);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border-gold);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.55);
    position: relative;
    z-index: 30;
}

.app-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--accent-cyan) 25%, var(--accent-gold) 50%, var(--accent-cyan) 75%, transparent 100%);
}

/* Brand Cluster */
.brand-cluster {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    cursor: pointer;
    user-select: none;
}

.hextech-crest {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(200, 170, 110, 0.22) 0%, rgba(10, 200, 185, 0.18) 100%);
    border: 1px solid var(--accent-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-gold-bright);
    font-size: 1.2rem;
    position: relative;
    box-shadow: inset 0 0 12px rgba(200, 170, 110, 0.25), 0 0 15px rgba(200, 170, 110, 0.2);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.brand-cluster:hover .hextech-crest {
    transform: scale(1.06) rotate(-3deg);
    box-shadow: 0 0 22px rgba(10, 200, 185, 0.45);
    border-color: var(--accent-cyan);
}

.brand-eyebrow {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-hud);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1.4px;
    color: var(--accent-cyan);
    text-transform: uppercase;
}

.status-dot-online {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-emerald);
    box-shadow: 0 0 8px var(--accent-emerald);
}

.brand-titles h1 {
    font-family: var(--font-display);
    font-size: 1.28rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: var(--text-bright);
    line-height: 1.15;
}

/* Primary SPA Route Navigation */
.primary-nav {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(11, 22, 44, 0.75);
    padding: 0.3rem;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
}

.nav-route-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-family: var(--font-hud);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    padding: 0.5rem 1rem;
    border-radius: 7px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    position: relative;
}

.nav-route-btn:hover {
    color: var(--text-bright);
    background: rgba(255, 255, 255, 0.04);
}

.nav-route-btn.active {
    color: var(--accent-gold-bright);
    background: linear-gradient(180deg, rgba(200, 170, 110, 0.2) 0%, rgba(200, 170, 110, 0.06) 100%);
    border-color: var(--border-gold);
    box-shadow: inset 0 1px 0 rgba(240, 230, 210, 0.25), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.nav-route-btn.active i {
    color: var(--accent-cyan);
}

.nav-badge-hot {
    background: linear-gradient(135deg, var(--accent-cyan) 0%, #0284c7 100%);
    color: #020617;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.nav-active-tournament-pill {
    background: rgba(200, 170, 110, 0.25);
    color: var(--accent-gold-bright);
    border: 1px solid var(--border-gold);
    font-size: 0.62rem;
    padding: 1px 6px;
    border-radius: 4px;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.db-telemetry-pill {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(11, 22, 44, 0.8);
    border: 1px solid var(--border-subtle);
    padding: 0.42rem 0.8rem;
    border-radius: 6px;
    font-family: var(--font-hud);
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Language Switcher (VI / EN) */
.lang-switcher {
    display: inline-flex;
    align-items: center;
    background: rgba(3, 7, 17, 0.88);
    border: 1px solid var(--border-gold);
    border-radius: 6px;
    padding: 2px;
    gap: 2px;
    box-shadow: inset 0 0 8px rgba(200, 170, 110, 0.12);
}

.lang-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-family: var(--font-hud);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    padding: 0.32rem 0.58rem;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    color: var(--text-bright);
    background: rgba(200, 170, 110, 0.1);
}

.lang-btn.active {
    background: linear-gradient(135deg, rgba(200, 170, 110, 0.28) 0%, rgba(10, 200, 185, 0.22) 100%);
    color: var(--accent-gold-bright);
    border-color: var(--accent-gold);
    box-shadow: 0 0 10px rgba(200, 170, 110, 0.25);
}

.btn-hextech {
    font-family: var(--font-hud);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 0.5rem 0.95rem;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: all 0.22s ease;
    position: relative;
    overflow: hidden;
}

.btn-hextech-gold {
    background: linear-gradient(180deg, rgba(200, 170, 110, 0.18) 0%, rgba(120, 90, 40, 0.28) 100%);
    color: var(--accent-gold-bright);
    border: 1px solid var(--accent-gold);
}

.btn-hextech-gold:hover {
    background: linear-gradient(180deg, var(--accent-gold) 0%, #a67c37 100%);
    color: #030711;
    box-shadow: var(--shadow-glow-gold);
    transform: translateY(-1px);
}

.btn-hextech-cyan {
    background: linear-gradient(180deg, rgba(10, 200, 185, 0.16) 0%, rgba(8, 145, 178, 0.25) 100%);
    color: var(--accent-cyan-bright);
    border: 1px solid var(--accent-cyan);
}

.btn-hextech-cyan:hover {
    background: linear-gradient(180deg, var(--accent-cyan) 0%, #0891b2 100%);
    color: #030711;
    box-shadow: var(--shadow-glow-cyan);
    transform: translateY(-1px);
}

.btn-hextech.loading i {
    animation: spin 1s linear infinite;
}

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

/* ==========================================================================
   MAIN VIEWPORT & SCREEN TRANSITIONS
   ========================================================================== */
.app-main {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.view {
    position: absolute;
    inset: 0;
    padding: 1.5rem 2rem 2.5rem;
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 0.26s ease, transform 0.26s ease;
    overflow-y: auto;
    overflow-x: hidden;
}

.view.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

#view-bracket {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

/* ==========================================================================
   SCREEN 1: TOURNAMENTS HUB (HERO, FILTERS, CARDS)
   ========================================================================== */
.hero-banner {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 1.5rem;
    padding: 1.6rem 2rem;
    margin-bottom: 1.5rem;
    border-radius: 14px;
    background:
        radial-gradient(circle at 90% 20%, rgba(200, 170, 110, 0.16) 0%, transparent 50%),
        radial-gradient(circle at 10% 80%, rgba(10, 200, 185, 0.14) 0%, transparent 55%),
        linear-gradient(135deg, rgba(11, 24, 49, 0.92) 0%, rgba(6, 13, 28, 0.95) 100%);
    border: 1px solid var(--border-gold);
    box-shadow: var(--shadow-card), inset 0 1px 0 rgba(240, 230, 210, 0.15);
    position: relative;
    overflow: hidden;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: var(--font-hud);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: var(--accent-cyan-bright);
    background: rgba(10, 200, 185, 0.12);
    border: 1px solid rgba(10, 200, 185, 0.35);
    padding: 0.28rem 0.75rem;
    border-radius: 20px;
    margin-bottom: 0.65rem;
}

.hero-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.55;
    max-width: 680px;
    margin-bottom: 1.15rem;
}

.hero-subtitle strong {
    color: var(--accent-gold-bright);
}

.hero-cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.btn-hero-primary {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #9b722c 100%);
    color: #030711;
    border: 1px solid var(--accent-gold-bright);
    font-family: var(--font-hud);
    font-weight: 700;
    font-size: 0.86rem;
    letter-spacing: 0.5px;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(200, 170, 110, 0.3);
}

.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(200, 170, 110, 0.5);
}

.btn-hero-secondary {
    background: rgba(10, 200, 185, 0.12);
    color: var(--accent-cyan-bright);
    border: 1px solid var(--border-cyan);
    font-family: var(--font-hud);
    font-weight: 700;
    font-size: 0.86rem;
    letter-spacing: 0.5px;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-hero-secondary:hover {
    background: var(--accent-cyan);
    color: #030711;
    box-shadow: var(--shadow-glow-cyan);
    transform: translateY(-2px);
}

/* Hero KPI Cards */
.hero-kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    align-content: center;
}

.hero-kpi-3col {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
}

.kpi-card {
    background: rgba(7, 14, 30, 0.72);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 0.8rem 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.kpi-card:hover {
    border-color: var(--accent-gold);
    transform: translateY(-2px);
    background: rgba(15, 28, 56, 0.88);
}

.kpi-icon {
    width: 42px;
    height: 42px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}

.kpi-live .kpi-icon {
    background: rgba(244, 63, 94, 0.16);
    color: var(--accent-red);
    border: 1px solid rgba(244, 63, 94, 0.4);
}
.kpi-upcoming .kpi-icon {
    background: rgba(10, 200, 185, 0.15);
    color: var(--accent-cyan);
    border: 1px solid rgba(10, 200, 185, 0.4);
}
.kpi-past .kpi-icon {
    background: rgba(200, 170, 110, 0.15);
    color: var(--accent-gold);
    border: 1px solid rgba(200, 170, 110, 0.4);
}
.kpi-ai .kpi-icon {
    background: rgba(139, 92, 246, 0.18);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.45);
}

.kpi-data {
    display: flex;
    flex-direction: column;
}

.kpi-value {
    font-family: var(--font-hud);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-bright);
    line-height: 1.1;
}

.kpi-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Filter & Search Command Bar */
.filter-command-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    padding: 0.65rem 1rem;
    border-radius: 12px;
}

.status-tabs {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.tab-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-family: var(--font-hud);
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.5rem 0.95rem;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: var(--text-bright);
    background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
    background: rgba(10, 200, 185, 0.14);
    color: var(--accent-cyan-bright);
    border-color: var(--border-cyan);
    box-shadow: 0 0 15px rgba(10, 200, 185, 0.15);
}

.live-beacon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-red);
    box-shadow: 0 0 8px var(--accent-red);
    animation: pulse-live 1.8s infinite;
}

.tab-count {
    background: rgba(15, 23, 42, 0.9);
    color: var(--text-muted);
    font-size: 0.72rem;
    padding: 1px 7px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
}

.tab-btn.active .tab-count {
    background: var(--accent-cyan);
    color: #020617;
    font-weight: 800;
    border-color: transparent;
}

.search-and-sort {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    max-width: 560px;
    justify-content: flex-end;
}

.search-box {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.search-box input {
    width: 100%;
    background: rgba(3, 7, 17, 0.75);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 0.52rem 2rem 0.52rem 2.2rem;
    color: var(--text-bright);
    font-family: var(--font-body);
    font-size: 0.85rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(10, 200, 185, 0.15);
}

.btn-clear-input {
    position: absolute;
    right: 8px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
}

.sort-box {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(3, 7, 17, 0.75);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 0.45rem 0.75rem;
    color: var(--text-muted);
}

.sort-box select {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: var(--font-hud);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
}

.sort-box select option {
    background: #070e1e;
    color: var(--text-main);
}

/* League Filter Pills */
.league-pills-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

.league-pill {
    background: rgba(11, 22, 44, 0.72);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-family: var(--font-hud);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.36rem 0.85rem;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: all 0.2s ease;
}

.league-pill img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.league-pill:hover {
    color: var(--text-bright);
    border-color: var(--accent-gold);
}

.league-pill.active {
    background: linear-gradient(135deg, rgba(200, 170, 110, 0.24) 0%, rgba(10, 200, 185, 0.16) 100%);
    color: var(--accent-gold-bright);
    border-color: var(--accent-gold);
}

/* Tournament Cards Grid */
.tournaments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 1.25rem;
}

.tournament-card {
    background: linear-gradient(165deg, rgba(14, 27, 54, 0.9) 0%, rgba(7, 14, 30, 0.95) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.tournament-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-gold));
    opacity: 0.35;
    transition: opacity 0.25s ease;
}

.tournament-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-gold);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.7), 0 0 20px rgba(200, 170, 110, 0.18);
}

.tournament-card:hover::before {
    opacity: 1;
}

.t-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
}

.tournament-header {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.tournament-logo-box {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.92) 0%, rgba(226, 232, 240, 0.85) 100%);
    border: 1px solid var(--border-gold);
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.tournament-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tournament-info h3 {
    font-family: var(--font-hud);
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 0.2rem;
}

.tournament-stage-tag {
    display: inline-block;
    font-family: var(--font-hud);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-gold-bright);
}

.t-status-pill {
    font-family: var(--font-hud);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 3px 9px;
    border-radius: 20px;
    white-space: nowrap;
}

.t-status-running {
    background: rgba(244, 63, 94, 0.18);
    color: #fb7185;
    border: 1px solid rgba(244, 63, 94, 0.5);
    animation: pulse-live 2s infinite;
}

.t-status-upcoming {
    background: rgba(10, 200, 185, 0.15);
    color: var(--accent-cyan-bright);
    border: 1px solid rgba(10, 200, 185, 0.4);
}

.t-status-past {
    background: rgba(148, 163, 184, 0.14);
    color: var(--text-muted);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.t-card-mid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.8rem;
    background: rgba(3, 7, 17, 0.55);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.t-avatar-stack {
    display: flex;
    align-items: center;
}

.t-avatar-stack img {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: contain;
    background: #1e293b;
    border: 1.5px solid var(--accent-gold);
    padding: 2px;
    margin-left: -6px;
}

.t-avatar-stack img:first-child {
    margin-left: 0;
}

.t-avatar-more {
    font-family: var(--font-hud);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent-gold-bright);
    margin-left: 6px;
}

.t-meta-stats {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-hud);
    font-size: 0.76rem;
    color: var(--text-muted);
}

.t-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.35rem;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.t-date {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.t-cta-link {
    font-family: var(--font-hud);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-cyan-bright);
    display: flex;
    align-items: center;
    gap: 5px;
    transition: transform 0.2s ease, color 0.2s ease;
}

.tournament-card:hover .t-cta-link {
    color: var(--accent-gold-bright);
    transform: translateX(3px);
}

/* ==========================================================================
   SCREEN 2: BRACKET ARENA & COMMAND BAR
   ========================================================================== */
.bracket-command-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.85rem;
    padding: 0.7rem 1.5rem;
    background: rgba(7, 14, 30, 0.92);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 20;
}

.bracket-nav-left {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.btn-back-hextech {
    background: rgba(15, 28, 56, 0.85);
    color: var(--text-bright);
    border: 1px solid var(--border-gold);
    font-family: var(--font-hud);
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.45rem 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: all 0.2s ease;
}

.btn-back-hextech:hover {
    background: var(--accent-gold);
    color: #030711;
}

.breadcrumb-trail {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-family: var(--font-hud);
    font-size: 0.85rem;
}

.crumb-link {
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}
.crumb-link:hover {
    color: var(--accent-cyan-bright);
    text-decoration: underline;
}
.crumb-sep {
    font-size: 0.7rem;
    color: var(--text-dim);
}
.crumb-current {
    color: var(--accent-gold-bright);
    font-weight: 700;
}

.quick-switcher-wrap {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(3, 7, 17, 0.75);
    border: 1px solid var(--border-subtle);
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    color: var(--accent-cyan);
    font-size: 0.78rem;
}

.quick-switcher-wrap select {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: var(--font-hud);
    font-size: 0.8rem;
    font-weight: 600;
    max-width: 220px;
    cursor: pointer;
    outline: none;
}

.quick-switcher-wrap select option {
    background: #070e1e;
    color: var(--text-main);
}

/* Bracket Mode Switcher */
.bracket-mode-switcher {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(3, 7, 17, 0.8);
    padding: 0.25rem;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
}

.mode-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-family: var(--font-hud);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
}

.mode-btn:hover {
    color: var(--text-bright);
}

.mode-btn.active {
    background: linear-gradient(135deg, rgba(10, 200, 185, 0.22) 0%, rgba(200, 170, 110, 0.22) 100%);
    color: var(--accent-gold-bright);
    border-color: var(--accent-gold);
}

/* Canvas Zoom & Sync Tools */
.bracket-canvas-controls {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.btn-canvas-tool {
    background: rgba(11, 22, 44, 0.8);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-family: var(--font-hud);
    font-size: 0.76rem;
    font-weight: 600;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.2s;
}

.btn-canvas-tool.active {
    color: var(--accent-cyan-bright);
    border-color: var(--accent-cyan);
    background: rgba(10, 200, 185, 0.14);
}

.zoom-control-group {
    display: flex;
    align-items: center;
    background: rgba(3, 7, 17, 0.8);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    overflow: hidden;
}

.btn-zoom {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}

.btn-zoom:hover {
    color: var(--accent-gold-bright);
    background: rgba(255, 255, 255, 0.06);
}

.zoom-level-text {
    font-family: var(--font-hud);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-main);
    min-width: 44px;
    text-align: center;
}

/* ==========================================================================
   TOURNAMENT INSIGHTS & TEAM HIGHLIGHTER BAR
   ========================================================================== */
.tournament-insights-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(90deg, rgba(11, 22, 44, 0.9) 0%, rgba(16, 30, 58, 0.75) 50%, rgba(11, 22, 44, 0.9) 100%);
    border-bottom: 1px solid var(--border-gold);
    z-index: 15;
}

.insights-kpi-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.insight-pill {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(3, 7, 17, 0.68);
    border: 1px solid var(--border-subtle);
    padding: 0.38rem 0.85rem;
    border-radius: 8px;
    font-family: var(--font-hud);
    font-size: 0.8rem;
}

.insight-pill-gold {
    border-color: var(--border-gold);
    background: linear-gradient(135deg, rgba(200, 170, 110, 0.16) 0%, rgba(3, 7, 17, 0.8) 100%);
}

.insight-pill-accuracy {
    border-color: var(--border-cyan);
    background: linear-gradient(135deg, rgba(10, 200, 185, 0.15) 0%, rgba(3, 7, 17, 0.8) 100%);
}

.insight-pill img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    border-radius: 50%;
    background: #1e293b;
    padding: 2px;
}

.team-logos-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    overflow-x: auto;
    max-width: 100%;
    padding: 2px 0;
}

.team-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(3, 7, 17, 0.72);
    border: 1px solid var(--border-subtle);
    padding: 3px 8px 3px 4px;
    border-radius: 20px;
    cursor: pointer;
    font-family: var(--font-hud);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.18s ease;
    white-space: nowrap;
}

.team-filter-chip img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    border-radius: 50%;
    background: #1e293b;
    padding: 2px;
}

.team-filter-chip:hover,
.team-filter-chip.active {
    border-color: var(--accent-gold);
    color: var(--accent-gold-bright);
    background: rgba(200, 170, 110, 0.22);
    box-shadow: 0 0 12px rgba(200, 170, 110, 0.3);
}

/* ==========================================================================
   BRACKET VIEWPORT, SPLIT VIEW & BINARY TREE GEOMETRY
   ========================================================================== */
.bracket-viewport {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
}

.bracket-single-panel {
    flex: 1;
    width: 100%;
    height: 100%;
    overflow: auto;
    padding: 1.5rem 2rem 4rem;
    cursor: grab;
}

.bracket-single-panel:active {
    cursor: grabbing;
}

.bracket-split-container {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1rem 1.25rem;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.bracket-half {
    display: flex;
    flex-direction: column;
    background: rgba(6, 12, 26, 0.78);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
}

.bracket-half-ai {
    border-color: var(--border-gold);
    box-shadow: inset 0 0 30px rgba(200, 170, 110, 0.05);
}

.half-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 1.15rem;
    background: rgba(11, 22, 44, 0.92);
    border-bottom: 1px solid var(--border-subtle);
}

.half-title-group {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.half-badge {
    font-family: var(--font-hud);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    padding: 2px 8px;
    border-radius: 4px;
}

.badge-real {
    background: rgba(10, 200, 185, 0.16);
    color: var(--accent-cyan-bright);
    border: 1px solid var(--border-cyan);
}

.badge-ai {
    background: rgba(200, 170, 110, 0.2);
    color: var(--accent-gold-bright);
    border: 1px solid var(--border-gold);
}

.half-title {
    font-family: var(--font-hud);
    font-size: 1rem;
    font-weight: 700;
}

.half-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.bracket-scroll-area {
    flex: 1;
    overflow: auto;
    padding: 1.25rem 1.5rem 3rem;
    cursor: grab;
}

.bracket-scroll-area:active {
    cursor: grabbing;
}

.bracket-canvas {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    width: max-content;
    min-width: 100%;
    transform-origin: 0 0;
    transition: transform 0.18s ease;
}

/* Bracket Stage Block (Upper / Lower / Swiss / Group) */
.bracket-stage-block {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stage-block-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(200, 170, 110, 0.25);
}

.stage-block-title {
    font-family: var(--font-display);
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--accent-gold-bright);
    letter-spacing: 0.6px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stage-block-badge {
    font-family: var(--font-hud);
    font-size: 0.72rem;
    color: var(--accent-cyan);
    background: rgba(10, 200, 185, 0.12);
    border: 1px solid var(--border-cyan);
    padding: 2px 8px;
    border-radius: 12px;
}

/* True Binary Tree Container */
.bracket-tree-row {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 56px;
    padding: 0.5rem 0.5rem;
}

.bracket-round-col {
    display: flex;
    flex-direction: column;
    min-width: 268px;
}

.round-col-header {
    font-family: var(--font-hud);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-gold-bright);
    background: linear-gradient(90deg, rgba(200, 170, 110, 0.16) 0%, rgba(11, 22, 44, 0.85) 100%);
    border: 1px solid var(--border-gold);
    border-radius: 6px;
    padding: 0.45rem 0.85rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.round-col-header span.round-count {
    font-size: 0.68rem;
    color: var(--text-muted);
    background: rgba(3, 7, 17, 0.6);
    padding: 1px 6px;
    border-radius: 4px;
}

.round-matches-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

/* Match Slot & True Tree Connectors */
.match-slot {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 12px 0;
}

/* Outgoing connector arm to right */
.match-slot.connect-pair-top::after {
    content: '';
    position: absolute;
    right: -28px;
    top: 50%;
    width: 28px;
    height: 50%;
    border-top: 2px solid var(--line-color);
    border-right: 2px solid var(--line-color);
    border-top-right-radius: 5px;
    z-index: 1;
    pointer-events: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.match-slot.connect-pair-bottom::after {
    content: '';
    position: absolute;
    right: -28px;
    bottom: 50%;
    width: 28px;
    height: 50%;
    border-bottom: 2px solid var(--line-color);
    border-right: 2px solid var(--line-color);
    border-bottom-right-radius: 5px;
    z-index: 1;
    pointer-events: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.match-slot.connect-straight::after {
    content: '';
    position: absolute;
    right: -28px;
    top: 50%;
    width: 28px;
    height: 2px;
    background: var(--line-color);
    z-index: 1;
    pointer-events: none;
    transition: background-color 0.2s ease;
}

/* Incoming horizontal connector from left */
.match-slot.has-incoming::before {
    content: '';
    position: absolute;
    left: -28px;
    top: 50%;
    width: 28px;
    height: 2px;
    background: var(--line-color);
    z-index: 1;
    pointer-events: none;
    transition: background-color 0.2s ease;
}

/* Highlighted Path States */
.match-slot.highlight-path::before,
.match-slot.highlight-path.connect-straight::after {
    background: var(--line-highlight) !important;
    box-shadow: 0 0 8px var(--line-highlight);
}

.match-slot.highlight-path.connect-pair-top::after,
.match-slot.highlight-path.connect-pair-bottom::after {
    border-color: var(--line-highlight) !important;
}

/* ==========================================================================
   HEXTECH MATCH CARD (.match-box)
   ========================================================================== */
.match-box {
    width: 268px;
    background: linear-gradient(180deg, rgba(16, 30, 58, 0.95) 0%, rgba(8, 16, 34, 0.98) 100%);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 9px;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
    overflow: hidden;
}

.match-box:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 8px 22px rgba(10, 200, 185, 0.25);
    transform: translateY(-2px);
}

.match-box.is-predicted-card {
    border-color: rgba(200, 170, 110, 0.45);
}

.match-box.is-predicted-card:hover {
    border-color: var(--accent-gold-bright);
    box-shadow: 0 8px 22px rgba(200, 170, 110, 0.28);
}

.match-slot.highlight-path .match-box {
    border-color: var(--accent-gold-bright);
    box-shadow: 0 0 20px rgba(200, 170, 110, 0.42);
    transform: scale(1.02);
}

.match-slot.dimmed-path .match-box {
    opacity: 0.32;
    filter: grayscale(40%);
}

/* Match Card Top Micro-Header */
.match-card-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 10px;
    background: rgba(3, 7, 17, 0.72);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-family: var(--font-hud);
    font-size: 0.66rem;
    color: var(--text-muted);
}

.match-bo-label {
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.verdict-badge {
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.62rem;
    letter-spacing: 0.4px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.verdict-hit {
    background: rgba(16, 185, 129, 0.18);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.verdict-upset {
    background: rgba(244, 63, 94, 0.18);
    color: #fb7185;
    border: 1px solid rgba(244, 63, 94, 0.4);
}

.verdict-ai {
    background: linear-gradient(135deg, rgba(200, 170, 110, 0.25) 0%, rgba(212, 175, 55, 0.15) 100%);
    color: var(--accent-gold-bright);
    border: 1px solid var(--border-gold);
}

.verdict-live {
    background: rgba(244, 63, 94, 0.22);
    color: #ef4444;
    border: 1px solid #ef4444;
}

/* Team Rows inside Match Box */
.team-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    transition: background 0.15s;
}

.team-row:first-of-type {
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.team-row.winner {
    background: linear-gradient(90deg, rgba(10, 200, 185, 0.11) 0%, transparent 85%);
}

.match-box.is-predicted-card .team-row.winner {
    background: linear-gradient(90deg, rgba(200, 170, 110, 0.14) 0%, transparent 85%);
}

.team-info {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.team-logo-wrap {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.team-logo-wrap.tbd-slot {
    background: rgba(30, 41, 59, 0.8);
    border: 1px dashed rgba(148, 163, 184, 0.3);
    color: var(--text-dim);
    font-size: 0.65rem;
}

.team-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.team-name-group {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.team-name {
    font-family: var(--font-hud);
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.team-win-crown {
    font-size: 0.65rem;
    color: var(--accent-gold);
}

.team-score-group {
    display: flex;
    align-items: center;
    gap: 5px;
}

.ai-mini-pred-score {
    font-family: var(--font-hud);
    font-size: 0.68rem;
    color: var(--accent-gold);
    background: rgba(200, 170, 110, 0.12);
    border: 1px solid rgba(200, 170, 110, 0.3);
    padding: 1px 5px;
    border-radius: 4px;
}

.team-score {
    font-family: var(--font-hud);
    font-weight: 800;
    font-size: 0.9rem;
    min-width: 22px;
    text-align: center;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(3, 7, 17, 0.55);
    color: var(--text-muted);
}

.team-row.winner .team-name {
    color: var(--text-bright);
}

.team-row.winner .team-score {
    background: rgba(10, 200, 185, 0.2);
    color: var(--accent-cyan-bright);
    border: 1px solid rgba(10, 200, 185, 0.4);
}

.match-box.is-predicted-card .team-row.winner .team-score {
    background: rgba(200, 170, 110, 0.25);
    color: var(--accent-gold-bright);
    border: 1px solid rgba(200, 170, 110, 0.5);
}

.team-row.loser .team-name,
.team-row.loser .team-score {
    opacity: 0.5;
}

/* Match Bottom AI Probability Bar */
.match-ai-bar-wrap {
    display: flex;
    flex-direction: column;
    background: rgba(3, 7, 17, 0.85);
    padding: 3px 10px 5px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.match-ai-bar-labels {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-hud);
    font-size: 0.62rem;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.match-ai-bar-track {
    width: 100%;
    height: 4px;
    background: rgba(244, 63, 94, 0.35);
    border-radius: 2px;
    overflow: hidden;
    display: flex;
}

.match-ai-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-gold));
    transition: width 0.3s ease;
}

/* ==========================================================================
   SWISS STAGE & GROUP STANDINGS LAYOUT
   ========================================================================== */
.swiss-stage-layout {
    display: flex;
    align-items: flex-start;
    gap: 1.75rem;
}

.swiss-standings-card {
    width: 310px;
    flex-shrink: 0;
    background: rgba(9, 18, 36, 0.92);
    border: 1px solid var(--border-gold);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.standings-header {
    padding: 0.75rem 1rem;
    background: linear-gradient(90deg, rgba(200, 170, 110, 0.2) 0%, rgba(11, 22, 44, 0.95) 100%);
    border-bottom: 1px solid var(--border-gold);
    font-family: var(--font-hud);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--accent-gold-bright);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.standings-list {
    display: flex;
    flex-direction: column;
    max-height: 620px;
    overflow-y: auto;
}

.standing-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.85rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    font-family: var(--font-hud);
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.15s;
}

.standing-row:hover {
    background: rgba(200, 170, 110, 0.12);
}

.standing-rank {
    width: 22px;
    font-weight: 700;
    color: var(--text-muted);
}

.standing-team {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    font-weight: 700;
    color: var(--text-bright);
}

.standing-team img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    background: #fff;
    border-radius: 4px;
    padding: 1px;
}

.standing-wl {
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.74rem;
}

.wl-qualified {
    background: rgba(16, 185, 129, 0.18);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.wl-eliminated {
    background: rgba(244, 63, 94, 0.15);
    color: #fb7185;
    border: 1px solid rgba(244, 63, 94, 0.35);
}

.wl-active {
    background: rgba(10, 200, 185, 0.15);
    color: var(--accent-cyan-bright);
    border: 1px solid rgba(10, 200, 185, 0.35);
}

.swiss-rounds-row {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.swiss-round-col {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 268px;
}

/* ==========================================================================
   SCREEN 3: H2H MATCHUP SIMULATOR
   ========================================================================== */
.simulator-container,
.model-hub-container {
    max-width: 1320px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.section-header-hextech {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-gold);
}

.section-eyebrow {
    font-family: var(--font-hud);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: var(--accent-cyan);
    display: block;
    margin-bottom: 0.35rem;
}

.section-header-hextech h2 {
    font-family: var(--font-display);
    font-size: 1.65rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
}

.section-header-hextech p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.rivalry-presets {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.preset-label {
    font-family: var(--font-hud);
    font-size: 0.78rem;
    color: var(--text-muted);
}

.preset-chip {
    background: rgba(11, 22, 44, 0.85);
    border: 1px solid var(--border-gold);
    color: var(--accent-gold-bright);
    font-family: var(--font-hud);
    font-size: 0.76rem;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.preset-chip:hover {
    background: var(--accent-gold);
    color: #030711;
}

.sim-selection-arena {
    display: grid;
    grid-template-columns: 1fr 220px 1fr;
    gap: 1.5rem;
    align-items: stretch;
}

.sim-team-selector {
    background: var(--bg-surface-elevated);
    border-radius: 14px;
    padding: 1.35rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-card);
}

.sim-team-selector.side-blue {
    border-top: 3px solid var(--accent-cyan);
}

.sim-team-selector.side-red {
    border-top: 3px solid var(--accent-red);
}

.side-banner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-hud);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.side-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}
.blue-dot { background: var(--accent-cyan); box-shadow: 0 0 8px var(--accent-cyan); }
.red-dot { background: var(--accent-red); box-shadow: 0 0 8px var(--accent-red); }

.sim-team-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem;
    background: rgba(3, 7, 17, 0.6);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.sim-preview-logo {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    padding: 6px;
    object-fit: contain;
}

.sim-preview-info h3 {
    font-family: var(--font-hud);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-bright);
}

.sim-preview-elo {
    font-family: var(--font-hud);
    font-size: 0.82rem;
    color: var(--accent-gold-bright);
    margin-top: 3px;
}

.sim-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sim-input-group label {
    font-size: 0.76rem;
    color: var(--text-muted);
}

.sim-input-group input {
    background: rgba(3, 7, 17, 0.85);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 0.65rem 0.9rem;
    color: var(--text-bright);
    font-family: var(--font-hud);
    font-size: 0.95rem;
    font-weight: 600;
}

.sim-input-group input:focus {
    outline: none;
    border-color: var(--accent-gold);
}

.sim-draft-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.draft-champ-pill {
    font-family: var(--font-hud);
    font-size: 0.72rem;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    padding: 3px 8px;
    border-radius: 6px;
}

.sim-center-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
}

.vs-medallion {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(200, 170, 110, 0.3) 0%, rgba(7, 14, 30, 0.95) 100%);
    border: 2px solid var(--accent-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--accent-gold-bright);
    box-shadow: var(--shadow-glow-gold);
}

.btn-swap-sides {
    background: rgba(11, 22, 44, 0.8);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-family: var(--font-hud);
    font-size: 0.76rem;
    padding: 0.35rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-swap-sides:hover {
    color: var(--text-bright);
    border-color: var(--accent-cyan);
}

.bo-selector-group {
    display: flex;
    background: rgba(3, 7, 17, 0.85);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 3px;
    width: 100%;
}

.bo-option {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-hud);
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.4rem 0;
    border-radius: 6px;
    cursor: pointer;
}

.bo-option.active {
    background: var(--accent-gold);
    color: #030711;
}

.btn-execute-sim {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-cyan) 0%, #0284c7 100%);
    color: #020617;
    border: none;
    font-family: var(--font-hud);
    font-size: 0.86rem;
    font-weight: 800;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    box-shadow: var(--shadow-glow-cyan);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-execute-sim:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(10, 200, 185, 0.45);
}

/* Simulator Results Output */
.sim-results-panel {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-gold);
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
}

.sim-verdict-banner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem;
    background: rgba(3, 7, 17, 0.7);
    border-radius: 12px;
    border: 1px solid rgba(200, 170, 110, 0.25);
    margin-bottom: 1.25rem;
}

.sim-score-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-hud);
    font-size: 2.8rem;
    font-weight: 800;
}

.tug-of-war-container {
    margin: 1rem 0 1.5rem;
}

.tug-labels {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-hud);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.tug-bar-outer {
    height: 14px;
    border-radius: 8px;
    background: linear-gradient(90deg, #be123c 0%, #f43f5e 100%);
    overflow: hidden;
    display: flex;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.tug-bar-blue {
    height: 100%;
    background: linear-gradient(90deg, #0284c7 0%, var(--accent-cyan-bright) 100%);
    transition: width 0.4s ease;
}

.sim-pillars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.pillar-card {
    background: rgba(3, 7, 17, 0.65);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
}

.pillar-card h4 {
    font-family: var(--font-hud);
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.pillar-val {
    font-family: var(--font-hud);
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--accent-gold-bright);
}

.telemetry-compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.metric-compare-row {
    margin-bottom: 0.75rem;
}

.metric-compare-header {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-hud);
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.metric-dual-bar {
    height: 6px;
    background: rgba(244, 63, 94, 0.35);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
}

.metric-dual-fill {
    height: 100%;
    background: var(--accent-cyan);
}

/* ==========================================================================
   SCREEN 4: AI V5 ARCHITECTURE HUB
   ========================================================================== */
.arch-pipeline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.arch-stage-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    box-shadow: var(--shadow-card);
}

.arch-card-xgb { border-top: 3px solid var(--accent-cyan); }
.arch-card-nn { border-top: 3px solid var(--accent-purple); }
.arch-card-meta { border-top: 3px solid var(--accent-gold); }

.arch-step-badge {
    font-family: var(--font-hud);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--accent-gold);
}

.arch-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(200, 170, 110, 0.14);
    border: 1px solid var(--border-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--accent-gold-bright);
}

.arch-stage-card h3 {
    font-family: var(--font-hud);
    font-size: 1.15rem;
    color: var(--text-bright);
}

.arch-stage-card p {
    font-size: 0.86rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.arch-feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    font-size: 0.82rem;
    color: var(--text-main);
}

.arch-param-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: auto;
}

.param-item {
    background: rgba(3, 7, 17, 0.65);
    border: 1px solid var(--border-subtle);
    padding: 0.45rem 0.65rem;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
}

.param-item span {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.param-item strong {
    font-family: var(--font-hud);
    font-size: 0.88rem;
    color: var(--accent-cyan-bright);
}

.meta-weights-box {
    background: rgba(3, 7, 17, 0.7);
    border: 1px solid var(--border-gold);
    padding: 0.75rem;
    border-radius: 8px;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.weight-bar-row {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-hud);
    font-size: 0.82rem;
}

.model-evolution-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1.5rem;
}

.model-evolution-card h3 {
    font-family: var(--font-hud);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.evolution-table-wrap {
    overflow-x: auto;
}

.hextech-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
}

.hextech-table th,
.hextech-table td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.hextech-table th {
    font-family: var(--font-hud);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--accent-gold);
    background: rgba(3, 7, 17, 0.6);
}

.highlight-v5-row {
    background: rgba(200, 170, 110, 0.08);
}

.ver-badge {
    font-family: var(--font-hud);
    font-size: 0.74rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(148, 163, 184, 0.2);
}
.ver-v4 { background: rgba(10, 200, 185, 0.2); color: var(--accent-cyan-bright); }
.ver-v5 { background: linear-gradient(135deg, var(--accent-gold) 0%, #9b722c 100%); color: #030711; }

/* ==========================================================================
   MATCH DETAIL & TELEMETRY MODAL
   ========================================================================== */
.modal {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.modal:not(.hidden) {
    opacity: 1;
    pointer-events: all;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 17, 0.78);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    z-index: 2;
    background: linear-gradient(180deg, rgba(13, 25, 50, 0.96) 0%, rgba(6, 12, 26, 0.98) 100%);
    border: 1px solid var(--accent-gold);
    border-radius: 14px;
    width: 650px;
    max-width: 94vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), var(--shadow-glow-gold);
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.close-modal:hover {
    background: var(--accent-red);
    color: #fff;
    border-color: var(--accent-red);
}

#modal-match-title {
    padding: 1.15rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(3, 7, 17, 0.55);
}

.match-round-name {
    font-family: var(--font-hud);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-gold-bright);
}

.scoreboard-container {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.match-meta-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
}

.bo-badge-highlight {
    background: var(--accent-gold);
    color: #030711;
    font-family: var(--font-hud);
    font-weight: 800;
    font-size: 0.78rem;
    padding: 3px 12px;
    border-radius: 20px;
}

.match-status {
    font-family: var(--font-hud);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 3px 12px;
    border-radius: 20px;
}

.status-upcoming { background: rgba(148, 163, 184, 0.2); color: var(--text-muted); }
.status-live { background: rgba(244, 63, 94, 0.2); color: #fb7185; border: 1px solid #f43f5e; }
.status-finished { background: rgba(10, 200, 185, 0.15); color: var(--accent-cyan-bright); border: 1px solid var(--border-cyan); }

.scoreboard-main {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(3, 7, 17, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.score-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.score-logo-wrapper {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    border: 2px solid var(--border-gold);
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.score-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.score-team-name {
    font-family: var(--font-hud);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-bright);
    text-align: center;
}

.score-center {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.score-number {
    font-family: var(--font-hud);
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-bright);
}

.score-divider {
    font-size: 1.75rem;
    color: var(--text-dim);
}

.ai-prediction-insight {
    background: linear-gradient(135deg, rgba(200, 170, 110, 0.14) 0%, rgba(10, 200, 185, 0.1) 100%);
    border: 1px solid var(--border-gold);
    padding: 0.9rem 1rem;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

/* ==========================================================================
   SKELETON LOADING & TOAST NOTIFICATIONS
   ========================================================================== */
.skeleton-card {
    height: 190px;
    border-radius: 12px;
    background: linear-gradient(90deg, rgba(11, 22, 44, 0.6) 25%, rgba(22, 41, 78, 0.8) 50%, rgba(11, 22, 44, 0.6) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border: 1px solid var(--border-subtle);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes pulse-live {
    0% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.5); }
    70% { box-shadow: 0 0 0 7px rgba(244, 63, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0); }
}

.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.hextech-toast {
    background: rgba(8, 16, 34, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--accent-gold);
    border-left: 4px solid var(--accent-cyan);
    color: var(--text-bright);
    padding: 0.85rem 1.2rem;
    border-radius: 8px;
    font-family: var(--font-hud);
    font-size: 0.86rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.65);
    animation: toast-in 0.25s ease forwards;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Footer */
.app-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 1.75rem;
    background: rgba(4, 9, 20, 0.92);
    border-top: 1px solid var(--border-subtle);
    font-family: var(--font-hud);
    font-size: 0.76rem;
    color: var(--text-muted);
    z-index: 20;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 1100px) {
    .hero-banner { grid-template-columns: 1fr; }
    .sim-selection-arena { grid-template-columns: 1fr; }
    .bracket-split-container { grid-template-columns: 1fr; }
}
