@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;800&family=Inter:wght@300;400;600&display=swap');

:root {
    --bg-dark: #0a0e1a;
    --bg-surface: #111827;
    --bg-surface-light: #1f2937;
    --gold: #d4af37;
    --gold-light: #f3e5ab;
    --green: #16a34a;
    --green-dark: #14532d;
    --text-main: #ffffff;
    --text-muted: #9ca3af;
    --glass-bg: rgba(17, 24, 39, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Barlow Condensed', sans-serif;
    text-transform: uppercase;
    font-weight: 800;
}

a {
    color: var(--gold);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--gold-light);
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-main);
}

.logo img {
    height: 40px;
}

.logo span {
    color: var(--gold);
}

nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

nav a {
    color: var(--text-main);
    font-weight: 600;
    font-size: 1.1rem;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--gold);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    font-size: 2rem;
    cursor: pointer;
    margin-left: auto;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: linear-gradient(135deg, var(--gold), #b8860b);
    color: #000;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    text-transform: uppercase;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.3);
    color: #000;
}

.btn-green {
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    color: white;
}

.btn-green:hover {
    box-shadow: 0 10px 20px rgba(22, 163, 74, 0.3);
    color: white;
}

/* Sections */
section {
    padding: 5rem 5%;
}

.section-title {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 3rem;
    color: var(--gold);
    position: relative;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
    padding-top: 80px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/hero_bg.jpg') center/cover no-repeat;
    z-index: -2;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(10, 14, 26, 0.7) 0%, var(--bg-dark) 100%);
    z-index: -1;
}

.hero h1 {
    font-size: 5rem;
    margin-bottom: 1rem;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1s ease-out;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    color: var(--text-muted);
    animation: fadeInUp 1s ease-out 0.2s backwards;
}

.hero .btn {
    animation: fadeInUp 1s ease-out 0.4s backwards;
}

/* Monetization Banner */
.ad-banner {
    width: 100%;
    max-width: 900px;
    margin: 2rem auto;
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.ad-banner p {
    margin: 0;
    font-size: 1.1rem;
}

/* How It Works */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.step-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    backdrop-filter: blur(5px);
    transition: transform 0.3s ease;
}

.step-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold);
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--gold);
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 auto 1rem;
}

/* Team Builder */
.team-builder-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.my-team {
    background: url('../images/news1.jpg') center/cover no-repeat;
    position: relative;
    border-radius: 12px;
    padding: 2rem;
    min-height: 250px;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    border: 2px solid var(--gold);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.1);
}

.my-team::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 26, 0.85);
    border-radius: 10px;
    z-index: 1;
}

.my-team>* {
    z-index: 2;
}

.empty-state {
    color: var(--text-muted);
    font-size: 1.2rem;
    font-weight: 600;
}

.player-roster {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.player-card {
    background: var(--bg-surface);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    position: relative;
}

.player-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, transparent 100%);
    pointer-events: none;
}

.player-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    border-color: var(--green);
}

.player-avatar {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #1f2937;
    border-bottom: 2px solid var(--gold);
}

.player-info {
    padding: 1rem;
}

.player-info h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--gold-light);
}

.player-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.add-player-btn,
.remove-player-btn {
    width: 100%;
    padding: 0.5rem;
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.add-player-btn:hover {
    background: var(--gold);
    color: #000;
}

.remove-player-btn {
    border-color: #ef4444;
    color: #ef4444;
}

.remove-player-btn:hover {
    background: #ef4444;
    color: white;
}

.selected-player {
    width: 100px;
    text-align: center;
    background: var(--bg-surface-light);
    border-radius: 8px;
    padding: 0.5rem;
    border: 1px solid var(--gold);
}

.selected-player img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.5rem;
    border: 2px solid var(--green);
}

.selected-player span {
    display: block;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Leaderboard */
.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-surface);
    border-radius: 8px;
    overflow: hidden;
}

.leaderboard-table th,
.leaderboard-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.leaderboard-table th {
    background: var(--bg-surface-light);
    color: var(--gold);
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.2rem;
}

.positive {
    color: var(--green);
}

.negative {
    color: #ef4444;
}

.neutral {
    color: var(--text-muted);
}

