/* ============================================
   munj.uk — Deep Ocean Seapunk Design System
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --abyss-bg: #0A0E17;
    --deep-water: #0F1B2D;
    --sonar-green: #00FFB2;
    --electric-cyan: #00D4FF;
    --anglerfish-gold: #FFD700;
    --pressure-red: #FF3366;
    --ghost-coral: #E8F0FE;
    --plankton-white: #C4D6E8;

    --glow-green: 0 0 10px rgba(0,255,178,0.5), 0 0 30px rgba(0,255,178,0.2);
    --glow-cyan: 0 0 10px rgba(0,212,255,0.5), 0 0 30px rgba(0,212,255,0.2);
    --glow-gold: 0 0 10px rgba(255,215,0,0.5), 0 0 30px rgba(255,215,0,0.2);
    --glow-red: 0 0 10px rgba(255,51,102,0.5), 0 0 30px rgba(255,51,102,0.2);

    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Lora', serif;
    --font-code: 'JetBrains Mono', monospace;

    --zone-spacing: clamp(4rem, 8vw, 10rem);
    --inner-spacing: clamp(1.5rem, 3vw, 3rem);

    --transition-smooth: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: var(--abyss-bg);
    color: var(--ghost-coral);
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    font-weight: 400;
    line-height: 1.7;
    overflow-x: hidden;
}

/* --- Particle Canvas --- */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* --- Depth Counter (Fixed) --- */
#depth-counter {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 100;
    font-family: var(--font-code);
    font-size: 0.9rem;
    color: var(--sonar-green);
    text-shadow: var(--glow-green);
    opacity: 0.9;
}

.depth-label {
    font-size: 0.65rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--plankton-white);
    margin-bottom: 0.25rem;
}

.depth-value {
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.depth-bar {
    width: 4px;
    height: 80px;
    background: rgba(0,255,178,0.15);
    border-radius: 2px;
    position: relative;
}

.depth-bar-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: var(--sonar-green);
    border-radius: 2px;
    box-shadow: var(--glow-green);
    transition: height 200ms ease-out;
}

/* --- Depth Zones (Shared) --- */
.depth-zone {
    position: relative;
    min-height: 100vh;
    width: 100%;
    z-index: 1;
    overflow: hidden;
}

.zone-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* --- Zone 0: Surface (Hero) --- */
.zone-surface {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    padding: clamp(2rem, 5vw, 5rem);
    align-items: stretch;
}

.zone-surface .zone-overlay {
    background: radial-gradient(ellipse at 50% 30%, rgba(0,212,255,0.08) 0%, transparent 70%);
}

/* Hero Domain Name */
.hero-domain {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 2;
}

.bioluminescent-text {
    font-family: var(--font-display);
    font-size: clamp(3rem, 10vw, 7rem);
    font-weight: 700;
    color: var(--sonar-green);
    text-shadow: 0 0 20px rgba(0,255,178,0.6), 0 0 60px rgba(0,255,178,0.3), 0 0 100px rgba(0,255,178,0.15);
    letter-spacing: -0.02em;
    line-height: 1;
    animation: textPulse 4s ease-in-out infinite;
}

@keyframes textPulse {
    0%, 100% {
        text-shadow: 0 0 20px rgba(0,255,178,0.6), 0 0 60px rgba(0,255,178,0.3), 0 0 100px rgba(0,255,178,0.15);
    }
    50% {
        text-shadow: 0 0 30px rgba(0,255,178,0.8), 0 0 80px rgba(0,255,178,0.4), 0 0 120px rgba(0,255,178,0.2);
    }
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: var(--plankton-white);
    margin-top: 1rem;
    opacity: 0.7;
    font-style: italic;
}

/* Compass Rose */
.compass-rose {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    padding-top: 2rem;
    z-index: 2;
}

.compass-rose svg {
    animation: compassSpin 30s linear infinite;
}

