@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Rajdhani:wght@400;500;600;700&family=Orbitron:wght@400;500;600;700;800;900&display=swap');

/* ============================================================
   DESIGN SYSTEM - FIFA World Cup 2026 Dashboard
   ============================================================ */

:root {
    /* Colors */
    --color-bg: #050a12;
    --color-bg-2: #080f1a;
    --color-bg-3: #0d1826;
    --color-surface: rgba(255, 255, 255, 0.04);
    --color-surface-hover: rgba(255, 255, 255, 0.07);
    --color-border: rgba(255, 255, 255, 0.08);
    --color-border-glow: rgba(0, 168, 255, 0.3);

    --color-neon-blue: #00a8ff;
    --color-neon-cyan: #00e5ff;
    --color-neon-gold: #ffd700;
    --color-neon-green: #00ff88;
    --color-neon-red: #ff3366;
    --color-neon-purple: #a855f7;
    --color-neon-orange: #ff6600;

    --color-text-primary: #f0f4ff;
    --color-text-secondary: rgba(240, 244, 255, 0.65);
    --color-text-muted: rgba(240, 244, 255, 0.35);

    --color-live: #ff3366;
    --color-win: #00ff88;
    --color-draw: #ffd700;
    --color-loss: #ff3366;

    /* Gradients */
    --gradient-hero: linear-gradient(135deg, #050a12 0%, #0a1628 50%, #050a12 100%);
    --gradient-card: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
    --gradient-gold: linear-gradient(135deg, #f5af19, #f12711, #f5af19);
    --gradient-live: linear-gradient(90deg, #ff3366, #ff6b35);
    --gradient-neon: linear-gradient(135deg, #00a8ff, #0066cc);

    /* Shadows & Glows */
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.6);
    --shadow-glow-blue: 0 0 20px rgba(0, 168, 255, 0.4);
    --shadow-glow-gold: 0 0 30px rgba(255, 215, 0, 0.5);
    --shadow-glow-red: 0 0 20px rgba(255, 51, 102, 0.5);
    --shadow-glow-green: 0 0 20px rgba(0, 255, 136, 0.4);

    /* Typography */
    --font-primary: 'Inter', sans-serif;
    --font-display: 'Rajdhani', sans-serif;
    --font-mono: 'Orbitron', monospace;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    /* Border radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;
}

/* ============================================================
   RESET & BASE
   ============================================================ */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    background: var(--color-bg);
    color: var(--color-text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--color-bg-2); }
::-webkit-scrollbar-thumb { background: rgba(0, 168, 255, 0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 168, 255, 0.6); }

/* ============================================================
   BACKGROUND EFFECTS
   ============================================================ */

.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 168, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 168, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

.bg-orbs {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.12;
    animation: orbFloat 20s ease-in-out infinite;
}

.bg-orb:nth-child(1) {
    width: 600px; height: 600px;
    background: var(--color-neon-blue);
    top: -200px; left: -200px;
    animation-duration: 25s;
}

.bg-orb:nth-child(2) {
    width: 400px; height: 400px;
    background: var(--color-neon-purple);
    bottom: -100px; right: -100px;
    animation-duration: 20s;
    animation-delay: -8s;
}

.bg-orb:nth-child(3) {
    width: 300px; height: 300px;
    background: var(--color-neon-gold);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation-duration: 30s;
    animation-delay: -15s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 30px) scale(0.9); }
}

/* ============================================================
   HEADER
   ============================================================ */

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(5, 10, 18, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    padding: 0 var(--space-xl);
}

.header-inner {
    max-width: 1800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    flex-shrink: 0;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: var(--shadow-glow-gold);
    animation: trophyPulse 3s ease-in-out infinite;
}

@keyframes trophyPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.5); }
    50% { box-shadow: 0 0 40px rgba(255, 215, 0, 0.9), 0 0 80px rgba(255, 215, 0, 0.3); }
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    color: var(--color-text-primary);
}

.logo-sub {
    font-size: 0.65rem;
    color: var(--color-neon-gold);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 600;
}

.nav {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-left: auto;
}

.header-summary {
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    white-space: nowrap;
}

.nav-btn {
    background: none;
    border: 1px solid transparent;
    color: var(--color-text-secondary);
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 6px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    letter-spacing: 0.02em;
}

.nav-btn:hover {
    color: var(--color-text-primary);
    border-color: var(--color-border-glow);
    background: var(--color-surface);
}

.nav-btn.active {
    color: var(--color-neon-blue);
    border-color: var(--color-neon-blue);
    background: rgba(0, 168, 255, 0.1);
    box-shadow: 0 0 10px rgba(0, 168, 255, 0.2);
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-left: auto;
}

.live-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 51, 102, 0.15);
    border: 1px solid rgba(255, 51, 102, 0.4);
    border-radius: var(--radius-sm);
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-live);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.live-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--color-live);
    animation: livePulse 1.2s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.7); }
}

.live-badge.hidden { display: none; }

.clock {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--color-text-muted);
    letter-spacing: 0.08em;
}

.btn-fullscreen {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    width: 36px; height: 36px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.btn-fullscreen:hover {
    background: var(--color-surface-hover);
    color: var(--color-text-primary);
    border-color: var(--color-neon-blue);
}

/* ============================================================
   MAIN LAYOUT
   ============================================================ */

.app-main {
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 64px);
}

