/* =========================================
   1. GLOBAL SETTINGS & VARIABLES
   ========================================= */
:root {
    --primary: #0f172a;    /* Deep Slate */
    --accent: #10b981;     /* Emerald Green */
    --white: #ffffff;
    --text-muted: #94a3b8;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body { 
    font-family: 'Inter', sans-serif; 
    background-color: var(--primary);
    color: var(--white);
    overflow-x: hidden;
}

/* =========================================
   2. ANIMATIONS (REVEAL & SCROLL)
   ========================================= */
.reveal {
    opacity: 0;
    transform: translateY(200px); /* Your preferred depth */
    transition: all 2s cubic-bezier(0.2, 0.8, 0.2, 1);
    visibility: hidden;
    will-change: transform, opacity; /* Optimizes performance */
}

.reveal.show {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

/* =========================================
   3. NAVBAR
   ========================================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    position: fixed;
    width: 100%;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    min-height: 80px;
}

.navbar-brand-btn {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 12px;
    transition: transform 0.3s ease;
}

.navbar-brand-btn:hover {
    transform: scale(1.05);
}

.nav-logo-img {
    height: 50px;
    width: auto;
}

.nav-text-brand {
    font-family: 'Inter', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1;
}

.foot-text { color: var(--white); }
.metrics-text { color: var(--accent); }

.navbar-search-form input {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 10px 25px;
    border-radius: 30px;
    color: white;
    width: 300px;
    backdrop-filter: blur(10px);
    outline: none;
}

.nav-link { 
    color: white; 
    text-decoration: none; 
    margin-left: 2rem; 
    font-weight: 600; 
    text-transform: uppercase; 
    font-size: 0.8rem; 
    letter-spacing: 1px; 
}

/* =========================================
   4. SHARED SECTION LOGIC
   ========================================= */
section {
    position: relative;
    padding: 120px 10%;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

/* =========================================
   5. HERO SECTION
   ========================================= */
.hero-section {
    background: var(--primary);
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0% 100%);
    z-index: 10;
}

.hero-content h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 0.9;
    font-weight: 900;
    text-transform: uppercase;
}

/* =========================================
   6. PLAYER SPOTLIGHT SECTION
   ========================================= */
.spotlight-section {
    background: var(--accent);
    color: var(--primary);
    margin-top: -10vh;
    clip-path: polygon(0 10%, 100% 0, 100% 90%, 0% 100%);
    z-index: 5;
    padding: 160px 10% 120px;
    flex-direction: column;
}

.spotlight-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
    width: 100%;
}

.spotlight-controls {
    display: flex;
    gap: 12px;
    margin-top: 2rem;
}

.widget-nav {
    background: var(--primary);
    color: var(--white);
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.widget-nav:hover {
    background: var(--white);
    color: var(--primary);
    transform: scale(1.1);
}

#playerInfo h3 a {
    display: inline-block;
    transition: all 0.3s ease;
    color: inherit;
    cursor: pointer;
}

#playerInfo h3 a:hover {
    color: var(--white) !important;
    background-color: var(--primary);
    padding: 2px 12px;
    border-radius: 8px;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.chart-wrapper {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 30px;
    padding: 2.5rem;
    height: 450px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.chart-wrapper canvas {
    max-width: 100% !important;
    max-height: 100% !important;
}

.dive-button-container {
    margin-top: 4rem;
    text-align: center;
    width: 100%;
}

.btn-deeper-dive {
    display: inline-block;
    padding: 14px 30px;
    background: var(--primary);
    color: var(--white);
    text-decoration: none;
    border-radius: 30px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.btn-deeper-dive:hover {
    background: var(--white);
    color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* =========================================
   7. ANALYSIS LAB SECTION
   ========================================= */
.analysis-section {
    background: #f8fafc;
    color: var(--primary);
    margin-top: -10vh;
    padding-top: 15vh;
    clip-path: polygon(0 10%, 100% 0, 100% 100%, 0% 100%);
}

.analysis-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; width: 100%; }

.analysis-card {
    background: var(--white);
    border: 1px solid #e2e8f0;
    padding: 4rem 2rem;
    border-radius: 20px;
    text-decoration: none;
    color: inherit;
    transition: all 0.4s ease;
}

.analysis-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* =========================================
   8. STANDINGS SECTION
   ========================================= */
.standings-section {
    background: var(--primary);
    padding: 100px 5%;
}

.standings-container { width: 100%; }

.table-responsive {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    padding: 20px;
    overflow-x: auto;
}

.mini-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--white);
    table-layout: fixed; 
}

