/* lrx.wiki - Seapunk Deep Ocean Wiki */

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

:root {
    --brine: #00ffd5;
    --phosphor: #a855f7;
    --coral-signal: #ff3366;
    --seafoam: #b8e6e0;
    --bleach: #e0faf5;
    --sonar-green: #39ff85;
    --surface-bg: #040d14;
    --photic-bg: #071a26;
    --twilight-bg: #050f18;
    --midnight-bg: #030a10;
    --abyssal-bg: #020508;
    --deep-navy: #0a1f2e;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Libre Baskerville', serif;
    background-color: var(--surface-bg);
    color: var(--seafoam);
    overflow-x: hidden;
    min-height: 100vh;
    transition: background-color 2s ease;
}

body[data-zone="surface"] { background-color: var(--surface-bg); }
body[data-zone="photic"] { background-color: var(--photic-bg); }
body[data-zone="twilight"] { background-color: var(--twilight-bg); }
body[data-zone="midnight"] { background-color: var(--midnight-bg); }
body[data-zone="abyssal"] { background-color: var(--abyssal-bg); }

/* Depth Gauge */
.depth-gauge {
    position: fixed;
    right: 0;
    top: 0;
    width: 2px;
    height: 100vh;
    background: rgba(0, 255, 213, 0.1);
    z-index: 100;
    transition: width 0.3s ease;
}

.depth-gauge:hover {
    width: 24px;
}

.depth-gauge-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(to bottom, var(--brine), var(--phosphor), var(--coral-signal));
    transition: height 0.1s linear;
}

.depth-gauge-labels {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 4px 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.depth-gauge:hover .depth-gauge-labels {
    opacity: 1;
}

.depth-gauge-labels span {
    font-family: 'Space Mono', monospace;
    font-size: 0.55rem;
    color: var(--sonar-green);
    white-space: nowrap;
}

/* Particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.particle--cyan {
    background: radial-gradient(circle, rgba(0, 255, 213, 0.3), transparent 70%);
}

.particle--violet {
    background: radial-gradient(circle, rgba(168, 85, 247, 0.15), transparent 70%);
}

/* Zones */
.zone {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    padding: 10vh 8vw;
}

.zone-surface {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 5vw;
}

/* Hero */
.hero-title {
    font-family: 'Libre Baskerville', serif;
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: 700;
    color: var(--brine);
    letter-spacing: -0.02em;
    margin-top: 30vh;
    transform: translateX(-2vw);
}

.hero-coords {
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    color: var(--sonar-green);
    margin-top: 1.5rem;
    transform: translateX(-1vw);
}

.scroll-chevron {
    position: fixed;
    bottom: 5vh;
    left: 50%;
    transform: translateX(-50%) rotate(90deg);
    font-size: 2rem;
    color: var(--coral-signal);
    animation: pulse-chevron 2s ease-in-out infinite;
    transition: opacity 0.6s ease;
    z-index: 50;
}

.scroll-chevron.hidden {
    opacity: 0;
    pointer-events: none;
}

@keyframes pulse-chevron {
    0%, 100% { opacity: 0.4; transform: translateX(-50%) rotate(90deg) translateY(0); }
    50% { opacity: 1; transform: translateX(-50%) rotate(90deg) translateY(8px); }
}

/* Specimen Entries */
.specimen-entry {
    max-width: 600px;
    margin: 12vh 0;
    padding: 2rem;
    border: 1px solid rgba(0, 255, 213, 0.1);
    border-radius: 2px;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                border-color 0.3s ease,
                rotate 0.3s ease;
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
}

.specimen-entry.visible {
    opacity: 1;
    transform: translateY(0);
}

.specimen-entry:hover {
    border-color: rgba(0, 255, 213, 0.4);
    rotate: 0.5deg;
    clip-path: polygon(1% 1%, 99% 0%, 100% 99%, 0% 98%);
}

.specimen-illustration {
    width: 120px;
    height: 120px;
    margin-bottom: 1.5rem;
}

.specimen-title {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: clamp(1.4rem, 3vw, 2rem);
    color: var(--bleach);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.specimen-class {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    color: var(--sonar-green);
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}

.specimen-body {
    font-family: 'Libre Baskerville', serif;
    font-weight: 400;
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--seafoam);
}

/* Glow animation */
.glow-circle {
    animation: glow 3s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* Sonar rings animation */
.sonar-ring {
    animation: sonar-pulse 4s ease-out infinite;
}

.sonar-ring:nth-child(2) { animation-delay: 0.5s; }
.sonar-ring:nth-child(3) { animation-delay: 1s; }
.sonar-ring:nth-child(4) { animation-delay: 1.5s; }

@keyframes sonar-pulse {
    0% { transform-origin: center; opacity: 0.8; }
    100% { transform-origin: center; opacity: 0.1; }
}

/* Navigation Pulses */
.nav-pulses {
    position: fixed;
    bottom: 3vh;
    left: 3vw;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 100;
}

.nav-pulse {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1.5px solid var(--brine);
    background: transparent;
    cursor: pointer;
    position: relative;
    transition: background 0.3s ease, transform 0.3s ease;
    animation: nav-glow 3s ease-in-out infinite;
}

.nav-pulse:hover {
    background: var(--brine);
    transform: scale(1.5);
}

.nav-pulse span {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    color: var(--brine);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-pulse:hover span {
    opacity: 1;
}

@keyframes nav-glow {
    0%, 100% { box-shadow: 0 0 3px rgba(0, 255, 213, 0.2); }
    50% { box-shadow: 0 0 8px rgba(0, 255, 213, 0.5); }
}

/* Sonar Click Effect */
.sonar-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 99;
}

.sonar-click-ring {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid var(--brine);
    opacity: 0.8;
    transform: scale(0);
    animation: sonar-click 0.8s ease-out forwards;
}

@keyframes sonar-click {
    to {
        transform: scale(1);
        opacity: 0;
    }
}

/* Links */
a {
    color: var(--phosphor);
    text-decoration: none;
    background-image: linear-gradient(var(--phosphor), var(--phosphor));
    background-size: 0% 1px;
    background-position: left bottom;
    background-repeat: no-repeat;
    transition: background-size 0.3s ease;
}

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

/* Background gradient animation for surface */
.zone-surface::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, var(--surface-bg) 0%, var(--deep-navy) 100%);
    opacity: 0;
    animation: surface-gradient 30s ease-in-out infinite alternate;
    z-index: -1;
}

@keyframes surface-gradient {
    0% { opacity: 0; }
    100% { opacity: 0.4; }
}
