/* Global Reset & Variables */
:root {
    --bg-black: #050505;
    --cyan: #00ffee;
    --purple: #aa77ff;
    --green: #44ff88;
    --amber: #ff9944;
    --font-mono: 'Space Mono', monospace;

    /* Hotspot Positioning Variables */
    /* Updated based on 16:9 Aspect Ratio Container */

    /* Wing 1: The Core (Left) */
    --hotspot-1-left: 27%;
    --hotspot-1-top: 28%;
    --hotspot-1-width: 14%;
    --hotspot-1-height: 35%;

    /* Wing 2: Stabilization Lab (Center) */
    --hotspot-2-left: 42%;
    --hotspot-2-top: 22%;
    --hotspot-2-width: 15%;
    --hotspot-2-height: 40%;

    /* Wing 3: Signal Room (Right-Center) */
    --hotspot-3-left: 63%;
    --hotspot-3-top: 28%;
    --hotspot-3-width: 12%;
    --hotspot-3-height: 32%;

    /* Wing 4: The Vault (Far Right) */
    --hotspot-4-left: 80%;
    --hotspot-4-top: 28%;
    --hotspot-4-width: 12%;
    --hotspot-4-height: 35%;
}

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

body,
html {
    width: 100%;
    height: 100%;
    background-color: var(--bg-black);
    color: #fff;
    font-family: var(--font-mono);
    overflow: hidden;
    /* Prevent scrolling on desktop */
    cursor: crosshair;
    /* Custom cursor fallback */
}

/* Splash Screen */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    /* Starts hidden, JS will fade it in */
    transition: opacity 1.5s ease-out;
}

#splash-screen.visible {
    opacity: 1;
}

.splash-content {
    text-align: center;
}

.pulse-text {
    font-size: 3rem;
    color: var(--cyan);
    text-shadow: 0 0 10px rgba(0, 255, 238, 0.5), 0 0 20px rgba(0, 255, 238, 0.3);
    animation: textPulse 3s infinite ease-in-out;
    letter-spacing: 4px;
}

.click-instruction {
    margin-top: 20px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    animation: blink 2s infinite;
}

/* Main Menu Container */
#main-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    /* Starts hidden */
    transition: opacity 1.5s ease-in;
    pointer-events: none;
    /* Disable interaction when hidden */
}

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

/* Scene Wrapper - Aspect Ratio Lock */
#scene-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    /* Simulate object-fit: cover behavior */
    width: 100vw;
    height: 56.25vw;
    /* 16:9 Aspect Ratio */

    min-height: 100vh;
    min-width: 177.77vh;
    /* 16:9 Aspect Ratio */

    z-index: 1;
}

.background-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* The wrapper handles the crop, image just fills wrapper */
    display: block;
}

/* Overlays (Scanlines, Noise, Vignette) */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.scanlines {
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0),
            rgba(255, 255, 255, 0) 50%,
            rgba(0, 0, 0, 0.2) 50%,
            rgba(0, 0, 0, 0.2));
    background-size: 100% 4px;
    opacity: 0.15;
    animation: scanMove 10s linear infinite;
}

.noise {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    opacity: 0.4;
    mix-blend-mode: overlay;
    animation: noiseShift 0.5s steps(10) infinite;
}

.vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.8) 100%);
    z-index: 11;
    pointer-events: none;
}

/* Center Element (Pulsing Energy) */
.center-element {
    position: absolute;
    top: 80%;
    /* Adjusted for floor perspective relative to 16:9 image */
    left: 50%;
    transform: translate(-50%, -50%) rotateX(60deg);
    width: 200px;
    height: 200px;
    z-index: 5;
    pointer-events: none;
}

.energy-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 2px solid var(--cyan);
    box-shadow: 0 0 10px var(--cyan);
    opacity: 0;
}

.ring-1 {
    width: 40%;
    height: 40%;
    animation: ripple 3s linear infinite;
}

.ring-2 {
    width: 40%;
    height: 40%;
    animation: ripple 3s linear infinite 1s;
}

.ring-3 {
    width: 40%;
    height: 40%;
    animation: ripple 3s linear infinite 2s;
}

