/* ==============================================
   20241204.com - Deep Observation Station
   Skeuomorphic Aquarium Interface
   ============================================== */

/* ---- Design Palette Reference ----
   #0a0e27 - Abyssal Navy (Deep Background)
   #141b3d - Midnight Slate (Panel Surface)
   #1e2a4a - Steel Blue-Gray (Card Face)
   #243352 - Fabric Weave Accent
   #00e5ff - Bioluminescent Cyan (Primary Accent)
   #1de9b6 - Phosphor Teal (Secondary Accent)
   #ff6b6b - Coral Ember (Warm Highlight)
   #e0f7fa - Pale Seafoam (Text Primary)
   #8892b0 - Muted Periwinkle (Text Secondary)
   #c0c8d8 - Metallic Silver (Chrome Bezel)
   #a0aab8 - Polished Metal
   #e8ecf2 - Chrome Highlight
   #7c4dff - Betta Purple
   #b388ff - Jellyfish Lavender
   #0a2e5c - Ocean Mid
   #061228 - Ocean Deep
   #000814 - Abyssal Black
   #2a1f14 - Leather Brown
   ---- */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background: #0a0e27;
    color: #e0f7fa;
    font-family: 'DM Sans', sans-serif;
    line-height: 1.5;
    letter-spacing: 0.02em;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* ---- Loading Screen ---- */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0e27;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

#loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.sonar-container {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sonar-ping {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #00e5ff;
    animation: ping 3s ease-out infinite;
}

.sonar-ping-2 {
    animation-delay: 1s;
}

.sonar-ping-3 {
    animation-delay: 2s;
}

.sonar-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00e5ff;
    box-shadow: 0 0 12px #00e5ff, 0 0 24px rgba(0, 229, 255, 0.4);
}

@keyframes ping {
    0% {
        transform: scale(0);
        opacity: 0.8;
    }
    100% {
        transform: scale(10);
        opacity: 0;
    }
}

/* ---- Main Container ---- */
#main-container {
    display: flex;
    width: 100%;
    height: 100vh;
    opacity: 1;
    transition: opacity 0.6s ease;
}

#main-container.hidden {
    opacity: 0;
    pointer-events: none;
}

#main-container.reveal {
    opacity: 1;
    pointer-events: auto;
}

/* ---- Aquarium Panel (Left 45%) ---- */
#aquarium-panel {
    width: 45%;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    overflow: hidden;
    z-index: 10;
}

.aquarium-viewport {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 0 12px 12px 0;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6), inset 0 0 4px rgba(0, 229, 255, 0.1);
    overflow: hidden;
    will-change: transform;
}

.aquarium-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 30% 70%, #0a2e5c 0%, #061228 60%, #000814 100%);
    transition: background 1.5s ease;
}

