/* ==========================================================================
   VM 2026 LIVE - PREMIUM CSS SYSTEM (NORWEGIAN)
   ========================================================================== */

/* --- Design Tokens & CSS Variables --- */
:root {
    /* Color Palette */
    --bg-dark: #0a0e17;
    --bg-card: rgba(20, 27, 45, 0.7);
    --bg-card-solid: #141b2d;
    --bg-sidebar: #0f1524;
    
    --primary-gold: #d4af37;
    --primary-gold-g1: #d4af37;
    --primary-gold-g2: #f3e5ab;
    --gold-glow: rgba(212, 175, 55, 0.4);
    
    --accent-red: #e53935;
    --accent-blue: #1e88e5;
    --accent-green: #00e676;
    --accent-yellow: #ffd600;
    
    --text-primary: #ffffff;
    --text-secondary: #90a4ae;
    --text-muted: #546e7a;
    
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-gold: rgba(212, 175, 55, 0.3);
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    
    /* Shadows & Effects */
    --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 15px 40px rgba(0, 0, 0, 0.6);
    --shadow-gold: 0 0 20px rgba(212, 175, 55, 0.25);
    --glass-blur: blur(12px);
    
    /* Layout & Spacing */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 30px;
    
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

/* --- Base Reset & Setup --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
}

button {
    font-family: var(--font-body);
    cursor: pointer;
    border: none;
    outline: none;
    background: none;
    color: inherit;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

a {
    color: inherit;
    text-decoration: none;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-gold);
}

/* --- App Shell Layout --- */
.app-shell {
    display: flex;
    min-height: 100vh;
}

/* Sidebar (Desktop) */
.sidebar {
    width: 280px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    padding: 24px;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.brand-text h1 {
    font-size: 20px;
    font-weight: 800;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--primary-gold-g1), var(--primary-gold-g2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.brand-text .subtext {
    font-size: 11px;
    letter-spacing: 0.25em;
    font-weight: 800;
    color: var(--accent-red);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 600;
    text-align: left;
    font-size: 15px;
}

.nav-btn i {
    width: 20px;
    height: 20px;
    transition: transform 0.25s ease;
}

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

.nav-btn:hover i {
    transform: translateX(3px);
}

.nav-btn.active {
    color: var(--bg-dark);
    background: linear-gradient(135deg, var(--primary-gold-g1), var(--primary-gold-g2));
    box-shadow: var(--shadow-gold);
}

.nav-btn.active i {
    color: var(--bg-dark);
}

.sidebar-footer {
    padding-top: 16px;
    border-top: 1px solid var(--border-glass);
}

.domain-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-muted);
}

/* Main Container */
.main-container {
    flex-grow: 1;
    margin-left: 280px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-dark);
}

/* Header */
.app-header {
    height: 70px;
    padding: 0 40px;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background-color: rgba(10, 14, 23, 0.85);
    backdrop-filter: var(--glass-blur);
    z-index: 90;
}

.header-left h2 {
    font-size: 18px;
    font-weight: 700;
}

/* Simulation Controls */
.sim-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    padding: 6px 12px;
    border-radius: var(--radius-xl);
}

.sim-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-red);
    box-shadow: 0 0 0 0 rgba(229, 57, 53, 0.7);
    animation: pulse 1.5s infinite;
}

.pulse-dot.paused {
    background-color: var(--text-muted);
    animation: none;
    box-shadow: none;
}

.sim-controls .btn-group {
    display: flex;
    align-items: center;
    gap: 6px;
    border-left: 1px solid var(--border-glass);
    padding-left: 12px;
}

.sim-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.sim-btn:hover {
    background-color: var(--primary-gold);
    color: var(--bg-dark);
}

.speed-btn {
    width: auto;
    border-radius: var(--radius-xl);
    padding: 0 10px;
    font-size: 12px;
    font-weight: 700;
}

.reset-btn:hover {
    background-color: var(--accent-red);
    color: white;
}

/* Viewport */
.app-viewport {
    flex-grow: 1;
    padding: 40px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

/* --- Mobile Components --- */
.mobile-only {
    display: none !important;
}

.mobile-navbar {
    display: none;
}

.more-menu-overlay {
    display: none;
}

/* --- Shared Premium UI Elements --- */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.glass-card.hover-scale:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-title {
    font-size: 24px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--primary-gold);
}