/* Hotspots - REFINED GLOW */
.hotspots-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
}

.hotspot {
    position: absolute;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

/* Hotspot Positioning - Using Variables */
.wing-1 {
    left: var(--hotspot-1-left);
    top: var(--hotspot-1-top);
    width: var(--hotspot-1-width);
    height: var(--hotspot-1-height);
}

.wing-2 {
    left: var(--hotspot-2-left);
    top: var(--hotspot-2-top);
    width: var(--hotspot-2-width);
    height: var(--hotspot-2-height);
}

.wing-3 {
    left: var(--hotspot-3-left);
    top: var(--hotspot-3-top);
    width: var(--hotspot-3-width);
    height: var(--hotspot-3-height);
}

.wing-4 {
    left: var(--hotspot-4-left);
    top: var(--hotspot-4-top);
    width: var(--hotspot-4-width);
    height: var(--hotspot-4-height);
}

/* Layered Hotspot Glow */
.hotspot-trigger {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0.3;
    transition: opacity 0.6s ease, transform 0.6s ease;
    mix-blend-mode: screen;
    filter: blur(30px);
    animation: organicFlicker 4s infinite alternate ease-in-out;
}

/* Floor Reflection */
.hotspot-reflection {
    position: absolute;
    bottom: -80%;
    left: 50%;
    width: 150%;
    height: 40%;
    transform: translateX(-50%) skewX(10deg);
    opacity: 0.05;
    transition: opacity 0.6s ease;
    pointer-events: none;
    z-index: 19;
    filter: blur(20px);
    background: linear-gradient(to top, currentColor, transparent);
    mix-blend-mode: color-dodge;
}

/* Wing-specific Glows */
.wing-1 .hotspot-trigger {
    background: radial-gradient(circle at 60% 40%, var(--cyan) 0%, transparent 80%), radial-gradient(circle at 40% 60%, rgba(0, 255, 238, 0.4) 0%, transparent 90%);
}

.wing-1 .hotspot-reflection {
    color: var(--cyan);
}

.wing-2 .hotspot-trigger {
    background: radial-gradient(circle at 50% 50%, var(--purple) 0%, transparent 80%), radial-gradient(circle at 50% 50%, rgba(170, 119, 255, 0.4) 0%, transparent 90%);
}

.wing-2 .hotspot-reflection {
    color: var(--purple);
}

.wing-3 .hotspot-trigger {
    background: radial-gradient(circle at 40% 40%, var(--green) 0%, transparent 80%), radial-gradient(circle at 60% 60%, rgba(68, 255, 136, 0.4) 0%, transparent 90%);
}

.wing-3 .hotspot-reflection {
    color: var(--green);
}

.wing-4 .hotspot-trigger {
    background: radial-gradient(circle at 50% 40%, var(--amber) 0%, transparent 80%), radial-gradient(circle at 50% 60%, rgba(255, 153, 68, 0.4) 0%, transparent 90%);
}

.wing-4 .hotspot-reflection {
    color: var(--amber);
}

.hotspot:hover .hotspot-trigger {
    opacity: 1;
    transform: scale(1.1);
    animation: intenseFlicker 0.3s infinite alternate;
}

.hotspot:hover .hotspot-reflection {
    opacity: 0.3;
}

.hotspot-label {
    position: absolute;
    bottom: -40px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease-out;
    text-align: center;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    pointer-events: none;
    white-space: nowrap;
    z-index: 30;
}

.label-text {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.label-sub {
    display: block;
    font-size: 0.7rem;
    color: #aaa;
}

/* Wing-specific Label Colors */
.wing-1:hover .label-text {
    color: var(--cyan);
}

.wing-1:hover .hotspot-label {
    border-color: var(--cyan);
    box-shadow: 0 0 15px rgba(0, 255, 238, 0.2);
}

.wing-2:hover .label-text {
    color: var(--purple);
}

.wing-2:hover .hotspot-label {
    border-color: var(--purple);
    box-shadow: 0 0 15px rgba(170, 119, 255, 0.2);
}

.wing-3:hover .label-text {
    color: var(--green);
}

.wing-3:hover .hotspot-label {
    border-color: var(--green);
    box-shadow: 0 0 15px rgba(68, 255, 136, 0.2);
}

.wing-4:hover .label-text {
    color: var(--amber);
}

.wing-4:hover .hotspot-label {
    border-color: var(--amber);
    box-shadow: 0 0 15px rgba(255, 153, 68, 0.2);
}

.hotspot:hover .hotspot-label {
    opacity: 1;
    transform: translateY(0);
}

/* Flash Overlay */
#flash-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    opacity: 0;
    pointer-events: none;
    z-index: 500;
}

/* Flash Animation: 0 -> 0.3 -> 0 */
#flash-overlay.active {
    animation: flashEffect 150ms ease-out forwards;
}

