/* style.css - World Cup 2026 Live Bracket Hub Styling */

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

:root {
    --bg-gradient: radial-gradient(circle at 50% 0%, #0d2a1c 0%, #06110b 100%);
    --card-bg: rgba(13, 27, 20, 0.45);
    --card-border: rgba(16, 185, 129, 0.15);
    --card-border-hover: rgba(16, 185, 129, 0.35);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --glass-blur: blur(12px);
    
    --primary: #10b981; /* Emerald field green */
    --primary-light: #34d399;
    --primary-glow: rgba(16, 185, 129, 0.25);
    --gold: #fbbf24;
    --gold-glow: rgba(251, 191, 36, 0.3);
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dark: #64748b;
    
    --live-color: #ef4444; /* Neon red */
    --live-glow: rgba(239, 68, 68, 0.4);
    
    --font: 'Outfit', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Scrollbar */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font);
    scrollbar-width: thin;
    scrollbar-color: var(--primary) rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

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

/* Live Score Ticker */
.ticker-wrap {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 100;
    background: rgba(5, 17, 11, 0.85);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--card-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.ticker {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 0.6rem 1.5rem;
    white-space: nowrap;
}

.ticker-title {
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-light);
    border-right: 2px solid var(--card-border);
    padding-right: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ticker-match {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 0.4rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.ticker-match:hover {
    background: rgba(16, 185, 129, 0.08);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.ticker-match.live {
    border-color: var(--live-color);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.15);
}

.ticker-badge {
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.ticker-badge.live {
    background: var(--live-color);
    color: white;
    animation: pulse 1.5s infinite;
}

.ticker-badge.ft {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

.ticker-badge.upcoming {
    background: rgba(16, 185, 129, 0.15);
    color: var(--primary-light);
}

.ticker-match-score {
    font-weight: 700;
    color: var(--text-main);
}

/* Header & Hero Section */
header {
    max-width: 1400px;
    margin: 2rem auto 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.logo-icon {
    font-size: 2.2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 8px rgba(16, 185, 129, 0.3));
}

.logo-text h1 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, #ffffff, #d8f3dc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-text p {
    font-size: 0.75rem;
    color: var(--primary-light);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 600;
}

/* Nav tabs / Filters */
.nav-filters {
    display: flex;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.3rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.filter-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    color: var(--text-main);
}

.filter-btn.active {
    background: var(--primary);
    color: #06110b;
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* Main Layout Grid */
main {
    max-width: 1600px;
    margin: 1.5rem auto 4rem auto;
    padding: 0 1.5rem;
}

/* Tab Content Switcher */
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease-in-out;
}

/* --- TOURNAMENT BRACKET STYLING --- */
.bracket-wrapper {
    position: relative;
    overflow-x: auto;
    padding: 2rem 0;
    width: 100%;
}

.bracket-container {
    display: grid;
    grid-template-columns: 240px 240px 240px 240px 280px 240px 240px 240px 240px;
    gap: 1.5rem;
    align-items: center;
    width: max-content;
    margin: 0 auto;
}

.bracket-col {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    height: 960px; /* Base height to stretch bracket connections */
}

/* Center Col for Trophy & Finals */
.bracket-center-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    height: 960px;
}

.trophy-container {
    text-align: center;
    position: relative;
}

.trophy-glow {
    position: absolute;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    animation: pulseGlow 3s infinite alternate;
}

.trophy-img {
    font-size: 4rem;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 4px 15px rgba(251, 191, 36, 0.4));
    animation: bounceSlow 4s infinite ease-in-out;
}

.champion-display {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(16, 185, 129, 0.05) 100%);
    border: 1px solid var(--gold);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.15);
    border-radius: 16px;
    padding: 1rem 1.5rem;
    text-align: center;
    width: 220px;
    backdrop-filter: var(--glass-blur);
    transform: translateY(-20px);
}

.champion-display h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gold);
    margin-bottom: 0.3rem;
}

.champion-display .champion-team {
    font-size: 1.2rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Match Card styling in Bracket */
.match-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 0.6rem;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    width: 100%;
    cursor: pointer;
    position: relative;
}

.match-card:hover {
    border-color: var(--card-border-hover);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.15);
}

.match-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.65rem;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 0.4rem;
    margin-bottom: 0.4rem;
}

.match-card-meta .live-badge {
    color: var(--live-color);
    font-weight: 800;
    animation: pulse 1.5s infinite;
}

