@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    /* Core Colors */
    --bg-primary: #0a0a0d;
    --bg-secondary: #141417;
    --bg-card: rgba(255, 255, 255, 0.03);
    
    /* Accents */
    --accent-primary: #bf7af0;
    --accent-secondary: #dab6ff;
    --accent-glow: #ff7a18;
    
    /* Typography */
    --text-primary: #f5f5f5;
    --text-secondary: #9ca3af;
    
    /* Layout */
    --max-width: 1400px;
    --nav-height: 90px;
    
    /* UI Elements */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 100px;
    
    /* Transitions */
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-smooth);
}

ul {
    list-style: none;
}

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

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 600;
    color: var(--text-primary);
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }

.text-gradient {
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-accent { color: var(--accent-primary); }
.text-muted { color: var(--text-secondary); }

/* ==========================================================================
   Layout System
   ========================================================================== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 100px 0;
}

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

@media (max-width: 768px) {
    .section { padding: 50px 0; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: var(--radius-pill);
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: var(--transition-smooth);
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #a855f7 0%, var(--accent-primary) 100%);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(191, 122, 240, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    pointer-events: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(191, 122, 240, 0.4), 0 0 15px rgba(255, 122, 24, 0.1);
}

.btn-lg {
    padding: 18px 48px;
    font-size: 1.125rem;
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-primary);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(10, 10, 13, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(191, 122, 240, 0.1);
    z-index: 1000;
    transition: var(--transition-smooth);
}

.header.scrolled {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(191, 122, 240, 0.2);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

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

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

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--accent-primary);
    transition: var(--transition-smooth);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--accent-primary);
}

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

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 992px) {
    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--nav-height));
        background: var(--bg-primary);
        flex-direction: column;
        justify-content: center;
        gap: 30px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: var(--transition-smooth);
    }
    
    .nav-links.is-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .nav-links .btn {
        margin-top: 20px;
    }

    .mobile-toggle {
        display: block;
    }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: var(--nav-height);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    opacity: 0.4;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, var(--bg-primary) 100%),
                linear-gradient(180deg, rgba(10,10,13,0.2) 0%, var(--bg-primary) 100%);
    z-index: -1;
}

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

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(191, 122, 240, 0.1);
    border: 1px solid rgba(191, 122, 240, 0.2);
    border-radius: var(--radius-pill);
    font-size: 0.875rem;
    color: var(--accent-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.disclaimer-box {
    margin-top: 16px;
    padding: 16px 24px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.disclaimer-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.disclaimer-item svg {
    width: 16px;
    height: 16px;
    color: var(--accent-primary);
}

/* ==========================================================================
   Game Section (CRITICAL PRIORITY)
   ========================================================================== */
.game-section {
    background: var(--bg-primary);
    position: relative;
    z-index: 10;
}

.game-container {
    width: 100%;
    max-width: 1300px; /* Dominant width */
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: 0 0 50px rgba(191, 122, 240, 0.1), 
                inset 0 0 0 1px rgba(191, 122, 240, 0.2);
    position: relative;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.game-container::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    background: linear-gradient(45deg, var(--accent-primary), transparent, var(--accent-glow), transparent);
    z-index: -1;
    border-radius: calc(var(--radius-lg) + 2px);
    opacity: 0.3;
    filter: blur(10px);
}

.game-container:hover {
    box-shadow: 0 0 80px rgba(191, 122, 240, 0.2), 
                inset 0 0 0 1px rgba(191, 122, 240, 0.4);
}

.game-iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: inherit;
    background: #000;
}

@media (max-width: 1400px) {
    .game-container { width: 95%; }
}

@media (max-width: 768px) {
    .game-container {
        width: 100%;
        border-radius: 0;
        aspect-ratio: auto;
        height: 60vh;
    }
}

/* ==========================================================================
   Features / Info Section
   ========================================================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 40px 30px;
    border-radius: var(--radius-md);
    transition: var(--transition-smooth);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(191, 122, 240, 0.2);
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 24px;
    background: rgba(191, 122, 240, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
}

.feature-icon svg {
    width: 28px;
    height: 28px;
}

.feature-title {
    margin-bottom: 12px;
    font-size: 1.25rem;
}

/* ==========================================================================
   Internal Pages (About, Terms, etc.)
   ========================================================================== */
.page-header {
    padding: 180px 0 80px;
    text-align: center;
    background: radial-gradient(circle at top, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.page-content {
    max-width: 800px;
    margin: 0 auto;
}

.prose h2 {
    margin: 40px 0 20px;
    font-size: 1.75rem;
}

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

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

.prose li {
    margin-bottom: 10px;
    position: relative;
}

.prose li::before {
    content: '•';
    color: var(--accent-primary);
    position: absolute;
    left: -20px;
}

/* Contact Form */
.contact-wrapper {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 50px;
    border-radius: var(--radius-lg);
    max-width: 600px;
    margin: 0 auto;
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition-smooth);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(191, 122, 240, 0.1);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 80px 0 40px;
}

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

.footer-brand .logo {
    margin-bottom: 20px;
}

.footer-desc {
    color: var(--text-secondary);
    max-width: 400px;
    font-size: 0.95rem;
}

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

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-link {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.footer-link:hover {
    color: var(--accent-primary);
    padding-left: 5px;
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr; gap: 40px; }
    .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
}

/* ==========================================================================
   Utilities & Animations
   ========================================================================== */
.text-center { text-align: center; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }

/* GSAP Initial States */
.gsap-fade-up {
    opacity: 0;
    transform: translateY(30px);
}