/* ============================================
   FIFA WORLD CUP 2026 - STYLESHEET
   Organized by: Reset • Variables • Base • Layout • Components • Sections • Media Queries
   ============================================ */

/* === RESET & VARIABLES === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary: #7B1FA2;
    --primary-dark: #4A0072;
    --accent: #E91E63;
    --gold: #D4AF37;
    --bg: #0D0D1A;
    --bg-card: #1A1A2E;
    --bg-card-hover: #222240;
    --text: #EAEAEA;
    --text-muted: #9E9E9E;
    --border: #2A2A4A;
    --success: #4CAF50;
    --danger: #F44336;
    --warning: #FF9800;
    --radius: 12px;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* === LOADING & OVERLAYS === */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s;
}

.loading-overlay.hidden { opacity: 0; pointer-events: none; }

.loading-overlay .spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading { text-align: center; padding: 80px 24px; }

/* === HEADER & NAVIGATION === */
header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(123,31,162,0.4);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity 0.2s;
}

.logo:hover { opacity: 0.85; }

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

nav { display: flex; gap: 4px; align-items: center; }

nav button {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.75);
    padding: 8px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.25s;
    text-transform: uppercase;
}

nav button:hover { background: rgba(255,255,255,0.1); color: #fff; }
nav button.active { background: rgba(255,255,255,0.2); color: #fff; }

.hamburger {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

/* === HERO SECTION === */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1a0033 50%, var(--bg) 100%);
    padding: 60px 24px;
    text-align: center;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #fff, var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 32px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.hero-stat .number {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--gold);
    display: block;
}

.hero-stat .label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-stat .fraction {
    font-size: 1.5rem;
    color: var(--text-muted);
    font-weight: 700;
    margin-left: 4px;
}

.hero-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.hero-link:hover { color: #fff; text-decoration: underline; }

.hero-progress {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    margin-top: 12px;
    overflow: hidden;
}

.hero-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--gold));
    border-radius: 3px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
}

.hero-progress-fill.teams-progress {
    background: linear-gradient(90deg, var(--accent), var(--gold));
}

.matches-stat, .teams-stat { min-width: 160px; }

/* === COUNTDOWN === */
.countdown {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.countdown-item {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 24px;
    text-align: center;
    min-width: 80px;
}

.countdown-item .cd-num {
    font-size: 2rem;
    font-weight: 900;
    color: var(--gold);
    display: block;
}

.countdown-item .cd-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* === CONTAINER & SECTIONS === */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 24px;
}

.section { display: none; }
.section.active { display: block; animation: fadeIn 0.4s ease; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-subtitle {
    color: var(--text-muted);
    margin-bottom: 32px;
    font-size: 1rem;
}

/* === FILTERS & SEARCH === */
.filters {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
    flex-wrap: wrap;
    align-items: center;
}

.filters select, .filters input {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
}

.filters select:focus, .filters input:focus {
    outline: none;
    border-color: var(--accent);
}

.search-box { position: relative; }
.search-box input { padding-left: 40px !important; width: 250px; }
.search-box::before {
    content: '\1F50D';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
}

/* === BRACKET FILTER (PATH TRACER) === */
.bracket-filter-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 16px 20px;
    background: rgba(212, 175, 55, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    flex-wrap: wrap;
}

.bracket-filter-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bracket-filter-select {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    min-width: 200px;
}

.bracket-filter-select:focus {
    outline: none;
    border-color: var(--gold);
}

.bracket-clear-btn {
    background: rgba(244, 67, 54, 0.15);
    border: 1px solid rgba(244, 67, 54, 0.3);
    color: var(--danger);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.bracket-clear-btn:hover {
    background: rgba(244, 67, 54, 0.25);
    border-color: var(--danger);
}

.bracket-filter-help {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    padding: 10px 16px;
    background: rgba(212, 175, 55, 0.03);
    border-left: 3px solid rgba(212, 175, 55, 0.3);
    border-radius: 4px;
    line-height: 1.5;
}

/* === MATCH TABS === */
.match-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.match-tab {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 8px 20px;
    border-radius: 24px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}

.match-tab:hover { border-color: var(--primary); color: var(--text); }
.match-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* === MATCH CARDS === */
.matches-grid { display: grid; gap: 16px; }

.matchday-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gold);
    margin: 24px 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
}

.match-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    transition: all 0.25s;
    position: relative;
}

.match-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.match-card.finished { border-left: 3px solid var(--success); }
.match-card.live { border-left: 3px solid var(--danger); }
.match-card.upcoming { border-left: 3px solid var(--warning); }

.team-side { display: flex; align-items: center; gap: 12px; }
.team-side.away { flex-direction: row-reverse; text-align: right; }

.team-name { font-weight: 700; font-size: 1rem; }
.team-code { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; }

.match-center {
    text-align: center;
    min-width: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.match-score {
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: 4px;
}

.match-score.live { color: var(--danger); }
.match-time { font-size: 0.8rem; color: var(--text-muted); }
.match-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }

.match-stadium-link {
    color: #C58AF8;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
    transition: all 0.2s ease;
}

.match-stadium-link:hover {
    color: var(--gold);
    text-decoration-style: solid;
    text-shadow: 0 0 4px rgba(212, 175, 55, 0.3);
}