.view {
    display: none;
    padding: var(--space-xl);
    max-width: 1800px;
    margin: 0 auto;
    animation: fadeIn var(--transition-normal);
}

.view.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.view-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-xl);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.view-title::before {
    content: '';
    display: block;
    width: 4px;
    height: 1.6em;
    background: var(--gradient-neon);
    border-radius: 2px;
}

/* ============================================================
   GROUPS VIEW
   ============================================================ */

.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--space-lg);
}

.groups-panel {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.live-stream-slot[hidden] {
    display: none !important;
}

.live-stream-card {
    display: grid;
    grid-template-columns: minmax(260px, 0.95fr) minmax(0, 1.6fr);
    gap: var(--space-lg);
    align-items: stretch;
    margin-bottom: var(--space-xl);
    padding: var(--space-lg);
    border: 1px solid rgba(255, 51, 102, 0.18);
    border-radius: var(--radius-xl);
    background:
        linear-gradient(135deg, rgba(255, 51, 102, 0.08), rgba(0, 168, 255, 0.06)),
        rgba(255, 255, 255, 0.02);
    box-shadow: var(--shadow-card);
}

.live-stream-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-sm);
    min-width: 0;
}

.live-stream-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 51, 102, 0.14);
    color: var(--color-live);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.live-stream-kicker::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: livePulse 1.2s ease-in-out infinite;
}

.live-stream-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.live-stream-match {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
}

.live-stream-frame {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #000;
    min-height: 320px;
}

.live-stream-frame iframe {
    width: 100%;
    height: 100%;
    min-height: 320px;
    border: 0;
    display: block;
}

.groups-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
}

.groups-panel-head .view-title {
    margin-bottom: 0;
}

.btn-section-fullscreen {
    background: rgba(0, 168, 255, 0.08);
    border: 1px solid rgba(0, 168, 255, 0.25);
    color: var(--color-neon-blue);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn-section-fullscreen:hover {
    background: rgba(0, 168, 255, 0.14);
    border-color: var(--color-neon-blue);
    color: var(--color-text-primary);
    box-shadow: var(--shadow-glow-blue);
}

.btn-section-fullscreen-icon {
    font-size: 1rem;
    line-height: 1;
}

.group-card {
    background: var(--gradient-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all var(--transition-normal);
    position: relative;
}

.group-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--group-color, var(--color-neon-blue));
    opacity: 0.8;
}

.group-card:hover {
    border-color: var(--color-border-glow);
    box-shadow: var(--shadow-card), var(--shadow-glow-blue);
    transform: translateY(-2px);
}

.group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.02);
}

.group-name {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--group-color, var(--color-neon-blue));
}

.group-matches-link {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
}

/* Group standings table */
.standings-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.standings-table th {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: var(--space-sm) 8px;
    text-align: center;
    border-bottom: 1px solid var(--color-border);
}

.standings-table th,
.standings-table td {
    min-width: 0;
}

.standings-table td {
    padding: 10px 8px;
    font-size: 0.82rem;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background var(--transition-fast);
}

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

.standings-table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

/* Column 1: Position */
.standings-table th:nth-child(1),
.standings-table td:nth-child(1) {
    width: 26px;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    padding-left: 2px;
    padding-right: 2px;
}

/* Column 2: Team */
.standings-table th:nth-child(2),
.standings-table td:nth-child(2) {
    width: auto;
    text-align: left;
    padding-left: 4px;
}

/* Column 3: Games (J) */
.standings-table th:nth-child(3),
.standings-table td:nth-child(3) {
    width: 36px;
    text-align: center;
}

/* Column 4: Goal Difference (SG) */
.standings-table th:nth-child(4),
.standings-table td:nth-child(4) {
    width: 44px;
    text-align: center;
}

/* Column 5: Points (Pts) */
.standings-table th:nth-child(5),
.standings-table td:nth-child(5) {
    width: 38px;
    text-align: center;
}

.group-team-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    width: 100%;
}

.team-flag-sm {
    width: 24px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.1);
}

.team-name-sm {
    display: block;
    flex: 1;
    min-width: 0;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: none;
}

.pts {
    font-weight: 700;
    color: var(--color-text-primary);
}

.qualified-row td { background: rgba(0, 255, 136, 0.04); }
.qualified-row td:first-child { border-left: 2px solid var(--color-win); }

.playoff-row td { background: rgba(255, 215, 0, 0.04); }
.playoff-row td:first-child { border-left: 2px solid var(--color-draw); }

/* Legend */
.group-legend {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-lg);
    border-top: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.01);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.65rem;
    color: var(--color-text-muted);
}

.legend-dot {
    width: 8px; height: 8px;
    border-radius: 2px;
}

.legend-dot.qualified { background: var(--color-win); }
.legend-dot.playoff { background: var(--color-draw); }

/* ============================================================
   BRACKET VIEW
   ============================================================ */

.bracket-container {
    overflow-x: auto;
    padding-bottom: var(--space-lg);
}

.bracket-wrapper {
    position: relative;
    min-width: 1600px;
}

.bracket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.bracket-stage-labels {
    display: grid;
    grid-template-columns: 220px 220px 180px 180px 160px;
    gap: var(--space-md);
    padding: 0 var(--space-md);
}

