/* =========================================
   1. CSS VARIABLES
   ========================================= */
:root {
    /* Color Palette */
    --bg-primary: #0a0a0d;
    --bg-secondary: #141417;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-hover-bg: rgba(255, 255, 255, 0.05);
    
    --color-green: #22c55e;
    --color-green-deep: #14532d;
    --color-gold: #facc15;
    
    --text-primary: #f5f5f5;
    --text-secondary: #9ca3af;
    --border-color: rgba(255, 255, 255, 0.08);

    /* Gradients & Glows */
    --gradient-primary: linear-gradient(135deg, var(--color-green), var(--color-gold));
    --glow-green: 0 0 20px rgba(34, 197, 94, 0.3);
    --glow-gold: 0 0 20px rgba(250, 204, 21, 0.3);
    
    /* Spacing System */
    --space-desktop: 100px;
    --space-tablet: 70px;
    --space-mobile: 50px;

    /* Typography */
    --font-main: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* =========================================
   2. RESET
   ========================================= */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* =========================================
   3. LAYOUT SYSTEM
   ========================================= */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: var(--space-desktop) 0;
}

.grid {
    display: grid;
    gap: 32px;
}

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

.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

/* =========================================
   4. TYPOGRAPHY & UTILITIES
   ========================================= */
h1, h2, h3, h4 {
    line-height: 1.2;
    margin-bottom: 1rem;
    font-weight: 700;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.bg-secondary {
    background-color: var(--bg-secondary);
}

.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    background: var(--card-hover-bg);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* =========================================
   5. BUTTON SYSTEM
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 100px; /* Pill shape */
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--bg-primary);
    box-shadow: var(--glow-green);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.5), 0 5px 15px rgba(0,0,0,0.4);
}

.btn-large {
    padding: 18px 40px;
    font-size: 1.125rem;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-green);
    color: var(--color-green);
}

.btn-outline:hover {
    background: rgba(34, 197, 94, 0.1);
    box-shadow: var(--glow-green);
}

.btn-full {
    width: 100%;
}

/* =========================================
   6. HEADER & NAVIGATION
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 10, 13, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(34, 197, 94, 0.2);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(34, 197, 94, 0.4);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.brand-logo .logo-img {
    height: 32px;
    width: auto;
    filter: drop-shadow(0 0 8px rgba(250, 204, 21, 0.4));
}

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

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    z-index: 1001;
}

.mobile-toggle span {
    display: block;
    width: 28px;
    height: 2px;
    background-color: var(--text-primary);
    transition: 0.3s ease;
}

/* =========================================
   7. HERO SECTION
   ========================================= */
.hero, .page-header {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px; /* Offset for header */
}

.page-header {
    min-height: 60vh;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(10,10,13,0.4) 0%, rgba(10,10,13,0.9) 80%, rgba(10,10,13,1) 100%);
    z-index: -1;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 100px;
    color: var(--color-green);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero-title {
    font-size: 4.5rem;
    letter-spacing: -1px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
}

.hero-disclaimer {
    background: rgba(20, 83, 45, 0.4);
    border: 1px solid var(--color-green-deep);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 10px 0 20px 0;
}

/* =========================================
   8. GAME SECTION (CRITICAL)
   ========================================= */
.game-section {
    padding-top: var(--space-desktop);
    padding-bottom: var(--space-desktop);
    background: radial-gradient(circle at center, rgba(34, 197, 94, 0.05) 0%, var(--bg-primary) 70%);
}

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

.section-header h2 {
    font-size: 2.5rem;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.game-frame-wrapper {
    width: 85%;
    max-width: 1300px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    min-height: 600px;
    background: #000;
    border-radius: 20px;
    border: 2px solid rgba(34, 197, 94, 0.4);
    box-shadow: 0 20px 50px rgba(0,0,0,0.8), 
                0 0 40px rgba(34, 197, 94, 0.15),
                inset 0 0 20px rgba(250, 204, 21, 0.05);
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease;
}

.game-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.game-legal-notice {
    text-align: center;
    margin-top: 24px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* =========================================
   9. FEATURES & CONTENT
   ========================================= */
.features-grid {
    grid-template-columns: repeat(3, 1fr);
}

.feature-card {
    text-align: center;
    padding: 48px 32px;
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px auto;
    filter: drop-shadow(0 0 10px rgba(250, 204, 21, 0.2));
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.content-card {
    max-width: 900px;
    margin: 0 auto;
}

.content-card p {
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.content-card ul {
    margin-bottom: 24px;
    padding-left: 20px;
    color: var(--text-secondary);
}

.content-card ul li {
    margin-bottom: 10px;
    list-style-type: disc;
}

.content-card ul li strong {
    color: var(--text-primary);
}

.legal-content h2 {
    margin-top: 40px;
    font-size: 1.5rem;
    color: var(--color-green);
}

/* =========================================
   10. CONTACT FORMS
   ========================================= */
.contact-grid {
    grid-template-columns: 1fr 1fr;
    max-width: 1000px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-green);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.2);
}

/* =========================================
   11. FOOTER
   ========================================= */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 80px 0 40px 0;
}

.footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
    margin-bottom: 60px;
}

.footer-brand p {
    color: var(--text-secondary);
    margin-top: 16px;
    max-width: 300px;
}

.footer-links h4 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links ul li a {
    color: var(--text-secondary);
}

.footer-links ul li a:hover {
    color: var(--color-green);
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 32px;
    text-align: center;
}

.footer-disclaimer {
    color: var(--text-secondary);
    font-size: 0.85rem;
    max-width: 800px;
    margin: 0 auto 20px auto;
}

.copyright {
    color: rgba(255,255,255,0.4);
    font-size: 0.85rem;
}

/* =========================================
   12. ANIMATIONS
   ========================================= */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   13. MEDIA QUERIES
   ========================================= */
@media (max-width: 1024px) {
    .hero-title { font-size: 3.5rem; }
    .game-frame-wrapper { width: 95%; min-height: 500px; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    
    .section { padding: var(--space-tablet) 0; }
}

@media (max-width: 768px) {
    .nav-links, .nav-cta {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .navbar.mobile-open .nav-links {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--bg-secondary);
        padding: 24px 0;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    }

    .navbar.mobile-open .nav-cta {
        display: flex;
        position: absolute;
        top: 320px;
        left: 0;
        width: 100%;
        justify-content: center;
        background: var(--bg-secondary);
        padding-bottom: 24px;
    }

    .hero-title { font-size: 2.5rem; }
    .hero-subtitle { font-size: 1rem; }
    
    .game-frame-wrapper {
        width: 100%;
        border-radius: 12px;
        min-height: 400px;
    }

    .features-grid, .contact-grid {
        grid-template-columns: 1fr;
    }

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

    .footer-brand p {
        margin: 16px auto;
    }

    .section { padding: var(--space-mobile) 0; }
}