/* === FLAGS & PLACEHOLDERS === */
.team-flag {
    width: 40px;
    height: 28px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.team-flag-placeholder {
    position: relative;
    width: 40px;
    height: 28px;
    background: var(--border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-weight: 800;
    font-size: 0.9rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    flex-shrink: 0;
}

.team-flag-placeholder.team-flag-label {
    background: linear-gradient(135deg, rgba(212,175,55,0.15), rgba(123,31,162,0.25)) !important;
    border: 1px solid var(--gold);
    color: var(--gold) !important;
    font-size: 0.6rem !important;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1;
    text-align: center;
    padding: 4px 2px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 2px 8px rgba(212,175,55,0.2);
    width: 40px;
    height: 28px;
    box-sizing: border-box;
}

.team-side.home .team-flag-placeholder.team-flag-label { margin-left: 24px; }
.team-side.home .team-flag-placeholder.team-flag-label::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 50%;
    width: 24px;
    height: 2px;
    background: rgba(212, 175, 55, 0.4);
}
.team-side.home .team-flag-placeholder.team-flag-label::after {
    content: '';
    position: absolute;
    left: -28px;
    top: 50%;
    width: 8px;
    height: 8px;
    background: var(--gold);
    border-radius: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 6px rgba(212, 175, 55, 0.6);
}

.team-side.away .team-flag-placeholder.team-flag-label { margin-right: 24px; }
.team-side.away .team-flag-placeholder.team-flag-label::before {
    content: '';
    position: absolute;
    right: -24px;
    top: 50%;
    width: 24px;
    height: 2px;
    background: rgba(212, 175, 55, 0.4);
}
.team-side.away .team-flag-placeholder.team-flag-label::after {
    content: '';
    position: absolute;
    right: -28px;
    top: 50%;
    width: 8px;
    height: 8px;
    background: var(--gold);
    border-radius: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 6px rgba(212, 175, 55, 0.6);
}

/* === MATCH BADGES === */
.match-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-live { background: var(--danger); color: #fff; animation: pulse 1.5s infinite; }
.badge-finished { background: var(--success); color: #fff; }
.badge-upcoming { background: var(--warning); color: #000; }

/* === PENALTY & EXTRA TIME BADGES === */
.match-badge.badge-pen {
    background: linear-gradient(135deg, #D4AF37, #F4C542) !important;
    color: #000 !important;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.match-badge.badge-aet {
    background: linear-gradient(135deg, #2196F3, #42A5F5) !important;
    color: #fff !important;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.penalty-score-inline {
    font-size: 0.85em;
    font-weight: 600;
    color: var(--gold, #D4AF37);
    letter-spacing: 0.3px;
    margin-left: 4px;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.knockout-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, var(--gold), #F4C542);
    color: #000;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
    z-index: 10;
}

.knockout-advances {
    font-size: 0.7rem;
    color: var(--gold);
    font-weight: 700;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.team-label-badge {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    background: rgba(212,175,55,0.1);
    border: 1px solid rgba(212,175,55,0.3);
    border-radius: 12px;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* === MATCH NUMBER BADGES === */
.match-number-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--text-muted);
    background: rgba(13, 13, 26, 0.85);
    border: 1px solid rgba(212, 175, 55, 0.3);
    padding: 2px 8px;
    border-radius: 4px;
    z-index: 5;
    white-space: nowrap;
    letter-spacing: 0.5px;
    backdrop-filter: blur(2px);
}

.match-center-num {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--gold);
    background: rgba(212,175,55,0.15);
    border: 1px solid rgba(212,175,55,0.3);
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-block;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.match-num-inline {
    display: inline-block;
    background: rgba(212,175,55,0.15);
    color: var(--gold);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    letter-spacing: 0.5px;
    vertical-align: middle;
}

.next-match-num {
    display: inline-block;
    background: rgba(212,175,55,0.2);
    color: var(--gold);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 8px;
    letter-spacing: 0.5px;
}

/* === CLICKABLE BADGES === */
.clickable-badge {
    cursor: pointer;
    transition: all 0.2s ease;
}

.clickable-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.knockout-badge.clickable-badge:hover {
    background: linear-gradient(135deg, #F4C542, var(--gold));
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.5);
}

.match-center-num.clickable-badge:hover {
    background: rgba(212,175,55,0.25);
    border-color: rgba(212,175,55,0.5);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

/* === MATCH SCORERS === */
.match-scorers {
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: left;
    max-width: 100%;
    width: 100%;
}

.team-side.away .match-scorers { text-align: right; margin-left: auto; }

.scorer-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.team-side.away .scorer-row { flex-direction: row-reverse; }

.scorer-icon { font-size: 0.7rem; opacity: 0.8; flex-shrink: 0; }
.scorer-name { font-weight: 600; color: var(--text); min-width: 0; flex-shrink: 1; }
.scorer-mins {
    color: var(--gold);
    font-weight: 700;
    font-size: 0.7rem;
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-left: auto;
}

.team-side.away .scorer-mins { margin-left: 0; margin-right: auto; }

.scorer-min {
    display: inline-block;
    background: rgba(212,175,55,0.12);
    color: var(--gold);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 6px;
    letter-spacing: 0.3px;
}

.scorer-min .pen-marker {
    color: var(--danger);
    font-size: 0.6rem;
    margin-left: 1px;
    font-weight: 800;
}

.og-label {
    color: var(--danger);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* === GROUPS === */
.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.group-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.group-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    padding: 14px 20px;
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.group-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 480px;
}

.group-table th:first-child, .group-table td:first-child {
    width: 32px;
    min-width: 32px;
    text-align: center;
}

.group-table th {
    padding: 10px 8px;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.group-table th:nth-child(2) { text-align: left; }

.group-table td {
    padding: 10px 8px;
    text-align: center;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(42,42,74,0.5);
}

.group-table td:nth-child(2) { text-align: left; }
.group-table tr:last-child td { border-bottom: none; }
.group-table tr.qualified td:first-child { box-shadow: inset 3px 0 0 var(--success); }

.group-team-cell { display: flex; align-items: center; gap: 8px; }
.group-team-cell img { width: 24px; height: 16px; object-fit: cover; border-radius: 2px; }
.group-team-name { cursor: pointer; transition: color 0.2s; }
.group-team-name:hover { color: var(--gold); text-decoration: underline; }
.pts-cell { font-weight: 800; color: var(--gold); }

.group-table .team-flag-placeholder {
    width: 24px;
    height: 16px;
    font-size: 0.6rem;
    border-radius: 2px;
    box-shadow: none;
}

/* === TEAMS === */
.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.team-card-new {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    border-top: 3px solid var(--border);
}

.team-card-new:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(123, 31, 162, 0.2);
}

.team-card-new.stage-final { border-top-color: #D4AF37; }
.team-card-new.stage-sf { border-top-color: #CD7F32; }
.team-card-new.stage-qf { border-top-color: #9C27B0; }
.team-card-new.stage-r16 { border-top-color: #2196F3; }
.team-card-new.stage-r32 { border-top-color: #009688; }
.team-card-new.stage-group { border-top-color: #757575; }
.team-card-new.stage-third { border-top-color: #FF9800; }

.team-card-new.eliminated { opacity: 0.65; filter: grayscale(50%); }
.team-card-new.eliminated:hover { opacity: 0.85; filter: grayscale(30%); }

.team-card-new-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.team-card-new-header .team-card-flag {
    width: 56px;
    height: 38px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.team-card-new-info { flex: 1; min-width: 0; }

.team-card-new-name {
    font-weight: 800;
    font-size: 1rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.team-card-new-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.team-card-new-code {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 1px;
}

.team-card-group-small {
    font-size: 0.65rem;
    color: var(--primary);
    background: rgba(123,31,162,0.15);
    border: 1px solid rgba(123,31,162,0.3);
    padding: 1px 6px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.team-card-group-small:hover {
    background: rgba(123,31,162,0.3);
    color: var(--gold);
}

.team-stage-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    width: fit-content;
}

.team-stage-badge.stage-final {
    background: linear-gradient(135deg, rgba(212,175,55,0.25), rgba(212,175,55,0.1));
    color: #D4AF37;
    border: 1px solid rgba(212,175,55,0.4);
    box-shadow: 0 2px 8px rgba(212,175,55,0.15);
}

.team-stage-badge.stage-sf {
    background: linear-gradient(135deg, rgba(205,127,50,0.2), rgba(205,127,50,0.08));
    color: #CD7F32;
    border: 1px solid rgba(205,127,50,0.35);
}

.team-stage-badge.stage-qf {
    background: linear-gradient(135deg, rgba(156,39,176,0.2), rgba(156,39,176,0.08));
    color: #CE93D8;
    border: 1px solid rgba(156,39,176,0.35);
}

.team-stage-badge.stage-r16 {
    background: linear-gradient(135deg, rgba(33,150,243,0.2), rgba(33,150,243,0.08));
    color: #64B5F6;
    border: 1px solid rgba(33,150,243,0.35);
}

.team-stage-badge.stage-r32 {
    background: linear-gradient(135deg, rgba(0,150,136,0.2), rgba(0,150,136,0.08));
    color: #4DB6AC;
    border: 1px solid rgba(0,150,136,0.35);
}

.team-stage-badge.stage-group {
    background: rgba(117,117,117,0.15);
    color: #9E9E9E;
    border: 1px solid rgba(117,117,117,0.3);
}

.team-stage-badge.stage-third {
    background: linear-gradient(135deg, rgba(255,152,0,0.2), rgba(255,152,0,0.08));
    color: #FFB74D;
    border: 1px solid rgba(255,152,0,0.35);
}

.team-stats-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    padding: 10px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
}

.team-stat { text-align: center; padding: 4px 2px; }

.team-stat-value {
    display: block;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
    margin-bottom: 2px;
}

.team-stat-label {
    display: block;
    font-size: 0.55rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.team-stat.positive .team-stat-value { color: var(--success); }
.team-stat.negative .team-stat-value { color: var(--danger); }

.team-next-match {
    background: rgba(123,31,162,0.1);
    border: 1px solid rgba(123,31,162,0.25);
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.team-next-match:hover {
    background: rgba(123,31,162,0.2);
    border-color: var(--primary);
}

.team-next-label {
    font-size: 0.6rem;
    font-weight: 800;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.team-next-opponent { font-size: 0.85rem; color: var(--text); margin-bottom: 2px; }
.team-next-opponent strong { color: var(--gold); }
.team-next-datetime { font-size: 0.7rem; color: var(--text-muted); }

.team-elimination-info {
    background: rgba(244,67,54,0.08);
    border: 1px solid rgba(244,67,54,0.2);
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 10px;
}

.team-elim-label {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--danger);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.team-elim-detail { font-size: 0.75rem; color: var(--text-muted); }

.team-awaiting {
    text-align: center;
    padding: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 10px;
}

.team-view-matches-btn {
    display: block;
    text-align: center;
    padding: 8px 12px;
    background: var(--primary);
    color: white;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.team-view-matches-btn:hover { background: var(--gold); color: #000; }

/* === GOAL SCORERS === */
.goalscores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.goalscore-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.goalscore-card:hover {
    transform: translateY(-2px);
    border-color: rgba(212,175,55,0.3);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.goalscore-card.eliminated { opacity: 0.6; }
.goalscore-card.eliminated::after {
    content: 'ELIMINATED';
    position: absolute;
    top: 8px;
    right: -28px;
    background: var(--danger);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 30px;
    transform: rotate(45deg);
    letter-spacing: 0.5px;
}

.goalscore-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }

.goalscore-rank {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--text-muted);
    min-width: 32px;
}

.goalscore-card:nth-child(1) .goalscore-rank { color: var(--gold); }
.goalscore-card:nth-child(2) .goalscore-rank { color: #C0C0C0; }
.goalscore-card:nth-child(3) .goalscore-rank { color: #CD7F32; }

.goalscore-flag {
    width: 48px;
    height: 32px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.goalscore-flag-placeholder {
    width: 48px;
    height: 32px;
    border-radius: 4px;
    background: rgba(255,255,255,0.08);
    border: 1px dashed rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.goalscore-info { flex: 1; min-width: 0; }
.goalscore-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.goalscore-team {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.goalscore-goals {
    text-align: center;
    padding: 12px 0;
    border-top: 1px solid var(--border);
    margin-top: 8px;
}

.goalscore-goals-number {
    font-size: 2rem;
    font-weight: 900;
    color: var(--gold);
    line-height: 1;
}

.goalscore-goals-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

.goalscore-minutes {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px 0;
    border-top: 1px solid var(--border);
    margin-top: 8px;
}

.goal-minute {
    display: inline-block;
    background: rgba(212,175,55,0.15);
    color: var(--gold);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 10px;
    letter-spacing: 0.3px;
}

.goal-minute.penalty {
    background: rgba(244,67,54,0.15);
    color: var(--danger);
    border: 1px solid rgba(244,67,54,0.3);
}

.goal-minute .min-pen {
    font-size: 0.6rem;
    opacity: 0.8;
    margin-left: 2px;
}

.hat-trick-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(212,175,55,0.25), rgba(212,175,55,0.1));
    color: var(--gold);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: 12px;
    border: 1px solid rgba(212,175,55,0.4);
    margin-top: 8px;
    box-shadow: 0 2px 8px rgba(212,175,55,0.15);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* === GOLDEN BOOT CAROUSEL === */
.gb-banner {
    background: linear-gradient(135deg, rgba(212,175,55,0.10) 0%, rgba(255,193,7,0.04) 50%, rgba(212,175,55,0.08) 100%);
    border: 1px solid rgba(212,175,55,0.20);
    border-left: 4px solid var(--gold);
    border-radius: 12px;
    padding: 20px 20px 16px;
    margin: 32px auto 24px;
    max-width: 1400px;
    position: relative;
    overflow: hidden;
}

.gb-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(212,175,55,0.06) 0%, transparent 70%);
    pointer-events: none;
}

.gb-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.gb-header-icon { font-size: 1.3rem; }
.gb-header-title {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1.8px;
}
.gb-header-subtitle {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-left: auto;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.gb-scroll-wrapper { position: relative; z-index: 1; }

.gb-scroll {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 12px;
    padding: 4px 2px 10px;
    scrollbar-width: none;
}

.gb-scroll::-webkit-scrollbar { display: none; }

.gb-fade-right {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 50px;
    background: linear-gradient(to right, transparent, rgba(13,13,26,0.85));
    pointer-events: none;
    border-radius: 0 12px 12px 0;
    transition: opacity 0.3s;
}

.gb-fade-right.gb-fade-hidden { opacity: 0; }

.gb-card {
    scroll-snap-align: start;
    flex: 0 0 108px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(212,175,55,0.12);
    border-radius: 10px;
    padding: 14px 8px 12px;
    text-align: center;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    cursor: pointer;
}

.gb-card:hover {
    transform: translateY(-3px);
    border-color: rgba(212,175,55,0.35);
    box-shadow: 0 6px 20px rgba(212,175,55,0.08);
}

.gb-card.gb-rank-1 {
    border-color: rgba(212,175,55,0.45);
    background: linear-gradient(170deg, rgba(212,175,55,0.18) 0%, rgba(212,175,55,0.04) 100%);
    box-shadow: 0 2px 12px rgba(212,175,55,0.10);
}

.gb-card.gb-rank-1:hover { box-shadow: 0 6px 24px rgba(212,175,55,0.18); }
.gb-card.gb-rank-2 {
    border-color: rgba(192,192,192,0.30);
    background: linear-gradient(170deg, rgba(192,192,192,0.10) 0%, rgba(192,192,192,0.02) 100%);
}
.gb-card.gb-rank-3 {
    border-color: rgba(205,127,50,0.30);
    background: linear-gradient(170deg, rgba(205,127,50,0.10) 0%, rgba(205,127,50,0.02) 100%);
}

.gb-rank {
font-size: 0.72rem;
font-weight: 700;
color: var(--gold);
margin-bottom: 6px;
line-height: 1;
height: 24px;
display: flex;
align-items: center;
justify-content: center;
}

.gb-rank-2 .gb-rank { color: #C0C0C0; }
.gb-rank-3 .gb-rank { color: #CD7F32; }

.gb-flag {
    width: 34px;
    height: 23px;
    object-fit: cover;
    border-radius: 3px;
    margin-bottom: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.gb-flag-placeholder {
    width: 34px;
    height: 23px;
    border-radius: 3px;
    background: rgba(255,255,255,0.08);
    border: 1px dashed rgba(255,255,255,0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.gb-name {
    font-size: 0.73rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.gb-team {
    font-size: 0.62rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.gb-goals {
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--gold);
    letter-spacing: 0.5px;
}

.gb-rank-2 .gb-goals { color: #D0D0D0; }
.gb-rank-3 .gb-goals { color: #D4944A; }

.gb-empty {
    text-align: center;
    padding: 28px 16px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
    width: 100%;
}

.gb-empty-icon {
    font-size: 1.8rem;
    display: block;
    margin-bottom: 8px;
    opacity: 0.5;
}

.gb-loading {
    text-align: center;
    padding: 28px 16px;
    color: var(--text-muted);
    font-size: 0.85rem;
    width: 100%;
}

.gb-indicator {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 8px;
    margin-top: 6px;
    letter-spacing: 0.3px;
}

.gb-indicator.hat-trick {
    background: rgba(212,175,55,0.2);
    color: var(--gold);
    border: 1px solid rgba(212,175,55,0.3);
}

.gb-indicator.penalty {
    background: rgba(244,67,54,0.15);
    color: var(--danger);
    border: 1px solid rgba(244,67,54,0.25);
}

/* === STADIUMS === */
.stadiums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.stadium-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s;
}

.stadium-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
}

.stadium-banner {
    height: 8px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.stadium-body { padding: 24px; }
.stadium-name { font-size: 1.15rem; font-weight: 800; margin-bottom: 4px; }
.stadium-fifa-name { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 16px; }

.stadium-info { display: flex; flex-direction: column; gap: 10px; }

.stadium-info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.stadium-info-row .icon {
    width: 32px;
    height: 32px;
    background: rgba(123,31,162,0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stadium-info-row .info-label { color: var(--text-muted); font-size: 0.75rem; }
.stadium-info-row .info-value { font-weight: 600; }

.stadium-capacity {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.capacity-bar {
    flex: 1;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    margin: 0 16px;
    overflow: hidden;
}

.capacity-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 3px;
}

.capacity-number { font-weight: 800; font-size: 1.1rem; color: var(--gold); }

.region-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.region-eastern {
    background: rgba(76,175,80,0.15);
    color: #4CAF50;
    border: 1px solid rgba(76,175,80,0.3);
}

.region-central {
    background: rgba(255,152,0,0.15);
    color: #FF9800;
    border: 1px solid rgba(255,152,0,0.3);
}

.region-western {
    background: rgba(33,150,243,0.15);
    color: #2196F3;
    border: 1px solid rgba(33,150,243,0.3);
}

/* === BRACKET === */
.bracket-scroll-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 30px;
    margin: 0 -20px;
    padding-left: 20px;
    padding-right: 20px;
}

.bracket-container {
    display: flex;
    gap: 60px;
    min-width: max-content;
    align-items: stretch;
    padding: 40px 20px;
    position: relative;
}

.bracket-round {
    display: flex;
    flex-direction: column;
    min-width: 280px;
    max-width: 280px;
    position: relative;
}

.bracket-round-title {
    text-align: center;
    color: var(--gold);
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 30px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(212, 175, 55, 0.4);
}

.bracket-round-matches {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.bracket-pair {
    display: grid;
    grid-template-rows: 1fr 1fr;
    flex: 1;
    position: relative;
}

.bracket-match-wrapper {
    display: flex;
    align-items: center;
    position: relative;
}

.bracket-pair::after {
    content: '';
    position: absolute;
    right: -30px;
    top: 25%;
    bottom: 25%;
    width: 2px;
    background: var(--gold);
    opacity: 0.4;
}

.bracket-match-wrapper::after {
    content: '';
    position: absolute;
    right: -30px;
    top: 50%;
    width: 30px;
    height: 2px;
    background: var(--gold);
    opacity: 0.4;
}

.bracket-match-wrapper.connector-left::before {
    content: '';
    position: absolute;
    left: -30px;
    top: 50%;
    width: 30px;
    height: 2px;
    background: var(--gold);
    opacity: 0.4;
}

.bracket-round:last-child .bracket-pair::after,
.bracket-round:last-child .bracket-match-wrapper::after { display: none; }

.bracket-round:last-child .bracket-round-matches { justify-content: center; }

.bracket-match {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.bracket-match:hover {
    border-color: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.25);
}

/* Path highlight for bracket matches */
.bracket-match.path-highlight {
    border: 2px solid var(--gold) !important;
    background: rgba(212, 175, 55, 0.08) !important;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3), 0 0 40px rgba(212, 175, 55, 0.15);
    animation: pathGlow 2s ease-in-out infinite;
}

@keyframes pathGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.3), 0 0 40px rgba(212, 175, 55, 0.15);
    }
    50% {
        box-shadow: 0 0 25px rgba(212, 175, 55, 0.5), 0 0 50px rgba(212, 175, 55, 0.25);
    }
}

.bracket-match-date {
    text-align: center;
    font-size: 0.65rem;
    color: var(--text-muted);
    padding: 6px 8px 4px;
    font-weight: 600;
    letter-spacing: 0.3px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 2px;
}

.bracket-match-date .live-dot-sm {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--danger);
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
    animation: blink 1.2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Wrapper for teams + badge so badge centers between teams only */
.bracket-teams-wrapper {
    position: relative;
}

.bracket-team {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.bracket-team:last-child { border-bottom: none; }

.bracket-team-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.bracket-team .team-flag,
.bracket-team .team-flag-label {
    width: 28px;
    height: 20px;
    border-radius: 3px;
    flex-shrink: 0;
    object-fit: cover;
}

.bracket-team .team-flag-label {
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    color: var(--gold);
    font-weight: 700;
}

.bracket-team .team-name {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
}

.bracket-team .team-score {
    font-weight: 800;
    font-size: 1.1rem;
    min-width: 24px;
    text-align: right;
    color: var(--gold);
    white-space: nowrap;
}

.bracket-team.winner { background: rgba(212, 175, 55, 0.08); }
.bracket-team.winner .team-name { color: var(--gold); font-weight: 700; }
.bracket-team.tbd .team-name { color: var(--text-muted); font-style: italic; font-size: 0.85rem; }

.bracket-loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    width: 100%;
}

/* === LIVE MATCH CARD === */
.live-match-card {
    background: var(--bg-card);
    border: 2px solid var(--danger);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin: 0 auto 20px;
    max-width: 700px;
    box-shadow: 0 4px 20px rgba(244, 67, 54, 0.15), 0 0 15px rgba(244, 67, 54, 0.1);
    animation: livePulse 3s infinite;
}

@keyframes livePulse {
    0% { box-shadow: 0 4px 20px rgba(244, 67, 54, 0.15), 0 0 15px rgba(244, 67, 54, 0.1); }
    50% { box-shadow: 0 4px 25px rgba(244, 67, 54, 0.35), 0 0 20px rgba(244, 67, 54, 0.2); }
    100% { box-shadow: 0 4px 20px rgba(244, 67, 54, 0.15), 0 0 15px rgba(244, 67, 54, 0.1); }
}

.live-match-label {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--danger);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 16px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.live-dot {
    width: 10px;
    height: 10px;
    background: var(--danger);
    border-radius: 50%;
    display: inline-block;
    animation: blink 1s infinite;
}

.live-match-content { display: flex; flex-direction: column; gap: 16px; }

.live-match-teams {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.live-match-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.live-match-team img {
    width: 56px;
    height: 38px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.live-match-team .team-flag-placeholder { width: 56px; height: 38px; }
.live-match-team .team-flag-placeholder.team-flag-label { width: 56px; height: 38px; font-size: 0.65rem !important; }

.live-match-team-name {
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.live-match-score {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--danger);
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(244, 67, 54, 0.3);
    padding: 0 10px;
}

.live-match-info {
    text-align: center;
    padding: 10px;
    background: rgba(244, 67, 54, 0.08);
    border-radius: 8px;
    border: 1px solid rgba(244, 67, 54, 0.2);
    transition: all 0.2s ease;
}

.live-match-info:hover { background: rgba(244, 67, 54, 0.15); border-color: var(--danger); }
.live-match-time { font-weight: 700; color: var(--danger); font-size: 1rem; margin-bottom: 4px; }
.live-match-stadium { font-size: 0.85rem; color: var(--text-muted); }

.live-match-scorers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 12px 16px;
    background: rgba(244, 67, 54, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(244, 67, 54, 0.15);
    margin: 0 4px;
}

.live-scorers-side {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.live-scorers-side.away {
    align-items: flex-end;
    text-align: right;
}

.live-scorers-side .scorer-row { font-size: 0.8rem; max-width: 100%; }
.live-scorers-side .scorer-name { font-size: 0.8rem; }
.live-scorers-side .scorer-min { font-size: 0.7rem; }

.live-scorers-empty {
    text-align: center;
    padding: 8px;
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.85rem;
    grid-column: 1 / -1;
}

.home-live-scorers {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed rgba(244, 67, 54, 0.25);
}

.home-live-scorers .scorer-row {
    font-size: 0.75rem;
    margin-bottom: 3px;
    gap: 6px;
}

.home-live-scorers .scorer-team-prefix {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-live-scorers .scorer-name { font-size: 0.75rem; }
.home-live-scorers .scorer-min { font-size: 0.65rem; }

/* === NEXT MATCH CARD === */
.next-match-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin: 0 auto 0;
    max-width: 700px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.next-match-label {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 16px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.knockout-phase-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--gold), #F4C542);
    color: #000;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 12px;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.next-match-content { display: flex; flex-direction: column; gap: 16px; }

.next-match-teams {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
}

.next-match-team { display: flex; align-items: center; gap: 12px; }

.next-match-team img {
    width: 48px;
    height: 32px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.next-match-team .team-flag-placeholder { width: 48px; height: 32px; }
.next-match-team .team-flag-placeholder.team-flag-label { width: 48px; height: 32px; font-size: 0.65rem !important; }

.next-match-team-name { font-weight: 700; font-size: 1.1rem; }

.next-match-vs {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-muted);
    background: var(--bg);
    padding: 6px 12px;
    border-radius: 20px;
}

.next-match-info {
    text-align: center;
    padding: 12px;
    background: rgba(123, 31, 162, 0.1);
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.next-match-info:hover { background: rgba(123, 31, 162, 0.2); border-color: var(--primary); }
.next-match-datetime { font-weight: 700; color: var(--gold); font-size: 1rem; margin-bottom: 4px; }
.next-match-stadium { font-size: 0.85rem; color: var(--text-muted); }

/* === HIGHLIGHT ANIMATIONS === */
.group-card-highlight { animation: highlightPulse 2s ease-out; }
@keyframes highlightPulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7); transform: scale(1.02); }
    50% { box-shadow: 0 0 15px 5px rgba(255, 215, 0, 0.4); }
    100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); transform: scale(1); }
}

.match-card-highlight { animation: matchHighlightPulse 2s ease-out; }
@keyframes matchHighlightPulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7); transform: scale(1.01); }
    50% { box-shadow: 0 0 15px 5px rgba(255, 215, 0, 0.4); }
    100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); transform: scale(1); }
}

.stadium-card-highlight { animation: stadiumPulseHighlight 2s ease-out; }
@keyframes stadiumPulseHighlight {
    0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7); transform: scale(1.02); }
    50% { box-shadow: 0 0 15px 5px rgba(212, 175, 55, 0.4); }
    100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); transform: scale(1); }
}

.team-card-highlight { animation: teamPulseHighlight 2s ease-out; }
@keyframes teamPulseHighlight {
    0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7); transform: scale(1.02); }
    50% { box-shadow: 0 0 15px 5px rgba(212, 175, 55, 0.4); }
    100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); transform: scale(1); }
}

.goalscore-highlight {
    animation: goalscorePulse 2s ease-out;
    border-color: var(--gold) !important;
    box-shadow: 0 0 20px rgba(212,175,55,0.4) !important;
}

@keyframes goalscorePulse {
    0% { transform: scale(1); box-shadow: 0 0 0 rgba(212,175,55,0.4); }
    50% { transform: scale(1.02); box-shadow: 0 0 30px rgba(212,175,55,0.6); }
    100% { transform: scale(1); box-shadow: 0 0 0 rgba(212,175,55,0); }
}

.bracket-match-highlight {
    animation: bracketMatchPulse 2.5s ease-out;
    z-index: 10;
}

@keyframes bracketMatchPulse {
    0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.8); transform: scale(1); }
    25% { box-shadow: 0 0 20px 8px rgba(212, 175, 55, 0.6); transform: scale(1.03); }
    50% { box-shadow: 0 0 25px 10px rgba(212, 175, 55, 0.4); transform: scale(1.02); }
    100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); transform: scale(1); }
}

.bracket-round-highlight { animation: bracketRoundPulse 2.5s ease-out; }

@keyframes bracketRoundPulse {
    0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.6); }
    25% { box-shadow: 0 0 20px 5px rgba(212, 175, 55, 0.4); }
    50% { box-shadow: 0 0 25px 8px rgba(212, 175, 55, 0.3); }
    100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

.bracket-round-highlight .bracket-round-title { animation: titleGlow 2.5s ease-out; }

@keyframes titleGlow {
    0%, 100% { text-shadow: none; }
    25%, 75% { text-shadow: 0 0 10px rgba(212, 175, 55, 0.8); }
}

/* === UTILITY CLASSES === */
.clickable-card { cursor: pointer; transition: all 0.3s ease; }
.clickable-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(123, 31, 162, 0.2); }
.clickable-card:active { transform: translateY(-2px); }

.error-message {
    background: rgba(244,67,54,0.1);
    border: 1px solid var(--danger);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    color: var(--danger);
    margin: 20px 0;
}

.error-message h3 { margin-bottom: 12px; font-size: 1.2rem; }
.error-message p { margin-bottom: 8px; font-size: 0.9rem; color: var(--text-muted); }

.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--border) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
    pointer-events: none;
}

.skeleton-match { height: 120px; margin-bottom: 16px; }
.skeleton-team { height: 180px; margin-bottom: 20px; }
.skeleton-stadium { height: 280px; margin-bottom: 20px; }
.skeleton-group { height: 320px; margin-bottom: 20px; }

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.debug-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8rem;
    z-index: 9998;
}

.debug-panel {
    position: fixed;
    bottom: 60px;
    right: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    width: 90%;
    max-width: 400px;
    max-height: 400px;
    overflow-y: auto;
    font-size: 0.75rem;
    z-index: 9999;
    display: none;
    font-family: monospace;
}

.debug-panel.show { display: block; }

/* === CHAMPION BANNER (Hero - post-tournament) === */
.champion-banner {
background: linear-gradient(135deg, rgba(212,175,55,0.18) 0%, rgba(123,31,162,0.22) 50%, rgba(212,175,55,0.15) 100%);
border: 2px solid var(--gold);
border-radius: 16px;
padding: 28px 24px;
text-align: center;
max-width: 700px;
margin: 0 auto;
box-shadow: 0 8px 32px rgba(212,175,55,0.25), 0 0 0 1px rgba(212,175,55,0.1) inset;
position: relative;
overflow: hidden;
animation: championGlow 3s ease-in-out infinite;
}
@keyframes championGlow {
0%, 100% { box-shadow: 0 8px 32px rgba(212,175,55,0.25), 0 0 0 1px rgba(212,175,55,0.1) inset; }
50% { box-shadow: 0 12px 40px rgba(212,175,55,0.4), 0 0 0 1px rgba(212,175,55,0.2) inset; }
}
.champion-banner::before {
content: '';
position: absolute;
top: -50%;
left: -20%;
width: 140%;
height: 200%;
background: radial-gradient(circle, rgba(212,175,55,0.08) 0%, transparent 60%);
pointer-events: none;
}
.champion-trophy {
font-size: 3rem;
line-height: 1;
margin-bottom: 8px;
filter: drop-shadow(0 4px 12px rgba(212,175,55,0.5));
animation: trophyBounce 2.5s ease-in-out infinite;
position: relative;
z-index: 1;
}
@keyframes trophyBounce {
0%, 100% { transform: translateY(0) rotate(-2deg); }
50% { transform: translateY(-6px) rotate(2deg); }
}
.champion-label {
font-size: 0.75rem;
font-weight: 800;
color: var(--gold);
letter-spacing: 3px;
text-transform: uppercase;
margin-bottom: 12px;
position: relative;
z-index: 1;
}
.champion-flag-wrap {
display: flex;
justify-content: center;
margin-bottom: 12px;
position: relative;
z-index: 1;
}
.champion-flag {
width: 96px;
height: 64px;
object-fit: cover;
border-radius: 6px;
box-shadow: 0 4px 16px rgba(0,0,0,0.4), 0 0 0 2px var(--gold);
}
.champion-name {
font-size: 2.2rem;
font-weight: 900;
background: linear-gradient(135deg, #fff 0%, var(--gold) 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
letter-spacing: 4px;
margin-bottom: 10px;
position: relative;
z-index: 1;
}
.champion-final-line {
font-size: 1rem;
color: var(--text);
margin-bottom: 6px;
position: relative;
z-index: 1;
}
.champion-final-line strong {
color: var(--text);
font-weight: 700;
}
.champion-goalscorer {
font-size: 0.9rem;
color: var(--gold);
font-weight: 600;
margin-bottom: 14px;
position: relative;
z-index: 1;
}
.champion-cta {
display: inline-block;
padding: 8px 20px;
background: rgba(212,175,55,0.15);
border: 1px solid var(--gold);
color: var(--gold);
border-radius: 20px;
font-size: 0.8rem;
font-weight: 700;
letter-spacing: 0.5px;
cursor: pointer;
transition: all 0.2s;
position: relative;
z-index: 1;
}
.champion-cta:hover {
background: var(--gold);
color: #000;
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(212,175,55,0.4);
}

/* === HOME CHAMPION CARD (Home page left column) === */
.home-champion-card {
background: linear-gradient(135deg, rgba(212,175,55,0.15), rgba(123,31,162,0.18));
border: 1px solid var(--gold);
border-radius: 12px;
padding: 20px 16px;
text-align: center;
transition: all 0.3s;
position: relative;
overflow: hidden;
}
.home-champion-card:hover {
transform: translateY(-3px);
box-shadow: 0 8px 24px rgba(212,175,55,0.3);
border-color: var(--gold);
}
.home-champ-trophy {
font-size: 2.2rem;
line-height: 1;
margin-bottom: 4px;
filter: drop-shadow(0 2px 8px rgba(212,175,55,0.4));
}
.home-champ-label {
font-size: 0.7rem;
font-weight: 800;
color: var(--gold);
letter-spacing: 2.5px;
text-transform: uppercase;
margin-bottom: 10px;
}
.home-champ-flag-wrap {
display: flex;
justify-content: center;
margin-bottom: 10px;
}
.home-champ-name {
font-size: 1.4rem;
font-weight: 900;
color: var(--text);
letter-spacing: 2px;
margin-bottom: 8px;
}
.home-champ-final {
font-size: 0.85rem;
color: var(--text-muted);
margin-bottom: 6px;
line-height: 1.5;
}
.home-champ-final strong {
color: var(--text);
}
.home-champ-scorer {
font-size: 0.8rem;
color: var(--gold);
font-weight: 600;
margin-bottom: 12px;
}
.home-champ-cta {
display: inline-block;
padding: 6px 16px;
background: rgba(212,175,55,0.15);
border: 1px solid rgba(212,175,55,0.4);
color: var(--gold);
border-radius: 16px;
font-size: 0.75rem;
font-weight: 700;
letter-spacing: 0.5px;
transition: all 0.2s;
}
.home-champion-card:hover .home-champ-cta {
background: var(--gold);
color: #000;
}

/* Mobile tweaks for champion banner */
@media (max-width: 600px) {
.champion-banner { padding: 22px 16px; }
.champion-trophy { font-size: 2.4rem; }
.champion-name { font-size: 1.6rem; letter-spacing: 2px; }
.champion-final-line { font-size: 0.9rem; }
.champion-flag { width: 72px; height: 48px; }
.home-champ-name { font-size: 1.2rem; }
}

/* === FOOTER === */
footer {
    text-align: center;
    padding: 40px 24px;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
    margin-top: 60px;
}

footer a { color: var(--primary); text-decoration: none; }

/* ============================================
   TEAM JOURNEY TRACKER MODAL
   ============================================ */

.journey-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 10001;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.journey-modal.active { display: flex; }

.journey-modal-content {
    background: var(--bg-card);
    width: 100%;
    max-width: 650px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 16px;
    position: relative;
    padding: 24px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    animation: modalFadeIn 0.3s ease;
}

.journey-modal-content::-webkit-scrollbar { width: 8px; }
.journey-modal-content::-webkit-scrollbar-track { background: var(--bg); border-radius: 4px; }
.journey-modal-content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.journey-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: var(--text);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}
.journey-close:hover { background: var(--danger); color: #fff; transform: rotate(90deg); }

.journey-header {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.journey-team-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}

.journey-team-info .team-card-flag {
    width: 64px;
    height: 44px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.journey-team-name {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text);
}

.journey-team-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.journey-stats-summary {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 16px;
}

.journey-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.journey-stat .val {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--gold);
}

.journey-stat .lbl {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.journey-status-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.journey-status-badge.active {
    background: rgba(76, 175, 80, 0.15);
    color: var(--success);
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.journey-status-badge.eliminated {
    background: rgba(244, 67, 54, 0.15);
    color: var(--danger);
    border: 1px solid rgba(244, 67, 54, 0.3);
}

/* Timeline */
.journey-timeline {
    position: relative;
    padding-left: 30px;
}

.journey-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--border));
}

.journey-stage-header {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 24px 0 12px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.journey-stage-header::before {
    content: '';
    position: absolute;
    left: -26px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: var(--gold);
    border-radius: 50%;
    border: 3px solid var(--bg-card);
    box-shadow: 0 0 0 2px var(--gold);
}

.journey-match-node {
    position: relative;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.journey-match-node:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--primary);
    transform: translateX(4px);
}

/* The dot on the timeline */
.journey-match-node::before {
    content: '';
    position: absolute;
    left: -26px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
    border: 2px solid var(--bg-card);
}

.journey-match-node.win::before { background: var(--success); box-shadow: 0 0 8px rgba(76, 175, 80, 0.5); }
.journey-match-node.loss::before { background: var(--danger); box-shadow: 0 0 8px rgba(244, 67, 54, 0.5); }
.journey-match-node.draw::before { background: var(--warning); box-shadow: 0 0 8px rgba(255, 152, 0, 0.5); }
.journey-match-node.live::before { background: var(--danger); animation: blink 1s infinite; }
.journey-match-node.upcoming::before { background: var(--text-muted); border-style: dashed; }

.journey-match-node.win { border-left: 3px solid var(--success); }
.journey-match-node.loss { border-left: 3px solid var(--danger); }
.journey-match-node.draw { border-left: 3px solid var(--warning); }
.journey-match-node.live { border-left: 3px solid var(--danger); }
.journey-match-node.upcoming { border-left: 3px dashed var(--text-muted); opacity: 0.8; }

.journey-node-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.journey-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.journey-match-num {
    font-size: 0.65rem;
    color: var(--gold);
    background: rgba(212, 175, 55, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    width: fit-content;
}

.journey-node-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.journey-node-center .team-card-flag, 
.journey-node-center .team-flag-placeholder {
    width: 40px;
    height: 28px;
    border-radius: 4px;
}

.journey-opp-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.journey-stadium {
    font-size: 0.65rem;
    color: var(--text-muted);
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.journey-node-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.journey-score {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--text);
    letter-spacing: 1px;
}

.journey-score .pen-score {
    font-size: 0.8rem;
    color: var(--gold);
    font-weight: 700;
}

.journey-result-badge {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.journey-result-badge.win { background: rgba(76, 175, 80, 0.2); color: var(--success); }
.journey-result-badge.loss { background: rgba(244, 67, 54, 0.2); color: var(--danger); }
.journey-result-badge.draw { background: rgba(255, 152, 0, 0.2); color: var(--warning); }
.journey-result-badge.live { background: var(--danger); color: #fff; animation: pulse 1.5s infinite; }
.journey-result-badge.upcoming { background: rgba(255, 255, 255, 0.1); color: var(--text-muted); }

/* ============================================
   MEDIA QUERIES (Consolidated)
   ============================================ */

/* === ARCHIVE MODE CLEANUP === */
/* Remove eliminated visual cues since tournament is complete */
.team-card-new.eliminated { 
    opacity: 1 !important; 
    filter: none !important; 
}
.team-card-new.eliminated:hover { 
    opacity: 1 !important; 
    filter: none !important; 
}
.goalscore-card.eliminated { 
    opacity: 1 !important; 
}
.goalscore-card.eliminated::after { 
    display: none !important; 
}   
   
/* === MOBILE: 600px and below === */
@media (max-width: 600px) {
    .group-table, .group-table th, .group-table td {
        font-size: 12px !important;
        padding: 8px 4px;
        white-space: nowrap;
    }
    
    .group-table th:first-child, .group-table td:first-child {
        width: 32px;
        min-width: 32px;
        max-width: 32px;
        padding-left: 6px;
        padding-right: 2px;
    }
    
    .group-table thead th:first-child, .group-table tbody td:first-child {
        position: sticky;
        left: 0;
        background: var(--bg-card);
        z-index: 2;
    }
    
    .group-table thead th:nth-child(2), .group-table tbody td:nth-child(2) {
        position: sticky;
        left: 32px;
        background: var(--bg-card);
        z-index: 2;
        box-shadow: 2px 0 5px rgba(0,0,0,0.3);
    }
    
    .hero-stat .number { font-size: 2rem; }
    .hero-stat .fraction { font-size: 1.2rem; }
    
    .live-match-teams { flex-direction: row; gap: 10px; }
    .live-match-score { font-size: 2rem; }
    .live-match-team-name { font-size: 0.9rem; max-width: 90px; }
    
    .live-match-scorers {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 10px 12px;
    }
    
    .live-scorers-side.away {
        align-items: flex-start;
        text-align: left;
    }
    
    .home-live-scorers .scorer-team-prefix {
        max-width: 60px;
        font-size: 0.6rem;
    }
    
    .next-match-teams { flex-direction: column; gap: 12px; }
    .next-match-vs { transform: rotate(90deg); margin: 8px 0; }
    .next-match-team { flex-direction: column; text-align: center; }
    
    .team-label-badge { font-size: 0.55rem; padding: 2px 6px; }
    .team-flag-placeholder.team-flag-label { font-size: 0.55rem !important; }
    .knockout-badge { position: static; display: inline-block; margin-bottom: 8px; }
    .knockout-advances { font-size: 0.65rem; margin-top: 2px; }
    
    .teams-grid { grid-template-columns: 1fr; }
    
    .team-stats-grid {
        grid-template-columns: repeat(7, 1fr);
        gap: 2px;
    }
    
    .team-stat-value { font-size: 0.85rem; }
    .team-stat-label { font-size: 0.5rem; }
    
    .bracket-filter-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .bracket-filter-label {
        text-align: center;
    }
    
    .bracket-filter-select {
        min-width: 100%;
    }
    
    .bracket-filter-help {
        font-size: 0.75rem;
        padding: 8px 12px;
    }
    
    .journey-modal-content { padding: 16px; }
    .journey-team-name { font-size: 1.2rem; }
    .journey-stats-summary { gap: 12px; }
    .journey-stat .val { font-size: 1.1rem; }
    
    .journey-match-node {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 8px;
    }
    
    .journey-node-left, .journey-node-center, .journey-node-right {
        align-items: center;
    }
    
    .journey-opp-name { max-width: 100%; }
    .journey-stadium { max-width: 100%; }
}

/* === TABLET: 768px and below === */
@media (max-width: 768px) {
    .hamburger { display: block; }
    
    nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--primary-dark);
        flex-direction: column;
        padding: 16px;
        gap: 4px;
    }
    
    nav.open { display: flex; }
    
    .match-card {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 12px;
    }
    
    .team-side, .team-side.away {
        flex-direction: column;
        text-align: center;
    }
    
    .groups-grid, .teams-grid, .stadiums-grid, .goalscores-grid {
        grid-template-columns: 1fr;
    }
    
    .match-scorers {
        text-align: center;
        margin: 6px auto 0;
        align-items: center;
        max-width: 100%;
    }
    
    .team-side.away .match-scorers {
        text-align: center;
        margin-left: 0;
    }
    
    .team-side.away .scorer-row {
        flex-direction: row;
        justify-content: center;
    }
    
    .scorer-row {
        white-space: normal;
        flex-wrap: wrap;
        text-align: center;
    }
    
    .scorer-name { word-break: break-word; }
    
    .team-side.home .team-flag-placeholder.team-flag-label,
    .team-side.away .team-flag-placeholder.team-flag-label {
        margin-left: 0;
        margin-right: 0;
    }
    
    .team-side.home .team-flag-placeholder.team-flag-label::before,
    .team-side.home .team-flag-placeholder.team-flag-label::after,
    .team-side.away .team-flag-placeholder.team-flag-label::before,
    .team-side.away .team-flag-placeholder.team-flag-label::after {
        display: none;
    }
    
    .goalscore-minutes { justify-content: center; }
    
    .scorer-mins {
        margin-left: 0;
        justify-content: center;
        margin-top: 4px;
    }
    
    .team-side.away .scorer-mins { margin-right: 0; }
    
    .bracket-match-date {
        font-size: 0.6rem;
        padding: 5px 6px 3px;
    }
}

/* === DESKTOP: 768px and above === */
@media (min-width: 768px) {
    .gb-card { flex: 0 0 120px; padding: 16px 10px 14px; }
    .gb-name { font-size: 0.76rem; }
    .gb-goals { font-size: 1.1rem; }
    .gb-flag { width: 38px; height: 25px; }
    .gb-flag-placeholder { width: 38px; height: 25px; }
}

/* === LARGE DESKTOP: 1024px and above === */
@media (min-width: 1024px) {
    .gb-scroll {
        overflow-x: visible;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .gb-card { flex: 0 0 130px; padding: 16px 12px 14px; }
    .gb-fade-right { display: none !important; }
    .gb-banner { padding: 24px 28px 20px; }
    
    .bracket-round { margin-bottom: 0; }
    .bracket-round-title { cursor: default; }
    .bracket-round-title::after { display: none; }
}

/* === EXTRA LARGE: 1400px and above === */
@media (min-width: 1400px) {
    .gb-card { flex: 0 0 140px; }
}

/* === BRACKET MOBILE: 1024px and below === */
@media (max-width: 1024px) {
    .bracket-scroll-wrapper {
        overflow-x: visible;
        margin: 0;
        padding: 0;
    }
    
    .bracket-container {
        display: block;
        gap: 0;
        padding: 20px 0;
    }
    
    .bracket-round {
        min-width: 100%;
        max-width: 100%;
        margin-bottom: 20px;
        border: 1px solid var(--border);
        border-radius: 12px;
        overflow: hidden;
        background: var(--bg-card);
    }
    
    .bracket-round-title {
        margin: 0;
        padding: 16px 20px;
        background: linear-gradient(135deg, rgba(212,175,55,0.1), rgba(123,31,162,0.2));
        border-bottom: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-size: 1rem;
        letter-spacing: 1px;
    }
    
    .bracket-round-title::after {
        content: '\25BC';
        font-size: 0.8rem;
        transition: transform 0.3s;
    }
    
    .bracket-round.collapsed .bracket-round-title::after { transform: rotate(-90deg); }
    
    .bracket-pair {
        display: flex;
        flex-direction: column;
        gap: 12px;
        flex: none;
    }
    
    .bracket-round-matches { padding: 16px; gap: 12px; }
    .bracket-round.collapsed .bracket-round-matches { display: none; }
    
    .bracket-pair::after,
    .bracket-match-wrapper::after,
    .bracket-match-wrapper::before {
        display: none !important;
    }
    
    .bracket-match { border-radius: 6px; }
    
    .bracket-match {
        position: relative;
        padding-top: 8px;
    }
    
    .match-number-badge {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 10;
    }
    
    .bracket-match-highlight {
        animation: bracketMatchPulseMobile 2.5s ease-out;
    }
    
    @keyframes bracketMatchPulseMobile {
        0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.8); transform: scale(1); }
        25% { box-shadow: 0 0 15px 5px rgba(212, 175, 55, 0.6); transform: scale(1.02); }
        100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); transform: scale(1); }
    }
}

/* Fix for bracket filter container overflow on large fonts */
.bracket-filter-container {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    max-width: 100%;
    overflow: hidden;
}

.bracket-filter-select {
    flex: 1;
    min-width: 0; /* Critical: allows flex item to shrink below content size */
    max-width: 100%;
    padding: 10px 14px;
    font-size: inherit; /* Respects user's font size preference */
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23D4AF37' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

/* Ensure options also respect width */
.bracket-filter-select option {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Clear button should not shrink */
.bracket-clear-btn {
    flex-shrink: 0;
    white-space: nowrap;
}

/* Mobile-specific adjustments for large fonts */
@media (max-width: 768px) {
    .bracket-filter-container {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .bracket-filter-label {
        font-size: 0.9rem;
    }
    
    .bracket-filter-select {
        width: 100%;
        min-width: 0;
    }
}