:root {
    /* DESIGN SYSTEM */
    --bg-color: #0B1B14;
    --surface-color: #132A20;
    --primary-color: #F6C445;
    --secondary-color: #2ED47A;
    --accent-color: #FF7A2F;
    
    --text-main: #FFFFFF;
    --text-muted: #CFE7D8;
    --text-dim: #8FAF9E;

    --font-main: 'Outfit', sans-serif;
}

/* RESET & BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-color);
}

/* 🖼️ SINGLE CONTINUOUS CINEMATIC WORLD BACKGROUND */
body {
    font-family: var(--font-main);
    color: var(--text-main);
    background-color: var(--bg-color);
    background-image: url('images/aaa-cinematic-jungle-vault-vertical-epic-scroll-story.jpg');
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    cursor: default;
    position: relative;
    z-index: 0;
}

/* Global Tint to ensure all floating UI panels are perfectly readable */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(46, 212, 122, 0.05) 0%, rgba(11, 27, 20, 0.85) 100%);
    z-index: -1;
    pointer-events: none;
}

/* GLOBAL HOVER SYSTEM */
a, button, .clickable {
    cursor: pointer;
    position: relative;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: inline-block;
    text-decoration: none;
}

/* Ensure inline links behave properly */
p a, .legal-content a, .cookie-content a {
    display: inline;
}
p a:hover, .legal-content a:hover, .cookie-content a:hover {
    transform: none;
    text-shadow: 0 0 10px rgba(46, 212, 122, 0.8);
    color: var(--secondary-color);
}

/* Soft energy sweep underline for text links (Nav & Footer) */
.main-nav a::after, .footer-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 0 10px var(--secondary-color);
}

.main-nav a:hover::after, .footer-nav a:hover::after {
    transform: scaleX(1);
}

.main-nav a:hover, .footer-nav a:hover {
    color: var(--text-main);
    text-shadow: 0 0 12px rgba(46, 212, 122, 0.8);
    transform: translateY(-2px);
}

/* TYPOGRAPHY */
h1, h2, h3 {
    font-weight: 800;
    line-height: 1.1;
}

a {
    color: inherit;
}

/* Buttons Hover System */
.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    outline: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--bg-color);
    box-shadow: 0 4px 15px rgba(246, 196, 69, 0.2);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(46, 212, 122, 0.4), 0 0 15px rgba(246, 196, 69, 0.5);
    color: var(--bg-color);
}

.btn-primary:hover::before {
    opacity: 1;
}

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

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(246, 196, 69, 0.2), inset 0 0 10px rgba(246, 196, 69, 0.2);
    background-color: rgba(246, 196, 69, 0.05);
    text-shadow: 0 0 8px rgba(246, 196, 69, 0.6);
}

/* HEADER (SINGLE INSTANCE) */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(13, 30, 22, 0.75);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(46, 212, 122, 0.2);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo {
    height: 50px;
    width: auto;
    display: block;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

.header-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 15px rgba(246, 196, 69, 0.5));
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

.main-nav a {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
}

/* Glassmorphism futuristic jungle UI */
.scroll-story-hud, .legal-container {
    background: rgba(13, 30, 22, 0.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(46, 212, 122, 0.3);
    border-top: 2px solid rgba(246, 196, 69, 0.4);
    border-bottom: 2px solid rgba(46, 212, 122, 0.4);
    border-radius: 24px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), inset 0 0 30px rgba(46, 212, 122, 0.1);
}

.module-image {
    width: 100%;
    max-width: 480px;
    border-radius: 16px;
    margin: 1.5rem auto;
    display: block;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6), 0 0 30px rgba(46, 212, 122, 0.2);
    border: 1px solid rgba(46, 212, 122, 0.4);
    object-fit: cover;
    aspect-ratio: 16/9;
}

.module-description {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto 2rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

/* GAME SECTION */
.game-section {
    padding: 8rem 2rem 6rem;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
    min-height: 100vh;
}

.game-container {
    width: 75%;
    max-width: 1400px;
    aspect-ratio: 16 / 9;
    border-radius: 24px;
    overflow: hidden;
    background: transparent;
    padding: 0;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9), 0 0 50px rgba(46, 212, 122, 0.2);
    border: 1px solid rgba(46, 212, 122, 0.4);
}

.game-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    object-fit: contain;
    border-radius: 24px;
}

/* JUNGLE VAULT SCENE */
.vertical-scroll-story {
    position: relative;
    width: 100%;
    padding: 4rem 0 8rem;
}

