:root {
    --bg: #030712;
    --surface: #0f172a;
    --surface-hover: #1e293b;
    --primary: #818cf8;
    /* Soft Indigo */
    --primary-bright: #6366f1;
    --secondary: #f472b6;
    /* Soft Pink */
    --accent: #2dd4bf;
    /* Teal */
    --text: #f8fafc;
    --text-dim: #94a3b8;
    --border: rgba(255, 255, 255, 0.04);
    --glass: rgba(15, 23, 42, 0.65);
    --neon-blue: #3b82f6;
    --neon-purple: #a855f7;
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

@keyframes meshGradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    font-family: 'Montserrat', sans-serif !important;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    background-image:
        linear-gradient(rgba(3, 7, 18, 0.85), rgba(3, 7, 18, 0.85)),
        url('../bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Montserrat', sans-serif;
    margin-top: 0;
}

/* Navbar Navigation */
.navbar {
    width: 100%;
    height: 90px;
    background: rgba(15, 23, 42, 0.8);
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 100;
    backdrop-filter: blur(12px);
}

.logo {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: -0.05em;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    text-decoration: none;
}

.logo-dot {
    width: 8px;
    height: 8px;
    background: var(--primary-bright);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-bright);
}

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

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 12px;
    color: var(--text-dim);
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.nav-item:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.03);
}

.nav-item.active {
    color: white;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
}

.nav-item svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.2;
}

.nav-item.active svg {
    stroke: var(--primary-bright);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.03);
    padding: 6px 6px 6px 20px;
    border-radius: 50px;
    border: 1px solid var(--border);
}

.balance-badge {
    background: var(--primary-bright);
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 700;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Main Content Area */
main {
    width: 100%;
    padding: 130px 40px 60px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Hero Landing */
.hero {
    padding: 40px 0;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.hero h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 4.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-dim);
    max-width: 600px;
    line-height: 1.6;
    margin-bottom: 40px;
    margin-left: auto;
    margin-right: auto;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 60px;
    text-align: left;
}

.feature-card {
    background: var(--surface);
    padding: 35px;
    border-radius: 30px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.4);
}

.feature-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 100% 0%, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
}

.feature-card h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 12px;
    text-transform: uppercase;
    font-weight: 800;
}

/* Player Cards - Elite Style */
.roster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
}

.elite-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 24px;
    border: 1px solid var(--border);
    padding: 24px;
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 380px;
}

.elite-card:hover {
    transform: scale(1.03);
    border-color: var(--primary-bright);
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.15);
}

.elite-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: rotate(45deg);
    transition: 0.6s;
}

.elite-card:hover::before {
    left: 100%;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
}

.role-badge {
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    font-size: 0.75rem;
    padding: 6px 14px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.role-U {
    color: #f472b6;
    border-color: rgba(244, 114, 182, 0.3);
}

.role-A {
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.3);
}

.player-info h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    margin: 0;
    line-height: 1.1;
    text-transform: uppercase;
    font-weight: 900;
}

.player-info-club {
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-top: 5px;
    display: block;
}

.card-stats {
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
}

.stat-box {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    margin-bottom: 4px;
}

.stat-val {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.3rem;
}

.action-btn {
    margin-top: 20px;
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    border: none;
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-sell {
    background: rgba(244, 63, 94, 0.1);
    color: #fb7185;
}

.btn-sell:hover {
    background: #f43f5e;
    color: white;
}

.btn-buy {
    background: var(--primary-bright);
    color: white;
}

.btn-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.4);
}

.empty-slot {
    border: 2px dashed rgba(255, 255, 255, 0.05);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: var(--text-dim);
    gap: 15px;
}

.empty-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 1px solid var(--border);
}

.live-pulse {
    width: 10px;
    height: 10px;
    background: #ef4444;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    animation: pulse-red 2s infinite;
    display: inline-block;
    margin-right: 8px;
}