/* Aquarium depth transitions */
.aquarium-bg.depth-shallow {
    background: radial-gradient(ellipse at 30% 50%, #0a3e6c 0%, #0a2e5c 40%, #061228 80%);
}

.aquarium-bg.depth-mid {
    background: radial-gradient(ellipse at 30% 70%, #0a2e5c 0%, #061228 60%, #000814 100%);
}

.aquarium-bg.depth-deep {
    background: radial-gradient(ellipse at 30% 80%, #061228 0%, #030a1a 60%, #000510 100%);
}

.aquarium-bg.depth-abyss {
    background: radial-gradient(ellipse at 30% 90%, #030a1a 0%, #010510 60%, #000206 100%);
}

/* Caustics SVG Overlay */
.caustics-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.15;
    pointer-events: none;
    mix-blend-mode: overlay;
    transition: opacity 1.5s ease;
}

/* Hex Grid */
.hex-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 1.5s ease;
}

/* Depth Markers */
.depth-markers {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.3;
    transition: opacity 1.5s ease;
}

.depth-marker {
    position: absolute;
    left: 0;
    width: 100%;
    border-top: 1px dashed rgba(0, 229, 255, 0.2);
}

.depth-marker span {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    color: #8892b0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding-left: 12px;
    position: relative;
    top: -8px;
}

/* Parallax Layers */
.parallax-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.parallax-foreground {
    z-index: 3;
}

.coral.coral-1 {
    position: absolute;
    bottom: 5%;
    left: 8%;
}

.coral.coral-2 {
    position: absolute;
    bottom: 8%;
    right: 10%;
}

/* Fish Layer */
.fish-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.fish-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

/* Fish Color Accents */
.angelfish-1,
.angelfish-2 {
    filter: drop-shadow(0 0 6px rgba(29, 233, 182, 0.3));
    color: #1de9b6;
}

.betta-hero {
    filter: drop-shadow(0 0 10px rgba(124, 77, 255, 0.3));
    color: #7c4dff;
}

.clownfish-1,
.clownfish-2 {
    filter: drop-shadow(0 0 4px rgba(255, 107, 107, 0.3));
    color: #ff6b6b;
}

.jellyfish {
    filter: drop-shadow(0 0 8px rgba(179, 136, 255, 0.3));
    color: #b388ff;
}

/* Angelfish Animation */
.angelfish-1 {
    position: absolute;
    top: 25%;
    left: -60px;
    animation: swimRight1 18s linear infinite;
}

.angelfish-2 {
    position: absolute;
    top: 45%;
    right: -50px;
    animation: swimLeft1 22s linear infinite;
    animation-delay: -8s;
}

@keyframes swimRight1 {
    0% { transform: translate(-60px, 0) scaleX(1); }
    5% { transform: translate(0, -10px) scaleX(1); }
    25% { transform: translate(25%, 15px) scaleX(1); }
    50% { transform: translate(55%, -20px) scaleX(1); }
    75% { transform: translate(80%, 10px) scaleX(1); }
    95% { transform: translate(calc(100% + 20px), -5px) scaleX(1); }
    100% { transform: translate(calc(100% + 60px), 0) scaleX(1); }
}

@keyframes swimLeft1 {
    0% { transform: translate(60px, 0) scaleX(-1); }
    5% { transform: translate(0, 10px) scaleX(-1); }
    25% { transform: translate(-25%, -15px) scaleX(-1); }
    50% { transform: translate(-55%, 20px) scaleX(-1); }
    75% { transform: translate(-80%, -10px) scaleX(-1); }
    95% { transform: translate(calc(-100% - 20px), 5px) scaleX(-1); }
    100% { transform: translate(calc(-100% - 60px), 0) scaleX(-1); }
}

/* Clownfish Animation - Figure Eight */
.clownfish-1 {
    position: absolute;
    bottom: 18%;
    left: 15%;
    animation: figureEight1 12s ease-in-out infinite;
}

.clownfish-2 {
    position: absolute;
    bottom: 22%;
    left: 18%;
    animation: figureEight1 12s ease-in-out infinite;
    animation-delay: -3s;
}

@keyframes figureEight1 {
    0% { transform: translate(0, 0); }
    12.5% { transform: translate(30px, -20px); }
    25% { transform: translate(60px, 0); }
    37.5% { transform: translate(30px, 20px); }
    50% { transform: translate(0, 0); }
    62.5% { transform: translate(-30px, 20px); }
    75% { transform: translate(-60px, 0); }
    87.5% { transform: translate(-30px, -20px); }
    100% { transform: translate(0, 0); }
}

/* Betta Hero Fish */
.betta-hero {
    position: absolute;
    top: 35%;
    left: 30%;
    opacity: 0;
    animation: bettaSwim 20s ease-in-out infinite, bettaAppear 2s ease forwards;
    animation-delay: 3s, 3s;
}

@keyframes bettaAppear {
    from { opacity: 0; transform: translate(-20px, 0); }
    to { opacity: 1; transform: translate(0, 0); }
}

@keyframes bettaSwim {
    0% { transform: translate(0, 0) rotate(0deg); }
    15% { transform: translate(20px, -15px) rotate(-2deg); }
    30% { transform: translate(-10px, 10px) rotate(1deg); }
    50% { transform: translate(15px, -5px) rotate(-1deg); }
    70% { transform: translate(-15px, -10px) rotate(2deg); }
    85% { transform: translate(10px, 15px) rotate(-1deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

/* Betta fin animations */
.betta-fin-top {
    animation: finWave 3s ease-in-out infinite;
    transform-origin: 35px 18px;
}

.betta-fin-tail {
    animation: tailFlow 2.5s ease-in-out infinite;
    transform-origin: 70px 35px;
}

.betta-fin-bottom {
    animation: finWave 3.5s ease-in-out infinite reverse;
    transform-origin: 30px 48px;
}

@keyframes finWave {
    0%, 100% { transform: rotate(0deg) scaleY(1); }
    50% { transform: rotate(5deg) scaleY(1.1); }
}

@keyframes tailFlow {
    0%, 100% { transform: rotate(0deg) scaleX(1); }
    30% { transform: rotate(8deg) scaleX(1.1); }
    70% { transform: rotate(-5deg) scaleX(0.95); }
}

/* Jellyfish */
.jellyfish-layer {
    z-index: 4;
    opacity: 0;
    transition: opacity 2s ease;
}

.jellyfish-layer.visible {
    opacity: 1;
}

.jellyfish {
    position: absolute;
    top: 20%;
    left: 50%;
    animation: jellyBob 8s ease-in-out infinite;
}

@keyframes jellyBob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-30px); }
}

.tentacle {
    animation: tentacleWave 4s ease-in-out infinite;
}

.tentacle.t1 { animation-delay: 0s; }
.tentacle.t2 { animation-delay: 0.3s; }
.tentacle.t3 { animation-delay: 0.6s; }
.tentacle.t4 { animation-delay: 0.9s; }
.tentacle.t5 { animation-delay: 1.2s; }

@keyframes tentacleWave {
    0%, 100% { transform: translateX(0) skewX(0deg); }
    25% { transform: translateX(3px) skewX(3deg); }
    75% { transform: translateX(-3px) skewX(-3deg); }
}

/* Bubble Particles */
.bubbles-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

.bubble {
    position: absolute;
    bottom: -10px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(0, 229, 255, 0.3), rgba(0, 229, 255, 0.05));
    animation: bubbleRise linear infinite;
}

@keyframes bubbleRise {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0.6;
    }
    25% {
        transform: translateY(-25vh) translateX(5px);
    }
    50% {
        transform: translateY(-50vh) translateX(-3px);
        opacity: 0.4;
    }
    75% {
        transform: translateY(-75vh) translateX(4px);
    }
    100% {
        transform: translateY(-105vh) translateX(-2px);
        opacity: 0;
    }
}

