/* =========================================
   1. CORE VARIABLES & RESET
   ========================================= */
:root {
    --gold: #d4af37;
    --purple: #8b5cf6;
    --fire: #ff4d00;
    --dark: #050505;
    --darker: #020202;
    --glass: rgba(255, 255, 255, 0.05);
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

html { 
    scroll-behavior: smooth; 
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--dark);
    color: #fff;
    overflow-x: hidden;
    line-height: 1.6;
}

/* =========================================
   2. NAVIGATION
   ========================================= */
.navbar {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 1.5rem 5%; 
    position: fixed; 
    width: 100%; 
    top: 0; 
    z-index: 1000;
    background: rgba(0, 0, 0, 0.9); 
    backdrop-filter: blur(15px);
    transition: var(--transition);
}

.logo { 
    font-family: 'Cinzel', serif; 
    font-size: 1.6rem; 
    color: var(--gold); 
    letter-spacing: 3px; 
}

.nav-links { 
    display: flex; 
    list-style: none; 
}

.nav-links li { 
    margin-left: 2rem; 
}

.nav-links a { 
    color: #fff; 
    text-decoration: none; 
    font-size: 0.8rem; 
    text-transform: uppercase; 
    font-weight: 600; 
    transition: var(--transition); 
}

.nav-links a:hover { 
    color: var(--purple); 
}

/* Mobile Toggle */
.menu-toggle { display: none; cursor: pointer; flex-direction: column; gap: 5px; }
.bar { width: 25px; height: 3px; background-color: #fff; transition: 0.4s; }

/* =========================================
   3. HERO SECTION
   ========================================= */
.hero { 
    height: 100vh; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    text-align: center; 
    position: relative; 
    background: url('../IMG/BGLandscape.png') center/cover no-repeat;
}

@media (max-width: 768px) {
    .hero {
        background: url('../IMG/BGPortrait.png') center/cover no-repeat;
    }
}

.lore-hero { 
    height: 40vh; 
    min-height: 300px; 
}

.hero-overlay { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: radial-gradient(circle, transparent 20%, var(--dark) 95%); 
}

.hero-content { 
    position: relative; 
    z-index: 10; 
    padding: 0 20px; 
}

.game-title { 
    font-family: 'Cinzel', serif; 
    font-size: clamp(2.5rem, 8vw, 5rem); 
    text-shadow: 0 0 30px var(--purple); 
}

.subtitle { 
    color: var(--gold); 
    letter-spacing: 5px; 
    font-size: 1rem; 
    text-transform: uppercase; 
}

/* =========================================
   4. LORE & STORY CONTENT
   ========================================= */
.lore-section { padding: 100px 10%; background: var(--dark); }
.alt-bg { background: var(--darker); }
.lore-container { max-width: 1200px; margin: 0 auto; }

.lore-flex { 
    display: flex; 
    align-items: center; 
    gap: 4rem; 
    margin-top: 40px; 
}

.lore-flex.reverse { flex-direction: row-reverse; }

.lore-text { flex: 1; font-size: 1.1rem; color: #cbd5e1; }
.lore-text p { margin-bottom: 20px; }

.lore-visual { 
    flex: 1; 
    display: flex; 
    justify-content: center; 
}

.lore-img { 
    max-width: 100%; 
    height: auto; 
    border-radius: 20px; 
    filter: drop-shadow(0 0 20px rgba(0,0,0,0.5)); 
}

.lore-text-center { max-width: 800px; margin: 0 auto; text-align: center; }

.lore-quote { 
    font-family: 'Cinzel', serif; 
    font-size: 1.5rem; 
    color: var(--gold); 
    margin: 40px 0; 
    font-style: italic; 
}

/* Aura/Glow Effects */
.fire-aura-glow { filter: drop-shadow(0 0 30px rgba(255, 77, 0, 0.3)); }
.shadow-aura-glow { filter: drop-shadow(0 0 30px rgba(139, 92, 246, 0.3)); }

/* =========================================
   5. BUTTONS
   ========================================= */
.btn-main, .btn-sub, .btn-download {
    display: inline-block; 
    padding: 1rem 2.5rem; 
    border-radius: 4px;
    font-family: 'Poppins', sans-serif; 
    font-weight: 700; 
    text-transform: uppercase;
    letter-spacing: 2px; 
    font-size: 0.85rem; 
    text-decoration: none;
    cursor: pointer; 
    transition: var(--transition); 
    border: none; 
    outline: none;
}

.btn-main { 
    background: var(--purple); 
    color: #fff; 
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3); 
}

.btn-main:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5); 
    filter: brightness(1.1); 
}