.gold-text {
    background: linear-gradient(135deg, var(--primary-gold-g1), var(--primary-gold-g2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- PAGE: HJEM (HOME) --- */
.home-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.home-left {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.home-right {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Hero Banner */
.hero-banner {
    position: relative;
    padding: 40px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #0d162c 0%, #172c54 100%);
    border: 1px solid var(--border-gold);
    box-shadow: var(--shadow-gold);
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
    filter: blur(20px);
    pointer-events: none;
}

.hero-content {
    max-width: 60%;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid var(--border-gold);
    padding: 6px 14px;
    border-radius: var(--radius-xl);
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-gold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.hero-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.2;
}

.hero-desc {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 24px;
}

.countdown-container {
    display: flex;
    gap: 12px;
}

.countdown-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    min-width: 60px;
}

.countdown-num {
    font-size: 20px;
    font-weight: 800;
    color: white;
}

.countdown-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.hero-visual {
    z-index: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 140px;
    height: 140px;
}

.trophy-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 25px rgba(212, 175, 55, 0.5));
    animation: float 4s ease-in-out infinite;
}

/* Match Carousel & List */
.match-carousel-wrapper {
    position: relative;
}

.match-carousel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 4px 4px 12px 4px;
    scroll-snap-type: x mandatory;
}

.match-carousel::-webkit-scrollbar {
    display: none;
}

.match-card-mini {
    flex: 0 0 280px;
    scroll-snap-align: start;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.match-card-header {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
}

.match-status-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--accent-red);
    font-weight: 700;
}

.match-status-badge.live .live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--accent-red);
    animation: blink 1s infinite alternate;
}

.match-card-teams {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.team-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.team-flag-svg {
    width: 24px;
    height: 16px;
    border-radius: 2px;
    box-shadow: var(--shadow-sm);
    object-fit: cover;
}

.team-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.team-score {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
}

.match-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 8px;
    margin-top: auto;
}

.match-card-footer .match-details-btn {
    color: var(--primary-gold);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
}

/* Home Sidebar Items (Trophy, Leaders, Mini Stats) */
.right-card {
    padding: 24px;
}

.right-card h3 {
    font-size: 18px;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 12px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.leader-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.leader-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    background-color: rgba(255, 255, 255, 0.02);
}

.leader-left-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.leader-rank {
    font-size: 12px;
    font-weight: 800;
    color: var(--primary-gold);
    width: 16px;
}

.leader-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--bg-dark);
    border: 1px solid var(--border-gold);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.leader-name {
    font-weight: 600;
    font-size: 13px;
}

.leader-team {
    font-size: 10px;
    color: var(--text-muted);
}

.leader-val {
    font-weight: 800;
    font-size: 14px;
    color: var(--primary-gold);
}

/* Highlights Grid */
.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.highlight-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 16/9;
}

.highlight-thumb {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #101c34 0%, #1f375f 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.highlight-thumb .play-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(212, 175, 55, 0.9);
    color: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
    z-index: 2;
    transition: transform 0.2s ease;
}

.highlight-card:hover .play-icon {
    transform: scale(1.1);
}

.highlight-meta {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    z-index: 3;
}

.highlight-title {
    font-size: 14px;
    font-weight: 700;
}

.highlight-desc {
    font-size: 11px;
    color: var(--text-secondary);
}

/* --- PAGE: GRUPPER (GROUP STAGE) --- */
.groups-filter {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 24px;
}

.groups-filter::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    padding: 8px 16px;
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.filter-chip.active {
    background-color: var(--primary-gold);
    color: var(--bg-dark);
    border-color: var(--primary-gold);
    box-shadow: var(--shadow-gold);
}

.groups-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 30px;
}

.group-card {
    padding: 20px;
}

.group-card-header {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 10px;
}

.group-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.group-table th {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    text-align: center;
    padding: 8px 6px;
}

.group-table th.align-left {
    text-align: left;
}

.group-table td {
    padding: 10px 6px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.group-row {
    transition: background-color 0.2s ease;
}

.group-row:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.group-row-p1 td {
    border-left: 3px solid var(--accent-green);
}

.group-row-p2 td {
    border-left: 3px solid var(--accent-green);
}

.group-row-p3 td {
    border-left: 3px solid var(--accent-yellow);
}

.group-row-eliminated td {
    opacity: 0.6;
}

.table-team-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
}

.jersey-icon {
    width: 18px;
    height: 18px;
    display: inline-block;
    filter: drop-shadow(var(--shadow-sm));
}

