/* ============================================
   CHALLENGER DEEP - Year 8 Science Website
   Deep Sea Exploration Theme
   ============================================ */

/* CSS Variables */
:root {
    --deep-black: #000508;
    --deep-navy: #0a1628;
    --twilight-blue: #0d2847;
    --midnight-blue: #061224;
    --bioluminescent-blue: #00d4ff;
    --bioluminescent-cyan: #00fff7;
    --bioluminescent-purple: #a855f7;
    --coral: #ff6b6b;
    --gold: #ffd700;
    --accent-yellow: #ffeb3b;
    --text-white: #e0f7ff;
    --text-pale: #b8e4f0;
    --glow-blue: 0 0 20px rgba(0, 212, 255, 0.8);
    --glow-cyan: 0 0 20px rgba(0, 255, 247, 0.8);
    --glow-purple: 0 0 20px rgba(168, 85, 247, 0.8);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--deep-black);
    color: var(--text-white);
    overflow-x: hidden;
}

/* ============================================
   ANIMATED BUBBLES BACKGROUND
   ============================================ */
.bubble-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bubble {
    position: absolute;
    bottom: -100px;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.3), rgba(0,212,255,0.1));
    border-radius: 50%;
    animation: rise linear infinite;
    opacity: 0.6;
}

.bubble:nth-child(1) { left: 10%; width: 30px; height: 30px; animation-duration: 12s; animation-delay: 0s; }
.bubble:nth-child(2) { left: 25%; width: 20px; height: 20px; animation-duration: 14s; animation-delay: 2s; }
.bubble:nth-child(3) { left: 40%; width: 40px; height: 40px; animation-duration: 16s; animation-delay: 1s; }
.bubble:nth-child(4) { left: 55%; width: 25px; height: 25px; animation-duration: 13s; animation-delay: 3s; }
.bubble:nth-child(5) { left: 70%; width: 35px; height: 35px; animation-duration: 15s; animation-delay: 0.5s; }
.bubble:nth-child(6) { left: 85%; width: 20px; height: 20px; animation-duration: 11s; animation-delay: 2.5s; }
.bubble:nth-child(7) { left: 15%; width: 28px; height: 28px; animation-duration: 14s; animation-delay: 1.5s; }
.bubble:nth-child(8) { left: 60%; width: 22px; height: 22px; animation-duration: 12s; animation-delay: 4s; }
.bubble:nth-child(9) { left: 80%; width: 38px; height: 38px; animation-duration: 17s; animation-delay: 0.8s; }
.bubble:nth-child(10) { left: 5%; width: 18px; height: 18px; animation-duration: 10s; animation-delay: 3.5s; }

@keyframes rise {
    0% {
        bottom: -100px;
        transform: translateX(0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.4;
    }
    100% {
        bottom: 100vh;
        transform: translateX(-50px) scale(1.2);
        opacity: 0;
    }
}

/* ============================================
   SONAR OVERLAY EFFECT
   ============================================ */
.sonar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    background: 
        radial-gradient(ellipse at center, transparent 0%, transparent 60%, rgba(0,20,40,0.3) 100%);
    opacity: 0.5;
}

/* ============================================
   NAVIGATION - COMMAND CONSOLE
   ============================================ */
.command-console {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(180deg, rgba(10,22,40,0.98) 0%, rgba(10,22,40,0.9) 100%);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    z-index: 999;
    border-bottom: 2px solid var(--bioluminescent-blue);
    box-shadow: 0 5px 30px rgba(0, 212, 255, 0.3);
}