.btn-sub { 
    background: transparent; 
    border: 2px solid #fff; 
    color: #fff; 
    margin-left: 15px; 
}

.btn-sub:hover { 
    background: #fff; 
    color: var(--dark); 
    transform: translateY(-3px); 
}

.btn-download { background: var(--gold); color: var(--dark); }

/* =========================================
   6. SHOWCASE & IMAGE SCALING FIXES
   ========================================= */
.showcase, .features { 
    padding: 80px 10%; 
    text-align: center; 
}

.feature-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 2.5rem; 
}

.feature-card { 
    background: var(--glass); 
    padding: 2.5rem; 
    border-radius: 20px; 
    border: 1px solid rgba(255,255,255,0.1); 
    transition: var(--transition); 
}

.char-img-wrap, .location-img-wrap {
    width: 100%; 
    height: 300px; 
    margin-bottom: 20px; 
    position: relative;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    overflow: hidden;
    border-radius: 12px; 
    background: rgba(0,0,0,0.3); 
    border: 1px solid rgba(255,255,255,0.1);
}

.char-img-inner { 
    max-width: 90%; 
    max-height: 90%; 
    width: auto; 
    height: auto; 
    object-fit: contain; 
    opacity: 0;
    transform: translateY(20px);
    animation: characterFade 0.8s ease-out forwards, float 4s ease-in-out infinite 0.8s;
}

.loc-img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: 0.5s;
}

/* =========================================
   7. QUEST LOG / TIMELINE
   ========================================= */
.timeline-container { max-width: 1100px; margin: 0 auto; padding: 40px 0; }
.timeline-part { margin-bottom: 100px; border-left: 3px solid var(--purple); padding-left: 40px; text-align: left; }
.chapter-card { background: var(--glass); padding: 25px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); }
.tag { color: var(--purple); font-weight: bold; text-transform: uppercase; font-size: 0.7rem; letter-spacing: 1px; }

/* =========================================
   8. FOOTER & PERSISTENT LINKS
   ========================================= */
footer { 
    width: 100%; 
    padding: 60px 5%; 
    background-color: var(--darker); 
    border-top: 1px solid rgba(255, 255, 255, 0.05); 
    text-align: center; 
}

.footer-container { 
    max-width: 1200px; 
    margin: 0 auto; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 25px; 
}

.social-links { display: flex; gap: 20px; font-family: 'Cinzel', serif; letter-spacing: 2px; }
.social-links a { color: var(--gold); text-decoration: none; transition: var(--transition); }

.footer-links { display: flex; gap: 25px; margin-top: 10px; }
.footer-links a { 
    color: #64748b; 
    font-size: 0.75rem; 
    text-decoration: none; 
    text-transform: uppercase; 
    transition: var(--transition);
}
.footer-links a:hover { color: var(--gold); }

.copyright { color: #444; font-size: 0.7rem; text-transform: uppercase; }

/* =========================================
   9. ANIMATIONS & REVEALS
   ========================================= */
@keyframes float { 
    0%, 100% { transform: translateY(0); } 
    50% { transform: translateY(-15px); } 
}

@keyframes characterFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal { 
    opacity: 0; 
    transform: translateY(30px); 
    transition: 1s ease-out; 
}

.reveal.active { 
    opacity: 1; 
    transform: translateY(0); 
}

/* =========================================
   10. MOBILE RESPONSIVENESS
   ========================================= */
@media (max-width: 768px) {
    .menu-toggle { display: flex; }
    
    /* MOBILE NAVIGATION FIX - INTEGRATED */
    .nav-links { 
        display: none; 
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(0, 0, 0, 0.95);
        padding: 2rem;
        text-align: center;
        z-index: 1000;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Show menu when active class is added by script.js */
    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 1.5rem 0;
        margin-left: 0;
    }
    
    .lore-flex, .lore-flex.reverse { flex-direction: column; text-align: center; gap: 2rem; }

    .btn-sub { 
        margin-left: 0; 
        margin-top: 15px; 
    }
    
    .char-img-wrap {
        height: 250px;
    }
    
    .footer-links { flex-direction: column; gap: 10px; }
}