/* Transitions */
#transition-curtain {
    z-index: 499;
}

/* Animations - Global Effects */
@keyframes textPulse {

    0%,
    100% {
        opacity: 0.8;
        text-shadow: 0 0 10px rgba(0, 255, 238, 0.5);
    }

    50% {
        opacity: 1;
        text-shadow: 0 0 20px rgba(0, 255, 238, 0.8), 0 0 30px var(--cyan);
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.8;
    }
}

@keyframes scanMove {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 0 100%;
    }
}

@keyframes noiseShift {
    0% {
        transform: translate(0, 0);
    }

    10% {
        transform: translate(-5%, -5%);
    }

    20% {
        transform: translate(-10%, 5%);
    }

    30% {
        transform: translate(5%, -10%);
    }

    40% {
        transform: translate(-5%, 15%);
    }

    50% {
        transform: translate(-10%, 5%);
    }

    60% {
        transform: translate(15%, 0);
    }

    70% {
        transform: translate(0, 10%);
    }

    80% {
        transform: translate(-15%, 0);
    }

    90% {
        transform: translate(10%, 5%);
    }

    100% {
        transform: translate(5%, 0);
    }
}

@keyframes ripple {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
        border-width: 4px;
    }

    100% {
        width: 200%;
        height: 200%;
        opacity: 0;
        border-width: 0;
    }
}

@keyframes flashEffect {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* Organic Glow Flicker */
@keyframes organicFlicker {
    0% {
        opacity: 0.2;
        transform: scale(1);
    }

    15% {
        opacity: 0.35;
        transform: scale(1.02);
    }

    30% {
        opacity: 0.25;
        transform: scale(0.98);
    }

    45% {
        opacity: 0.4;
        transform: scale(1.05);
    }

    70% {
        opacity: 0.2;
        transform: scale(1);
    }

    85% {
        opacity: 0.3;
        transform: scale(1.03);
    }

    100% {
        opacity: 0.25;
        transform: scale(0.99);
    }
}

@keyframes intenseFlicker {
    0% {
        opacity: 0.7;
        transform: scale(1.1);
    }

    50% {
        opacity: 1;
        transform: scale(1.12);
    }

    100% {
        opacity: 0.85;
        transform: scale(1.08);
    }
}

/* Environmental Keyframes */
@keyframes sway {
    0% {
        transform: rotate(-0.5deg);
    }

    100% {
        transform: rotate(0.5deg);
    }
}

@keyframes spark {

    0%,
    90%,
    100% {
        opacity: 0;
    }

    92% {
        opacity: 1;
    }

    94% {
        opacity: 0.2;
    }

    96% {
        opacity: 1;
    }
}

@keyframes mistDrift {
    0% {
        transform: translateX(-5%) translateY(0);
        opacity: 0.3;
    }

    50% {
        transform: translateX(5%) translateY(-2px);
        opacity: 0.5;
    }

    100% {
        transform: translateX(-5%) translateY(0);
        opacity: 0.3;
    }
}

@keyframes jitter {

    0%,
    100% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(0.5px, -0.5px);
    }

    50% {
        transform: translate(-0.5px, 0.5px);
    }

    75% {
        transform: translate(0.5px, 0.5px);
    }
}

@keyframes dustDrift {
    0% {
        transform: translate(0, 0);
        opacity: 0;
    }

    20% {
        opacity: 0.4;
    }

    80% {
        opacity: 0.4;
    }

    100% {
        transform: translate(20px, -40px);
        opacity: 0;
    }
}

