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

:root {
    /* Colors */
    --c-deep-night: #0a0f1c;
    --c-midnight: #10182b;
    --c-glass: rgba(255, 255, 255, 0.03);
    --c-glass-border: rgba(255, 255, 255, 0.08);
    --c-gold: #fbbf24;
    --c-orange: #fb923c;
    --c-red: #f87171;
    --c-text-primary: #f9fafb;
    --c-text-secondary: #d1d5db;
    
    /* Layout */
    --container-w: 1320px;
    --nav-h: 80px;
    
    /* Spacing */
    --space-desk: 110px;
    --space-tab: 80px;
    --space-mob: 60px;
    
    /* Radius */
    --rad-container: 24px;
    --rad-btn: 16px;
    --rad-card: 20px;
    
    /* Fonts */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--c-deep-night);
    color: var(--c-text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Atmosphere */
.ambient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    background: radial-gradient(circle at 50% 0%, var(--c-midnight) 0%, var(--c-deep-night) 70%);
}

.glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.15;
    animation: drift 20s infinite alternate ease-in-out;
}

.orb-1 { top: 10%; left: 20%; width: 400px; height: 400px; background: var(--c-gold); }
.orb-2 { bottom: 20%; right: 10%; width: 500px; height: 500px; background: var(--c-orange); animation-delay: -5s; }

/* Typography */
h1, h2, h3, h4, .brand {
    font-family: var(--font-heading);
    font-weight: 500;
    line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); margin-bottom: 1.5rem; }
h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1.5rem; }
h3 { font-size: 1.5rem; margin-bottom: 1rem; }

p { font-size: 1.125rem; color: var(--c-text-secondary); margin-bottom: 1.5rem; font-weight: 300; }

.text-gradient {
    background: linear-gradient(135deg, var(--c-gold), var(--c-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Layout Classes */
.container {
    max-width: var(--container-w);
    margin: 0 auto;
    padding: 0 32px;
}

@media (max-width: 1024px) { .container { padding: 0 24px; } }
@media (max-width: 768px) { .container { padding: 0 16px; } }

section {
    padding: var(--space-desk) 0;
    position: relative;
}

@media (max-width: 1024px) { section { padding: var(--space-tab) 0; } }
@media (max-width: 768px) { section { padding: var(--space-mob) 0; } }

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-h);
    z-index: 1000;
    background: rgba(10, 15, 28, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--c-glass-border);
    transition: all 0.3s ease;
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    color: var(--c-text-primary);
    text-decoration: none;
    letter-spacing: 1px;
}

.brand-icon {
    width: 32px;
    height: 32px;
    background: radial-gradient(circle at 30% 30%, var(--c-gold), var(--c-orange));
    border-radius: 8px 8px 16px 16px;
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.4);
}

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

nav a {
    color: var(--c-text-secondary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 400;
    transition: color 0.3s ease;
    position: relative;
}

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

nav a:hover { color: var(--c-text-primary); }
nav a:hover::after { width: 100%; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: var(--rad-btn);
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 1.1rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--c-gold), var(--c-orange));
    color: var(--c-deep-night);
    box-shadow: 0 4px 20px rgba(251, 146, 60, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(251, 146, 60, 0.5);
    background: linear-gradient(135deg, #fcd34d, #fdba74);
}

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

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Mobile Menu Toggle (CSS Only) */
.menu-toggle { display: none; }
.menu-icon { display: none; cursor: pointer; padding: 10px; }
.menu-icon span { display: block; width: 25px; height: 2px; background: var(--c-text-primary); margin: 5px 0; transition: 0.3s; }

@media (max-width: 768px) {
    .menu-icon { display: block; }
    nav ul {
        position: absolute;
        top: var(--nav-h);
        left: 0;
        width: 100%;
        background: rgba(10, 15, 28, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        gap: 1.5rem;
        transform: translateY(-150%);
        transition: transform 0.4s ease;
        border-bottom: 1px solid var(--c-glass-border);
    }
    .menu-toggle:checked ~ ul { transform: translateY(0); }
    .nav-actions { display: none; }
}

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

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    max-width: 600px;
    z-index: 2;
}

.hero-visual {
    position: relative;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* CSS Lantern Graphic for Hero */
.css-lantern {
    position: relative;
    width: 120px;
    height: 160px;
    background: linear-gradient(to bottom, rgba(251, 191, 36, 0.2), rgba(251, 146, 60, 0.8));
    border-radius: 20px 20px 30px 30px;
    box-shadow: 0 0 50px rgba(251, 146, 60, 0.6), inset 0 0 20px rgba(255, 255, 255, 0.5);
    animation: floatLantern 4s infinite ease-in-out;
    border: 1px solid rgba(255,255,255,0.3);
}

.css-lantern::before {
    content: '';
    position: absolute;
    top: -15px; left: 50%; transform: translateX(-50%);
    width: 60px; height: 15px;
    background: #333; border-radius: 10px 10px 0 0;
}
.css-lantern::after {
    content: '';
    position: absolute;
    bottom: -10px; left: 50%; transform: translateX(-50%);
    width: 80px; height: 10px;
    background: #222; border-radius: 0 0 10px 10px;
}
.flame {
    position: absolute;
    bottom: 20px; left: 50%; transform: translateX(-50%);
    width: 20px; height: 40px;
    background: #fff;
    border-radius: 50% 50% 20% 20%;
    box-shadow: 0 0 20px #fff, 0 0 40px var(--c-gold), 0 0 60px var(--c-orange);
    animation: flicker 0.1s infinite alternate;
}

.floating-lights {
    position: absolute;
    width: 100%; height: 100%;
}
.light-dot {
    position: absolute;
    width: 4px; height: 4px;
    background: var(--c-gold);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--c-gold);
    opacity: 0;
}
.ld-1 { top: 20%; left: 10%; animation: floatParticle 6s infinite 1s; }
.ld-2 { top: 60%; left: 80%; animation: floatParticle 8s infinite 2s; }
.ld-3 { top: 80%; left: 30%; animation: floatParticle 7s infinite 0s; }
.ld-4 { top: 10%; left: 70%; animation: floatParticle 9s infinite 3s; }

@media (max-width: 992px) {
    .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
    .hero-content { margin: 0 auto; }
    .hero-visual { height: 300px; }
}

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

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem auto;
}