/* Compass Rose */
.compass-rose {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 6;
    animation: compassRotate 60s linear infinite;
}

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

/* Sonar Rings */
.sonar-rings {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.sonar-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid #00e5ff;
    animation: sonarExpand 2s ease-out forwards;
    pointer-events: none;
}

@keyframes sonarExpand {
    0% {
        width: 0;
        height: 0;
        opacity: 0.8;
        margin-left: 0;
        margin-top: 0;
    }
    100% {
        width: 80px;
        height: 80px;
        opacity: 0;
        margin-left: -40px;
        margin-top: -40px;
    }
}

/* ---- Toggle Navigation ---- */
.toggle-nav {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 20;
    background: rgba(14, 27, 61, 0.72);
    padding: 16px 12px;
    border-radius: 24px;
    backdrop-filter: blur(8px);
}

.toggle-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    outline: none;
}

.toggle-track {
    width: 36px;
    height: 20px;
    border-radius: 10px;
    background: #1e2a4a;
    position: relative;
    transition: background 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

.toggle-switch.active .toggle-track {
    background: #00e5ff;
}

.toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #c0c8d8;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.toggle-switch.active .toggle-thumb {
    transform: translateX(16px);
}

.toggle-label {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #8892b0;
    transition: color 0.3s ease;
}

.toggle-switch.active .toggle-label {
    color: #00e5ff;
}

/* ---- Chrome Bezel Divider ---- */
.chrome-bezel {
    width: 8px;
    height: 100vh;
    position: fixed;
    left: 45%;
    top: 0;
    z-index: 15;
    background: linear-gradient(180deg, #e8ecf2 0%, #a0aab8 30%, #c0c8d8 50%, #a0aab8 70%, #e8ecf2 100%);
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.3), 2px 0 8px rgba(0, 0, 0, 0.3);
}

/* ---- Instrument Panel (Right 55%) ---- */
#instrument-panel {
    width: 55%;
    margin-left: 45%;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 40px;
    position: relative;
    background: #0a0e27;
    scrollbar-width: thin;
    scrollbar-color: #1e2a4a #0a0e27;
}

#instrument-panel::-webkit-scrollbar {
    width: 6px;
}

#instrument-panel::-webkit-scrollbar-track {
    background: #0a0e27;
}