@keyframes heartBeat {

    0%,
    10%,
    100% {
        opacity: 0.3;
        filter: blur(2px);
    }

    15% {
        opacity: 0.8;
        filter: blur(0px);
    }

    25% {
        opacity: 0.4;
        filter: blur(1px);
    }

    30% {
        opacity: 0.6;
        filter: blur(0px);
    }
}

@keyframes scrollingText {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-50%);
    }
}

@keyframes blinkIrregular {

    0%,
    5%,
    15%,
    20%,
    35%,
    100% {
        opacity: 1;
    }

    10%,
    30% {
        opacity: 0;
    }
}

/* Hide mobile-only elements on desktop */
.mobile-only {
    display: none;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .mobile-only {
        display: flex;
    }

    /* Override Global Overflow for Mobile to allow horizontal scroll */
    body,
    html {
        overflow: hidden;
        /* Keep hidden on body, scroll on container */
    }

    #main-menu,
    .wing-container,
    .panoramic-viewport {
        overflow-x: auto;
        /* Allow horizontal scroll */
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        /* Hide scrollbar */
        scrollbar-width: none;
        /* Firefox */
        -ms-overflow-style: none;
        /* IE 10+ */

        /* Ensure the container itself has height to scroll content */
        height: 100vh;
        width: 100vw;
        opacity: 1;
        /* Ensure wing pages are visible */
    }

    #main-menu {
        position: fixed;
        opacity: 0;
        /* Only keep the landing page specific opacity here */
        transition: opacity 1.5s ease-in;
    }

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

    #main-menu::-webkit-scrollbar,
    .wing-container::-webkit-scrollbar,
    .panoramic-viewport::-webkit-scrollbar {
        display: none;
        /* Chrome/Safari */
    }

    /* Scene Wrapper - Mobile Panoramic Mode */
    #scene-wrapper {
        position: relative;
        top: 0;
        left: 0;
        transform: none;

        /* Force Full Height, Auto Width */
        height: 100vh;
        width: 177.77vh;
        /* Force 16:9 aspect ratio width based on viewport height */

        /* Reset min/max restrictions */
        min-width: auto;
        min-height: auto;
        max-width: none;
        max-height: none;
        margin: 0;
        padding: 0;

        aspect-ratio: 16 / 9;
        overflow: hidden;
        /* Ensure content stays inside */
    }

    .background-image {
        width: 100%;
        height: 100%;
        object-fit: fill;
        /* Fill the wrapper */
    }

    /* Restore Hotspots for Panoramic View */
    .hotspots-container {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        padding-bottom: 0;
        display: block;
        z-index: 20;
    }

    .hotspot {
        /* Restore Absolute Positioning */
        position: absolute;
        width: auto !important;
        height: auto !important;
        margin: 0;
        background: transparent;
        border: none;
    }

    /* Ensure no stacked button styles remain */
    .hotspot-trigger {
        display: block;
        opacity: 0.5;
        animation: pulseGlow 2s infinite ease-in-out;
    }

    .hotspot-reflection {
        display: none;
    }

    /* Specific overrides to ensure variables work */
    .wing-1 {
        left: var(--hotspot-1-left) !important;
        top: var(--hotspot-1-top) !important;
        width: var(--hotspot-1-width) !important;
        height: var(--hotspot-1-height) !important;
    }

    .wing-2 {
        left: var(--hotspot-2-left) !important;
        top: var(--hotspot-2-top) !important;
        width: var(--hotspot-2-width) !important;
        height: var(--hotspot-2-height) !important;
    }

    .wing-3 {
        left: var(--hotspot-3-left) !important;
        top: var(--hotspot-3-top) !important;
        width: var(--hotspot-3-width) !important;
        height: var(--hotspot-3-height) !important;
    }

    .wing-4 {
        left: var(--hotspot-4-left) !important;
        top: var(--hotspot-4-top) !important;
        width: var(--hotspot-4-width) !important;
        height: var(--hotspot-4-height) !important;
    }

    .hotspot-label {
        opacity: 0.8;
        transform: translateY(0);
        position: absolute;
        bottom: -30px;
        background: rgba(0, 0, 0, 0.6);
        font-size: 0.7rem;
        padding: 4px 8px;
        display: block;
        width: auto;
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    .label-sub {
        display: none;
    }

    /* Scroll Hints */
    .scroll-hint {
        position: fixed;
        top: 50%;
        transform: translateY(-50%);
        z-index: 500;
        pointer-events: none;
        opacity: 0.8;
        animation: hintPulse 1.5s infinite;
        transition: opacity 0.5s;
    }

    .scroll-left {
        left: 20px;
    }

    .scroll-right {
        right: 20px;
    }

    .chevron-left,
    .chevron-right {
        width: 20px;
        height: 20px;
        border-top: 4px solid var(--cyan);
        box-shadow: 0 0 10px var(--cyan);
    }

    .chevron-left {
        border-left: 4px solid var(--cyan);
        transform: rotate(-45deg);
    }

    .chevron-right {
        border-right: 4px solid var(--cyan);
        transform: rotate(45deg);
    }

    .center-element {
        display: none;
    }
}

