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

:root {
    /* Colors */
    --bg-primary: #090806;
    --bg-secondary: #1a120b;
    --text-primary: #fff7ed;
    --text-secondary: #fed7aa;
    --text-muted: #d6a77a;

    /* Glass & Effects */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --backdrop-blur: 18px;
    
    /* Gradients */
    --grad-bronze: linear-gradient(135deg, #78350f, #d97706);
    --grad-copper: linear-gradient(135deg, #92400e, #f59e0b);
    --grad-gold: linear-gradient(135deg, #ca8a04, #fde68a);
    
    /* Glows */
    --glow-bronze: rgba(217, 119, 6, 0.35);
    --glow-gold: rgba(250, 204, 21, 0.4);
    --glow-warm: rgba(245, 158, 11, 0.3);

    /* Layout */
    --max-width: 1280px;
    --game-max-width: 1200px;
    --radius-btn: 18px;
    --radius-card: 24px;
    --nav-width-desktop: 80px;
    --nav-width-desktop-hover: 220px;
    
    /* Spacing */
    --spacing-desktop: 120px;
    --spacing-tablet: 80px;
    --spacing-mobile: 60px;
    
    /* Fonts */
    --font-heading: 'Cinzel', serif;
    --font-body: 'Inter', sans-serif;
}

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

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    background-image: radial-gradient(circle at 50% 0%, var(--bg-secondary) 0%, var(--bg-primary) 70%);
    background-attachment: fixed;
}

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

ul {
    list-style: none;
}

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

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    background: var(--grad-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    text-transform: uppercase;
    letter-spacing: 2px;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.text-muted {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ==========================================================================
   Layout & Utilities
   ========================================================================== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.section-padding {
    padding-top: var(--spacing-mobile);
    padding-bottom: var(--spacing-mobile);
}

@media (min-width: 768px) {
    .section-padding {
        padding-top: var(--spacing-tablet);
        padding-bottom: var(--spacing-tablet);
    }
}

@media (min-width: 1024px) {
    .section-padding {
        padding-top: var(--spacing-desktop);
        padding-bottom: var(--spacing-desktop);
    }
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--backdrop-blur));
    -webkit-backdrop-filter: blur(var(--backdrop-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    position: relative;
    overflow: hidden;
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-btn);
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.btn-gold {
    background: var(--grad-gold);
    color: var(--bg-primary);
    box-shadow: 0 4px 15px var(--glow-gold);
    -webkit-text-fill-color: var(--bg-primary); /* override text gradient */
}

.btn-bronze {
    background: var(--grad-bronze);
    color: var(--text-primary);
    box-shadow: 0 4px 15px var(--glow-bronze);
    -webkit-text-fill-color: var(--text-primary);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(253, 230, 138, 0.5); /* fde68a with opacity */
    backdrop-filter: blur(4px);
    -webkit-text-fill-color: var(--text-primary);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--glow-gold);
}

.btn-bronze:hover {
    box-shadow: 0 8px 25px var(--glow-bronze);
}

.btn-outline:hover {
    background: rgba(253, 230, 138, 0.1);
    box-shadow: 0 4px 15px var(--glow-warm);
}

.btn:active {
    transform: translateY(1px);
}

.btn::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: skewX(-20deg);
    transition: 0.5s;
}

.btn:hover::after {
    left: 150%;
}

/* ==========================================================================
   Header - Frontier Command Bar
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.header.scrolled {
    background: rgba(9, 8, 6, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0.75rem 0;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.logo:hover {
    transform: translateY(-2px);
    filter: drop-shadow(0 4px 12px rgba(251, 191, 36, 0.3));
}

.brand-logo {
    height: 44px;
    width: auto;
    display: block;
}

.header-cta {
    display: none;
}

@media (min-width: 768px) {
    .header-cta {
        display: block;
    }
}

/* ==========================================================================
   Side Navigation
   ========================================================================== */
.side-nav {
    position: fixed;
    z-index: 90;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--backdrop-blur));
    border: 1px solid var(--glass-border);
}

/* Desktop Side Nav */
@media (min-width: 1024px) {
    .side-nav {
        top: 50%;
        left: 2rem;
        transform: translateY(-50%);
        width: var(--nav-width-desktop);
        border-radius: 40px;
        padding: 2rem 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 4px 20px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(250, 204, 21, 0.1);
        overflow: hidden;
    }

    .side-nav:hover {
        width: var(--nav-width-desktop-hover);
        border-color: rgba(250, 204, 21, 0.3);
        box-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 15px var(--glow-bronze);
    }

    .nav-link {
        display: flex;
        align-items: center;
        width: 100%;
        padding: 0.5rem 1.5rem;
        color: var(--text-secondary);
        position: relative;
        white-space: nowrap;
    }

    .nav-icon {
        min-width: 24px;
        height: 24px;
        display: flex;
        justify-content: center;
        align-items: center;
        margin-right: 1.5rem;
    }
    
    .nav-icon svg {
        width: 100%;
        height: 100%;
        stroke: currentColor;
        stroke-width: 2;
        fill: none;
        transition: all 0.3s ease;
    }

    .nav-text {
        opacity: 0;
        transform: translateX(-10px);
        transition: all 0.3s ease;
        font-weight: 500;
    }

    .side-nav:hover .nav-text {
        opacity: 1;
        transform: translateX(0);
        transition-delay: 0.1s;
    }

    .nav-link:hover, .nav-link.active {
        color: #fde68a;
    }

    .nav-link:hover .nav-icon svg, .nav-link.active .nav-icon svg {
        transform: scale(1.1);
        stroke: #fde68a;
        filter: drop-shadow(0 0 8px var(--glow-gold));
    }

    .nav-link.active::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 4px;
        height: 20px;
        background: var(--grad-gold);
        border-radius: 0 4px 4px 0;
        box-shadow: 0 0 10px var(--glow-gold);
    }
}