@keyframes compassSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.compass-tri {
    fill: none;
    stroke: var(--sonar-green);
    stroke-width: 1;
    opacity: 0.8;
}

.compass-diag {
    stroke: var(--electric-cyan);
    opacity: 0.5;
}

.compass-center {
    fill: var(--sonar-green);
    filter: drop-shadow(0 0 6px rgba(0,255,178,0.7));
}

.compass-ring {
    fill: none;
    stroke: var(--electric-cyan);
    stroke-width: 0.5;
    opacity: 0.4;
    stroke-dasharray: 3 5;
}

.compass-ring-outer {
    fill: none;
    stroke: var(--sonar-green);
    stroke-width: 0.3;
    opacity: 0.25;
    stroke-dasharray: 1 8;
}

/* Depth Gauge */
.depth-gauge {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    align-items: flex-end;
    z-index: 2;
    padding-bottom: 2rem;
    gap: 1rem;
}

.gauge-line {
    width: 2px;
    height: 120px;
    background: linear-gradient(to bottom, var(--sonar-green), var(--electric-cyan), var(--pressure-red));
    opacity: 0.6;
    position: relative;
}

.gauge-markers {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 120px;
    font-family: var(--font-code);
    font-size: 0.65rem;
    color: var(--plankton-white);
    opacity: 0.5;
}

.gauge-indicator {
    width: 8px;
    height: 8px;
    background: var(--sonar-green);
    border-radius: 50%;
    box-shadow: var(--glow-green);
    position: absolute;
    left: -3px;
    top: 0;
    transition: top 200ms ease-out;
}

/* Dive Prompt */
.dive-prompt {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-end;
    padding-bottom: 2rem;
    z-index: 2;
    cursor: pointer;
}

.dive-text {
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--electric-cyan);
    text-shadow: var(--glow-cyan);
    margin-bottom: 0.5rem;
}

.dive-arrow {
    animation: bobDown 2s ease-in-out infinite;
}

.dive-arrow svg polygon {
    filter: drop-shadow(0 0 6px rgba(0,255,178,0.5));
    transition: var(--transition-smooth);
}

.dive-prompt:hover .dive-arrow svg polygon {
    stroke: var(--anglerfish-gold);
    filter: drop-shadow(0 0 10px rgba(255,215,0,0.7));
}

@keyframes bobDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

/* Floating Hex Cluster */
.hex-cluster {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    pointer-events: none;
}

.hexagon {
    position: absolute;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    border: 1px solid var(--sonar-green);
    background: rgba(0,255,178,0.03);
    animation: hexFloat 8s ease-in-out infinite;
}

.hex-sm {
    width: 40px;
    height: 46px;
    top: -30px;
    left: -50px;
    opacity: 0.4;
    animation-delay: 0s;
    background: rgba(0,255,178,0.05);
    outline: 1px solid rgba(0,255,178,0.3);
}

.hex-md {
    width: 70px;
    height: 80px;
    top: 0;
    left: 0;
    opacity: 0.25;
    animation-delay: -2s;
    background: rgba(0,212,255,0.04);
    outline: 1px solid rgba(0,212,255,0.25);
}

.hex-lg {
    width: 100px;
    height: 115px;
    top: -20px;
    left: 40px;
    opacity: 0.15;
    animation-delay: -4s;
    background: rgba(0,255,178,0.02);
    outline: 1px solid rgba(0,255,178,0.15);
}

@keyframes hexFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-15px) rotate(5deg); }
    66% { transform: translateY(10px) rotate(-3deg); }
}

/* --- Zone 1: Twilight --- */
.zone-twilight {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--zone-spacing);
    padding: var(--zone-spacing) clamp(2rem, 5vw, 5rem);
    position: relative;
}

.zone-twilight .zone-overlay {
    background: radial-gradient(ellipse at 30% 50%, rgba(0,212,255,0.06) 0%, transparent 60%);
}