.group-matches-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px dashed var(--border-glass);
    padding-top: 16px;
}

.group-match-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border-radius: var(--radius-md);
    background-color: rgba(255, 255, 255, 0.02);
}

.g-match-time {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 700;
}

.g-match-teams {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-grow: 1;
    justify-content: center;
}

.g-match-team {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    width: 110px;
}

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

.g-match-score {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-weight: 800;
    font-size: 12px;
    min-width: 40px;
    text-align: center;
}

.g-match-score.live {
    color: var(--accent-red);
    background-color: rgba(229, 57, 53, 0.1);
    box-shadow: 0 0 5px rgba(229, 57, 53, 0.2);
}

/* --- PAGE: SLUTTSPILL (KNOCKOUT BRACKET) --- */
.knockout-viewport {
    overflow-x: auto;
    padding: 20px 0;
}

.bracket-container {
    display: flex;
    gap: 40px;
    min-width: 1400px;
    padding-bottom: 20px;
    position: relative;
}

.bracket-round {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 250px;
}

.bracket-round-title {
    text-align: center;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--primary-gold);
    letter-spacing: 0.1em;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-glass);
    padding-bottom: 8px;
}

.bracket-match {
    margin: 16px 0;
    display: flex;
    flex-direction: column;
    position: relative;
}

.bracket-match-card {
    padding: 12px;
    background-color: var(--bg-card-solid);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.bracket-match-card.completed {
    border-color: rgba(212, 175, 55, 0.15);
}

.bracket-match-card.completed.winner-path {
    border-color: var(--primary-gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.15);
}

.bracket-team {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
    opacity: 0.5;
}

.bracket-team.winner {
    opacity: 1;
    font-weight: 700;
}

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

.bracket-score {
    font-weight: 800;
    font-size: 14px;
}

.bracket-penalty {
    font-size: 10px;
    color: var(--primary-gold);
    margin-left: 4px;
}

/* Bracket connection lines */
.bracket-match::after {
    content: '';
    position: absolute;
    right: -24px;
    top: 50%;
    width: 24px;
    height: 2px;
    background-color: var(--border-glass);
    z-index: 1;
}

.bracket-match.even-match::before {
    content: '';
    position: absolute;
    right: -24px;
    top: 50%;
    width: 2px;
    height: 100%;
    background-color: var(--border-glass);
    z-index: 1;
}

/* --- PAGE: VEIEN TIL FINALEN (QUALIFICATION FLOW) --- */
.veien-intro {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 40px auto;
}

.veien-intro p {
    color: var(--text-secondary);
}

.veien-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    position: relative;
    padding-bottom: 50px;
}

.veien-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.veien-col h3 {
    font-size: 13px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 800;
    margin-bottom: 12px;
}

.veien-node {
    width: 100%;
    padding: 12px;
    border-radius: var(--radius-md);
    text-align: center;
    background-color: var(--bg-card-solid);
    border: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
}

.veien-node.qualified {
    border-color: var(--accent-green);
    box-shadow: 0 0 10px rgba(0, 230, 118, 0.1);
}

.veien-node.advancing {
    border-color: var(--primary-gold);
    box-shadow: var(--shadow-gold);
    animation: gold-pulse 2s infinite;
}

.veien-node-flag {
    width: 32px;
    height: 20px;
    border-radius: 2px;
}

.veien-node-jersey {
    width: 20px;
    height: 20px;
}

.veien-node-name {
    font-size: 11px;
    font-weight: 700;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.veien-badge-status {
    position: absolute;
    top: -8px;
    right: -4px;
    font-size: 8px;
    background-color: var(--primary-gold);
    color: var(--bg-dark);
    padding: 2px 5px;
    border-radius: 10px;
    font-weight: 800;
}

/* Connecting Pathways (Canvas or Visual Lines) */
.pathway-line {
    stroke-dasharray: 5;
    animation: dash 1s linear infinite;
}

/* --- PAGE: LAG (TEAM PROFILE) --- */
.team-profile-header {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border-glass);
}

.team-profile-flag {
    width: 100px;
    height: 64px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
}

.team-profile-info h1 {
    font-size: 36px;
    line-height: 1;
    margin-bottom: 6px;
}

.team-profile-info p {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
}

.team-content-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
}

.team-jersey-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.team-jersey-display {
    display: flex;
    gap: 30px;
    justify-content: center;
    width: 100%;
}

