/* ============================================
   GIAI BONG DA XUAN DUC 2026 - Design System
   Light Premium Sports Theme (Banner-Matched)
   ============================================ */

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

/* --- CSS Variables --- */
:root {
    --bg-primary: #f0f4ff;
    --bg-secondary: #e8edf8;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-card-hover: rgba(255, 255, 255, 0.98);
    --bg-glass: rgba(255, 255, 255, 0.6);
    --border-color: rgba(30, 80, 200, 0.12);
    --border-hover: rgba(0, 180, 255, 0.5);

    --text-primary: #0d1b3e;
    --text-secondary: #3a4a7a;
    --text-muted: #7a8ab8;

    --blue: #1a60f5;
    --blue-light: #3a8ef8;
    --cyan: #00c4e8;
    --green: #00c97d;
    --red: #f03050;
    --yellow: #f5a800;
    --orange: #ff6a20;

    /* Neon gradient palette */
    --gradient-neon: linear-gradient(135deg, #00c4e8 0%, #1a60f5 50%, #7f3ff5 100%);
    --gradient-neon-warm: linear-gradient(135deg, #f5a800 0%, #f03050 50%, #7f3ff5 100%);
    --gradient-hero: linear-gradient(135deg, #ddeeff 0%, #c5e0ff 50%, #e8f0ff 100%);
    --gradient-blue: linear-gradient(135deg, #1a60f5, #00c4e8);
    --gradient-card: linear-gradient(145deg, rgba(255,255,255,0.9), rgba(230,240,255,0.7));
    --gradient-border: linear-gradient(135deg, #00c4e8, #1a60f5, #7f3ff5);

    --shadow-sm: 0 2px 12px rgba(26, 96, 245, 0.08);
    --shadow-md: 0 4px 20px rgba(26, 96, 245, 0.12);
    --shadow-lg: 0 8px 40px rgba(26, 96, 245, 0.18);
    --shadow-glow: 0 0 24px rgba(0, 196, 232, 0.3);
    --shadow-neon: 0 0 32px rgba(26, 96, 245, 0.25), 0 0 64px rgba(0, 196, 232, 0.15);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Inter', sans-serif;

    --max-width: 1200px;
    --nav-height: 72px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

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

a { color: var(--blue-light); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--cyan); }

img { max-width: 100%; height: auto; }

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 2px solid transparent;
    background-clip: padding-box;
    box-shadow: 0 2px 0 0 transparent, var(--shadow-sm);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 24px;
    /* Gradient bottom border via pseudo trick */
    position: fixed;
}

.navbar::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: var(--gradient-neon);
    opacity: 0.7;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-brand-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
}

.nav-links a:hover {
    color: var(--blue);
    background: rgba(26, 96, 245, 0.06);
}

.nav-links a.active {
    color: var(--blue);
    background: rgba(26, 96, 245, 0.08);
    font-weight: 700;
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--gradient-blue);
    color: #fff;
}

.btn-primary:hover {
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--blue);
    color: var(--text-primary);
}

.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 12px 28px; font-size: 1rem; }

.btn-danger { background: var(--red); color: #fff; }
.btn-success { background: var(--green); color: #fff; }

.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
}

.nav-hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s;
}

/* --- Main Content --- */
.main-content {
    padding-top: var(--nav-height);
    min-height: 100vh;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 60px 0;
}

.section-header {
    margin-bottom: 40px;
    text-align: center;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
    background: var(--gradient-neon);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* --- Hero Banner (Image) --- */
.hero-banner {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 24px 0;
    background: var(--bg-primary);
}

.hero-banner-wrapper {
    position: relative;
    max-width: 1200px;
    width: 100%;
    border-radius: var(--radius-xl);
    /* Gradient neon border */
    padding: 3px;
    background: var(--gradient-neon);
    box-shadow: var(--shadow-neon);
    transition: box-shadow 0.4s ease;
}

.hero-banner-wrapper:hover {
    box-shadow: 0 0 40px rgba(26, 96, 245, 0.4), 0 0 80px rgba(0, 196, 232, 0.25);
}

.hero-banner-inner {
    border-radius: calc(var(--radius-xl) - 3px);
    overflow: hidden;
    line-height: 0;
    background: #fff;
}

.hero-banner-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.hero-banner-wrapper:hover .hero-banner-img {
    transform: scale(1.01);
}

/* --- Hero Section (text fallback) --- */
.hero {
    position: relative;
    padding: 100px 0 80px;
    background: var(--gradient-hero);
    overflow: hidden;
    text-align: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%233b82f6' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    padding: 6px 20px;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 50px;
    color: var(--cyan);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 4px;
    line-height: 1.1;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #60a5fa 50%, #22d3ee 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-cup {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--yellow);
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.hero-info {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 32px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 40px;
}

.hero-stat {
    text-align: center;
}

.hero-stat-value {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--cyan);
}

.hero-stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Cards --- */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: all 0.3s ease;
    cursor: pointer;
    /* Gradient neon border via box-shadow */
    box-shadow: var(--shadow-sm), inset 0 0 0 1px rgba(26, 96, 245, 0.1);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(8px);
}

