:root {
    --panel-bg: #1a1a20;
    --phosphor: #40b0a0;
    --surface-blue: #1a4a7a;
    --twilight-blue: #0e2a4a;
    --midnight: #041020;
    --abyss: #020810;
    --hadal: #010204;
    --sonar-line: #2a6a9a;
    --sonar-bright: #4a8aba;
    --bio-cyan: #2a8aaa;
    --bio-warm: #4aaa80;
    --text-surface: #b0c8d8;
    --text-deep: #6a8090;
    --text-abyss: #4a6070;
    --text-hadal: #2a3840;
    --panel-border: #2a2a30;
    --rivet: #3a3a40;
}

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

body {
    background-color: var(--hadal);
    color: var(--text-surface);
    overflow-x: hidden;
}

/* Instrument Panel */
.instrument-panel {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background-color: var(--panel-bg);
    z-index: 10;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.panel-border {
    position: absolute;
    right: 0;
    top: 0;
    width: 2px;
    height: 100%;
    background-color: var(--panel-border);
}

.rivet {
    position: absolute;
    right: 6px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: var(--rivet);
}

/* Gauges */
.gauge {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.gauge-label {
    font-family: 'Share Tech Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.65rem, 0.75vw, 0.75rem);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--phosphor);
    opacity: 0.6;
    margin-bottom: 8px;
}

.gauge-value {
    font-family: 'Share Tech Mono', monospace;
    font-weight: 400;
    font-size: clamp(1.2rem, 2vw, 2rem);
    color: var(--phosphor);
    line-height: 1;
}

.gauge-value-small {
    font-size: clamp(0.9rem, 1.2vw, 1.2rem);
}

.gauge-reading {
    font-family: 'Share Tech Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.7rem, 0.85vw, 0.85rem);
    color: var(--phosphor);
    margin-top: 4px;
}

/* Pressure dial */
.pressure-dial {
    width: 100px;
    height: 100px;
}

#pressure-needle {
    transition: transform 0.3s ease;
}

/* Observation Window */
.observation-window {
    margin-left: 280px;
    width: calc(100vw - 280px);
    min-height: 1000vh;
    position: relative;
    background: linear-gradient(
        to bottom,
        var(--surface-blue) 0%,
        var(--surface-blue) 8%,
        #14385a 10%,
        var(--twilight-blue) 12%,
        #0a2238 18%,
        #081a2a 22%,
        #061828 26%,
        var(--midnight) 32%,
        #030c18 40%,
        var(--abyss) 60%,
        #010408 70%,
        #010306 80%,
        var(--hadal) 90%,
        var(--hadal) 100%
    );
}

/* Sonar lines */
.sonar-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 0.5px;
    background-color: var(--sonar-line);
    opacity: 0.4;
}

/* Zone labels */
.zone-label {
    position: absolute;
    left: 5%;
}

.zone-name {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 600;
    font-size: clamp(0.8rem, 0.95vw, 0.9rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-variant: small-caps;
    color: var(--text-surface);
}

.zone-label-deep .zone-name {
    color: var(--text-deep);
}

.zone-label-hadal .zone-name {
    color: var(--text-hadal);
}

/* Content blocks */
.content-block {
    position: absolute;
    max-width: 45%;
    padding: 16px;
    padding-left: 14px;
    border-left: 2px solid var(--sonar-line);
    opacity: 0;
    transition: opacity 1.2s ease-in;
}

.content-block.visible {
    opacity: 1;
}

.content-deep {
    border-left-color: rgba(42, 106, 154, 0.5);
}

.content-abyss {
    border-left-color: rgba(42, 106, 154, 0.25);
}

.content-hadal {
    border-left-color: rgba(42, 106, 154, 0.1);
}

/* Contact labels */
.contact-label {
    font-family: 'Share Tech Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.65rem, 0.75vw, 0.75rem);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--sonar-line);
    display: block;
    margin-bottom: 8px;
}

.contact-label-dim {
    color: var(--text-deep);
}

.contact-label-hadal {
    color: var(--text-hadal);
}

/* Observation text */
.observation-text {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 300;
    font-size: clamp(0.85rem, 1vw, 0.95rem);
    line-height: 1.75;
    color: var(--text-surface);
}

.content-deep .observation-text {
    color: var(--text-deep);
}

.content-abyss .observation-text {
    color: var(--text-abyss);
}

.content-hadal .observation-text {
    color: var(--text-hadal);
    font-size: clamp(0.8rem, 0.9vw, 0.9rem);
}

/* Bioluminescent organisms */
.bioluminescent {
    position: absolute;
    width: 50px;
    height: 60px;
    filter: drop-shadow(0 0 15px rgba(42, 138, 170, 0.25));
}

.organism-jelly {
    animation: pulse-slow 3s ease-in-out infinite;
}

.organism-angler {
    width: 50px;
    height: 40px;
    filter: drop-shadow(0 0 15px rgba(74, 170, 128, 0.25));
    animation: pulse-medium 2s ease-in-out infinite;
}

.organism-worm {
    width: 60px;
    height: 20px;
    animation: pulse-slow 4s ease-in-out infinite;
}

.organism-point {
    width: 10px;
    height: 10px;
    filter: drop-shadow(0 0 20px rgba(42, 138, 170, 0.35));
    animation: pulse-hadal 6s ease-in-out infinite;
}

@keyframes pulse-slow {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

@keyframes pulse-medium {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

@keyframes pulse-hadal {
    0%, 85%, 100% { opacity: 0.3; }
    90% { opacity: 1; }
}

/* Mobile */
@media (max-width: 768px) {
    .instrument-panel {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 60px;
        flex-direction: row;
        align-items: center;
        justify-content: space-around;
        padding: 10px 20px;
        gap: 0;
    }

    .panel-border {
        right: auto;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 2px;
    }

    .rivet {
        display: none;
    }

    .gauge-pressure,
    .gauge-temp {
        display: none;
    }

    .gauge-label {
        font-size: 0.55rem;
        margin-bottom: 2px;
    }

    .gauge-value {
        font-size: 1rem;
    }

    .observation-window {
        margin-left: 0;
        margin-top: 60px;
        width: 100%;
    }

    .content-block {
        max-width: 85%;
        left: 5% !important;
        right: auto !important;
    }
}