.stage-label {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    text-align: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--color-border);
}

.bracket-main {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
}

/* SVG connecting lines */
.bracket-svg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
}

.bracket-line {
    fill: none;
    stroke: var(--color-neon-blue);
    stroke-width: 1.5;
    opacity: 0.25;
    transition: all var(--transition-normal);
}

.bracket-line.active {
    opacity: 0.7;
    stroke: var(--color-neon-cyan);
    filter: drop-shadow(0 0 4px var(--color-neon-cyan));
}

/* Pathway columns */
.pathway {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
    position: relative;
    z-index: 1;
}

.pathway-label {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-neon-blue);
    text-align: center;
    margin-bottom: var(--space-md);
    opacity: 0.7;
}

.bracket-rounds {
    display: flex;
    align-items: center;
    gap: 0;
    width: 100%;
}

.bracket-round {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    gap: var(--space-md);
    flex: 0 0 220px;
    padding: 0 var(--space-sm);
}

.bracket-round.round-16 { flex: 0 0 200px; }
.bracket-round.round-qf { flex: 0 0 180px; }
.bracket-round.round-sf { flex: 0 0 170px; }
.bracket-round.round-final { flex: 0 0 200px; }

/* Match Card */
.match-card {
    background: var(--gradient-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    min-width: 0;
    width: 100%;
    box-shadow: var(--shadow-card);
}

.match-card:hover {
    border-color: var(--color-border-glow);
    box-shadow: var(--shadow-card), var(--shadow-glow-blue);
    transform: translateY(-1px);
    z-index: 10;
}

.match-card.live {
    border-color: rgba(255, 51, 102, 0.5);
    box-shadow: var(--shadow-card), 0 0 20px rgba(255, 51, 102, 0.2);
    animation: liveBorder 2s ease-in-out infinite;
}

@keyframes liveBorder {
    0%, 100% { border-color: rgba(255, 51, 102, 0.5); box-shadow: var(--shadow-card), 0 0 20px rgba(255, 51, 102, 0.2); }
    50% { border-color: rgba(255, 51, 102, 0.9); box-shadow: var(--shadow-card), 0 0 35px rgba(255, 51, 102, 0.4); }
}

.match-card.finished { opacity: 0.8; }

.match-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    padding: 4px 6px;
    border-bottom: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.02);
}

.match-id {
    font-size: 0.52rem;
    color: var(--color-text-muted);
    font-family: var(--font-mono);
    letter-spacing: 0.05em;
}

.match-status {
    font-size: 0.52rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 1px 4px;
    border-radius: 3px;
}

.match-status.live {
    background: rgba(255, 51, 102, 0.2);
    color: var(--color-live);
    animation: statusPulse 1.5s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.match-status.scheduled { color: var(--color-text-muted); background: transparent; }
.match-status.finished { color: var(--color-text-muted); background: rgba(255,255,255,0.05); }

.match-time {
    font-size: 0.52rem;
    color: var(--color-neon-blue);
    font-family: var(--font-mono);
}

/* Team rows inside match card */
.match-team {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 6px;
    transition: background var(--transition-fast);
    position: relative;
}

.match-team:first-of-type {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.match-team.winner {
    background: rgba(0, 255, 136, 0.05);
}

.match-team.loser { opacity: 0.55; }

.match-team-flag {
    width: 22px; height: 15px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.1);
}

.match-team-name {
    font-size: 0.7rem;
    font-weight: 600;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.match-team-name.tbd {
    color: var(--color-text-muted);
    font-weight: 400;
    font-style: italic;
}

.match-score {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--color-text-primary);
    min-width: 16px;
    text-align: center;
}

.match-score.live-score {
    color: var(--color-neon-cyan);
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.6);
}

.match-winner-indicator {
    width: 3px;
    height: 60%;
    position: absolute;
    right: 0;
    background: var(--color-win);
    border-radius: 2px 0 0 2px;
    top: 50%;
    transform: translateY(-50%);
}

/* Match footer (stadium, date) */
.match-footer {
    padding: 3px 6px;
    border-top: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.01);
    display: flex;
    align-items: center;
    gap: 4px;
}

.match-venue {
    font-size: 0.52rem;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

/* ============================================================
   LIVE MATCH PROBABILITIES
   ============================================================ */

.match-probs {
    padding: 6px;
    border-top: 1px solid var(--color-border);
    background: rgba(0, 0, 0, 0.2);
}

.probs-title {
    font-size: 0.58rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 6px;
}

.probs-bar-container {
    display: flex;
    gap: 2px;
    height: 4px;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}

.prob-segment {
    height: 100%;
    transition: width 0.8s ease;
}

.prob-segment.home { background: var(--color-neon-blue); }
.prob-segment.draw { background: var(--color-neon-gold); }
.prob-segment.away { background: var(--color-neon-red); }

.probs-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.prob-label {
    font-size: 0.65rem;
    font-weight: 600;
}

.prob-label.home { color: var(--color-neon-blue); }
.prob-label.draw { color: var(--color-neon-gold); }
.prob-label.away { color: var(--color-neon-red); }

.favorite-star {
    font-size: 0.65rem;
    margin-left: 2px;
}

/* ============================================================
   CENTER TROPHY
   ============================================================ */

.bracket-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 0 0 140px;
    padding: var(--space-md);
    position: relative;
}