@keyframes pulseGlow {

    0%,
    100% {
        opacity: 0.2;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(1.05);
    }
}

@keyframes hintPulse {

    0%,
    100% {
        opacity: 0.4;
        transform: translateY(-50%) scale(0.9);
    }

    50% {
        opacity: 1;
        transform: translateY(-50%) scale(1.1);
    }
}

/* Wing Page Specific Scoped Styles */
.wing-title {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 100;
    pointer-events: none;
}

.wing-name {
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: 10px;
    display: block;
    text-shadow: 0 0 20px currentColor;
}

.wing-sub {
    font-size: 1rem;
    color: #aaa;
    letter-spacing: 5px;
    margin-top: 10px;
    display: block;
    opacity: 0.7;
}

.construction-notice {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 40px;
    letter-spacing: 2px;
}

.back-button {
    position: fixed;
    top: 30px;
    left: 30px;
    z-index: 200;
    color: var(--cyan);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 10px;
    border: 1px solid rgba(0, 255, 238, 0.3);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    transition: all 0.3s;
}

.back-button:hover {
    background: var(--cyan);
    color: #000;
    box-shadow: 0 0 20px var(--cyan);
}

/* Animation Element Utility Styles */
.env-anim {
    position: absolute;
    pointer-events: none;
    z-index: 2;
}

.dust-particle {
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
}

.spark {
    width: 4px;
    height: 4px;
    background: cyan;
    box-shadow: 0 0 10px cyan;
    border-radius: 50%;
}

.mist-layer {
    width: 100%;
    height: 20%;
    bottom: 0;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.05), transparent);
}

/* Lab Status Terminal */
.status-terminal {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 12, 0.85);
    border-top: 1px solid #00E5CC33;
    backdrop-filter: blur(10px);
    z-index: 100;
    padding: 15px 30px;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: opacity 1s ease, transform 1s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease;
}

.status-terminal.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.status-terminal:hover {
    background: rgba(14, 14, 18, 0.95);
}

.terminal-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    max-width: 1600px;
    margin: 0 auto;
}