/* Mobile Bottom Nav */
@media (max-width: 1023px) {
    .side-nav {
        bottom: 0;
        left: 0;
        width: 100%;
        border-radius: 20px 20px 0 0;
        padding: 1rem;
        display: flex;
        justify-content: space-around;
        align-items: center;
        border-bottom: none;
    }

    .nav-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
        color: var(--text-muted);
        font-size: 0.75rem;
    }

    .nav-icon {
        width: 24px;
        height: 24px;
    }

    .nav-icon svg {
        width: 100%;
        height: 100%;
        stroke: currentColor;
        stroke-width: 2;
        fill: none;
    }

    .nav-text {
        display: block;
    }

    .nav-link.active, .nav-link:hover {
        color: #fde68a;
    }
    
    .nav-link.active .nav-icon svg {
        stroke: #fde68a;
    }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-left: 0; /* Adjust for desktop nav if needed, but centering looks better */
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -2;
    background-image: url('https://images.unsplash.com/photo-1509316785289-025f5b846b35?q=80&w=2076&auto=format&fit=crop'); /* Desert sunset */
    background-size: cover;
    background-position: center;
    transform: scale(1.05); /* For parallax/animation */
    animation: slowZoom 20s infinite alternate linear;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    background: radial-gradient(circle at center, transparent 0%, var(--bg-primary) 80%),
                linear-gradient(to bottom, rgba(9,8,6,0.4) 0%, var(--bg-primary) 100%);
}

.particles-container {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 0 1.5rem;
}

.hero-content h1 {
    text-shadow: 0 4px 20px rgba(0,0,0,0.8);
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.125rem;
    margin-bottom: 2.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.legal-notice {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

/* ==========================================================================
   Game Section
   ========================================================================== */
.game-section {
    position: relative;
    z-index: 10;
}

.game-container {
    max-width: var(--game-max-width);
    margin: 0 auto;
    padding: 2rem;
    border-radius: 32px;
    border-color: rgba(217, 119, 6, 0.3); /* Bronze edge */
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 30px var(--glow-bronze);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-container:hover {
    transform: scale(1.01);
    box-shadow: 0 25px 60px rgba(0,0,0,0.6), 0 0 40px var(--glow-gold);
    border-color: rgba(250, 204, 21, 0.4);
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.game-title h2 {
    margin-bottom: 0.5rem;
}

.game-controls {
    display: flex;
    gap: 1rem;
}

.iframe-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0,0,0,1);
}

.iframe-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ==========================================================================
   Features Grid
   ========================================================================== */
.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    /* Asymmetrical layout */
    .feature-card:nth-child(1) { grid-column: span 2; }
    .feature-card:nth-child(4) { grid-column: span 2; }
}

.feature-card {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><filter id="noiseFilter"><feTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noiseFilter)" opacity="0.03"/></svg>'); /* Subtle sand texture */
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.4), 0 0 20px var(--glow-bronze);
    border-color: rgba(217, 119, 6, 0.4);
}

.feature-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(250, 204, 21, 0.2);
    box-shadow: 0 0 15px var(--glow-warm);
}

.feature-icon svg {
    width: 24px;
    height: 24px;
    stroke: #fde68a;
    stroke-width: 1.5;
    fill: none;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    -webkit-text-fill-color: var(--text-primary);
}

/* ==========================================================================
   Internal Pages (About, Legal, Contact)
   ========================================================================== */
.page-hero {
    padding: 150px 0 80px;
    text-align: center;
    background: radial-gradient(ellipse at top, rgba(120, 53, 15, 0.2) 0%, var(--bg-primary) 70%);
    position: relative;
}

.page-hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; width: 100%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(250, 204, 21, 0.2), transparent);
}

.content-box {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem;
}

.content-box h2 {
    margin-top: 2rem;
    font-size: 1.75rem;
}

.content-box ul {
    list-style: disc;
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.content-box li {
    margin-bottom: 0.5rem;
}

/* Contact Form */
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 1rem;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-body);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #d97706;
    box-shadow: 0 0 10px var(--glow-bronze);
}

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

.form-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.form-success {
    display: none;
    padding: 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    border-top: 1px solid var(--glass-border);
    padding: 4rem 0 2rem;
    background: linear-gradient(to bottom, transparent, rgba(120, 53, 15, 0.1));
    margin-bottom: 80px; /* Space for mobile nav */
}

@media (min-width: 1024px) {
    .footer { margin-bottom: 0; }
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

.footer-brand .brand-logo {
    height: 52px;
    margin-bottom: 1rem;
}

.footer-brand p {
    max-width: 300px;
    margin-top: 1rem;
}

.footer-links h4 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-family: var(--font-body);
    font-size: 1.125rem;
    -webkit-text-fill-color: var(--text-primary);
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

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

.footer-links a:hover {
    color: #fde68a;
    padding-left: 5px;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.rg-notice {
    font-size: 0.75rem;
    color: var(--text-muted);
    max-width: 600px;
}

/* ==========================================================================
   Animations & Utilities
   ========================================================================== */
@keyframes slowZoom {
    0% { transform: scale(1.05); }
    100% { transform: scale(1.15); }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }

.text-center { text-align: center; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

/* Desktop adjustment for content to not hide behind nav */
@media (min-width: 1024px) {
    .main-content {
        padding-left: calc(var(--nav-width-desktop) + 2rem);
    }
    .footer {
        padding-left: calc(var(--nav-width-desktop) + 2rem);
    }
}