/* Viewport Panels */
.viewport-panel {
    max-width: 600px;
    width: 100%;
    z-index: 2;
}

.panel-left {
    align-self: flex-start;
    perspective: 800px;
}

.panel-right {
    align-self: flex-end;
    perspective: 800px;
}

.panel-frame {
    border: 2px solid rgba(0,212,255,0.3);
    border-radius: 20px;
    padding: 3px;
    background: linear-gradient(135deg, rgba(0,212,255,0.08), rgba(0,255,178,0.04));
    position: relative;
    overflow: hidden;
}

.panel-left .panel-frame {
    transform: rotateY(2deg);
}

.panel-right .panel-frame {
    transform: rotateY(-2deg);
}

.panel-frame::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(0,212,255,0.1), transparent, rgba(0,255,178,0.05), transparent);
    animation: panelShimmer 8s linear infinite;
    pointer-events: none;
}

@keyframes panelShimmer {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.panel-glass {
    background: rgba(15,27,45,0.85);
    border-radius: 17px;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    position: relative;
    backdrop-filter: blur(2px);
}

.panel-title {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 700;
    color: var(--electric-cyan);
    text-shadow: var(--glow-cyan);
    margin-bottom: 1rem;
}

.panel-body {
    color: var(--plankton-white);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.panel-code {
    font-family: var(--font-code);
    font-size: 0.85rem;
    color: var(--sonar-green);
    text-shadow: 0 0 8px rgba(0,255,178,0.4);
    background: rgba(10,14,23,0.8);
    padding: 1rem 1.25rem;
    border-radius: 8px;
    border-left: 2px solid var(--sonar-green);
    line-height: 1.9;
}

/* Readout Bars */
.panel-readout {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.readout-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.readout-label {
    font-family: var(--font-code);
    font-size: 0.75rem;
    color: var(--plankton-white);
    width: 90px;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.readout-bar {
    flex: 1;
    height: 6px;
    background: rgba(0,212,255,0.1);
    border-radius: 3px;
    overflow: hidden;
}

.readout-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--electric-cyan), var(--sonar-green));
    border-radius: 3px;
    box-shadow: 0 0 8px rgba(0,212,255,0.4);
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Bio Lines */
.bio-line {
    width: 100px;
    height: 200px;
    z-index: 1;
    opacity: 0.4;
    pointer-events: none;
}

.signal-line {
    stroke-dasharray: 5, 10;
    animation: signalTravel 3s linear infinite;
}

@keyframes signalTravel {
    from { stroke-dashoffset: 0; }
    to { stroke-dashoffset: -30; }
}

/* Triangle School */
.shape-school {
    position: absolute;
    right: 10%;
    top: 50%;
    z-index: 1;
    pointer-events: none;
}

.tri-fish {
    width: 0;
    height: 0;
    border-left: 8px solid var(--sonar-green);
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    position: absolute;
    opacity: 0.3;
    filter: drop-shadow(0 0 4px rgba(0,255,178,0.4));
    animation: fishSwim 6s ease-in-out infinite;
}

.tri-fish:nth-child(1) { top: 0; left: 0; animation-delay: 0s; }
.tri-fish:nth-child(2) { top: 15px; left: 20px; animation-delay: -0.5s; }
.tri-fish:nth-child(3) { top: -10px; left: 25px; animation-delay: -1s; }
.tri-fish:nth-child(4) { top: 25px; left: 10px; animation-delay: -1.5s; }
.tri-fish:nth-child(5) { top: 5px; left: 45px; animation-delay: -2s; }

@keyframes fishSwim {
    0%, 100% { transform: translateX(0) translateY(0); }
    25% { transform: translateX(30px) translateY(-10px); }
    50% { transform: translateX(60px) translateY(5px); }
    75% { transform: translateX(30px) translateY(15px); }
}

/* --- Zone 2: Midnight --- */
.zone-midnight {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--zone-spacing);
    padding: var(--zone-spacing) clamp(2rem, 5vw, 5rem);
    min-height: 120vh;
}

.zone-midnight .zone-overlay {
    background: radial-gradient(ellipse at 60% 40%, rgba(0,255,178,0.05) 0%, transparent 50%);
}

/* Sonar */
.sonar-container {
    position: relative;
    width: clamp(280px, 50vw, 500px);
    height: clamp(280px, 50vw, 500px);
    z-index: 2;
}

.sonar-sweep {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
}

.sonar-arm {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50%;
    height: 2px;
    background: linear-gradient(90deg, var(--sonar-green), transparent);
    transform-origin: left center;
    animation: sonarSweep 4s linear infinite;
    box-shadow: 0 0 15px rgba(0,255,178,0.5);
}

.sonar-sweep::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: conic-gradient(from 0deg at 50% 50%,
        rgba(0,255,178,0.15) 0deg,
        rgba(0,255,178,0.05) 30deg,
        transparent 60deg,
        transparent 360deg
    );
    animation: sonarSweep 4s linear infinite;
    mix-blend-mode: screen;
    border-radius: 50%;
}