.terminal-section {
    flex: 1;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.status-terminal.active .transmission-log {
    transition-delay: 0.2s;
    opacity: 1;
}

.status-terminal.active .frequencies {
    transition-delay: 0.5s;
    opacity: 1;
}

.status-terminal.active .origin {
    transition-delay: 0.8s;
    opacity: 1;
    flex: 0 0 auto;
}

.section-label {
    font-size: 0.65rem;
    color: var(--cyan);
    opacity: 0.5;
    margin-bottom: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Left Section: Transmission Log */
.log-layout {
    display: flex;
    align-items: center;
    gap: 15px;
}

.crc-logo {
    height: 45px;
    opacity: 0.8;
    filter: grayscale(1) brightness(1.2);
}

.log-text .main-text {
    font-size: 12px;
    color: #888890;
    line-height: 1.4;
    max-width: 400px;
}

.log-text .sub-text {
    font-size: 10px;
    color: #555560;
    margin-top: 4px;
}

/* Center Section: Frequencies */
.freq-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 20px;
}

.freq-item {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 11px;
    padding: 4px 0;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.freq-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    box-shadow: 0 0 5px currentColor;
    animation: signalPulse 2s infinite ease-in-out;
}

.freq-code {
    color: #555560;
}

.freq-name {
    color: #888890;
}

.freq-status {
    font-weight: bold;
}

.cyan-dot {
    color: var(--cyan);
    background: var(--cyan);
}

.purple-dot {
    color: var(--purple);
    background: var(--purple);
}

.green-dot {
    color: var(--green);
    background: var(--green);
}

.amber-dot {
    color: var(--amber);
    background: var(--amber);
}

.cyan-text {
    color: var(--cyan);
}

.purple-text {
    color: var(--purple);
}

.green-text {
    color: var(--green);
}

.amber-text {
    color: var(--amber);
}

.freq-item:hover {
    transform: translateX(5px);
    text-shadow: 0 0 8px currentColor;
}

.freq-item:hover .freq-name {
    color: #fff;
}

.freq-item:hover .freq-dot {
    animation: signalPulse 0.5s infinite ease-in-out;
}

/* Right Section: Origin */
.origin-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    font-size: 11px;
    transition: all 0.3s ease;
}

.origin-tag {
    color: #555560;
}

.origin-site {
    color: #888890;
    font-size: 13px;
    margin-top: 2px;
}

.origin-link:hover .origin-site {
    color: var(--cyan);
    text-shadow: 0 0 10px var(--cyan);
}

/* Mobile Terminal Styles */
#terminal-toggle {
    display: none;
    width: 100%;
    background: transparent;
    border: none;
    color: var(--cyan);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 10px;
    cursor: pointer;
    text-align: center;
    letter-spacing: 2px;
}

/* Signal Pulse for Frequency Dots */
@keyframes signalPulse {

    0%,
    100% {
        opacity: 0.6;
        box-shadow: 0 0 3px currentColor;
    }

    50% {
        opacity: 1;
        box-shadow: 0 0 8px currentColor;
    }
}

/* Mobile Responsiveness for Terminal */
@media (max-width: 768px) {
    .status-terminal {
        padding: 5px 0;
        transform: translateY(100%);
        transition: opacity 1s ease, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .status-terminal.active {
        opacity: 1;
        transform: translateY(calc(100% - 40px));
    }

    .status-terminal.active.expanded {
        transform: translateY(0);
    }

    #terminal-toggle {
        display: block;
    }

    .terminal-content {
        flex-direction: column;
        gap: 20px;
        padding: 15px 16px 30px;
        max-height: 70vh;
        overflow-y: auto;
    }

    .terminal-section {
        width: 100%;
    }

    /* Frequency Links — Game Menu Buttons */
    .freq-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .freq-item {
        position: relative;
        min-height: 56px;
        padding: 12px 40px 12px 16px;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-left: 3px solid currentColor;
        border-radius: 4px;
        font-size: 13px;
        white-space: normal;
        gap: 10px;
        transition: all 0.15s ease;
        -webkit-tap-highlight-color: transparent;
    }

    /* Tap arrow indicator */
    .freq-item::after {
        content: '▸';
        position: absolute;
        right: 14px;
        top: 50%;
        transform: translateY(-50%);
        color: rgba(255, 255, 255, 0.15);
        font-size: 16px;
        transition: all 0.15s ease;
    }

    /* Tap feedback */
    .freq-item:active {
        background: rgba(255, 255, 255, 0.08);
        border-left-width: 5px;
        transform: scale(0.98);
    }

    .freq-item:active::after {
        color: rgba(255, 255, 255, 0.4);
        transform: translateY(-50%) translateX(2px);
    }

    .freq-item:active .freq-name {
        color: #fff;
    }

    /* Bigger pulsing dot on mobile */
    .freq-dot {
        width: 10px;
        height: 10px;
        flex-shrink: 0;
        box-shadow: 0 0 8px currentColor;
    }

    .freq-name {
        font-size: 13px;
        color: #999;
    }

    .freq-code {
        display: none;
    }

    .freq-status {
        margin-left: auto;
        font-size: 10px;
    }

    .crc-logo {
        height: 35px;
    }
}