.story-container {
    position: relative;
    width: 100%;
    padding: 0 2rem;
}

.scroll-story-hud {
    margin: 0 auto;
    width: 100%;
    max-width: 800px;
    text-align: center;
    z-index: 5;
    padding: 4rem;
}

.hud-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    color: #FFFFFF;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.9),
        0 0 30px rgba(46, 212, 122, 0.4);
    margin-bottom: 1rem;
    font-weight: 800;
}

.hud-bottom-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.hud-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--primary-color);
    font-weight: 800;
    text-shadow: 0 0 10px rgba(246, 196, 69, 0.3);
    background: rgba(246, 196, 69, 0.1);
    padding: 0.35rem 1.25rem;
    border-radius: 20px;
    border: 1px solid rgba(246, 196, 69, 0.3);
}

a.hud-label:hover {
    background: rgba(246, 196, 69, 0.25);
    border-color: rgba(246, 196, 69, 0.8);
    box-shadow: 0 0 20px rgba(246, 196, 69, 0.4);
    color: var(--primary-color);
    text-shadow: 0 0 15px rgba(246, 196, 69, 0.8);
    transform: translateY(-2px);
}

.hud-glow-line {
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
    box-shadow: 0 0 10px rgba(46, 212, 122, 0.8);
    border-radius: 50%;
    animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
    0% { opacity: 0.5; width: 80px; }
    50% { opacity: 1; width: 140px; box-shadow: 0 0 20px rgba(46, 212, 122, 1); }
    100% { opacity: 0.5; width: 80px; }
}

/* LEGAL PAGES GENERATION SYSTEM */
.legal-section {
    padding: 10rem 2rem 4rem;
    min-height: 100vh;
}

.legal-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem;
}

.legal-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    text-align: center;
}

.legal-mandatory-disclaimer {
    background: rgba(246, 196, 69, 0.1);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    margin-bottom: 3rem;
    font-weight: 600;
    color: var(--primary-color);
    border-radius: 0 8px 8px 0;
    line-height: 1.6;
}

.legal-content h2 {
    color: var(--text-main);
    margin: 2.5rem 0 1rem;
    font-size: 1.5rem;
    border-bottom: 1px solid rgba(46, 212, 122, 0.3);
    padding-bottom: 0.5rem;
}

.legal-content p {
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    line-height: 1.8;
}

.legal-content ul {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    line-height: 1.8;
}

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

.legal-content a {
    color: var(--secondary-color);
    text-decoration: none;
}

/* AUTO-REPAIR SINGLE FOOTER */
.site-footer {
    background: rgba(11, 27, 20, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 5rem 2rem;
    border-top: 1px solid rgba(46, 212, 122, 0.2);
    position: relative;
    z-index: 2;
}

.footer-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
}

.footer-brand {
    color: var(--primary-color);
    font-size: 1.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.footer-description {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 600px;
}

.footer-nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-nav a {
    color: var(--text-main);
    font-weight: 600;
}

.footer-disclaimer {
    color: var(--text-dim);
    font-size: 0.85rem;
    line-height: 1.5;
    max-width: 700px;
}

.footer-email {
    color: var(--secondary-color);
    font-weight: 600;
}

.footer-email:hover {
    color: var(--primary-color);
}

.footer-copyright {
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-top: 1rem;
}

/* COOKIE SYSTEM */
.cookie-banner {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(13, 30, 22, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(46, 212, 122, 0.4);
    border-top: 2px solid rgba(46, 212, 122, 0.6);
    padding: 1.5rem 2rem;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), inset 0 0 20px rgba(46, 212, 122, 0.15);
    z-index: 9999;
    width: 90%;
    max-width: 600px;
}

.cookie-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
}

.cookie-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.cookie-content a {
    color: var(--primary-color);
    text-decoration: none;
}

.cookie-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.cookie-buttons button {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
}

/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
    .game-container {
        width: 88%;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .main-nav {
        display: none;
    }

    .game-section {
        padding: 8rem 0 2rem;
    }

    .game-container {
        width: 100%;
        border-radius: 16px;
        aspect-ratio: auto;
        height: 60vh;
        border-left: none;
        border-right: none;
    }
    
    .game-iframe {
        border-radius: 16px;
    }

    .scroll-story-hud {
        padding: 3rem 1.5rem;
    }

    .footer-nav ul {
        flex-direction: column;
        gap: 1rem;
    }

    .legal-container {
        padding: 2rem 1.5rem;
    }
}