/* News */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.news-card {
    background: var(--bg-surface);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-content {
    padding: 1.5rem;
}

.news-date {
    color: var(--gold);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    background: #05070d;
    padding: 4rem 5% 2rem;
    border-top: 1px solid var(--glass-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    color: var(--gold);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.footer-col a {
    color: var(--text-muted);
}

.footer-col a:hover {
    color: var(--gold);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Legal Pages */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-surface);
    padding: 3rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.legal-content h1 {
    color: var(--gold);
    margin-bottom: 2rem;
    font-size: 2rem;
}

.legal-content h2 {
    color: var(--green);
    margin: 1.5rem 0 0.5rem;
}

.legal-content p,
.legal-content ul {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.legal-content ul {
    padding-left: 1.5rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Unique Builder Layout */
.builder-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.pitch-container {
    flex: 1;
    position: sticky;
    top: 100px;
}

.pitch-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.pitch-field {
    background: url('../images/hero_bg.jpg') center/cover no-repeat;
    border-radius: 12px;
    height: 600px;
    position: relative;
    border: 2px solid var(--gold);
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    padding: 2rem;
    gap: 1rem;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.8);
}

.pitch-lines {
    position: absolute;
    top: 5%;
    bottom: 5%;
    left: 5%;
    right: 5%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    pointer-events: none;
}

.empty-state-pitch {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.roster-container {
    flex: 1.5;
}

.roster-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--bg-surface);
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--gold);
    color: #000;
    border-color: var(--gold);
}

.player-avatar-wrapper {
    position: relative;
}

.player-rating {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--gold);
    color: #000;
    font-weight: 800;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .builder-layout {
        flex-direction: column;
    }

    .pitch-container {
        position: relative;
        top: 0;
        width: 100%;
        height: 400px;
    }

    .pitch-field {
        height: 400px;
    }

    .player-roster {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991px) {
    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    nav {
        width: 100%;
        order: 3;
    }

    header {
        flex-wrap: wrap;
    }

    nav ul {
        display: none;
        width: 100%;
        background: var(--bg-surface);
        flex-direction: column;
        padding: 1rem;
        text-align: center;
        border-bottom: 1px solid var(--glass-border);
        margin-top: 1rem;
    }

    nav ul.active {
        display: flex;
    }

    .player-roster {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 3.5rem;
    }

    .ad-banner {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .legal-content {
        padding: 1.5rem;
    }

    .player-roster {
        grid-template-columns: 1fr;
    }

    .steps-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }

    .pitch-field {
        padding: 1rem;
        height: 350px;
    }

    .pitch-container {
        height: 350px;
    }
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

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

.modal-content {
    background: var(--bg-surface);
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid var(--gold);
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.modal-close {
    margin-top: 1rem;
    padding: 0.5rem 1.5rem;
    cursor: pointer;
    color: #000;
    background: var(--gold);
    border: none;
    font-weight: 600;
    border-radius: 4px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.1rem;
}

/* Specific Buttons */
.btn-upgrade {
    background: linear-gradient(135deg, #d4af37, #b8860b);
    color: #000;
    box-shadow: inset 0 0 0 2px #fff, 0 0 0 4px #1e40af;
    border-radius: 6px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    padding: 1rem 2.5rem;
    display: inline-block;
    text-transform: uppercase;
    text-decoration: none;
    transition: transform 0.2s;
    border: none;
}

.btn-upgrade:hover {
    transform: scale(1.05);
    color: #000;
}

.btn-shop {
    background: linear-gradient(135deg, #16a34a, #14532d);
    color: #fff;
    box-shadow: inset 0 0 0 2px #4ade80, 0 0 0 4px #14532d;
    border-radius: 6px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    padding: 1rem 2.5rem;
    display: inline-block;
    text-transform: uppercase;
    text-decoration: none;
    transition: transform 0.2s;
    border: none;
}

.btn-shop:hover {
    transform: scale(1.05);
    color: #fff;
}

@media (max-width: 380px) {
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    .step-card {
        gap: 1rem !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }

    .steps-grid > div:first-child {
        display: none !important;
    }

    .step-number {
        margin: 0 auto 1rem !important;
    }

    .step-card>div,
    .news-content {
        padding: 1rem !important;
        width: 100% !important;
        box-sizing: border-box;
    }

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

    .btn-upgrade,
    .btn-shop {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    .pitch-header {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        text-align: center;
    }

    .hero > div > div:last-child {
        gap: 1rem !important;
        flex-wrap: wrap;
        justify-content: center;
    }
}