.jersey-showcase {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.jersey-showcase svg {
    width: 70px;
    height: 70px;
}

.jersey-showcase label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 700;
    text-transform: uppercase;
}

.team-stats-card {
    padding: 24px;
    width: 100%;
}

.team-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.team-stat-item {
    background-color: rgba(255, 255, 255, 0.02);
    padding: 12px;
    border-radius: var(--radius-md);
    text-align: center;
}

.team-stat-num {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary-gold);
}

.team-stat-label {
    font-size: 11px;
    color: var(--text-muted);
}

.squad-card {
    padding: 24px;
}

.squad-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.player-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
}

.player-num {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-secondary);
    width: 24px;
}

.player-name {
    font-weight: 600;
    font-size: 13px;
}

.player-pos {
    font-size: 10px;
    color: var(--text-muted);
}

/* --- PAGE: LIVE MATCH CENTER --- */
.live-match-header {
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.live-match-scoreboard {
    display: flex;
    align-items: center;
    justify-content: space-around;
}

.scoreboard-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 150px;
}

.scoreboard-team img, .scoreboard-team svg {
    width: 60px;
    height: 40px;
    border-radius: 4px;
}

.scoreboard-team-jersey {
    width: 32px;
    height: 32px;
}

.scoreboard-team-name {
    font-size: 18px;
    font-weight: 800;
    text-align: center;
}

.scoreboard-score-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.scoreboard-clock {
    font-size: 14px;
    font-weight: 800;
    color: var(--accent-red);
    background-color: rgba(229, 57, 53, 0.1);
    padding: 4px 12px;
    border-radius: var(--radius-xl);
}

.scoreboard-clock.completed {
    color: var(--text-muted);
    background-color: rgba(255, 255, 255, 0.05);
}

.scoreboard-score {
    font-size: 48px;
    font-weight: 900;
    letter-spacing: -0.05em;
    line-height: 1;
}

.scoreboard-venue {
    font-size: 11px;
    color: var(--text-muted);
}

.match-scolers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    font-size: 12px;
    color: var(--text-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 12px;
}

.scoler-col-home {
    text-align: right;
}

.scoler-col-away {
    text-align: left;
}

.match-stats-timeline-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.stats-card {
    padding: 24px;
}

.stat-bar-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
}

.stat-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 700;
}

.stat-label-center {
    color: var(--text-muted);
    font-size: 11px;
}

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

.stat-fill-home {
    height: 100%;
    background-color: var(--accent-red);
}

.stat-fill-away {
    height: 100%;
    background-color: var(--accent-blue);
}

.timeline-card {
    padding: 24px;
}

.timeline-list {
    display: flex;
    flex-direction: column;
    position: relative;
    padding-left: 20px;
}

.timeline-list::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background-color: var(--border-glass);
}

.timeline-event {
    position: relative;
    padding-bottom: 24px;
    display: flex;
    gap: 16px;
}

.timeline-event::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--text-muted);
    border: 2px solid var(--bg-dark);
}

.timeline-event.event-goal::before {
    background-color: var(--primary-gold);
}

.timeline-event.event-card::before {
    background-color: var(--accent-yellow);
}

.timeline-event.event-sub::before {
    background-color: var(--accent-blue);
}

.timeline-event-time {
    font-size: 11px;
    font-weight: 800;
    color: var(--primary-gold);
}

.timeline-event-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.timeline-event-title {
    font-size: 13px;
    font-weight: 700;
}

.timeline-event-desc {
    font-size: 11px;
    color: var(--text-muted);
}

/* Match Momentum Graph */
.momentum-graph-container {
    height: 140px;
    margin-top: 16px;
    border-radius: var(--radius-md);
    background-color: rgba(0, 0, 0, 0.2);
    overflow: hidden;
    position: relative;
}

.momentum-label {
    position: absolute;
    left: 10px;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}

.momentum-label.home-label {
    top: 10px;
    color: var(--accent-red);
}

.momentum-label.away-label {
    bottom: 10px;
    color: var(--accent-blue);
}

/* --- PAGE: VM-TIPS / PREDICTOR --- */
.predictor-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 30px auto;
}

.predictor-header p {
    color: var(--text-secondary);
}

.predictor-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
}

.action-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary-gold-g1), var(--primary-gold-g2));
    color: var(--bg-dark);
    font-weight: 700;
    font-size: 13px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-gold);
}

.action-btn:hover {
    transform: translateY(-2px);
}

.secondary-btn {
    padding: 10px 20px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 13px;
    border-radius: var(--radius-md);
}

