/* NXGEN FC - CINEMATIC ESPORTS THEME V3 */
:root {
    --bg-dark: #0B0F1A;
    --bg-card: #151B2B;
    --gold: #D4AF37;
    --red: #E50914;
    --white: #ffffff;
    --text-muted: #A0AEC0;
    --ucl-blue: #001C55;
    --haitian-blue: #003da5;
    --haitian-red: #d21034;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-dark);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

h1 { font-size: clamp(2rem, 8vw, 4rem); }
h2 { font-size: clamp(1.5rem, 6vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 4vw, 1.8rem); }

h1, h2, h3, h4, h5, h6, .cinzel {
    font-family: 'Cinzel', serif;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--gold);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Navbar overhaul */
.navbar {
    background: rgba(11, 15, 26, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    border-bottom: 2px solid var(--gold);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-links a {
    text-decoration: none;
    color: var(--white);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    padding: 10px 15px;
    letter-spacing: 1px;
}

.nav-links a:hover {
    color: var(--gold);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--gold) 0%, #B8860B 100%);
    color: #000 !important;
    padding: 14px 35px;
    min-height: 44px;
    border-radius: 0;
    font-weight: 900;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    clip-path: polygon(10% 0, 100% 0, 90% 100%, 0 100%);
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover {
    transform: skew(-5deg) scale(1.05);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.6);
}

/* Hero Section */
.hero-video-container {
    position: relative;
    height: 90vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

#hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    transform: translate(-50%, -50%);
    z-index: -1;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle, rgba(11, 15, 26, 0.4) 0%, rgba(11, 15, 26, 0.9) 100%);
    z-index: 0;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 4px;
    padding: 25px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    will-change: transform;
}

.card:hover {
    border-color: var(--gold);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.soccer-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 4px; height: 100%;
    background: var(--gold);
}

/* Stats Bar */
.stats-bar {
    display: flex;
    justify-content: space-around;
    background: var(--bg-card);
    padding: 30px;
    border-top: 1px solid var(--gold);
    border-bottom: 1px solid var(--gold);
    margin: 40px 0;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    font-weight: 900;
    color: var(--gold);
    display: block;
    line-height: 1;
}

.stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 2px;
}

/* Match Card (Massive) */
.match-card-large {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('../images/stadium-bg.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    padding: 60px 40px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border: 1px solid var(--gold);
    margin-bottom: 50px;
}

.match-team {
    text-align: center;
    flex: 1;
}

.match-team img {
    width: 120px;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.2));
}

.match-score {
    font-size: clamp(2.5rem, 10vw, 5rem);
    font-weight: 900;
    font-family: 'Cinzel', serif;
    color: var(--white);
    text-shadow: 0 0 30px rgba(212, 175, 55, 0.5);
    margin: 0 30px;
}