.match-card-teams {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.match-team {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    padding: 0.2rem;
    border-radius: 6px;
}

.match-team.winner {
    font-weight: 700;
    color: var(--text-main);
}

.match-team.loser {
    color: var(--text-muted);
    opacity: 0.6;
}

.team-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.team-flag {
    width: 22px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.team-flag-empty {
    width: 22px;
    height: 15px;
    background: rgba(255,255,255,0.05);
    border: 1px dashed rgba(255,255,255,0.2);
    border-radius: 2px;
}

.team-score {
    font-weight: 700;
    font-size: 0.9rem;
    padding-left: 0.5rem;
}

/* Match center List View */
.match-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.match-list-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.2rem;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    cursor: pointer;
}

.match-list-card:hover {
    border-color: var(--card-border-hover);
    transform: translateY(-2px);
}

.match-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.match-list-header .status-tag {
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
}

.match-list-header .status-tag.live {
    background: rgba(239, 68, 68, 0.15);
    color: var(--live-color);
    border: 1px solid var(--live-color);
}

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

.match-list-header .status-tag.upcoming {
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary-light);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.match-list-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.match-list-team {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
}

.match-list-team .team-flag {
    width: 48px;
    height: 32px;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

.match-list-team span {
    font-size: 0.95rem;
    font-weight: 600;
}

.match-list-score-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.match-list-score {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.match-list-minute {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--live-color);
}

.match-list-venue {
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(255,255,255,0.03);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

/* Stats panel / Standings Drawer */
.stats-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.stats-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
}

.stats-card h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-light);
}

.top-scorers-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.scorer-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.scorer-player {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.scorer-rank {
    font-weight: 800;
    color: var(--gold);
    width: 20px;
}

.scorer-goals {
    font-weight: 800;
    color: var(--primary-light);
}

/* Modal View */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-gradient);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    transform: translateY(30px);
    transition: var(--transition);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-main);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--live-color);
}

.modal-match-summary {
    padding: 1.5rem;
    text-align: center;
    background: rgba(0,0,0,0.15);
}

.modal-teams-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin: 1rem 0;
}

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

.modal-team img {
    width: 64px;
    height: 42px;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.modal-team h2 {
    font-size: 1.1rem;
    font-weight: 700;
}

.modal-score-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-score {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.modal-status-badge {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--live-color);
    background: rgba(239, 68, 68, 0.1);
    padding: 0.2rem 0.8rem;
    border-radius: 12px;
    border: 1px solid var(--live-color);
}

/* Modal Tabs */
.modal-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0,0,0,0.1);
}

.modal-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 1rem;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
}

.modal-tab-btn.active {
    color: var(--primary-light);
    border-bottom-color: var(--primary);
    background: rgba(255,255,255,0.01);
}

.modal-body {
    padding: 1.5rem;
}

.modal-pane {
    display: none;
}
.modal-pane.active {
    display: block;
}

/* Timeline/Events */
.timeline-list {
    position: relative;
    padding-left: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.timeline-list::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background: var(--card-border);
}

.timeline-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.timeline-marker {
    position: absolute;
    left: -2rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid #06110b;
    z-index: 2;
    top: 4px;
}

@media (min-width: 501px) {
    .timeline-list {
        padding-left: 0;
    }
    .timeline-list::before {
        left: 50%;
        transform: translateX(-50%);
    }
    .timeline-item {
        width: 50%;
        align-items: center;
        gap: 0.8rem;
    }
    .timeline-item.left {
        align-self: flex-start;
        justify-content: flex-end;
        padding-right: 1.5rem;
        flex-direction: row-reverse;
        text-align: right;
    }
    .timeline-item.right {
        align-self: flex-end;
        justify-content: flex-start;
        padding-left: 1.5rem;
        flex-direction: row;
        text-align: left;
    }
    .timeline-item.left .timeline-marker {
        right: -9px;
        left: auto;
        top: 50%;
        transform: translateY(-50%);
    }
    .timeline-item.right .timeline-marker {
        left: -9px;
        right: auto;
        top: 50%;
        transform: translateY(-50%);
    }
}

.timeline-marker.goal {
    background: var(--gold);
}
.timeline-marker.yellow {
    background: #eab308;
}
.timeline-marker.red {
    background: var(--live-color);
}

.timeline-time {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--primary-light);
    background: rgba(16, 185, 129, 0.1);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
}

.timeline-event-content {
    font-size: 0.9rem;
}

.timeline-event-title {
    font-weight: 600;
}