.trophy-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.trophy-icon {
    font-size: 4rem;
    animation: trophyFloat 4s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.7));
    line-height: 1;
}

@keyframes trophyFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-8px) scale(1.05); }
}

.trophy-label {
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-neon-gold);
    text-align: center;
    opacity: 0.8;
}

/* FINAL card highlight */
.match-card.final-match {
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: var(--shadow-card), var(--shadow-glow-gold);
    min-width: 0;
}

.match-card.final-match .match-team-name { font-size: 0.75rem; }
.match-card.final-match .match-score { font-size: 0.95rem; }

/* ============================================================
   MATCHES LIST VIEW
   ============================================================ */

.matches-filters {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    font-family: var(--font-primary);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-btn:hover {
    border-color: var(--color-border-glow);
    color: var(--color-text-primary);
}

.filter-btn.active {
    background: rgba(0, 168, 255, 0.15);
    border-color: var(--color-neon-blue);
    color: var(--color-neon-blue);
}

.matches-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.matches-date-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.matches-date-header {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-neon-blue);
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.matches-date-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 340px));
    gap: 14px;
    justify-content: center;
}

.match-list-item {
    background: var(--gradient-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-areas:
        "home score away"
        "info info info";
    align-items: center;
    gap: 12px 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
    min-height: 142px;
}

.match-list-item::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--color-border);
    transition: all var(--transition-normal);
}

.match-list-item:hover::before { background: var(--color-neon-blue); }
.match-list-item.live::before { background: var(--color-live); }
.match-list-item.finished::before { background: var(--color-win); }

.match-list-item:hover {
    border-color: var(--color-border-glow);
    background: var(--color-surface-hover);
}

.match-list-item.live {
    border-color: rgba(255, 51, 102, 0.3);
    animation: liveBorder 3s ease-in-out infinite;
}

.match-list-team {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: var(--space-sm);
    min-width: 0;
}

.match-list-team:first-of-type {
    grid-area: home;
}

.match-list-team.away {
    grid-area: away;
    justify-content: flex-end;
    text-align: right;
}

.match-list-team-flag {
    width: 36px; height: 24px;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}

.match-list-team-name {
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.match-list-score-block {
    grid-area: score;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    justify-content: center;
    min-width: 88px;
    align-self: center;
}

.match-list-score {
    font-family: var(--font-mono);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.match-list-score.live { color: var(--color-neon-cyan); text-shadow: 0 0 10px rgba(0, 229, 255, 0.5); }

.match-list-minute {
    font-size: 0.65rem;
    color: var(--color-live);
    font-weight: 600;
    animation: statusPulse 1.5s ease-in-out infinite;
}

.match-list-info {
    grid-area: info;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    gap: 8px;
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-wrap: wrap;
}

.match-list-date {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    font-weight: 500;
}

.match-list-venue {
    font-size: 0.65rem;
    color: var(--color-text-muted);
    text-align: right;
    margin-left: auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.match-list-stage {
    font-size: 0.6rem;
    color: var(--color-neon-blue);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.matches-tv-shell,
.stats-tv-shell {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.tv-feature-shell,
.matches-tv-section,
.stats-tv-kpi-card,
.stats-spotlight-card {
    position: relative;
}

.tv-feature-shell {
    position: sticky;
    top: 76px;
    z-index: 8;
}

.tv-feature-card,
.matches-tv-section {
    background:
        linear-gradient(135deg, rgba(0, 168, 255, 0.08), rgba(255, 215, 0, 0.05)),
        rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(14px);
}

.tv-feature-card {
    display: grid;
    grid-template-columns: minmax(320px, 1.05fr) minmax(360px, 0.95fr);
    gap: var(--space-xl);
    padding: var(--space-xl);
}

.tv-feature-card-compact {
    grid-template-columns: minmax(540px, 840px);
    justify-content: center;
    padding: 20px;
}

.tv-feature-card.is-live {
    border-color: rgba(255, 51, 102, 0.28);
    box-shadow: var(--shadow-card), 0 0 34px rgba(255, 51, 102, 0.12);
}

.tv-feature-copy,
.tv-feature-board,
.stats-spotlight-layout {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.matches-tv-kicker.is-live {
    background: rgba(255, 51, 102, 0.16);
    color: var(--color-live);
}

.matches-tv-hero-title,
.matches-tv-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--color-text-primary);
    margin: 0;
}

.tv-feature-subtitle,
.tv-feature-note,
.tv-feature-tags,
.matches-tv-meta,
.matches-tv-empty-note,
.stats-tv-kpi-note,
.stats-source-note,
.stats-spotlight-summary span {
    color: var(--color-text-secondary);
    font-size: 0.82rem;
}

.tv-feature-note,
.stats-source-note {
    line-height: 1.6;
}

.tv-feature-tags,
.matches-tv-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tv-feature-tags span,
.matches-tv-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.tv-scoreboard {
    background: linear-gradient(180deg, rgba(5, 10, 18, 0.98), rgba(10, 18, 30, 0.92));
    border: 1px solid rgba(0, 168, 255, 0.16);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    max-width: 100%;
}

.tv-scoreboard.is-live {
    border-color: rgba(255, 51, 102, 0.26);
}

.tv-scoreboard-top {
    display: flex;
    justify-content: space-between;
    gap: var(--space-md);
    color: var(--color-neon-blue);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: var(--space-md);
}

.tv-scoreboard-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: var(--space-md);
    align-items: center;
}

.tv-team {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    min-width: 0;
}

.tv-team.away {
    justify-content: flex-end;
    text-align: right;
}

.tv-team img {
    width: 44px;
    height: 30px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.tv-team strong {
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tv-score-center {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-family: var(--font-display);
    color: var(--color-text-primary);
}

.tv-score-center span {
    font-size: 2.1rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.02em;
}

.tv-score-center small {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
}

.matches-tv-section {
    padding: var(--space-lg);
}

.matches-tv-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.matches-tv-body {
    display: grid;
    grid-template-columns: 124px minmax(0, 1fr);
    gap: var(--space-lg);
    align-items: start;
}

.matches-date-rail {
    position: sticky;
    top: 76px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    padding-right: 6px;
}

.matches-date-rail-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    color: var(--color-text-secondary);
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
}

.matches-date-rail-btn:hover {
    border-color: var(--color-border-glow);
    color: var(--color-text-primary);
    transform: translateX(2px);
}

.matches-date-rail-btn.active {
    background: rgba(0, 168, 255, 0.12);
    border-color: rgba(0, 168, 255, 0.4);
    color: var(--color-text-primary);
    box-shadow: var(--shadow-glow-blue);
}

.matches-date-rail-day {
    font-family: var(--font-mono);
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1;
}

.matches-date-rail-month,
.matches-date-rail-helper,
.matches-date-rail-count {
    font-size: 0.66rem;
}

.matches-date-rail-month {
    color: var(--color-neon-blue);
    font-weight: 700;
    letter-spacing: 0.12em;
}

.matches-date-rail-helper {
    color: var(--color-text-secondary);
    text-transform: uppercase;
}

.matches-date-rail-count {
    color: var(--color-text-muted);
}

.matches-day-stage {
    min-width: 0;
}

.matches-day-stage-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: var(--space-md);
    margin-bottom: 12px;
}

.matches-day-stage-note {
    margin-top: 6px;
    color: var(--color-text-secondary);
    font-size: 0.82rem;
}

.premium-empty-state {
    min-height: 180px;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.02);
}

.stats-tv-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-lg);
}