.nav-logo {
    font-family: 'Courier New', monospace;
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--bioluminescent-cyan);
    text-shadow: var(--glow-cyan);
    letter-spacing: 3px;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { text-shadow: 0 0 10px rgba(0,255,247,0.8); }
    50% { text-shadow: 0 0 25px rgba(0,255,247,1), 0 0 40px rgba(0,255,247,0.5); }
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links li a {
    color: var(--text-white);
    text-decoration: none;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    padding: 10px 15px;
    border: 1px solid transparent;
    border-radius: 5px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-links li a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(0,212,255,0.4) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.nav-links li a:hover {
    color: var(--bioluminescent-cyan);
    border-color: var(--bioluminescent-blue);
    text-shadow: var(--glow-cyan);
    transform: scale(1.05);
}

.nav-links li a:hover::before {
    width: 200px;
    height: 200px;
    animation: jellyfish-pulse 0.6s ease-out;
}

@keyframes jellyfish-pulse {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

/* ============================================
   ZONES - BASE STYLES
   ============================================ */
.zone {
    min-height: 100vh;
    padding: 120px 5% 60px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 10;
}

.depth-indicator {
    position: absolute;
    top: 100px;
    right: 5%;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    color: var(--bioluminescent-cyan);
    background: rgba(0,20,40,0.8);
    padding: 8px 15px;
    border: 1px solid var(--bioluminescent-blue);
    border-radius: 5px;
    text-shadow: var(--glow-cyan);
}

.zone-title {
    font-size: 2.8rem;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 700;
}

/* Glowing Text Effects */
.glow-text {
    color: var(--text-white);
    text-shadow: 
        0 0 10px var(--bioluminescent-blue),
        0 0 20px var(--bioluminescent-blue),
        0 0 40px var(--bioluminescent-blue),
        0 0 80px rgba(0,212,255,0.5);
    animation: title-glow 3s ease-in-out infinite;
}

@keyframes title-glow {
    0%, 100% { text-shadow: 0 0 10px var(--bioluminescent-blue), 0 0 20px var(--bioluminescent-blue), 0 0 40px var(--bioluminescent-blue); }
    50% { text-shadow: 0 0 20px var(--bioluminescent-cyan), 0 0 40px var(--bioluminescent-cyan), 0 0 60px var(--bioluminescent-blue); }
}

.glow-text-cyan {
    color: var(--bioluminescent-cyan);
    text-shadow: var(--glow-cyan);
}

.glow-text-purple {
    color: var(--bioluminescent-purple);
    text-shadow: var(--glow-purple);
}

.glow-text-yellow {
    color: var(--accent-yellow);
    text-shadow: 0 0 20px rgba(255,235,59,0.8);
}

.glow-text-green {
    color: #4ade80;
    text-shadow: 0 0 20px rgba(74,222,128,0.8);
}

.glow-text-orange {
    color: #fb923c;
    text-shadow: 0 0 20px rgba(251,146,60,0.8);
}

.glow-text-blue {
    color: var(--bioluminescent-blue);
    text-shadow: var(--glow-blue);
}

.glow-text-white {
    color: var(--text-white);
    text-shadow: 0 0 20px rgba(255,255,255,0.5);
}

/* ============================================
   SECTION 1: THE SURFACE
   ============================================ */
.surface-zone {
    background: linear-gradient(180deg, 
        #001e3c 0%, 
        #003366 30%, 
        #004080 60%, 
        #0059b3 100%);
    text-align: center;
    overflow: hidden;
}

/* Sun Rays Effect */
.sun-rays {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(115deg, 
            transparent 0px, 
            transparent 30px, 
            rgba(255,255,200,0.03) 30px, 
            rgba(255,255,200,0.03) 32px);
    animation: ray-rotate 60s linear infinite;
}

@keyframes ray-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Submarine Animation */
.submarine-container {
    position: absolute;
    bottom: 20%;
    left: -100px;
    animation: submarine-enter 3s ease-out forwards, submarine-hover 4s ease-in-out 3s infinite;
}

@keyframes submarine-enter {
    to { left: 50%; transform: translateX(-50%); }
}

@keyframes submarine-hover {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-20px); }
}

.submarine {
    font-size: 80px;
    filter: drop-shadow(0 0 30px var(--bioluminescent-cyan));
    animation: submarine-bob 2s ease-in-out infinite;
}

@keyframes submarine-bob {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.main-title {
    font-size: 3.5rem;
    margin-bottom: 20px;
    font-family: 'Arial Black', sans-serif;
}

.main-subtitle {
    font-size: 1.5rem;
    color: var(--bioluminescent-cyan);
    margin-bottom: 30px;
    text-shadow: var(--glow-cyan);
}

.mission-brief {
    background: rgba(0,40,80,0.7);
    border: 2px solid var(--bioluminescent-blue);
    border-radius: 15px;
    padding: 30px;
    max-width: 700px;
    margin: 0 auto 40px;
    box-shadow: 0 0 30px rgba(0,212,255,0.3);
    backdrop-filter: blur(5px);
}

.mission-brief p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-pale);
}