#instrument-panel::-webkit-scrollbar-thumb {
    background: #1e2a4a;
    border-radius: 3px;
}

/* ---- Hero Section ---- */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 20px;
}

.hero-title {
    font-family: 'Righteous', cursive;
    font-size: 56px;
    line-height: 1.1;
    color: #e0f7fa;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 229, 255, 0.15);
    margin-bottom: 16px;
}

.hero-title .char {
    display: inline-block;
    animation: charDrop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    opacity: 0;
    transform: translateY(-40px);
}

@keyframes charDrop {
    0% {
        opacity: 0;
        transform: translateY(-40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes charGlow {
    0%, 100% {
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 229, 255, 0.15);
    }
    50% {
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 229, 255, 0.4), 0 0 60px rgba(0, 229, 255, 0.15);
    }
}

.hero-subtitle {
    font-family: 'DM Sans', sans-serif;
    font-size: 18px;
    color: #8892b0;
    margin-bottom: 32px;
}

.blink-cursor {
    animation: cursorBlink 1s step-end infinite;
}

@keyframes cursorBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.hero-readout {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.readout-label {
    color: #8892b0;
}

.readout-value {
    color: #00e5ff;
}

.readout-divider {
    color: #1e2a4a;
}

/* ---- Section Titles ---- */
.section-title {
    font-family: 'Righteous', cursive;
    font-size: 36px;
    color: #e0f7fa;
    margin-bottom: 40px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.section-title .wave-char {
    display: inline-block;
    animation: waveFloat 2s ease-in-out infinite;
}

@keyframes waveFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* ---- Card Grid ---- */
.card-section {
    padding: 80px 20px;
    min-height: 100vh;
}

.card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ---- Flip Cards ---- */
.flip-card {
    perspective: 1000px;
    height: 220px;
    cursor: pointer;
}

.flip-card.card-offset {
    margin-top: 24px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s ease-in-out;
    transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner,
.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow: hidden;
}

/* Light Streak Effect on Flip */
.flip-card-front::after,
.flip-card-back::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    transition: left 0.6s ease-in-out;
    pointer-events: none;
}

.flip-card:hover .flip-card-front::after,
.flip-card.flipped .flip-card-front::after {
    left: 200%;
}

/* Card Front Textures */

/* Brushed Aluminum */
.card-aluminum {
    background: #1e2a4a;
    background-image:
        repeating-linear-gradient(
            90deg,
            rgba(192, 200, 216, 0.03) 0px,
            rgba(192, 200, 216, 0.03) 1px,
            transparent 1px,
            transparent 3px
        );
    border: 1px solid rgba(192, 200, 216, 0.15);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.card-aluminum::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(192, 200, 216, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

/* Leather Panel */
.card-leather {
    background: #2a1f14;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(60, 45, 30, 0.4) 0%, transparent 2px),
        radial-gradient(circle at 60% 70%, rgba(60, 45, 30, 0.3) 0%, transparent 2px),
        radial-gradient(circle at 80% 20%, rgba(60, 45, 30, 0.35) 0%, transparent 1.5px),
        radial-gradient(circle at 40% 80%, rgba(60, 45, 30, 0.3) 0%, transparent 2px),
        radial-gradient(circle at 90% 50%, rgba(60, 45, 30, 0.25) 0%, transparent 1.5px);
    border: 2px dashed rgba(192, 200, 216, 0.2);
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Fabric Weave */
.card-fabric {
    background: #1e2a4a;
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 4px,
            #243352 4px,
            #243352 5px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 4px,
            rgba(30, 42, 74, 0.8) 4px,
            rgba(30, 42, 74, 0.8) 5px
        );
    border: 1px solid rgba(192, 200, 216, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Card Front Content */
.card-embossed-icon {
    margin-bottom: 16px;
    opacity: 0.7;
}

.card-front-label {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #8892b0;
}

/* Card Back */
.flip-card-back {
    background: #141b3d;
    transform: rotateY(180deg);
    text-align: center;
    border: 1px solid rgba(0, 229, 255, 0.15);
}

.flip-card-back h3 {
    font-family: 'Righteous', cursive;
    font-size: 20px;
    color: #e0f7fa;
    margin-bottom: 12px;
}

.flip-card-back p {
    font-size: 14px;
    line-height: 1.6;
    color: #8892b0;
    margin-bottom: 20px;
}

/* Chrome Button */
.chrome-button {
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #0a0e27;
    background: linear-gradient(180deg, #e8ecf2 0%, #c0c8d8 50%, #a0aab8 100%);
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.chrome-button:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Card Hover Glow */
.flip-card:hover {
    z-index: 2;
}

.flip-card:hover .flip-card-back {
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ---- Abyss Section ---- */
.section-abyss {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.abyss-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

/* Porthole Frame */
.porthole-frame {
    position: relative;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    border: 8px solid;
    border-image: linear-gradient(180deg, #e8ecf2, #a0aab8, #c0c8d8, #a0aab8, #e8ecf2) 1;
    border-image: none;
    border-color: #a0aab8;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5), inset 0 0 30px rgba(0, 0, 0, 0.4), 0 0 40px rgba(0, 229, 255, 0.05);
    background: linear-gradient(135deg, #c0c8d8 0%, #a0aab8 50%, #8892b0 100%);
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.porthole-inner {
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    border-radius: 50%;
    background: radial-gradient(ellipse at 40% 40%, #061228 0%, #010510 80%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6);
}

.abyss-text {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    line-height: 1.7;
    color: #8892b0;
    text-align: center;
}

/* Porthole Rivets */
.porthole-rivet {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #e8ecf2, #a0aab8);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.rivet-top { top: -5px; left: 50%; margin-left: -5px; }
.rivet-right { right: -5px; top: 50%; margin-top: -5px; }
.rivet-bottom { bottom: -5px; left: 50%; margin-left: -5px; }
.rivet-left { left: -5px; top: 50%; margin-top: -5px; }

/* Abyss Readout */
.abyss-readout {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 280px;
}

.readout-line {
    display: flex;
    justify-content: space-between;
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 0;
    border-bottom: 1px solid rgba(30, 42, 74, 0.5);
}

.readout-line .readout-label {
    color: #8892b0;
}

.readout-line .readout-value {
    color: #00e5ff;
}

.blink-slow {
    animation: blinkSlow 2s ease-in-out infinite;
}

@keyframes blinkSlow {
    0%, 40%, 100% { opacity: 1; }
    50%, 90% { opacity: 0.3; }
}

/* ---- Footer ---- */
.station-footer {
    padding: 60px 20px 40px;
    text-align: center;
}

.footer-line {
    width: 60px;
    height: 1px;
    background: #1e2a4a;
    margin: 0 auto 24px;
}

.footer-text {
    font-size: 14px;
    color: #8892b0;
    margin-bottom: 8px;
}

.footer-sub {
    font-size: 10px;
    color: #1e2a4a;
    letter-spacing: 0.12em;
}

.mono-text {
    font-family: 'Space Mono', monospace;
}

/* ---- Mobile Responsive ---- */
@media (max-width: 768px) {
    body {
        overflow-y: auto;
        height: auto;
    }

    #main-container {
        flex-direction: column;
        height: auto;
    }

    #aquarium-panel {
        width: 100%;
        height: 30vh;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 10;
    }

    .aquarium-viewport {
        border-radius: 0;
    }

    .aquarium-viewport::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 60px;
        background: linear-gradient(to top, rgba(10, 14, 39, 0.9), transparent);
        pointer-events: none;
    }

    .chrome-bezel {
        display: none;
    }

    #instrument-panel {
        width: 100%;
        margin-left: 0;
        margin-top: 30vh;
        padding: 0 20px;
        height: auto;
        overflow-y: visible;
    }

    .toggle-nav {
        flex-direction: row;
        left: 50%;
        top: auto;
        bottom: 10px;
        transform: translateX(-50%) translateY(0);
        padding: 8px 12px;
    }

    .toggle-label {
        display: none;
    }

    .hero-title {
        font-size: 36px;
    }

    .section-title {
        font-size: 28px;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .flip-card {
        height: 200px;
    }

    .flip-card.card-offset {
        margin-top: 0;
    }

    .porthole-frame {
        width: 240px;
        height: 240px;
    }

    .porthole-inner {
        padding: 28px;
    }

    .abyss-text {
        font-size: 12px;
    }

    .compass-rose {
        width: 40px;
        height: 40px;
    }
}

/* ---- Utility ---- */
.hidden {
    opacity: 0;
    pointer-events: none;
}

.visible {
    opacity: 1;
    pointer-events: auto;
}