@keyframes pulse-red {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

@media (max-width: 1024px) {
    .navbar {
        padding: 0 20px;
        height: 70px;
    }

    .nav-item span {
        display: none;
    }

    main {
        padding-top: 100px;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0 15px;
        justify-content: space-between;
    }

    .logo span {
        display: none;
        /* Hide logo text on very small screens */
    }

    .nav-center {
        gap: 2px;
    }

    .nav-item {
        padding: 8px;
    }

    .user-profile {
        padding: 4px;
        background: transparent;
        border: none;
        gap: 8px;
    }

    .user-profile span {
        display: none;
        /* Hide user name */
    }

    .balance-badge {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    main {
        padding: 90px 15px 40px 15px;
    }

    .roster-grid {
        grid-template-columns: 1fr;
        /* Single column on mobile */
        gap: 20px;
    }

    .elite-card {
        min-height: auto;
        padding: 20px;
    }

    .player-info h2 {
        font-size: 1.5rem;
    }

    .podium-container {
        gap: 10px;
        align-items: flex-end;
    }

    .podium-spot {
        width: 30%;
        padding: 10px;
    }

    .podium-name {
        font-size: 0.8rem;
        text-overflow: ellipsis;
        overflow: hidden;
        white-space: nowrap;
        width: 100%;
    }

    .podium-score {
        font-size: 1.1rem;
    }
}

/* Table Elite */
.table-container {
    background: var(--surface);
    border-radius: 30px;
    border: 1px solid var(--border);
    padding: 30px;
    margin-top: 30px;
    font-family: 'Manrope', sans-serif;
    overflow-x: auto;
    /* Scrollable tables */
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
    /* Ensure table doesn't squash too much */
}

th {
    text-align: left;
    padding: 15px;
    color: var(--text-dim);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 1px solid var(--border);
    font-weight: 800;
}

td {
    padding: 20px 15px;
    border-bottom: 1px solid var(--border);
}

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

tr:hover td {
    background: rgba(255, 255, 255, 0.01);
}

.table-player-name {
    font-weight: 700;
    font-size: 1.1rem;
}

.table-club {
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* Section Visibility */
.app-section {
    display: none;
}

.app-section.active {
    display: block;
    animation: sectionFade 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes sectionFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.developer-credit {
    margin-top: 30px;
    padding: 15px 10px;
    text-decoration: none;
    color: var(--text-dim);
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    transition: all 0.3s;
    opacity: 0.6;
    border-top: 1px solid var(--border);
    line-height: 1.4;
}

.developer-credit:hover {
    opacity: 1;
    color: var(--text);
}

.developer-logo {
    height: 12px;
    width: auto;
    vertical-align: middle;
}

/* Leaderboard Specifics */
.podium-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 50px;
    margin-top: 20px;
}

.podium-spot {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px 20px 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 20px;
    width: 160px;
    position: relative;
}

.podium-1 {
    height: 240px;
    border-color: #fbbf24;
    background: linear-gradient(to top, rgba(251, 191, 36, 0.1), var(--surface));
    box-shadow: 0 -10px 40px rgba(251, 191, 36, 0.2);
    z-index: 2;
}

.podium-2 {
    height: 190px;
    border-color: #94a3b8;
    background: linear-gradient(to top, rgba(148, 163, 184, 0.1), var(--surface));
}

.podium-3 {
    height: 160px;
    border-color: #d97706;
    /* Bronze-ish */
    background: linear-gradient(to top, rgba(217, 119, 6, 0.1), var(--surface));
}

.rank-badge {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.2rem;
    margin-bottom: 15px;
    border: 2px solid currentColor;
    background: var(--bg);
}

.rank-1 {
    color: #fbbf24;
    box-shadow: 0 0 15px #fbbf24;
}

.rank-2 {
    color: #94a3b8;
}

.rank-3 {
    color: #d97706;
}

.podium-name {
    font-weight: 700;
    text-align: center;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.podium-score {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--accent);
}

.stat-icon {
    width: 24px;
    height: 24px;
    opacity: 0.5;
    color: var(--text-dim);
    transition: opacity 0.3s;
}

.stat-icon:hover {
    opacity: 1;
    color: var(--primary-bright);
}