/* FUT Card */
.fut-card-front {
    background: linear-gradient(135deg, #0B0F1A 0%, #1c2538 100%) !important;
    border: 2px solid var(--gold) !important;
}

.fut-card-badge {
    color: var(--gold) !important;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn 0.8s ease forwards; }

/* Mobile Menu */
.hamburger span {
    background: var(--gold) !important;
}

@media screen and (max-width: 768px) {
    .match-card-large {
        flex-direction: column;
        gap: 30px;
    }
    .match-score { font-size: clamp(2rem, 8vw, 3rem); }
    .nav-links {
        background: var(--bg-dark) !important;
    }

    /* Vertical Pitch Mobile Optimization */
    .pitch-canvas.vertical-pitch {
        height: 1000px;
        background: linear-gradient(to bottom, #1a3c1a 0%, #112211 100%);
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        align-items: center;
    }

    .pitch-canvas.vertical-pitch .pitch-player-card {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: translate3d(0,0,0) scale(0.9);
        margin: 10px 0;
    }

    .pitch-lines, .chemistry-lines-svg { display: none; } /* Hide lines on mobile vertical stack for clarity */
}

/* Glass Tile */
.glass-tile {
    backdrop-filter: blur(10px);
    background: rgba(11, 15, 26, 0.8);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 8px;
    padding: 20px;
}

/* Stat Pill */
.stat-pill {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* OVR Badge */
.ovr-badge {
    background: linear-gradient(135deg, var(--gold) 0%, #B8860B 100%);
    color: #000;
    width: 60px;
    height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    font-weight: 900;
    border: 2px solid #fff;
}

.ovr-badge span {
    font-size: 1.5rem;
    line-height: 1;
}

.ovr-badge small {
    font-size: 0.6rem;
    text-transform: uppercase;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.quick-action-card {
    text-align: center;
    padding: 40px 20px;
    transition: 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.quick-action-card i {
    font-size: 3rem;
    color: var(--gold);
    margin-bottom: 20px;
}

.quick-action-card:hover {
    background: rgba(212, 175, 55, 0.1);
    transform: translateY(-10px);
}

/* Sticky Performance Bar */
.performance-bar {
    background: rgba(11, 15, 26, 0.9);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 999;
    font-size: 0.85rem;
    color: var(--gold);
}

.performance-bar .container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.performance-stat {
    display: flex;
    align-items: center;
    gap: 8px;
}

.performance-stat i {
    opacity: 0.7;
}

/* Table Enhancements */
.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.modern-table tr {
    background: rgba(255, 255, 255, 0.03);
    transition: 0.3s;
}

.modern-table tr:hover {
    background: rgba(255, 255, 255, 0.07);
}

.modern-table th {
    padding: 15px;
    text-align: left;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.modern-table td {
    padding: 15px;
}

.modern-table td:first-child {
    border-radius: 8px 0 0 8px;
}

/* Smart App Banner - Cinematic Refinement */
#pwa-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to right, var(--bg-dark), var(--bg-card));
    border-top: 3px solid var(--gold);
    padding: 20px;
    display: none;
    z-index: 10000;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.8);
    backdrop-filter: blur(15px);
}

#pwa-banner .banner-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

#pwa-banner img {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    border: 1px solid var(--gold);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

#pwa-banner .banner-text h4 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--gold);
    font-family: 'Cinzel', serif;
}

#pwa-banner .banner-text p {
    margin: 5px 0 0;
    font-size: 0.9rem;
    color: var(--white);
    opacity: 0.8;
}

#pwa-banner .btn-primary {
    padding: 10px 25px;
    font-size: 0.8rem;
}

/* Dropdown visibility */
.show {
    display: block !important;
}

/* Floating Music Button */
.music-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    background: var(--gold);
    color: #000;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    cursor: pointer;
    z-index: 9999;
    transition: transform 0.3s;
}

.music-fab:hover {
    transform: scale(1.1);
}

@media screen and (max-width: 768px) {
    .music-fab {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
}

/* Animations */
@keyframes pulse-gold {
    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 pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(210, 16, 52, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(210, 16, 52, 0); }
    100% { box-shadow: 0 0 0 0 rgba(210, 16, 52, 0); }
}

.pulse-gold {
    animation: pulse-gold 2s infinite;
}

.pulse-red {
    animation: pulse-red 2s infinite;
}

/* --- Phase 22: Gaming System Overhaul --- */

/* FIFA-style Pitch Layout */
.pitch-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    height: 1200px;
    background: radial-gradient(circle, #2e7d32 0%, #1b5e20 100%);
    margin: 40px auto;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
}

body {
    background: #0b0f1a;
    color: #fff;
    font-family: Arial;
}

.card {
    background: #111827;
    padding: 20px;
    margin: 10px;
    border-radius: 10px;
    display: inline-block;
}

h1 {
    color: gold;
}

table {
    width: 100%;
    background: #111;
}
/* Pitch markings */
.pitch-lines {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
}

.pitch-line { border: 2px solid rgba(255, 255, 255, 0.3); position: absolute; }
.pitch-center-circle {
    width: 200px; height: 200px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}
.pitch-center-line { width: 100%; top: 50%; border-bottom: 2px solid rgba(255, 255, 255, 0.3); }

/* Refined FUT Card */
.fut-card {
    width: 160px;
    height: 230px;
    background: linear-gradient(135deg, #0B0F1A 0%, #1c2538 100%);
    border: 2px solid var(--gold);
    border-radius: 8px;
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translate3d(0, 0, 0);
    cursor: grab;
    z-index: 10;
    will-change: transform;
}

.fut-card:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

.fut-card .player-img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 5px;
}

.fut-card .player-name {
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    color: var(--gold);
    text-align: center;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.fut-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    width: 100%;
    font-size: 0.6rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 2px 5px;
    background: rgba(255,255,255,0.05);
}

.stat-val { font-weight: 900; color: var(--white); }
.stat-lbl { color: var(--text-muted); text-transform: uppercase; }

/* Chemistry Lines */
.chemistry-lines-svg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 5;
    pointer-events: none;
}

.chemistry-line {
    stroke-width: 4;
    stroke-linecap: round;
    fill: none;
    transition: 0.5s stroke;
}

.chem-green { stroke: #4caf50; stroke-dasharray: 10; animation: chemDash 20s linear infinite; }
.chem-yellow { stroke: #ffeb3b; }
.chem-red { stroke: #f44336; }

@keyframes chemDash {
    to { stroke-dashoffset: -1000; }
}

/* Roster FUT Upgrades */
.roster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
    padding: 40px 0;
}

.mvp-glow {
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.8) !important;
    animation: pulse-gold 2s infinite;
}

/* Global Stats Bar */
.global-stats-bar {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    background: #0B0F1A;
    border-bottom: 1px solid var(--gold);
}

.global-stat {
    text-align: center;
}

.global-stat-val {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--gold);
    font-family: 'Cinzel', serif;
}

.global-stat-lbl {
    font-size: 0.6rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