.stats-tv-kpi-card {
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(10, 18, 30, 0.95), rgba(7, 13, 22, 0.92));
    box-shadow: var(--shadow-card);
}

.stats-tv-kpi-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    border-radius: 999px;
    background: var(--color-neon-blue);
}

.stats-tv-kpi-card.accent-gold::before { background: var(--color-neon-gold); }
.stats-tv-kpi-card.accent-red::before { background: var(--color-live); }
.stats-tv-kpi-card.accent-green::before { background: var(--color-neon-green); }

.stats-tv-kpi-label {
    display: block;
    color: var(--color-text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.stats-tv-kpi-value {
    display: block;
    margin: 12px 0 6px;
    font-family: var(--font-mono);
    font-size: 2rem;
    line-height: 1;
    color: var(--color-text-primary);
}

.stats-tv-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.stats-spotlight-card {
    grid-column: span 2;
}

.stats-spotlight-summary {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stats-spotlight-summary strong {
    font-size: 1rem;
}

.tv-stat-board {
    display: grid;
    gap: 8px;
}

.tv-stat-row {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 72px;
    gap: var(--space-sm);
    align-items: center;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tv-stat-row strong:last-child {
    text-align: right;
}

/* ============================================================
   GOAL OVERLAY
   ============================================================ */

#fireworks-canvas {
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

#fireworks-canvas.active { opacity: 1; }

.goal-banner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    z-index: 9999;
    background: linear-gradient(135deg, rgba(5, 10, 18, 0.97), rgba(8, 15, 26, 0.97));
    border: 2px solid var(--color-neon-gold);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl) var(--space-3xl);
    text-align: center;
    box-shadow: 0 0 60px rgba(255, 215, 0, 0.6), 0 0 120px rgba(255, 215, 0, 0.2), var(--shadow-card);
    backdrop-filter: blur(20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    max-width: 90vw;
}

.goal-banner.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.goal-emoji {
    font-size: 3rem;
    display: block;
    margin-bottom: var(--space-sm);
    animation: goalEmoji 0.5s ease infinite alternate;
}

@keyframes goalEmoji {
    from { transform: scale(1) rotate(-5deg); }
    to { transform: scale(1.15) rotate(5deg); }
}

.goal-gool-text {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: 0.15em;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    margin-bottom: var(--space-sm);
    display: block;
    animation: goalText 0.3s ease infinite alternate;
}

@keyframes goalText {
    from { letter-spacing: 0.1em; }
    to { letter-spacing: 0.2em; }
}

.goal-player {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: var(--space-sm);
}

.goal-team-flag-lg {
    width: 64px; height: 43px;
    object-fit: cover;
    border-radius: 4px;
    border: 2px solid rgba(255, 215, 0, 0.5);
    margin: 0 auto var(--space-sm);
    display: block;
}

.goal-team-name {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--color-neon-gold);
}

/* ============================================================
   STATS VIEW
   ============================================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.stat-card {
    background: var(--gradient-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    backdrop-filter: blur(10px);
}

.stat-card-title {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border);
}

/* ============================================================
   LOADING STATE
   ============================================================ */

.loading-overlay {
    position: fixed;
    inset: 0;
    background: var(--color-bg);
    z-index: 9990;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    transition: opacity 0.5s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 60px; height: 60px;
    border: 3px solid rgba(0, 168, 255, 0.2);
    border-top-color: var(--color-neon-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-text {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
    animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ============================================================
   ERROR/EMPTY STATES
   ============================================================ */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-3xl);
    gap: var(--space-md);
    color: var(--color-text-muted);
    text-align: center;
}

.empty-state-icon { font-size: 3rem; opacity: 0.5; }
.empty-state-text { font-size: 0.9rem; }

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */

.toast-container {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    z-index: 9997;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    pointer-events: none;
}

.toast {
    background: rgba(8, 15, 26, 0.95);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    font-size: 0.82rem;
    backdrop-filter: blur(10px);
    animation: toastIn 0.3s ease, toastOut 0.3s ease 3s forwards;
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(10px); }
}

.toast.success { border-color: rgba(0, 255, 136, 0.3); }
.toast.error { border-color: rgba(255, 51, 102, 0.3); }
.toast.info { border-color: rgba(0, 168, 255, 0.3); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1200px) {
    .bracket-wrapper { min-width: 1200px; }
    .groups-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
    .tv-feature-card,
    .stats-tv-grid {
        grid-template-columns: 1fr;
    }
    .stats-tv-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .stats-spotlight-card {
        grid-column: auto;
    }
}

@media (max-width: 768px) {
    .header { padding: 0 var(--space-md); }
    .header-inner { gap: var(--space-md); }
    .logo-sub { display: none; }
    .header-summary { display: none; }
    .clock { display: none; }

    .view { padding: var(--space-md); }
    .groups-grid { grid-template-columns: 1fr; }
    .groups-panel-head {
        flex-direction: column;
        align-items: stretch;
    }
    .groups-panel-head .view-title {
        margin-bottom: var(--space-sm);
    }
    .btn-section-fullscreen {
        justify-content: center;
        width: 100%;
        min-height: 52px;
    }
    .live-stream-card {
        grid-template-columns: 1fr;
        padding: var(--space-md);
    }
    .live-stream-frame,
    .live-stream-frame iframe {
        min-height: 220px;
    }

    .tv-feature-card,
    .matches-tv-section-head,
    .matches-tv-body,
    .stats-tv-kpis {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .tv-feature-shell {
        position: relative;
        top: auto;
        z-index: auto;
    }

    .matches-date-rail {
        position: relative;
        top: auto;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        flex-direction: row;
        padding-right: 0;
        padding-bottom: 4px;
    }

    .matches-date-rail-btn {
        min-width: 110px;
        flex: 0 0 auto;
    }

    .tv-scoreboard-main {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .tv-team,
    .tv-team.away {
        justify-content: center;
        text-align: center;
    }

    .matches-date-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .match-list-item {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "home score"
            "away score"
            "info info";
        min-height: 0;
    }

    .match-list-info {
        display: flex;
    }

    .nav-btn span { display: none; }
}

@media (max-width: 480px) {
    .view-title { font-size: 1.3rem; }
    .goal-gool-text { font-size: 2.5rem; }
    .goal-banner { padding: var(--space-xl) var(--space-lg); }
    .group-header {
        padding: 12px 14px;
    }
    .group-name {
        font-size: 1rem;
    }
    .group-matches-link {
        font-size: 0.66rem;
    }
}

/* ============================================================
   FULLSCREEN MODE
   ============================================================ */

:fullscreen .header { position: fixed; }
:fullscreen .view { padding: var(--space-lg); }

.groups-panel.is-expanded {
    position: fixed;
    inset: 0;
    z-index: 9998;
}

.groups-panel:fullscreen,
.groups-panel.is-expanded {
    width: 100%;
    height: 100%;
    padding: var(--space-lg);
    background:
        linear-gradient(rgba(0, 168, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 168, 255, 0.03) 1px, transparent 1px),
        var(--color-bg);
    background-size: 60px 60px, 60px 60px, auto;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: var(--space-md);
}

.groups-panel:fullscreen .groups-panel-head,
.groups-panel.is-expanded .groups-panel-head {
    position: sticky;
    top: 0;
    z-index: 5;
    padding-bottom: var(--space-md);
    background: linear-gradient(to bottom, rgba(5, 10, 18, 0.96), rgba(5, 10, 18, 0.7), transparent);
    backdrop-filter: blur(10px);
}

.groups-panel:fullscreen .groups-grid,
.groups-panel.is-expanded .groups-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
    grid-auto-flow: row;
    gap: var(--space-md);
    min-height: 0;
    overflow: hidden;
}

.groups-panel:fullscreen .group-card,
.groups-panel.is-expanded .group-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.groups-panel:fullscreen .group-header,
.groups-panel.is-expanded .group-header {
    padding: 12px 16px;
}

.groups-panel:fullscreen .standings-table th,
.groups-panel.is-expanded .standings-table th {
    padding: 6px 4px;
    font-size: 0.56rem;
}

.groups-panel:fullscreen .standings-table td,
.groups-panel.is-expanded .standings-table td {
    padding: 7px 4px;
    font-size: 0.72rem;
}

/* Column 1: Position */
.groups-panel:fullscreen .standings-table th:nth-child(1),
.groups-panel:fullscreen .standings-table td:nth-child(1),
.groups-panel.is-expanded .standings-table th:nth-child(1),
.groups-panel.is-expanded .standings-table td:nth-child(1) {
    width: 18px;
    font-size: 0.68rem;
}

/* Column 2: Team */
.groups-panel:fullscreen .standings-table th:nth-child(2),
.groups-panel:fullscreen .standings-table td:nth-child(2),
.groups-panel.is-expanded .standings-table th:nth-child(2),
.groups-panel.is-expanded .standings-table td:nth-child(2) {
    width: auto;
}

/* Column 3: Games (J) */
.groups-panel:fullscreen .standings-table th:nth-child(3),
.groups-panel:fullscreen .standings-table td:nth-child(3),
.groups-panel.is-expanded .standings-table th:nth-child(3),
.groups-panel.is-expanded .standings-table td:nth-child(3) {
    width: 30px;
}

/* Column 4: Goal Difference (SG) */
.groups-panel:fullscreen .standings-table th:nth-child(4),
.groups-panel:fullscreen .standings-table td:nth-child(4),
.groups-panel.is-expanded .standings-table th:nth-child(4),
.groups-panel.is-expanded .standings-table td:nth-child(4) {
    width: 38px;
}

/* Column 5: Points (Pts) */
.groups-panel:fullscreen .standings-table th:nth-child(5),
.groups-panel:fullscreen .standings-table td:nth-child(5),
.groups-panel.is-expanded .standings-table th:nth-child(5),
.groups-panel.is-expanded .standings-table td:nth-child(5) {
    width: 32px;
}

.groups-panel:fullscreen .group-team-row,
.groups-panel.is-expanded .group-team-row {
    gap: 6px;
}

.groups-panel:fullscreen .team-name-sm,
.groups-panel.is-expanded .team-name-sm {
    max-width: none;
    font-size: 0.72rem;
}

.groups-panel:fullscreen .team-flag-sm,
.groups-panel.is-expanded .team-flag-sm {
    width: 20px;
    height: 14px;
}

.groups-panel:fullscreen .group-legend,
.groups-panel.is-expanded .group-legend {
    margin-top: auto;
    padding: 8px 16px;
}

@media (max-width: 1100px) {
    .groups-panel:fullscreen,
    .groups-panel.is-expanded {
        padding: var(--space-md);
    }

    .groups-panel:fullscreen .groups-grid,
    .groups-panel.is-expanded .groups-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-template-rows: auto;
        grid-auto-rows: minmax(0, 1fr);
        overflow-y: auto;
        padding-right: 4px;
    }
}

@media (max-width: 820px) {
    .groups-panel:fullscreen,
    .groups-panel.is-expanded {
        gap: var(--space-sm);
        padding: 12px;
    }

    .groups-panel:fullscreen .groups-panel-head,
    .groups-panel.is-expanded .groups-panel-head {
        padding-bottom: 10px;
    }

    .groups-panel:fullscreen .groups-grid,
    .groups-panel.is-expanded .groups-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: auto;
        grid-auto-rows: auto;
        gap: 12px;
        overflow-y: auto;
        align-content: start;
    }

    .groups-panel:fullscreen .group-card,
    .groups-panel.is-expanded .group-card {
        height: auto;
        min-height: 0;
    }

    .groups-panel:fullscreen .standings-table th,
    .groups-panel.is-expanded .standings-table th {
        font-size: 0.62rem;
    }

    .groups-panel:fullscreen .standings-table td,
    .groups-panel.is-expanded .standings-table td {
        font-size: 0.8rem;
    }

    .groups-panel:fullscreen .team-name-sm,
    .groups-panel.is-expanded .team-name-sm {
        font-size: 0.8rem;
    }
}

@media (max-width: 560px) {
    .groups-panel:fullscreen .groups-panel-head,
    .groups-panel.is-expanded .groups-panel-head {
        position: sticky;
        top: 0;
    }

    .groups-panel:fullscreen .groups-grid,
    .groups-panel.is-expanded .groups-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .groups-panel:fullscreen .btn-section-fullscreen,
    .groups-panel.is-expanded .btn-section-fullscreen {
        font-size: 0.78rem;
        padding: 12px 14px;
    }
}

body.groups-panel-expanded {
    overflow: hidden;
}

#view-bracket.is-expanded {
    position: fixed;
    inset: 0;
    z-index: 9998;
}