/* Dive Button */
.dive-button {
    display: inline-block;
    padding: 20px 50px;
    background: linear-gradient(135deg, var(--bioluminescent-blue), var(--bioluminescent-cyan));
    color: var(--deep-navy);
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: bold;
    border-radius: 50px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 0 30px rgba(0,212,255,0.5);
    animation: button-pulse 2s ease-in-out infinite;
}

@keyframes button-pulse {
    0%, 100% { box-shadow: 0 0 30px rgba(0,212,255,0.5); }
    50% { box-shadow: 0 0 50px rgba(0,255,247,0.8), 0 0 80px rgba(0,212,255,0.4); }
}

.dive-button:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 10px 40px rgba(0,255,247,0.8);
}

.dive-button .button-text {
    position: relative;
    z-index: 2;
}

/* ============================================
   SECTION 2: SUNLIGHT ZONE
   ============================================ */
.sunlight-zone {
    background: linear-gradient(180deg, 
        #0059b3 0%, 
        #004080 30%, 
        #002b55 70%, 
        #001a33 100%);
    position: relative;
}

/* Fish Animation */
.fish-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.fish {
    position: absolute;
    font-size: 30px;
    animation: fish-swim 15s linear infinite;
    opacity: 0.7;
}

.fish:nth-child(1) { top: 20%; animation-duration: 18s; animation-delay: 0s; }
.fish:nth-child(2) { top: 40%; animation-duration: 22s; animation-delay: 5s; font-size: 25px; }
.fish:nth-child(3) { top: 60%; animation-duration: 20s; animation-delay: 2s; font-size: 35px; }

@keyframes fish-swim {
    0% { left: -10%; transform: scaleX(1); }
    49.9% { transform: scaleX(1); }
    50% { left: 110%; transform: scaleX(-1); }
    100% { left: -10%; transform: scaleX(-1); }
}

.scanner-frame {
    background: rgba(0,60,120,0.6);
    border: 3px solid var(--bioluminescent-cyan);
    border-radius: 20px;
    padding: 25px;
    margin: 30px auto;
    max-width: 800px;
    position: relative;
    overflow: hidden;
}

.scanner-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--bioluminescent-cyan), transparent);
    animation: scan 3s linear infinite;
}

@keyframes scan {
    0% { top: 0; opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* Topic Grid */
.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    margin: 40px 0;
}

.topic-card {
    background: linear-gradient(135deg, rgba(0,80,160,0.8), rgba(0,40,80,0.9));
    border: 2px solid var(--bioluminescent-blue);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.topic-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0,212,255,0.4);
    border-color: var(--bioluminescent-cyan);
}

.topic-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    animation: icon-float 3s ease-in-out infinite;
}

