/* --- RESET & VARIABLES --- */
:root {
    --bg-color: #080808;
    --text-color: #e0e0e0;
    --accent-gold: #ffb700;
    --accent-cyan: #00f7ff;
    --accent-violet: #bd00ff; /* New color for the Flash */
    --glass-panel: rgba(20, 20, 20, 0.85);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.3rem;
    line-height: 1.8;
    overflow-x: hidden;
}

/* --- HERO SECTION --- */
.hero {
    height: 100vh;
    width: 100%;
    /* Background: Scene 1 Placeholder */
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), var(--bg-color)), url('images/chapter5_scene1.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero-content {
    background: rgba(0,0,0,0.7);
    padding: 40px;
    border: 1px solid var(--accent-violet);
    box-shadow: 0 0 30px rgba(189, 0, 255, 0.2);
    backdrop-filter: blur(5px);
}

.chapter-tag {
    font-family: 'Orbitron', sans-serif;
    color: var(--accent-violet);
    letter-spacing: 4px;
    text-transform: uppercase;
    font-size: 1rem;
    margin-bottom: 10px;
}

h1 {
    font-family: 'Cinzel', serif;
    font-size: 3.5rem;
    color: #fff;
    text-shadow: 0 0 15px rgba(189, 0, 255, 0.6);
    margin: 0;
    line-height: 1.1;
}

/* --- CONTAINER --- */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
}

/* --- TEXT ELEMENTS --- */
p { margin-bottom: 2rem; color: #ccc; }

.first-letter::first-letter {
    font-family: 'Cinzel', serif;
    font-size: 3.5rem;
    float: left;
    margin-right: 10px;
    line-height: 0.8;
    color: var(--accent-gold);
}

.highlight-gold { color: var(--accent-gold); font-weight: bold; font-style: italic; font-size: 1.2rem; display: block; margin-top: 15px; border-left: 3px solid var(--accent-gold); padding-left: 15px; }

/* --- IMAGES --- */
figure { margin: 0; padding: 0; }
figcaption { text-align: center; font-size: 0.8rem; color: #666; font-family: 'Orbitron', sans-serif; margin-top: 10px; }

.story-image {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 40px 0 10px 0;
    box-shadow: 0 0 30px rgba(0,0,0,0.8);
    border: 1px solid #333;
    transition: transform 0.5s ease;
}

.story-image:hover { transform: scale(1.01); }
.gold-border { border: 1px solid var(--accent-gold); }

/* --- BLUEPRINT HUD (Chemical Recipe) --- */
.blueprint-hud {
    background: rgba(10, 10, 15, 0.95);
    border: 1px solid var(--accent-cyan);
    padding: 25px;
    margin: 40px 0;
    font-family: 'Orbitron', sans-serif;
}

.hud-header {
    color: var(--accent-cyan);
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
    margin-bottom: 20px;
    letter-spacing: 2px;
    font-size: 0.9rem;
}

.blueprint-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blueprint-list li {
    margin-bottom: 15px;
    color: #fff;
    font-size: 1rem;
    display: flex;
    align-items: center;
}

.bp-icon {
    font-size: 1.5rem;
    margin-right: 15px;
    filter: drop-shadow(0 0 5px var(--accent-cyan));
}

/* --- SUB-CHAPTER & SFX --- */
.sub-chapter {
    text-align: center;
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    color: #888;
    margin: 80px 0 40px 0;
    letter-spacing: 2px;
    border-top: 1px solid #333;
    padding-top: 20px;
}

.sfx-flash {
    font-family: 'Orbitron', sans-serif;
    font-size: 6rem;
    text-align: center;
    font-weight: 900;
    color: #fff;
    margin: 20px 0;
    text-shadow: 0 0 50px var(--accent-violet), 0 0 100px #fff;
    animation: blind 0.1s infinite;
}

/* --- ANIMATIONS --- */
.reveal { opacity: 0; transform: translateY(40px); transition: all 0.8s ease; }
.reveal.active { opacity: 1; transform: translateY(0); }

@keyframes blind {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.02); }
    100% { opacity: 1; transform: scale(1); }
}

/* --- NAVIGATION --- */
.nav-links { display: flex; justify-content: space-between; margin-top: 80px; }
.btn-nav { text-decoration: none; color: #888; padding: 10px 20px; border: 1px solid #333; transition: 0.3s; }
.btn-next { color: var(--accent-violet); border-color: var(--accent-violet); font-weight: bold; }
.btn-nav:hover { background: #111; color: #fff; }

/* --- MOBILE --- */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    .sfx-flash { font-size: 4rem; }
    .hero { background-attachment: scroll; }
}