.card:hover {
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-glow), var(--shadow-md);
    border-color: var(--cyan);
    transform: translateY(-3px);
}

/* --- Match Card --- */
.match-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(8px);
}

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

.match-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.match-status {
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.match-status.scheduled {
    background: rgba(59, 130, 246, 0.15);
    color: var(--blue-light);
}

.match-status.live {
    background: rgba(239, 68, 68, 0.15);
    color: var(--red);
    animation: pulse-live 2s infinite;
}

.match-status.finished {
    background: rgba(16, 185, 129, 0.15);
    color: var(--green);
}

@keyframes pulse-live {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.match-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.match-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    text-align: center;
}

.match-team-logo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.match-team-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.match-score {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
}

.match-score-num {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 35px;
    text-align: center;
}

.match-score-divider {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.match-score-vs {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--text-muted);
    letter-spacing: 2px;
}

.match-card-footer {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* --- Standings Table --- */
.standings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.standings-table thead {
    background: rgba(59, 130, 246, 0.1);
}

.standings-table th {
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border-color);
}

.standings-table th:first-child,
.standings-table td:first-child {
    text-align: center;
    width: 40px;
}

.standings-table th:nth-child(2),
.standings-table td:nth-child(2) {
    text-align: left;
    padding-left: 16px;
}

.standings-table td {
    padding: 14px 8px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.standings-table tbody tr:hover td {
    background: var(--bg-card-hover);
}

.standings-table .team-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.standings-table .team-logo-sm {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.55rem;
    font-weight: 700;
    color: #fff;
}

.standings-table .points {
    font-weight: 700;
    color: var(--cyan);
    font-family: var(--font-heading);
    font-size: 1.1rem;
}

.qualify { background: rgba(16, 185, 129, 0.05); }

/* --- Team Card --- */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.team-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.team-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
    transform: translateY(-4px);
}

.team-card-logo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    border: 3px solid rgba(255, 255, 255, 0.1);
}

.team-card-name {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.team-card-group {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --- Player Card --- */
.player-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.player-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 14px 8px 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s;
    cursor: pointer;
    min-height: 64px;
    overflow: hidden;
}

.player-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateY(-1px);
}

.player-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--bg-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--blue-light);
    flex-shrink: 0;
}

.player-number-badge {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--yellow);
    min-width: 40px;
    text-align: right;
    flex-shrink: 0;
    letter-spacing: -1px;
    line-height: 1;
    opacity: 0.9;
}

.player-info-name {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-info-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* --- Vote Section --- */
.vote-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.vote-bar-label {
    width: 120px;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: right;
    flex-shrink: 0;
}

.vote-bar-track {
    flex: 1;
    height: 28px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    overflow: hidden;
    position: relative;
}

.vote-bar-fill {
    height: 100%;
    border-radius: 50px;
    transition: width 0.6s ease;
    display: flex;
    align-items: center;
    padding-left: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    min-width: fit-content;
}

.vote-bar-count {
    font-size: 0.8rem;
    color: var(--text-muted);
    width: 50px;
    text-align: right;
    flex-shrink: 0;
}

.vote-btn {
    padding: 8px 20px;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.vote-btn:hover {
    border-color: var(--blue);
    color: var(--blue-light);
    background: rgba(59, 130, 246, 0.1);
}

.vote-btn.voted {
    background: var(--gradient-blue);
    border-color: transparent;
    color: #fff;
}

/* --- Formation (7 players) --- */
.formation {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    aspect-ratio: 3/4;
    background: linear-gradient(180deg, #1a4d2e 0%, #1a6b35 50%, #1a4d2e 100%);
    border-radius: var(--radius-md);
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.15);
    overflow: hidden;
}

.formation::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.formation::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.formation-player {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transform: translate(-50%, -50%);
}

.formation-player-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.formation-player-name {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* --- Grid Layout --- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.match-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

/* --- Tabs --- */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 28px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 4px;
    border: 1px solid var(--border-color);
    overflow-x: auto;
}

.tab {
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    border: none;
    background: none;
    font-family: var(--font-body);
}

.tab:hover { color: var(--text-primary); }
.tab.active {
    background: var(--gradient-blue);
    color: #fff;
}

/* --- Forms --- */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-select {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
}

/* --- Footer --- */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    margin-top: 60px;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-info {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: right;
}

/* --- Modal --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
}

/* --- Toast --- */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 3000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success { background: var(--green); color: #fff; }
.toast.error { background: var(--red); color: #fff; }
.toast.info { background: var(--blue); color: #fff; }

/* --- Utilities --- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-blue { color: var(--blue-light); }
.text-cyan { color: var(--cyan); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-yellow { color: var(--yellow); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.hidden { display: none !important; }

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

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

.animate-fade { animation: fadeIn 0.5s ease; }
.animate-slide { animation: slideInRight 0.4s ease; }

/* --- Responsive --- */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-hamburger { display: flex; }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--bg-primary);
        border-bottom: 1px solid var(--border-color);
        padding: 16px;
    }

    .hero-title { font-size: 2.2rem; letter-spacing: 2px; }
    .hero-cup { font-size: 1rem; }
    .hero-stats { gap: 24px; }
    .hero-stat-value { font-size: 1.8rem; }

    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .match-grid { grid-template-columns: 1fr; }

    .section { padding: 40px 0; }
    .section-title { font-size: 1.5rem; }

    .standings-table { font-size: 0.8rem; }
    .standings-table th, .standings-table td { padding: 10px 4px; }

    .footer-content { flex-direction: column; gap: 16px; text-align: center; }
    .footer-info { text-align: center; }

    .tabs { flex-wrap: nowrap; }

    .hero { padding: 60px 0 50px; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 1.8rem; }
    .match-team-logo { width: 44px; height: 44px; }
    .match-score-num { font-size: 1.6rem; }
    .container { padding: 0 16px; }
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* --- Rules Page --- */
.rules-content {
    max-width: 800px;
    margin: 0 auto;
}

.rules-content h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--cyan);
    margin-top: 32px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rules-content h3 {
    font-size: 1rem;
    color: var(--blue-light);
    margin: 20px 0 10px;
}

.rules-content p, .rules-content li {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 8px;
}

.rules-content ul {
    padding-left: 24px;
}

.rules-content .highlight {
    background: rgba(59, 130, 246, 0.1);
    border-left: 3px solid var(--blue);
    padding: 12px 16px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 16px 0;
}

/* --- Admin Panel --- */
.admin-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 24px;
    min-height: calc(100vh - var(--nav-height) - 120px);
}

.admin-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
}