.secondary-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* --- PAGE: FAN SONE --- */
.fanzone-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.poll-card {
    padding: 24px;
}

.poll-option-btn {
    width: 100%;
    display: flex;
    flex-direction: column;
    padding: 14px;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
}

.poll-option-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.poll-percent-fill {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(212, 175, 55, 0.08);
    width: 0%;
    transition: width 0.8s ease;
    z-index: 1;
}

.poll-option-text-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
    z-index: 2;
    font-weight: 600;
}

/* Emoji Streams */
.emoji-reactions-bar {
    display: flex;
    justify-content: space-around;
    padding: 16px;
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
}

.emoji-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.emoji-btn span {
    font-size: 24px;
    transition: transform 0.2s ease;
}

.emoji-btn:hover span {
    transform: scale(1.3);
}

.emoji-count {
    font-size: 11px;
    color: var(--text-muted);
}

/* Trivia Card */
.trivia-card {
    padding: 24px;
}

.trivia-question {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 16px;
}

.trivia-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.trivia-option-btn {
    width: 100%;
    padding: 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    background-color: rgba(255, 255, 255, 0.02);
}

.trivia-option-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.trivia-option-btn.correct {
    background-color: rgba(0, 230, 118, 0.15) !important;
    border-color: var(--accent-green) !important;
    color: var(--accent-green);
}

.trivia-option-btn.wrong {
    background-color: rgba(229, 57, 53, 0.15) !important;
    border-color: var(--accent-red) !important;
    color: var(--accent-red);
}

/* History Card */
.history-card {
    padding: 24px;
}

.history-timeline {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.history-year {
    font-weight: 800;
    font-size: 14px;
    color: var(--primary-gold);
    width: 50px;
    flex-shrink: 0;
}

.history-winner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    font-size: 13px;
    flex: 1;
    text-align: center;
}

.history-runner-up {
    font-size: 11px;
    color: var(--text-muted);
    width: 160px;
    flex-shrink: 0;
    text-align: right;
}

