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

:root {
    /* Colors */
    --bg-primary: #07080d;
    --bg-secondary: #141820;
    --text-primary: #f8fafc;
    --text-secondary: #dbeafe;
    --text-muted: #94a3b8;
    
    /* Glass */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-bg-hover: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: 18px;

    /* Gradients */
    --grad-blue: linear-gradient(135deg, #1e3a8a, #3b82f6);
    --grad-purple: linear-gradient(135deg, #312e81, #9333ea);
    --grad-gold: linear-gradient(135deg, #ca8a04, #fde68a);
    --grad-dark-overlay: linear-gradient(to bottom, rgba(7,8,13,0.3), rgba(7,8,13,1));

    /* Glows */
    --glow-blue: rgba(59, 130, 246, 0.35);
    --glow-purple: rgba(147, 51, 234, 0.35);
    --glow-gold: rgba(250, 204, 21, 0.4);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Layout */
    --max-width: 1280px;
    --game-width: 1200px;
    --border-radius: 18px;
    --space-desktop: 120px;
    --space-tablet: 80px;
    --space-mobile: 60px;
    --nav-width: 80px;
}

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

html {
    scroll-behavior: smooth;
}

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

/* Film Grain & Fog Base */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); letter-spacing: -0.02em; }
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); }
.text-gold { background: var(--grad-gold); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.text-center { text-align: center; }

/* Utilities */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 5%;
}

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

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    border-radius: var(--border-radius);
    font-family: var(--font-heading);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    border: none;
    outline: none;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--grad-gold);
    color: var(--bg-primary);
    box-shadow: 0 4px 20px var(--glow-blue);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px var(--glow-blue), inset 0 0 10px rgba(255,255,255,0.5);
}

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

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: var(--glass-bg-hover);
    border-color: rgba(250, 204, 21, 0.5);
    box-shadow: 0 4px 20px var(--glow-gold);
    transform: translateY(-3px);
}

/* Header */
.header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: var(--max-width);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-radius: 100px;
    transition: all 0.3s ease;
}

.header.scrolled {
    background: rgba(7, 8, 13, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.brand-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.header-empty-space { flex: 1; }

/* Side Navigation */
.side-nav {
    position: fixed;
    top: 50%;
    left: 30px;
    transform: translateY(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem 1rem;
    border-radius: 50px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(59, 130, 246, 0.3);
}

.nav-item {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-item svg {
    width: 20px;
    height: 20px;
    transition: all 0.3s ease;
}

.nav-item::before {
    content: attr(data-tooltip);
    position: absolute;
    left: 120%;
    top: 50%;
    transform: translateY(-50%) translateX(-10px);
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-family: var(--font-heading);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    white-space: nowrap;
    border: 1px solid var(--glass-border);
}

.nav-item:hover, .nav-item.active {
    color: #fde68a;
    background: rgba(59, 130, 246, 0.1);
    box-shadow: 0 0 15px var(--glow-blue);
    transform: scale(1.08);
}

.nav-item:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

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

/* Mobile Bottom Nav */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(7, 8, 13, 0.9);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    z-index: 1000;
    padding: 0.5rem 1rem;
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
}

.mobile-nav-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.mobile-nav .nav-item {
    flex-direction: column;
    gap: 4px;
    width: auto;
    height: auto;
    border-radius: 0;
}

.mobile-nav .nav-item span {
    font-size: 0.65rem;
    font-family: var(--font-heading);
}

.mobile-nav .nav-item::before, .mobile-nav .nav-item.active::after { display: none; }
.mobile-nav .nav-item:hover, .mobile-nav .nav-item.active { background: transparent; box-shadow: none; transform: none; }
.mobile-nav .nav-item.active svg { filter: drop-shadow(0 0 5px var(--glow-gold)); }


/* Main Content Wrapper (accounts for side nav) */
.main-content {
    margin-left: var(--nav-width);
    transition: margin 0.3s ease;
}


/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('https://images.unsplash.com/photo-1542204625-780829141f22?q=80&w=2070&auto=format&fit=crop'); /* Dark street/rain theme */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--grad-dark-overlay);
    z-index: -1;
}

.fog-container {
    position: absolute;
    top: 0; left: 0; width: 200%; height: 100%;
    background: url('https://images.unsplash.com/photo-1485199433301-8b71028403ab?q=80&w=2000&auto=format&fit=crop&opacity=0.1') repeat-x;
    background-size: contain;
    opacity: 0.15;
    animation: drift 60s linear infinite;
    mix-blend-mode: screen;
    z-index: -1;
    pointer-events: none;
}

@keyframes drift {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.hero-content {
    text-align: center;
    max-width: 800px;
    padding: 0 5%;
    z-index: 1;
}

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

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

.hero-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-legal {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    width: 90%;
}

/* Page Hero (About, Contact, Legal) */
.page-hero {
    height: 50vh;
    min-height: 400px;
    display: flex;
    align-items: flex-end;
    padding-bottom: 4rem;
    background-size: cover;
    background-position: center;
    position: relative;
    border-bottom: 1px solid var(--glass-border);
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg-primary) 0%, rgba(7,8,13,0.4) 100%);
}