.timeline-event-detail {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Stats Progress Bars */
.stat-row {
    margin-bottom: 1rem;
}

.stat-label-wrap {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
}

.stat-value {
    font-weight: 700;
}

.stat-label {
    color: var(--text-muted);
    font-weight: 500;
}

.stat-bar-container {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    display: flex;
    overflow: hidden;
}

.stat-bar {
    height: 100%;
}

.stat-bar.team1 {
    background: var(--primary);
}

.stat-bar.team2 {
    background: #60a5fa; /* Slate blue */
}

/* Lineup tactical field */
.pitch-container {
    background: #1e3a1f;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    height: 480px;
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    width: 100%;
    max-width: 480px;
    box-shadow: inset 0 0 30px rgba(0,0,0,0.6);
}

.pitch-line {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.pitch-center-circle {
    top: 50%;
    left: 50%;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.pitch-half-line {
    top: 50%;
    left: 0;
    width: 100%;
    height: 0;
}

.pitch-penalty-area-top {
    top: 0;
    left: 50%;
    width: 220px;
    height: 80px;
    transform: translateX(-50%);
    border-top: none;
}

.pitch-penalty-area-bottom {
    bottom: 0;
    left: 50%;
    width: 220px;
    height: 80px;
    transform: translateX(-50%);
    border-bottom: none;
}

.player-node {
    position: absolute;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    color: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
    transform: translate(-50%, -50%);
    z-index: 10;
}

.player-node.t1 {
    background: var(--primary);
    border: 2px solid white;
}

.player-node.t2 {
    background: #60a5fa;
    border: 2px solid white;
}

.player-node-label {
    position: absolute;
    top: 34px;
    font-size: 0.65rem;
    white-space: nowrap;
    background: rgba(0,0,0,0.7);
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    color: var(--text-main);
    font-weight: 500;
}

.pitch-rosters-list {
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.roster-team h3 {
    font-size: 0.9rem;
    border-bottom: 2px solid var(--card-border);
    padding-bottom: 0.3rem;
    margin-bottom: 0.6rem;
}

.roster-player-item {
    font-size: 0.8rem;
    padding: 0.2rem 0;
    display: flex;
    justify-content: space-between;
}

.roster-player-item span.pos {
    color: var(--text-muted);
}

/* Predictions / Fan Poll Form */
.poll-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--card-border);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
}

.poll-question {
    font-weight: 600;
    margin-bottom: 1rem;
}

.poll-options {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.poll-btn {
    flex: 1;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-main);
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.poll-btn:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--primary);
}

.poll-btn.selected {
    background: var(--primary);
    color: #06110b;
    border-color: var(--primary);
}

.poll-results {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.poll-result-row {
    text-align: left;
}

.poll-result-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.poll-result-bar-bg {
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    overflow: hidden;
}

.poll-result-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 6px;
    transition: width 0.6s cubic-bezier(0.1, 0.8, 0.3, 1);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 0 var(--live-glow); }
    50% { transform: scale(1.05); opacity: 0.8; box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
    100% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

@keyframes pulseGlow {
    from { opacity: 0.5; }
    to { opacity: 0.9; }
}

@keyframes bounceSlow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Bracket connection line highlighting styles */
.highlight-win {
    border-color: var(--primary) !important;
    box-shadow: 0 0 15px var(--primary-glow) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    header {
        margin: 1rem auto;
        padding: 0 1rem;
        flex-direction: column;
        align-items: flex-start;
    }
    main {
        padding: 0 1rem;
    }
    .stats-section {
        grid-template-columns: 1fr;
    }
    .poll-options {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Groups Grid Layout */
.groups-grid-wrapper {
    margin-top: 2rem;
    animation: fadeIn 0.4s ease-out;
}

.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.group-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.2rem;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.group-card:hover {
    border-color: var(--card-border-hover);
    transform: translateY(-2px);
}

.group-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-light);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.group-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.group-table th {
    color: var(--text-muted);
    font-weight: 600;
    text-align: center;
    padding: 0.5rem 0.2rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.group-table th:nth-child(2) {
    text-align: left;
}

.group-table td {
    padding: 0.6rem 0.2rem;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.02);
}

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

.group-table td:nth-child(2) {
    text-align: left;
}

.group-table .team-name-col {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.group-table .team-name-col img {
    width: 18px;
    height: 12px;
    object-fit: cover;
    border-radius: 1px;
}

.group-table .rank-num {
    font-weight: 700;
    width: 18px;
    display: inline-block;
    text-align: center;
}

.group-table tr:nth-child(1) .rank-num,
.group-table tr:nth-child(2) .rank-num {
    color: var(--gold); /* Direct qualification colors */
}

.group-table tr:nth-child(3) .rank-num {
    color: var(--primary-light); /* Potential 3rd place colors */
}

.group-table tr:nth-child(4) .rank-num {
    color: var(--text-muted);
}