.mini-table th, .mini-table td {
    padding: 15px 10px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.col-pos { width: 60px; }
.col-team { width: 30%; }
.col-data { width: 10%; text-align: center !important; }
.col-pts { width: 10%; text-align: right !important; }

.mini-table th {
    color: var(--accent);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    border-bottom: 2px solid rgba(16, 185, 129, 0.3);
}

.mini-table tr:hover { background: rgba(255, 255, 255, 0.05); }

/* =========================================
   9. SEARCH SUGGESTIONS
   ========================================= */
#suggestions {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
    max-height: 300px;
    overflow-y: auto;
    z-index: 2000;
    display: none;
}

.suggestion-item {
    padding: 12px 20px;
    cursor: pointer;
    color: var(--primary);
    font-weight: 500;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background 0.2s ease, color 0.2s ease;
}

.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover {
    background-color: var(--accent);
    color: white;
}

#suggestions::-webkit-scrollbar { width: 6px; }
#suggestions::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 10px;
}

/* =========================================
   10. MOBILE RESPONSIVENESS
   ========================================= */
@media (max-width: 768px) {
    section {
        padding: 80px 5% 60px;
        min-height: auto;
    }

    section.hero-section {
        padding: 160px 10% 120px;
        min-height: 70vh;
        display: flex;
        align-items: center;
    }

    .hero-content h1 {
        font-size: 2.5rem;
        line-height: 1.1;
    }

    .reveal {
        transform: translateY(50px); 
        transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); 
    }

    .spotlight-section {
        padding: 130px 5% 100px;
    }

    .spotlight-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .spotlight-controls {
        justify-content: center;
        margin-top: 1.5rem;
    }

    .chart-wrapper { height: 350px; }

    .analysis-grid { grid-template-columns: 1fr; }
    .analysis-card { padding: 2.5rem 1.5rem; }

    .dive-button-container { padding-bottom: 10%; }

    .navbar {
        padding: 1rem 5%;
        flex-wrap: wrap;
    }

    .nav-text-brand { font-size: 1.4rem; }

    .navbar-search-form {
        order: 3;
        width: 100%;
        margin-top: 1rem;
        padding-bottom: 5%;
    }

    .nav-link {
        margin-left: 1rem;
        font-size: 0.7rem;
    }

    /* Table Mobile Logic */
    .hide-mobile { display: none !important; }

    .mini-table {
        table-layout: auto !important;
        min-width: 100% !important;
    }

    .col-team {
        width: 70%;
        padding-left: 10px;
    }

    .col-pts {
        width: 20%;
        text-align: right !important;
        padding-right: 15px !important;
    }

    .col-pos { width: 10%; }

    .mini-table td, .mini-table th {
        padding: 18px 10px;
        font-size: 0.95rem;
    }

    .rankings-page {
        padding: 120px 5% 50px;
    }

    .header-banner {
        padding: 35px 5% 5px;
        min-height: auto;
    }
}

/* Add this to your <style> block or style.css */

.navbar-right .nav-link {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block; /* Required for the lift animation */
}

.navbar-right .nav-link:hover {
    color: var(--accent); /* Emerald Green */
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.6); /* The Glow */
    transform: translateY(-2px); /* The Lift */
}