.page-hero-content {
    position: relative;
    z-index: 1;
}


/* Game Section */
.game-section {
    position: relative;
    z-index: 2;
    margin-top: -50px; /* Pull up slightly into hero */
}

.game-showcase {
    max-width: var(--game-width);
    margin: 0 auto;
    padding: 3px; /* Space for animated border */
    border-radius: calc(var(--border-radius) + 4px);
    position: relative;
    background: var(--bg-secondary);
    overflow: hidden;
}

/* Animated Glowing Border */
.game-showcase::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: conic-gradient(from 0deg, transparent 0%, var(--glow-blue) 25%, transparent 50%, var(--glow-gold) 75%, transparent 100%);
    animation: rotate 10s linear infinite;
    z-index: 0;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

.game-inner {
    position: relative;
    z-index: 1;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

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

.game-meta h2 { margin-bottom: 0.5rem; }
.game-meta p { margin-bottom: 0; max-width: 600px; }

.game-frame-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.8);
}

.game-frame-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Feature Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: url('https://images.unsplash.com/photo-1601334691763-714088a82ce1?q=80&w=600&auto=format&fit=crop') center/cover;
    opacity: 0.03; /* Paper texture */
    pointer-events: none;
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: rgba(30, 58, 138, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 0 20px var(--glow-blue);
    transition: all 0.3s ease;
}

.feature-icon svg {
    width: 30px;
    height: 30px;
    color: #3b82f6;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: rgba(250, 204, 21, 0.3);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 20px var(--glow-purple);
}

.feature-card:hover .feature-icon {
    background: rgba(202, 138, 4, 0.2);
    border-color: rgba(250, 204, 21, 0.4);
    box-shadow: 0 0 30px var(--glow-gold);
}

.feature-card:hover .feature-icon svg {
    color: #fde68a;
}

/* Asymmetry for grid */
.feature-card:nth-child(2n) {
    transform: translateY(20px);
}
.feature-card:nth-child(2n):hover {
    transform: translateY(10px);
}


/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

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

.form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 15px var(--glow-blue);
    background: rgba(0,0,0,0.5);
}

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

.form-message {
    display: none;
    padding: 1rem;
    border-radius: 12px;
    margin-top: 1rem;
    font-weight: 500;
}
.form-message.success { display: block; background: rgba(34, 197, 94, 0.1); border: 1px solid #22c55e; color: #4ade80; }
.form-message.error { display: block; background: rgba(239, 68, 68, 0.1); border: 1px solid #ef4444; color: #f87171; }


/* Text Content Pages (Legal/About) */
.content-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.content-wrapper h2 { margin-top: 2rem; color: #fde68a; }
.content-wrapper h3 { margin-top: 1.5rem; font-size: 1.2rem; }
.content-wrapper ul { margin-bottom: 1.5rem; padding-left: 1.5rem; color: var(--text-secondary); }
.content-wrapper li { margin-bottom: 0.5rem; }


/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--glass-border);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: url('https://images.unsplash.com/photo-1601334691763-714088a82ce1?q=80&w=1200&auto=format&fit=crop') center/cover;
    opacity: 0.02;
    pointer-events: none;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.footer-col h4 {
    color: #fde68a;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-col p { font-size: 0.9rem; }

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.8rem; }
.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}
.footer-links a:hover { color: var(--text-primary); text-shadow: 0 0 10px var(--glow-blue); }

.footer-bottom {
    border-top: 1px solid var(--glass-border);
    padding-top: 2rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.responsible-notice {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    font-size: 0.75rem;
    margin-top: 1rem;
    background: rgba(0,0,0,0.2);
}

.age-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px; height: 30px;
    border: 2px solid var(--text-muted);
    border-radius: 50%;
    font-weight: bold;
    font-size: 0.8rem;
    margin-left: 10px;
}


/* Animations Utilities */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    :root { --space-desktop: var(--space-tablet); }
    .side-nav { display: none; }
    .main-content { margin-left: 0; }
    .mobile-nav { display: block; }
    body { padding-bottom: 70px; } /* Space for bottom nav */
    .header { width: 95%; }
}

@media (max-width: 768px) {
    :root { --space-desktop: var(--space-mobile); }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .game-inner { padding: 1rem; }
    .feature-card:nth-child(2n) { transform: translateY(0); }
    .feature-card:nth-child(2n):hover { transform: translateY(-10px); }
    .hero-btns { flex-direction: column; width: 100%; max-width: 300px; margin: 0 auto; }
    .btn { width: 100%; }
}