@keyframes icon-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.topic-card h3 {
    color: var(--bioluminescent-cyan);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.topic-card p {
    color: var(--text-pale);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Descend Button */
.descend-button {
    display: block;
    text-align: center;
    padding: 20px;
    margin: 40px auto;
    color: var(--bioluminescent-cyan);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 3px;
    animation: descend-pulse 2s ease-in-out infinite;
    width: fit-content;
}

@keyframes descend-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.descend-button:hover {
    color: var(--text-white);
    text-shadow: var(--glow-cyan);
    animation: none;
}

/* ============================================
   SECTION 3: TWILIGHT ZONE (CORE)
   ============================================ */
.twilight-zone {
    background: linear-gradient(180deg, 
        #001a33 0%, 
        #001222 30%, 
        #000a15 70%, 
        #000508 100%);
    position: relative;
}

/* Thermal Vents */
.thermal-vent {
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 100px;
    height: 200px;
}

.vent-steam {
    position: absolute;
    bottom: 0;
    width: 30px;
    height: 30px;
    background: radial-gradient(circle, rgba(255,255,255,0.6), transparent);
    border-radius: 50%;
    animation: vent-steam 3s ease-out infinite;
}

.vent-steam:nth-child(2) { animation-delay: 1s; left: 20px; }
.vent-steam:nth-child(3) { animation-delay: 2s; left: 50px; }

@keyframes vent-steam {
    0% { transform: translateY(0) scale(1); opacity: 0.8; }
    100% { transform: translateY(-200px) scale(3); opacity: 0; }
}

/* Glowing Creatures */
.glowing-creatures {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.creature {
    position: absolute;
    font-size: 2.5rem;
    animation: creature-glow 4s ease-in-out infinite;
    filter: drop-shadow(0 0 15px var(--bioluminescent-purple));
}

.creature:nth-child(1) { top: 15%; right: 15%; animation-delay: 0s; }
.creature:nth-child(2) { top: 45%; right: 25%; animation-delay: 1.5s; font-size: 2rem; }
.creature:nth-child(3) { top: 70%; right: 10%; animation-delay: 2.5s; font-size: 2.2rem; }

@keyframes creature-glow {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

/* Floating Formulas */
.floating-formulas {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.formula {
    position: absolute;
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    color: var(--bioluminescent-cyan);
    opacity: 0.4;
    animation: formula-float 8s ease-in-out infinite;
}

.formula:nth-child(1) { top: 20%; left: 5%; }
.formula:nth-child(2) { top: 40%; left: 8%; animation-delay: 2s; }
.formula:nth-child(3) { top: 60%; left: 3%; animation-delay: 4s; }
.formula:nth-child(4) { top: 80%; left: 10%; animation-delay: 1s; }

@keyframes formula-float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-15px) rotate(5deg); }
    75% { transform: translateY(15px) rotate(-5deg); }
}

.zone-subtitle {
    text-align: center;
    font-size: 1.3rem;
    color: var(--text-pale);
    margin-bottom: 30px;
}

.intro-box {
    background: linear-gradient(135deg, rgba(20,60,120,0.7), rgba(10,30,60,0.8));
    border: 2px solid var(--bioluminescent-purple);
    border-radius: 15px;
    padding: 30px;
    margin: 30px 0;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.intro-box p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-pale);
}

.intro-box strong {
    color: var(--bioluminescent-cyan);
}

/* Subsections */
.subsection {
    margin: 50px 0;
    padding: 30px;
    background: rgba(0,30,60,0.6);
    border-radius: 20px;
    border: 1px solid rgba(0,212,255,0.3);
}

/* Sonar Screen */
.sonar-screen {
    background: radial-gradient(ellipse at center, #001a33 0%, #000a15 100%);
    border: 3px solid var(--bioluminescent-blue);
    border-radius: 50%;
    padding: 40px;
    max-width: 500px;
    margin: 0 auto 30px;
    position: relative;
    overflow: hidden;
}

.sonar-rings {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border: 2px solid var(--bioluminescent-cyan);
    border-radius: 50%;
    animation: sonar-ping 3s ease-out infinite;
}

.sonar-rings::before, .sonar-rings::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid var(--bioluminescent-cyan);
    border-radius: 50%;
    animation: sonar-ping 3s ease-out infinite;
}

.sonar-rings::before { animation-delay: 1s; }
.sonar-rings::after { animation-delay: 2s; }

@keyframes sonar-ping {
    0% { width: 10%; height: 10%; opacity: 1; }
    100% { width: 200%; height: 200%; opacity: 0; }
}

/* Reactivity Chart */
.reactivity-chart {
    background: rgba(0,20,40,0.9);
    border: 2px solid var(--bioluminescent-cyan);
    border-radius: 15px;
    overflow: hidden;
    max-width: 800px;
    margin: 30px auto;
}

.reactivity-header {
    display: grid;
    grid-template-columns: 60px 1fr 1.5fr;
    background: linear-gradient(90deg, var(--bioluminescent-blue), var(--bioluminescent-cyan));
    color: var(--deep-navy);
    font-weight: bold;
    padding: 15px 20px;
}

.reactivity-row {
    display: grid;
    grid-template-columns: 60px 1fr 1.5fr;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(0,212,255,0.2);
    transition: all 0.3s ease;
}

.reactivity-row:hover {
    background: rgba(0,212,255,0.1);
    transform: scale(1.02);
}

.reactivity-row.hot { border-left: 5px solid #ff4444; }
.reactivity-row.warm { border-left: 5px solid #ffaa00; }
.reactivity-row.moderate { border-left: 5px solid #44ff44; }
.reactivity-row.cold { border-left: 5px solid #4444ff; }

/* Experiment Zones */
.experiment-zone {
    background: linear-gradient(135deg, rgba(0,50,100,0.7), rgba(0,20,50,0.8));
    border-radius: 20px;
    padding: 35px;
    margin: 30px 0;
    position: relative;
    overflow: hidden;
}

.water-experiment { border: 2px solid var(--bioluminescent-cyan); }
.acid-experiment { border: 2px solid #4ade80; }
.displacement-experiment { border: 2px solid #fb923c; }

/* Chemical Vent Animation */
.chemical-vent {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 60px;
    height: 80px;
}

.bubbles {
    position: absolute;
    bottom: 0;
    width: 15px;
    height: 15px;
    background: radial-gradient(circle at 30% 30%, var(--bioluminescent-cyan), transparent);
    border-radius: 50%;
    animation: bubble-rise 2s ease-out infinite;
}

.bubbles:nth-child(2) { left: 15px; animation-delay: 0.5s; }
.bubbles:nth-child(3) { left: 30px; animation-delay: 1s; }

@keyframes bubble-rise {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(-80px); opacity: 0; }
}

/* Cauldron Animation */
.cauldron {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 80px;
    height: 60px;
    background: radial-gradient(ellipse, rgba(74,222,128,0.6), transparent);
    border-radius: 50%;
}

.acid-bubbles {
    position: absolute;
    top: 0;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, #4ade80, transparent);
    border-radius: 50%;
    animation: acid-fizz 1.5s ease-out infinite;
}

.acid-bubbles:nth-child(2) { left: 25px; animation-delay: 0.3s; }

@keyframes acid-fizz {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translateY(-40px) scale(1.5); opacity: 0; }
}

/* Battle Scene */
.battle-scene {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin: 20px 0;
}

.metal-bully {
    font-size: 3rem;
    animation: bully-pulse 1s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(251,146,60,0.8));
}

.metal-victim {
    font-size: 3rem;
    animation: victim-shake 0.5s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(100,100,255,0.5));
}

@keyframes bully-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes victim-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Formula Boxes */
.formula-box {
    background: rgba(0,30,50,0.8);
    border: 2px solid var(--bioluminescent-blue);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.formula-box h4 {
    color: var(--bioluminescent-cyan);
    margin-bottom: 10px;
}

.formula-main {
    font-family: 'Courier New', monospace;
    font-size: 1.3rem;
    color: var(--accent-yellow);
    text-shadow: 0 0 10px rgba(255,235,59,0.5);
}

.example-box {
    background: rgba(0,40,70,0.7);
    border-radius: 10px;
    padding: 25px;
    margin-top: 20px;
}

.example-box h4 {
    color: var(--text-white);
    margin-bottom: 15px;
}

.equation {
    font-size: 1.1rem;
    color: var(--text-pale);
    margin: 10px 0;
}

.chemical-equation {
    font-family: 'Courier New', monospace;
    font-size: 1.4rem;
    color: var(--bioluminescent-cyan);
    text-shadow: var(--glow-cyan);
    margin: 15px 0;
    padding: 15px;
    background: rgba(0,20,40,0.8);
    border-radius: 8px;
    text-align: center;
}

/* Reaction Visual */
.reaction-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
}

.reaction-element {
    padding: 15px 25px;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    font-weight: bold;
    animation: element-float 2s ease-in-out infinite;
}

.na { background: linear-gradient(135deg, #ff6b6b, #cc4444); color: white; }
.h2o { background: linear-gradient(135deg, #4dabf7, #1971c2); color: white; }
.naoh { background: linear-gradient(135deg, #69db7c, #2f9e44); color: white; }
.h2 { background: linear-gradient(135deg, #ffd43b, #fab005); color: #333; }
.zn { background: linear-gradient(135deg, #868e96, #495057); color: white; }
.hcl { background: linear-gradient(135deg, #ff8787, #e03131); color: white; }
.zncl { background: linear-gradient(135deg, #b197fc, #6741d9); color: white; }

.reaction-arrow {
    font-size: 1.5rem;
    color: var(--bioluminescent-cyan);
    animation: arrow-pulse 1s ease-in-out infinite;
}

@keyframes element-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes arrow-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Color Change Animation */
.color-change {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 25px 0;
    flex-wrap: wrap;
}

.solution-blue, .solution-clear {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--bioluminescent-blue);
    animation: solution-glow 2s ease-in-out infinite;
}

.solution-blue {
    background: radial-gradient(circle, #0066ff, #0033cc);
    box-shadow: 0 0 30px rgba(0,102,255,0.8);
}

.solution-clear {
    background: radial-gradient(circle, #ffffff, #e0e0e0);
    box-shadow: 0 0 30px rgba(255,255,255,0.5);
}

@keyframes solution-glow {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.color-note {
    text-align: center;
    color: var(--accent-yellow);
    font-style: italic;
    margin-top: 15px;
}

/* ============================================
   SECTION 4: MIDNIGHT ZONE
   ============================================ */
.midnight-zone {
    background: linear-gradient(180deg, 
        #000508 0%, 
        #000205 50%, 
        #000000 100%);
    position: relative;
}

/* Bioluminescence */
.bioluminescence {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.glow-spots {
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(0,212,255,0.2), transparent);
    border-radius: 50%;
    animation: bio-glow 5s ease-in-out infinite;
}

.glow-spots:nth-child(1) { top: 10%; left: 20%; }
.glow-spots:nth-child(2) { top: 50%; right: 15%; animation-delay: 2s; }
.glow-spots:nth-child(3) { bottom: 20%; left: 30%; animation-delay: 1s; }

@keyframes bio-glow {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.2); }
}

/* Deep Creatures */
.deep-creatures {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.creature.deep {
    position: absolute;
    font-size: 1.8rem;
    animation: deep-swim 12s linear infinite;
    filter: drop-shadow(0 0 10px var(--bioluminescent-blue));
    opacity: 0.6;
}

.creature.deep:nth-child(1) { top: 25%; animation-duration: 18s; }
.creature.deep:nth-child(2) { top: 55%; animation-duration: 22s; animation-delay: 5s; }
.creature.deep:nth-child(3) { top: 75%; animation-duration: 15s; animation-delay: 3s; }

@keyframes deep-swim {
    0% { left: -5%; }
    100% { left: 105%; }
}

/* Ancient Structures */
.ancient-structures {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 150px;
    pointer-events: none;
}

.ruins {
    position: absolute;
    bottom: 0;
    width: 200px;
    height: 100px;
    background: linear-gradient(0deg, #001a33 0%, transparent 100%);
    opacity: 0.5;
}

.ruins:nth-child(1) { left: 10%; }
.ruins:nth-child(2) { right: 15%; height: 80px; }

/* Peripheral Sections */
.peripheral-section {
    background: rgba(0,30,50,0.7);
    border: 2px solid var(--bioluminescent-blue);
    border-radius: 20px;
    padding: 35px;
    margin: 30px 0;
    transition: all 0.3s ease;
}

.peripheral-section:hover {
    border-color: var(--bioluminescent-cyan);
    box-shadow: 0 0 30px rgba(0,212,255,0.3);
}

.peripheral-section h3 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

/* Particle Model */
.particle-model {
    margin: 25px 0;
}

.model-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
}

.particle-state {
    text-align: center;
    padding: 20px;
    border-radius: 15px;
    width: 180px;
    transition: all 0.3s ease;
}

.particle-state:hover {
    transform: scale(1.05);
}

.particle-state.solid {
    background: rgba(100,100,150,0.5);
    border: 2px solid #8888aa;
}

.particle-state.liquid {
    background: rgba(50,100,150,0.5);
    border: 2px solid #5588cc;
}

.particle-state.gas {
    background: rgba(100,150,100,0.5);
    border: 2px solid #66aa66;
}

.particles-packed, .particles-sliding, .particles-moving {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    height: 60px;
    margin-bottom: 15px;
}

.particles-packed span {
    width: 15px;
    height: 15px;
    background: var(--bioluminescent-cyan);
    border-radius: 50%;
    animation: vibrate 0.1s linear infinite;
}

@keyframes vibrate {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(1px, 1px); }
    75% { transform: translate(-1px, -1px); }
}

.particles-sliding span {
    width: 15px;
    height: 15px;
    background: var(--bioluminescent-blue);
    border-radius: 50%;
    animation: slide 2s ease-in-out infinite;
}

@keyframes slide {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10px); }
}

.particles-moving span {
    width: 12px;
    height: 12px;
    background: var(--bioluminescent-purple);
    border-radius: 50%;
    animation: move-random 1.5s ease-in-out infinite;
}

@keyframes move-random {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(15px, -10px); }
    66% { transform: translate(-10px, 15px); }
}

.particle-state p {
    font-weight: bold;
    margin-bottom: 8px;
}

.particle-desc {
    font-size: 0.8rem;
    color: var(--text-pale);
}

/* Cell Diagram */
.cell-diagram {
    margin: 25px 0;
    display: flex;
    justify-content: center;
}

.cell {
    width: 200px;
    height: 150px;
    background: radial-gradient(ellipse, rgba(74,222,128,0.3), rgba(74,222,128,0.1));
    border: 3px solid #4ade80;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    position: relative;
    animation: cell-pulse 4s ease-in-out infinite;
}

@keyframes cell-pulse {
    0%, 100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    50% { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; }
}

.nucleus {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: radial-gradient(circle, #a855f7, #7c3aed);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    box-shadow: 0 0 20px rgba(168,85,247,0.8);
}

.mitochondria {
    position: absolute;
    width: 30px;
    height: 15px;
    background: linear-gradient(90deg, #fb923c, #ea580c);
    border-radius: 50%;
    animation: mito-move 3s ease-in-out infinite;
}

.mitochondria.mt2 {
    top: 30%;
    right: 20%;
    animation-delay: 1.5s;
}

.mitochondria:first-of-type {
    bottom: 25%;
    left: 15%;
}

@keyframes mito-move {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(10deg); }
}

.membrane {
    position: absolute;
    top: 5%;
    left: 5%;
    right: 5%;
    bottom: 5%;
    border: 2px dashed rgba(74,222,128,0.5);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
}

.cell-parts {
    list-style: none;
    margin: 20px 0;
    padding: 0;
}

.cell-parts li {
    padding: 12px;
    margin: 10px 0;
    background: rgba(0,40,70,0.6);
    border-radius: 10px;
    border-left: 4px solid var(--bioluminescent-cyan);
}

.plant-note {
    margin-top: 20px;
    padding: 15px;
    background: rgba(0,80,40,0.5);
    border-radius: 10px;
    border: 2px solid #4ade80;
}

/* Forces Demo */
.forces-demo {
    margin: 25px 0;
    display: flex;
    justify-content: center;
}

.lever-system {
    position: relative;
    width: 300px;
    height: 120px;
}

.lever {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 250px;
    height: 10px;
    background: linear-gradient(90deg, #ff6b6b, #ffd43b);
    border-radius: 5px;
    transform-origin: left center;
    animation: lever-move 2s ease-in-out infinite;
}

@keyframes lever-move {
    0%, 100% { transform: translateX(-50%) rotate(-10deg); }
    50% { transform: translateX(-50%) rotate(10deg); }
}

.pivot {
    position: absolute;
    bottom: 30px;
    left: 25px;
    width: 30px;
    height: 30px;
    background: var(--bioluminescent-cyan);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--bioluminescent-cyan);
}

.force-arrow {
    position: absolute;
    bottom: 80px;
    right: 20px;
    font-size: 1rem;
    color: #ff6b6b;
    font-weight: bold;
    animation: arrow-right 1s ease-in-out infinite;
}

@keyframes arrow-right {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10px); }
}

.load {
    position: absolute;
    bottom: 60px;
    right: 30px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ffd43b, #fab005);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    color: #333;
}

/* ============================================
   SECTION 5: ABYSSAL ZONE
   ============================================ */
.abyss-zone {
    background: linear-gradient(180deg, 
        #000000 0%, 
        #000000 50%, 
        #0a0a0a 100%);
    position: relative;
    min-height: 100vh;
}

/* Seafloor */
.seafloor {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    pointer-events: none;
}

.sediment {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: linear-gradient(0deg, #1a1a2e 0%, transparent 100%);
}

.rocks {
    position: absolute;
    bottom: 10px;
    width: 100%;
    height: 40px;
    background: 
        radial-gradient(ellipse at 10%, #1a1a2e 30%, transparent 70%),
        radial-gradient(ellipse at 30%, #15152a 40%, transparent 80%),
        radial-gradient(ellipse at 70%, #1a1a2e 35%, transparent 75%),
        radial-gradient(ellipse at 90%, #15152a 45%, transparent 85%);
}

/* Submarine Landed */
.submarine-landed {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    animation: landed 1s ease-out forwards;
}

@keyframes landed {
    from { transform: translateX(-50%) translateY(-100px); opacity: 0; }
    to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

.sub {
    font-size: 60px;
    filter: drop-shadow(0 0 25px var(--bioluminescent-cyan));
}

/* Mission Complete */
.mission-complete {
    background: linear-gradient(135deg, rgba(0,60,100,0.8), rgba(0,30,60,0.9));
    border: 3px solid var(--bioluminescent-cyan);
    border-radius: 20px;
    padding: 40px;
    max-width: 800px;
    margin: 30px auto;
    text-align: center;
    box-shadow: 0 0 40px rgba(0,255,247,0.3);
}

.mission-complete p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-pale);
    margin-bottom: 20px;
}

.mission-complete .highlight {
    font-size: 1.3rem;
    color: var(--bioluminescent-cyan);
    font-weight: 600;
    text-shadow: var(--glow-cyan);
    padding: 20px;
    background: rgba(0,40,70,0.6);
    border-radius: 10px;
    border-left: 4px solid var(--bioluminescent-cyan);
}

/* Mission Buttons */
.mission-buttons {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.mission-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 35px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.mission-btn.download {
    background: linear-gradient(135deg, var(--bioluminescent-blue), #0066cc);
    color: white;
    border: 2px solid var(--bioluminescent-cyan);
}

.mission-btn.sources {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: #0a1628;
    border: 2px solid #86efac;
}

.mission-btn:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,212,255,0.4);
}

.btn-icon {
    font-size: 1.5rem;
}

/* Stats Panel */
.stats-panel {
    background: rgba(0,30,50,0.9);
    border: 2px solid var(--bioluminescent-blue);
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    margin: 40px auto;
}

.stats-panel h3 {
    text-align: center;
    color: var(--bioluminescent-cyan);
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.stat {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0,212,255,0.2);
}

.stat:last-child {
    border-bottom: none;
}

.stat-label {
    color: var(--text-pale);
}

.stat-value {
    color: var(--bioluminescent-cyan);
    font-weight: bold;
}

.stat-value.success {
    color: #4ade80;
    text-shadow: 0 0 10px rgba(74,222,128,0.5);
}

/* Footer */
.mission-footer {
    text-align: center;
    padding: 40px 20px;
    margin-top: 60px;
    border-top: 2px solid var(--bioluminescent-blue);
    background: rgba(0,20,40,0.8);
}

.mission-footer p {
    color: var(--text-pale);
    margin-bottom: 10px;
}

.disclaimer {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* ============================================
   SCROLL PROGRESS BAR
   ============================================ */
.scroll-progress {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(0,20,40,0.8);
    z-index: 998;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--bioluminescent-blue), var(--bioluminescent-cyan));
    width: 0%;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px var(--bioluminescent-cyan);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .command-console {
        flex-direction: column;
        padding: 15px;
    }

    .nav-links {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }

    .main-title {
        font-size: 2rem;
    }

    .zone-title {
        font-size: 1.8rem;
    }

    .topic-grid {
        grid-template-columns: 1fr;
    }

    .model-container {
        flex-direction: column;
        align-items: center;
    }

    .reactivity-header,
    .reactivity-row {
        grid-template-columns: 40px 1fr 1fr;
        font-size: 0.8rem;
        padding: 10px;
    }

    .mission-buttons {
        flex-direction: column;
        align-items: center;
    }

    .depth-indicator {
        position: static;
        margin-bottom: 20px;
    }
}

/* ============================================
   PARALLAX & SPECIAL EFFECTS
   ============================================ */
.zone::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 80%, rgba(0,212,255,0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(168,85,247,0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Smooth Section Transitions */
.zone {
    transition: background 0.5s ease;
}

/* Additional Ambient Particles */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--bioluminescent-cyan);
    border-radius: 50%;
    animation: particle-drift 8s linear infinite;
    opacity: 0.5;
}

.particle:nth-child(1) { top: 30%; left: 20%; animation-duration: 10s; }
.particle:nth-child(2) { top: 50%; left: 60%; animation-duration: 12s; animation-delay: 2s; }
.particle:nth-child(3) { top: 70%; left: 40%; animation-duration: 8s; animation-delay: 4s; }

@keyframes particle-drift {
    0% { transform: translate(0, 0); opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.4; }
    100% { transform: translate(30px, -50px); opacity: 0; }
}