#view-bracket:fullscreen,
#view-bracket.is-expanded {
    width: 100%;
    height: 100%;
    padding: 12px;
    background:
        linear-gradient(rgba(0, 168, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 168, 255, 0.03) 1px, transparent 1px),
        radial-gradient(circle at 50% 50%, rgba(255, 215, 0, 0.08), transparent 34%),
        var(--color-bg);
    background-size: 60px 60px, 60px 60px, auto, auto;
    overflow: hidden;
}

#view-bracket:fullscreen .bracket-panel-actions,
#view-bracket.is-expanded .bracket-panel-actions {
    top: 12px;
    right: 12px;
}

#view-bracket:fullscreen .bracket-content,
#view-bracket.is-expanded .bracket-content {
    width: 100%;
    height: 100%;
    padding: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

#view-bracket:fullscreen .bracket-container,
#view-bracket.is-expanded .bracket-container {
    width: max-content;
    max-width: 100%;
}

#view-bracket:fullscreen .bracket-stage-row,
#view-bracket.is-expanded .bracket-stage-row {
    margin-bottom: clamp(10px, 1.4vh, 18px);
}

#view-bracket:fullscreen .bracket-labels-row,
#view-bracket.is-expanded .bracket-labels-row {
    padding-inline: clamp(8px, 1.4vw, 26px);
}