@keyframes sonarSweep {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.sonar-rings {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.sonar-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(0,255,178,0.15);
}

.ring-1 {
    top: 33.3%;
    left: 33.3%;
    width: 33.3%;
    height: 33.3%;
}

.ring-2 {
    top: 16.6%;
    left: 16.6%;
    width: 66.6%;
    height: 66.6%;
}

.ring-3 {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Sonar Blips */
.sonar-blip {
    position: absolute;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.sonar-blip::after {
    content: attr(data-label);
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-code);
    font-size: 0.6rem;
    color: var(--plankton-white);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 300ms;
    margin-top: 0.5rem;
}

.sonar-blip:hover::after {
    opacity: 1;
}

.blip-1 { top: 25%; left: 65%; }
.blip-2 { top: 60%; left: 30%; }
.blip-3 { top: 45%; left: 70%; }

.hex-node {
    width: 24px;
    height: 28px;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    background: rgba(0,255,178,0.15);
    outline: 1px solid var(--sonar-green);
    animation: blipPulse 2s ease-in-out infinite;
}

.circle-node {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0,212,255,0.15);
    border: 1px solid var(--electric-cyan);
    animation: blipPulse 2s ease-in-out infinite 0.5s;
}

.tri-node {
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 20px solid rgba(255,215,0,0.2);
    filter: drop-shadow(0 0 4px rgba(255,215,0,0.4));
    animation: blipPulse 2s ease-in-out infinite 1s;
}

@keyframes blipPulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

.sonar-blip:hover .hex-node,
.sonar-blip:hover .circle-node {
    box-shadow: 0 0 15px rgba(0,255,178,0.7);
    transform: rotate(20deg) scale(1.3);
}

/* Data Clusters */
.data-cluster {
    z-index: 2;
    max-width: 400px;
    width: 100%;
}

.cluster-left {
    align-self: flex-start;
}

.cluster-right {
    align-self: flex-end;
}

.cluster-title {
    font-family: var(--font-display);
    font-size: clamp(1rem, 2vw, 1.3rem);
    font-weight: 700;
    color: var(--anglerfish-gold);
    text-shadow: var(--glow-gold);
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Hex Grid */
.hex-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hex-cell {
    width: 50px;
    height: 58px;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    background: rgba(0,212,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
}

.hex-cell.active {
    background: rgba(0,255,178,0.12);
}

.hex-cell::before {
    content: '';
    position: absolute;
    inset: 0;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    border: 1px solid rgba(0,212,255,0.25);
}

.hex-cell.active::before {
    border-color: rgba(0,255,178,0.5);
}

.hex-cell:hover {
    background: rgba(0,255,178,0.2);
    transform: scale(1.1) rotate(10deg);
}

.hex-data {
    font-family: var(--font-code);
    font-size: 0.75rem;
    color: var(--electric-cyan);
}

.hex-cell.active .hex-data {
    color: var(--sonar-green);
    text-shadow: var(--glow-green);
}

/* Frequency Bars */
.freq-bars {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 100px;
}

.freq-bar {
    flex: 1;
    height: var(--bar-height);
    background: linear-gradient(to top, var(--electric-cyan), var(--sonar-green));
    border-radius: 2px 2px 0 0;
    opacity: 0.7;
    box-shadow: 0 0 6px rgba(0,212,255,0.3);
    animation: freqPulse 2s ease-in-out infinite;
    animation-delay: calc(var(--bar-height) * -1ms);
    min-width: 8px;
}

@keyframes freqPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* --- Zone 3: Abyss --- */
.zone-abyss {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--zone-spacing);
    padding: var(--zone-spacing) clamp(2rem, 5vw, 5rem);
    min-height: 120vh;
    position: relative;
}

.zone-abyss .zone-overlay {
    background: radial-gradient(ellipse at 50% 70%, rgba(255,51,102,0.04) 0%, transparent 50%);
}

/* Abyss Specimens */
.abyss-specimen {
    position: relative;
    max-width: 650px;
    width: 100%;
    z-index: 2;
}

.specimen-1 {
    align-self: flex-start;
    margin-left: 5%;
}

.specimen-2 {
    align-self: flex-end;
    margin-right: 5%;
}

.specimen-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(0,255,178,0.04) 0%, transparent 60%);
    pointer-events: none;
}