.game-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--c-glass);
    border: 1px solid var(--c-glass-border);
    border-radius: var(--rad-container);
    padding: 16px;
    backdrop-filter: blur(12px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 30px rgba(251, 191, 36, 0.1);
    position: relative;
    transition: transform 0.5s ease;
}

.game-wrapper::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    background: linear-gradient(135deg, rgba(251,191,36,0.5), transparent, rgba(251,146,60,0.5));
    z-index: -1;
    border-radius: calc(var(--rad-container) + 2px);
    opacity: 0.5;
    animation: glowPulseEdge 4s infinite alternate;
}

.game-wrapper:hover {
    transform: scale(1.01);
}

.game-container {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

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

@media (max-width: 768px) {
    .game-wrapper { padding: 8px; border-radius: 16px; }
    .game-container { border-radius: 8px; }
}

/* Glass Cards (Features/Legal/About) */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.glass-card {
    background: var(--c-glass);
    border: 1px solid var(--c-glass-border);
    border-radius: var(--rad-card);
    padding: 2.5rem;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3), 0 0 15px rgba(251, 191, 36, 0.1);
}

.card-icon {
    width: 50px; height: 50px;
    background: rgba(251, 191, 36, 0.1);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--c-gold);
    font-size: 1.5rem;
    border: 1px solid rgba(251, 191, 36, 0.2);
}

/* Content Pages (Legal, About) */
.page-header {
    text-align: center;
    padding: 180px 0 80px;
    background: radial-gradient(ellipse at bottom, rgba(251, 146, 60, 0.1) 0%, transparent 70%);
}

.content-block {
    max-width: 800px;
    margin: 0 auto;
    background: var(--c-glass);
    border: 1px solid var(--c-glass-border);
    border-radius: var(--rad-card);
    padding: 3rem;
    backdrop-filter: blur(10px);
}

.content-block h2 { color: var(--c-gold); font-size: 1.8rem; margin-top: 2rem; }
.content-block h2:first-child { margin-top: 0; }
.content-block ul { margin-bottom: 1.5rem; padding-left: 1.5rem; color: var(--c-text-secondary); }
.content-block li { margin-bottom: 0.5rem; }

@media (max-width: 768px) {
    .content-block { padding: 1.5rem; }
}

/* Footer */
footer {
    border-top: 1px solid var(--c-glass-border);
    background: rgba(10, 15, 28, 0.8);
    padding: 4rem 0 2rem;
    position: relative;
    z-index: 2;
}

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

.footer-col h4 {
    color: var(--c-text-primary);
    margin-bottom: 1.5rem;
}

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

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.8rem; }
.footer-links a {
    color: var(--c-text-secondary);
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.95rem;
}
.footer-links a:hover { color: var(--c-gold); }

.disclaimer {
    background: rgba(255,255,255,0.02);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--c-glass-border);
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 2rem;
}

.age-icon {
    width: 40px; height: 40px;
    background: var(--c-red); color: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold; font-family: var(--font-heading);
    flex-shrink: 0;
}

.disclaimer p { margin: 0; font-size: 0.85rem; }

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--c-glass-border);
    font-size: 0.85rem;
    color: rgba(209, 213, 219, 0.5);
}

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

/* Forms */
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; color: var(--c-text-primary); font-size: 0.9rem;}
.form-control {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--c-glass-border);
    border-radius: 12px;
    color: white;
    font-family: var(--font-body);
    transition: all 0.3s;
}
.form-control:focus { outline: none; border-color: var(--c-gold); background: rgba(0,0,0,0.4); }
textarea.form-control { min-height: 150px; resize: vertical; }

/* Animations Keyframes */
@keyframes drift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(30px, -30px); }
}

@keyframes floatLantern {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
}

@keyframes flicker {
    0% { opacity: 0.8; transform: translateX(-50%) scale(0.9); }
    100% { opacity: 1; transform: translateX(-50%) scale(1.1); }
}

@keyframes floatParticle {
    0% { transform: translateY(0) scale(1); opacity: 0; }
    20% { opacity: 0.8; }
    80% { opacity: 0.8; }
    100% { transform: translateY(-100px) scale(0); opacity: 0; }
}

@keyframes glowPulseEdge {
    0% { opacity: 0.3; }
    100% { opacity: 0.7; }
}