/* --- CHAMPIONS / VINNER FEIRING SCREEN --- */
.champions-overlay {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(10, 14, 23, 0.95);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.champions-card {
    text-align: center;
    max-width: 500px;
    width: 100%;
    padding: 40px;
    border: 1px solid var(--border-gold);
    box-shadow: 0 0 50px rgba(212, 175, 55, 0.3);
    position: relative;
    overflow: hidden;
}

.confetti-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.champions-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.champion-flag {
    width: 120px;
    height: 80px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    border: 2px solid white;
}

.champion-trophy {
    width: 100px;
    height: 100px;
    filter: drop-shadow(0 0 20px var(--primary-gold));
    animation: bounce 2s infinite;
}

.champion-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary-gold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.champion-name {
    font-size: 42px;
    font-weight: 900;
    line-height: 1;
}

/* --- Spinner & Loading Screen --- */
.loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    gap: 16px;
    color: var(--text-secondary);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-glass);
    border-top: 4px solid var(--primary-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* --- KEYFRAME ANIMATIONS --- */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(229, 57, 53, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(229, 57, 53, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(229, 57, 53, 0);
    }
}

@keyframes blink {
    0% { opacity: 0.2; }
    100% { opacity: 1; }
}

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

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

@keyframes gold-pulse {
    0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(212, 175, 55, 0); }
    100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

@keyframes dash {
    to {
        stroke-dashoffset: -40;
    }
}

/* --- RESPONSIVE MEDIA QUERIES --- */

/* Tablet Optimization */
@media (max-width: 1024px) {
    .sidebar {
        width: 220px;
        padding: 16px;
    }
    .main-container {
        margin-left: 220px;
    }
    .app-header {
        padding: 0 24px;
    }
    .app-viewport {
        padding: 24px;
    }
    .home-grid {
        grid-template-columns: 1fr;
    }
    .groups-container {
        grid-template-columns: 1fr;
    }
    .team-content-grid {
        grid-template-columns: 1fr;
    }
}

/* Smartphone Optimization (Mobile-first Layout) */
@media (max-width: 768px) {
    /* Hide Sidebar, Enable Bottom Nav */
    .sidebar {
        display: none;
    }
    
    .main-container {
        margin-left: 0;
        padding-bottom: 80px; /* Space for bottom nav */
    }
    
    .mobile-only {
        display: flex !important;
        align-items: center;
        gap: 8px;
    }
    
    .brand-logo-small {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background-color: rgba(212, 175, 55, 0.15);
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .gold-icon {
        color: var(--primary-gold);
    }
    
    .app-header {
        padding: 0 16px;
        height: 60px;
    }
    
    .sim-controls {
        padding: 4px 8px;
        gap: 8px;
    }
    
    .sim-status {
        font-size: 11px;
    }
    
    .sim-btn {
        width: 28px;
        height: 28px;
    }
    
    .speed-btn {
        font-size: 10px;
        padding: 0 8px;
    }
    
    .app-viewport {
        padding: 16px;
    }
    
    /* Hero Banner Mobile */
    .hero-banner {
        padding: 24px;
        flex-direction: column-reverse;
        align-items: flex-start;
        gap: 20px;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-visual {
        width: 100px;
        height: 100px;
        align-self: center;
    }
    
    .hero-title {
        font-size: 24px;
    }
    
    /* Bottom Navigation */
    .mobile-navbar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 64px;
        background-color: rgba(15, 21, 36, 0.95);
        backdrop-filter: var(--glass-blur);
        -webkit-backdrop-filter: var(--glass-blur);
        border-top: 1px solid var(--border-glass);
        justify-content: space-around;
        align-items: center;
        z-index: 100;
        padding-bottom: var(--safe-area-bottom);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    }
    
    .mobile-nav-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        color: var(--text-secondary);
        font-size: 10px;
        font-weight: 600;
        flex: 1;
        height: 100%;
        justify-content: center;
    }
    
    .mobile-nav-btn i {
        width: 20px;
        height: 20px;
        transition: transform 0.2s ease;
    }
    
    .mobile-nav-btn.active {
        color: var(--primary-gold);
    }
    
    .mobile-nav-btn.active i {
        transform: translateY(-2px);
    }
    
    /* More Menu Overlay Drawers */
    .more-menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        background-color: rgba(0, 0, 0, 0.7);
        z-index: 110;
        backdrop-filter: var(--glass-blur);
    }
    
    .more-menu-overlay.open {
        display: block;
    }
    
    .more-menu-drawer {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        background-color: var(--bg-sidebar);
        border-top-left-radius: var(--radius-lg);
        border-top-right-radius: var(--radius-lg);
        border-top: 1px solid var(--border-glass);
        padding: 20px;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        padding-bottom: calc(20px + var(--safe-area-bottom));
    }
    
    .more-menu-overlay.open .more-menu-drawer {
        transform: translateY(0);
    }
    
    .drawer-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        border-bottom: 1px solid var(--border-glass);
        padding-bottom: 12px;
    }
    
    .drawer-content {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    .drawer-item {
        display: flex;
        align-items: center;
        gap: 16px;
        padding: 14px;
        background-color: rgba(255, 255, 255, 0.02);
        border-radius: var(--radius-md);
        text-align: left;
        width: 100%;
    }
    
    .drawer-item i {
        width: 24px;
        height: 24px;
    }
    
    .drawer-item-text h4 {
        font-size: 14px;
        font-weight: 700;
    }
    
    .drawer-item-text p {
        font-size: 11px;
        color: var(--text-muted);
    }
    
    .close-drawer {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background-color: rgba(255, 255, 255, 0.05);
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Matches and Lists on Mobile */
    .highlights-grid {
        grid-template-columns: 1fr;
    }
    
    .fanzone-grid {
        grid-template-columns: 1fr;
    }
    
    .match-stats-timeline-grid {
        grid-template-columns: 1fr;
    }
    
    .veien-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
}

/* ==========================================================================
   VIDEO MODAL OVERLAY (YOUTUBE INTEGRATION)
   ========================================================================== */
.video-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(4, 6, 12, 0.88);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.video-modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}
.video-modal-content {
    background: #0a0e17;
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 16px;
    width: 92%;
    max-width: 800px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 40px rgba(212, 175, 55, 0.08);
    overflow: hidden;
    transform: scale(0.92);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.video-modal-overlay.open .video-modal-content {
    transform: scale(1);
}
.video-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.01);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.video-modal-title {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.video-modal-title i, .video-modal-title svg {
    color: var(--primary-gold);
}
.video-modal-close {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: #94a3b8;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.video-modal-close:hover {
    background: #ef4444;
    color: #fff;
    transform: rotate(90deg);
}
.video-modal-body {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    background: #000;
}
.video-modal-body iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}
.video-modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