.admin-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: var(--font-body);
}

.admin-menu-item:hover, .admin-menu-item.active {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.admin-menu-item.active { color: var(--cyan); }

.admin-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
}

@media (max-width: 768px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   PLAYER PROFILE MODAL
   ============================================ */

.player-profile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 20, 60, 0.7);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.player-profile-overlay.open {
    opacity: 1;
}

.player-profile-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    width: min(420px, 100%);
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35), var(--shadow-neon);
    transform: translateY(32px) scale(0.96);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.player-profile-overlay.open .player-profile-card {
    transform: translateY(0) scale(1);
}

/* Header with team color gradient */
.pp-header {
    position: relative;
    padding: 36px 24px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    min-height: 160px;
    justify-content: flex-end;
}

.pp-header-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.pp-header-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.55));
}

/* Big player number in background */
.pp-number-hero {
    position: absolute;
    top: -10px;
    right: 12px;
    font-family: var(--font-heading);
    font-size: 7rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.15);
    line-height: 1;
    z-index: 1;
    letter-spacing: -4px;
    pointer-events: none;
}

.pp-team-logo-wrap {
    position: relative;
    z-index: 2;
    margin-bottom: 10px;
}

.pp-team-logo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.5);
    object-fit: cover;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    display: block;
}

.pp-team-logo-fallback {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.pp-number-badge {
    position: absolute;
    bottom: -8px;
    right: -12px;
    background: var(--yellow);
    color: #111;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 900;
    padding: 2px 10px;
    border-radius: 50px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.pp-name {
    position: relative;
    z-index: 2;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    margin-bottom: 4px;
}

.pp-badges {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.pp-pos-badge {
    padding: 3px 12px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.pp-pos-GK { background: rgba(239,68,68,0.85); color: #fff; }
.pp-pos-DF { background: rgba(16,185,129,0.85); color: #fff; }
.pp-pos-MF { background: rgba(59,130,246,0.85); color: #fff; }
.pp-pos-FW { background: rgba(245,158,11,0.85); color: #111; }

.pp-captain-badge {
    background: var(--yellow);
    color: #111;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
}

/* Body */
.pp-body {
    padding: 20px 24px 24px;
    overflow-y: auto;
    max-height: 50vh;
}

/* Stats row */
.pp-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.pp-stat {
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    padding: 10px 8px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.pp-stat-val {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.pp-stat-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pp-stat-goals .pp-stat-val { color: var(--cyan); }
.pp-stat-yellow .pp-stat-val { color: var(--yellow); }
.pp-stat-red .pp-stat-val { color: var(--red); }

/* Info grid */
.pp-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.pp-info-item {
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    border: 1px solid var(--border-color);
}

.pp-info-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.pp-info-val {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Team name row */
.pp-team-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.pp-team-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Close button */
.pp-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    transition: background 0.2s;
    backdrop-filter: blur(4px);
}

.pp-close:hover {
    background: rgba(0, 0, 0, 0.6);
}

/* Loading state */
.pp-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    color: var(--text-muted);
}

.pp-loading-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--cyan);
    animation: pp-bounce 1.2s ease-in-out infinite;
}
.pp-loading-dot:nth-child(2) { animation-delay: 0.15s; }
.pp-loading-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes pp-bounce {
    0%, 80%, 100% { transform: scale(0.7); opacity: 0.5; }
    40% { transform: scale(1.1); opacity: 1; }
}

@media (max-width: 480px) {
    .pp-number-hero { font-size: 5rem; }
    .pp-name { font-size: 1.25rem; }
}