#view-bracket:fullscreen .bracket-outer,
#view-bracket.is-expanded .bracket-outer {
    min-height: clamp(560px, calc(100vh - 230px), 800px);
}

#view-bracket:fullscreen .bracket-pathway,
#view-bracket.is-expanded .bracket-pathway {
    padding: clamp(8px, 1vw, 18px);
}

#view-bracket:fullscreen .bracket-rounds-wrapper,
#view-bracket.is-expanded .bracket-rounds-wrapper {
    gap: clamp(10px, 1vw, 22px);
}

#view-bracket:fullscreen .bracket-col,
#view-bracket.is-expanded .bracket-col {
    gap: clamp(2px, 0.28vh, 4px);
    min-height: clamp(560px, calc(100vh - 230px), 800px);
}

#view-bracket:fullscreen .r32-col,
#view-bracket.is-expanded .r32-col {
    width: clamp(150px, 9.9vw, 196px);
}

#view-bracket:fullscreen .r16-col,
#view-bracket.is-expanded .r16-col {
    width: clamp(144px, 9.25vw, 182px);
}

#view-bracket:fullscreen .qf-col,
#view-bracket.is-expanded .qf-col {
    width: clamp(138px, 8.65vw, 170px);
}

#view-bracket:fullscreen .sf-col,
#view-bracket.is-expanded .sf-col {
    width: clamp(132px, 8vw, 158px);
}