.specimen-body {
    position: relative;
}

.specimen-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 700;
    color: var(--ghost-coral);
    margin-bottom: 1rem;
    position: relative;
}

.specimen-title::before {
    content: '';
    position: absolute;
    left: -1.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--sonar-green);
    border-radius: 50%;
    box-shadow: var(--glow-green);
    animation: blipPulse 3s ease-in-out infinite;
}

.specimen-text {
    color: var(--plankton-white);
    line-height: 1.9;
    padding-left: 0.5rem;
    border-left: 1px solid rgba(0,255,178,0.2);
}

/* Abyss SVG Paths */
.abyss-paths {
    width: 100%;
    height: 200px;
    z-index: 1;
    opacity: 0.3;
}

.z-path {
    animation: signalTravel 6s linear infinite;
}

.path-node {
    animation: blipPulse 3s ease-in-out infinite;
}

/* Terminal Window */
.terminal-window {
    background: rgba(10,14,23,0.95);
    border: 1px solid rgba(0,255,178,0.2);
    border-radius: 10px;
    overflow: hidden;
    font-family: var(--font-code);
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(15,27,45,0.8);
    border-bottom: 1px solid rgba(0,255,178,0.1);
}

.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.terminal-dot.red { background: var(--pressure-red); box-shadow: var(--glow-red); }
.terminal-dot.gold { background: var(--anglerfish-gold); box-shadow: var(--glow-gold); }
.terminal-dot.green { background: var(--sonar-green); box-shadow: var(--glow-green); }

.terminal-title {
    font-size: 0.7rem;
    color: var(--plankton-white);
    opacity: 0.6;
    margin-left: 0.5rem;
}

.terminal-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.terminal-line {
    font-size: 0.85rem;
    color: var(--sonar-green);
    text-shadow: 0 0 8px rgba(0,255,178,0.3);
    display: block;
    line-height: 1.8;
}

.terminal-line.output {
    color: var(--plankton-white);
    text-shadow: none;
    opacity: 0.8;
    padding-left: 0.5rem;
}

.terminal-line.output.success {
    color: var(--sonar-green);
    text-shadow: 0 0 6px rgba(0,255,178,0.4);
}

.prompt {
    color: var(--electric-cyan);
    margin-right: 0.5rem;
}

/* Hydrothermal Vent Footer */
.hydrothermal-vent {
    width: 100%;
    padding: clamp(3rem, 6vw, 5rem) clamp(2rem, 5vw, 5rem);
    position: relative;
    z-index: 2;
    margin-top: auto;
    text-align: center;
}

.vent-glow {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 200%;
    background: radial-gradient(ellipse at 50% 100%, rgba(255,51,102,0.12) 0%, rgba(255,215,0,0.06) 30%, transparent 70%);
    pointer-events: none;
    animation: ventPulse 5s ease-in-out infinite;
}

@keyframes ventPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.vent-content {
    position: relative;
}

.vent-label {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: 700;
    color: var(--pressure-red);
    text-shadow: var(--glow-red);
    display: block;
    margin-bottom: 0.5rem;
}

.vent-sub {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--plankton-white);
    opacity: 0.5;
    font-style: italic;
    display: block;
}

.vent-particles {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 100px;
    pointer-events: none;
}

.vent-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--anglerfish-gold);
    border-radius: 50%;
    box-shadow: var(--glow-gold);
    animation: ventRise 4s ease-out infinite;
}

.vent-particle:nth-child(1) { left: 30%; animation-delay: 0s; }
.vent-particle:nth-child(2) { left: 45%; animation-delay: -0.8s; }
.vent-particle:nth-child(3) { left: 55%; animation-delay: -1.6s; }
.vent-particle:nth-child(4) { left: 65%; animation-delay: -2.4s; }
.vent-particle:nth-child(5) { left: 50%; animation-delay: -3.2s; }

@keyframes ventRise {
    0% {
        bottom: 0;
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        bottom: 100px;
        opacity: 0;
        transform: translateX(20px);
    }
}

/* --- Reveal Animations --- */
.reveal-element {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 600ms cubic-bezier(0.4, 0, 0.2, 1), transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-element.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- Link Styles --- */
a {
    color: var(--sonar-green);
    text-decoration: none;
    position: relative;
    background-image: linear-gradient(var(--sonar-green), var(--sonar-green));
    background-size: 0% 1px;
    background-position: left bottom;
    background-repeat: no-repeat;
    transition: background-size 300ms ease-out;
}

a:hover {
    background-size: 100% 1px;
}

a::after {
    content: '\2B21';
    display: inline-block;
    margin-left: 0.3em;
    font-size: 0.7em;
    color: var(--sonar-green);
    transform: scale(0);
    transition: transform 300ms ease-out;
}

a:hover::after {
    transform: scale(1);
}

/* --- Proximity Glow Classes (set by JS) --- */
.proximity-glow {
    will-change: box-shadow, opacity;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .zone-surface {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 2rem;
        padding: 2rem;
    }

    .hero-domain {
        grid-column: 1;
        grid-row: 1;
    }

    .compass-rose {
        grid-column: 1;
        grid-row: 2;
        justify-content: center;
    }

    .compass-rose svg {
        width: 120px;
        height: 120px;
    }

    .depth-gauge {
        grid-column: 1;
        grid-row: 3;
    }

    .dive-prompt {
        grid-column: 1;
        grid-row: 4;
        align-items: center;
    }

    .viewport-panel {
        max-width: 100%;
    }

    .panel-left, .panel-right {
        align-self: center;
    }

    .panel-left .panel-frame,
    .panel-right .panel-frame {
        transform: none;
    }

    .sonar-container {
        width: 280px;
        height: 280px;
    }

    .data-cluster {
        max-width: 100%;
    }

    .cluster-left, .cluster-right {
        align-self: center;
    }

    .specimen-1, .specimen-2 {
        align-self: center;
        margin-left: 0;
        margin-right: 0;
    }

    #depth-counter {
        bottom: 1rem;
        left: 1rem;
        transform: scale(0.85);
        transform-origin: bottom left;
    }
}