#view-bracket:fullscreen .bracket-center-column,
#view-bracket.is-expanded .bracket-center-column {
    flex-basis: clamp(112px, 6.7vw, 136px);
}

#view-bracket:fullscreen .bracket-spacer-sm,
#view-bracket.is-expanded .bracket-spacer-sm {
    height: clamp(3px, 0.28vh, 5px);
}

#view-bracket:fullscreen .bracket-spacer-md,
#view-bracket.is-expanded .bracket-spacer-md {
    height: clamp(8px, 0.75vh, 12px);
}

#view-bracket:fullscreen .match-card,
#view-bracket.is-expanded .match-card {
    border-radius: var(--radius-md);
}

#view-bracket:fullscreen .match-meta,
#view-bracket.is-expanded .match-meta {
    padding: clamp(3px, 0.42vh, 5px) 7px;
}

#view-bracket:fullscreen .match-id,
#view-bracket:fullscreen .match-time,
#view-bracket.is-expanded .match-id,
#view-bracket.is-expanded .match-time {
    font-size: clamp(0.54rem, 0.58vw, 0.62rem);
}

#view-bracket:fullscreen .match-team,
#view-bracket.is-expanded .match-team {
    gap: 8px;
    min-height: clamp(23px, 2.1vh, 27px);
    padding: clamp(3px, 0.36vh, 4px) 7px;
}

#view-bracket:fullscreen .match-team-flag,
#view-bracket.is-expanded .match-team-flag {
    width: clamp(22px, 1.45vw, 28px);
    height: clamp(15px, 1vw, 19px);
}

#view-bracket:fullscreen .match-team-name,
#view-bracket.is-expanded .match-team-name {
    font-size: clamp(0.72rem, 0.72vw, 0.82rem);
}

#view-bracket:fullscreen .match-score,
#view-bracket.is-expanded .match-score {
    font-size: clamp(0.84rem, 0.8vw, 0.95rem);
}

#view-bracket:fullscreen .match-footer,
#view-bracket.is-expanded .match-footer {
    padding: 2px 7px;
}

#view-bracket:fullscreen .match-venue,
#view-bracket.is-expanded .match-venue {
    font-size: clamp(0.52rem, 0.58vw, 0.62rem);
}

#view-bracket:fullscreen .final-block,
#view-bracket.is-expanded .final-block {
    gap: clamp(12px, 1.5vh, 20px);
}

body.bracket-panel-expanded {
    overflow: hidden;
}

body.bracket-panel-expanded .header {
    display: none;
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */

.text-neon-blue { color: var(--color-neon-blue); }
.text-neon-gold { color: var(--color-neon-gold); }
.text-neon-green { color: var(--color-neon-green); }
.text-neon-red { color: var(--color-neon-red); }
.text-muted { color: var(--color-text-muted); }
.text-secondary { color: var(--color-text-secondary); }
.font-mono { font-family: var(--font-mono); }
.font-display { font-family: var(--font-display); }

.glow-blue { box-shadow: var(--shadow-glow-blue); }
.glow-gold { box-shadow: var(--shadow-glow-gold); }
.glow-green { box-shadow: var(--shadow-glow-green); }

.glass {
    background: var(--gradient-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--color-border);
}

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
