/* ============================================
   AIICE.DEV - Retro-Futuristic HUD Interface
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --void-black: #0A0A0F;
    --charcoal-cockpit: #14141F;
    --neon-mint: #00FFAB;
    --neon-magenta: #FF006E;
    --antique-ivory: #F0E6D3;
    --gunmetal-gray: #A0A0B0;
    --aurora-teal: #00C9A7;
    --deep-violet: #2D1B69;

    --bezel-inset: 24px;
    --side-channel-width: 18%;
    --status-bar-height: 48px;
    --thrust-bar-height: 2px;

    --font-display: 'Playfair Display', Georgia, serif;
    --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
}

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

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

body {
    background-color: var(--void-black);
    color: var(--antique-ivory);
    font-family: var(--font-mono);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Prevent scrolling during boot */
body.booting {
    overflow: hidden;
}

/* --- Boot Sequence Overlay --- */
#boot-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--void-black);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 0.8s ease;
}

#boot-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

#boot-overlay.hidden {
    display: none;
}

#bezel-svg {
    position: absolute;
    top: var(--bezel-inset);
    left: var(--bezel-inset);
    width: calc(100% - var(--bezel-inset) * 2);
    height: calc(100% - var(--bezel-inset) * 2);
}

#bezel-rect {
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    animation: drawBezel 1.2s ease-in-out 0.3s forwards;
}

@keyframes drawBezel {
    to {
        stroke-dashoffset: 0;
    }
}

#boot-status-text {
    font-family: var(--font-mono);
    font-size: clamp(0.8rem, 1.2vw, 1.1rem);
    color: var(--neon-mint);
    letter-spacing: 0.08em;
    opacity: 0.85;
    z-index: 1;
    white-space: nowrap;
}

/* --- Scan-line Overlay --- */
#scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9000;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 1px,
        rgba(0, 255, 171, 0.03) 1px,
        rgba(0, 255, 171, 0.03) 2px
    );
    opacity: 1;
}

/* --- Aurora Background --- */
#aurora-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0;
    transition: opacity 2s ease;
    background:
        radial-gradient(ellipse 80% 50% at 20% 80%, rgba(45, 27, 105, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 70% 20%, rgba(0, 201, 167, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 50% 60% at 50% 50%, rgba(255, 0, 110, 0.05) 0%, transparent 40%);
    background-size: 200% 200%, 180% 180%, 160% 160%;
    animation:
        auroraDrift1 60s ease-in-out infinite,
        auroraDrift2 45s ease-in-out infinite,
        auroraDrift3 30s ease-in-out infinite;
}

#aurora-bg.visible {
    opacity: 1;
}

@keyframes auroraDrift1 {
    0%, 100% { background-position: 0% 0%, 50% 50%, 25% 75%; }
    25% { background-position: 30% 20%, 70% 30%, 45% 55%; }
    50% { background-position: 60% 40%, 20% 70%, 65% 35%; }
    75% { background-position: 40% 60%, 80% 40%, 15% 85%; }
}

@keyframes auroraDrift2 {
    0%, 100% { background-position: 50% 50%, 30% 70%, 70% 30%; }
    33% { background-position: 20% 30%, 60% 50%, 40% 60%; }
    66% { background-position: 80% 70%, 40% 30%, 60% 50%; }
}

@keyframes auroraDrift3 {
    0%, 100% { background-position: 25% 75%, 75% 25%, 50% 50%; }
    50% { background-position: 75% 25%, 25% 75%, 30% 70%; }
}

/* --- HUD Bezel Frame --- */
#hud-bezel {
    position: relative;
    min-height: 100vh;
    margin: var(--bezel-inset);
    border: 1px solid rgba(0, 255, 171, 0.6);
    border-radius: 2px;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.8s ease;
}

#hud-bezel.visible {
    opacity: 1;
}

/* --- Status Bar --- */
#status-bar {
    position: fixed;
    top: var(--bezel-inset);
    left: var(--bezel-inset);
    right: var(--bezel-inset);
    height: var(--status-bar-height);
    background: var(--charcoal-cockpit);
    border-bottom: 1px solid rgba(0, 255, 171, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 500;
    border-radius: 2px 2px 0 0;
}

.status-left .domain-label {
    font-family: var(--font-mono);
    font-size: clamp(0.7rem, 0.9vw, 0.85rem);
    font-weight: 500;
    color: var(--neon-mint);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.status-center #clock-readout {
    font-family: var(--font-mono);
    font-size: clamp(0.65rem, 0.8vw, 0.8rem);
    color: var(--gunmetal-gray);
    letter-spacing: 0.06em;
}

.status-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-cluster {
    display: flex;
    gap: 2px;
}

.nav-link {
    font-family: var(--font-mono);
    font-size: clamp(0.6rem, 0.75vw, 0.75rem);
    color: var(--gunmetal-gray);
    text-decoration: none;
    letter-spacing: 0.06em;
    padding: 4px 10px;
    border: 1px solid rgba(160, 160, 176, 0.2);
    border-radius: 1px;
    transition: color 0.3s, border-color 0.3s, background 0.3s;
}

.nav-link:hover {
    color: var(--neon-mint);
    border-color: rgba(0, 255, 171, 0.5);
    background: rgba(0, 255, 171, 0.05);
}

#mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 3px;
    padding: 8px;
    background: none;
    border: 1px solid rgba(0, 255, 171, 0.3);
    cursor: pointer;
    border-radius: 1px;
}

#mobile-menu-btn span {
    display: block;
    width: 16px;
    height: 1px;
    background: var(--neon-mint);
}

/* --- Side Channels --- */
.side-channel {
    position: fixed;
    top: calc(var(--bezel-inset) + var(--status-bar-height));
    width: var(--side-channel-width);
    bottom: calc(var(--bezel-inset) + 20px);
    background: var(--charcoal-cockpit);
    z-index: 400;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.side-channel.visible {
    opacity: 1;
}

/* Scrollbar styling for side channels */
.side-channel::-webkit-scrollbar {
    width: 2px;
}
.side-channel::-webkit-scrollbar-track {
    background: transparent;
}
.side-channel::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 171, 0.2);
}

#left-channel {
    left: var(--bezel-inset);
    border-right: 1px solid rgba(0, 255, 171, 0.15);
}

#right-channel {
    right: var(--bezel-inset);
    border-left: 1px solid rgba(0, 255, 171, 0.15);
}

.channel-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.channel-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--gunmetal-gray);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(160, 160, 176, 0.15);
}

.data-readout {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: rgba(0, 255, 171, 0.85);
    letter-spacing: 0.04em;
    line-height: 1.6;
}

/* Signal Bars */
.signal-display {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 30px;
}

.signal-bar {
    width: 6px;
    background: var(--neon-mint);
    border-radius: 1px 1px 0 0;
    opacity: 0.7;
    transition: height 0.5s ease;
}

/* Compass Rose */
#compass-rose {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 70px;
}

.compass-ring {
    position: relative;
    width: 56px;
    height: 56px;
    border: 1px solid rgba(0, 255, 171, 0.3);
    border-radius: 50%;
    animation: compassRotate 60s linear infinite;
}

.compass-needle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1px;
    height: 20px;
    background: var(--neon-magenta);
    transform: translate(-50%, -100%);
}

.compass-needle::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    width: 1px;
    height: 20px;
    background: rgba(160, 160, 176, 0.3);
    transform: translateX(-50%);
}

.compass-n, .compass-e, .compass-s, .compass-w {
    position: absolute;
    font-family: var(--font-mono);
    font-size: 0.5rem;
    color: var(--gunmetal-gray);
    letter-spacing: 0;
}

.compass-n { top: 2px; left: 50%; transform: translateX(-50%); }
.compass-e { right: 2px; top: 50%; transform: translateY(-50%); }
.compass-s { bottom: 2px; left: 50%; transform: translateX(-50%); }
.compass-w { left: 2px; top: 50%; transform: translateY(-50%); }

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

/* Telemetry Feed */
.telemetry-scroll {
    height: 100px;
    overflow: hidden;
    font-size: 0.65rem;
    line-height: 1.5;
    color: rgba(0, 255, 171, 0.6);
}

/* Status Indicators */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--gunmetal-gray);
    letter-spacing: 0.04em;
    padding: 3px 0;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.active {
    background: var(--neon-mint);
    box-shadow: 0 0 6px rgba(0, 255, 171, 0.5);
}

.status-dot.warning {
    background: #FFB800;
    box-shadow: 0 0 6px rgba(255, 184, 0, 0.4);
    animation: warningPulse 2s ease-in-out infinite;
}

.status-dot.inactive {
    background: rgba(160, 160, 176, 0.3);
}

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

/* Power Meter */
.meter-display {
    position: relative;
    height: 12px;
    background: rgba(0, 255, 171, 0.05);
    border: 1px solid rgba(0, 255, 171, 0.2);
    border-radius: 1px;
}

.meter-fill {
    height: 100%;
    width: 78%;
    background: linear-gradient(90deg, var(--neon-mint), var(--aurora-teal));
    opacity: 0.6;
    border-radius: 1px;
    animation: meterPulse 3s ease-in-out infinite;
}

@keyframes meterPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.8; }
}

.meter-value {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    font-family: var(--font-mono);
    font-size: 0.55rem;
    color: var(--antique-ivory);
    letter-spacing: 0.04em;
}

/* Frequency Bars */
#freq-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 40px;
}

.freq-bar {
    flex: 1;
    background: linear-gradient(to top, var(--deep-violet), var(--neon-mint));
    opacity: 0.5;
    border-radius: 1px 1px 0 0;
    transition: height 0.4s ease;
}

/* --- Main Viewport --- */
#main-viewport {
    margin-left: var(--side-channel-width);
    margin-right: var(--side-channel-width);
    padding: calc(var(--status-bar-height) + 32px) 40px 60px;
    min-height: 100vh;
}

/* --- Instrument Panels --- */
.instrument-panel {
    position: relative;
    border: 1px solid rgba(0, 255, 171, 0.3);
    border-radius: 2px;
    margin-bottom: 48px;
    background: rgba(10, 10, 15, 0.8);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.8s ease;
}

.instrument-panel.visible {
    opacity: 1;
    transform: translateY(0);
}

.instrument-panel.dimmed {
    border-color: rgba(0, 255, 171, 0.15);
}

.instrument-panel.dimmed .panel-content {
    opacity: 0.4;
    transition: opacity 0.8s ease;
}

/* Panel border draw animation */
.instrument-panel.drawing {
    animation: panelBorderDraw 0.6s ease forwards;
}

@keyframes panelBorderDraw {
    0% {
        clip-path: inset(0 100% 100% 0);
    }
    50% {
        clip-path: inset(0 0 100% 0);
    }
    100% {
        clip-path: inset(0 0 0 0);
    }
}

/* Panel Corners (HUD bracket marks) */
.panel-corner {
    position: absolute;
    width: 8px;
    height: 8px;
    z-index: 2;
}

.panel-corner::before,
.panel-corner::after {
    content: '';
    position: absolute;
    background: rgba(0, 255, 171, 0.4);
}

.panel-corner.tl { top: -1px; left: -1px; }
.panel-corner.tl::before { top: 0; left: 0; width: 8px; height: 1px; }
.panel-corner.tl::after { top: 0; left: 0; width: 1px; height: 8px; }

.panel-corner.tr { top: -1px; right: -1px; }
.panel-corner.tr::before { top: 0; right: 0; width: 8px; height: 1px; }
.panel-corner.tr::after { top: 0; right: 0; width: 1px; height: 8px; }

.panel-corner.bl { bottom: -1px; left: -1px; }
.panel-corner.bl::before { bottom: 0; left: 0; width: 8px; height: 1px; }
.panel-corner.bl::after { bottom: 0; left: 0; width: 1px; height: 8px; }

.panel-corner.br { bottom: -1px; right: -1px; }
.panel-corner.br::before { bottom: 0; right: 0; width: 8px; height: 1px; }
.panel-corner.br::after { bottom: 0; right: 0; width: 1px; height: 8px; }

.panel-content {
    padding: 40px;
    transition: opacity 0.8s ease;
}

/* --- Panel Typography --- */
.panel-heading {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    color: var(--antique-ivory);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.scan-line {
    height: 1px;
    background: rgba(0, 255, 171, 0.2);
    margin-bottom: 24px;
}

.panel-body {
    font-family: var(--font-mono);
    font-size: clamp(0.85rem, 1vw, 1rem);
    color: var(--antique-ivory);
    letter-spacing: 0.04em;
    line-height: 1.8;
    margin-bottom: 32px;
    opacity: 0.85;
}

/* --- Hero Panel --- */
.hero {
    text-align: center;
    padding: 80px 0;
    border-color: rgba(0, 255, 171, 0.4);
    background: linear-gradient(180deg, rgba(45, 27, 105, 0.1) 0%, rgba(10, 10, 15, 0.9) 100%);
}

.hero .panel-content {
    padding: 60px 40px;
}

.hero-headline {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.8rem, 6vw, 5rem);
    color: var(--antique-ivory);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 16px;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.hero-headline.visible {
    opacity: 1;
}

.hero-subtitle {
    font-family: var(--font-display);
    font-weight: 400;
    font-style: italic;
    font-size: clamp(1.1rem, 2vw, 1.6rem);
    color: var(--neon-magenta);
    letter-spacing: 0.04em;
    margin-bottom: 48px;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hero-subtitle.visible {
    opacity: 1;
}

/* Hero Isometric Cube */
.hero-isometric {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.iso-cube {
    width: 80px;
    height: 80px;
    position: relative;
    transform: rotateX(60deg) rotateZ(45deg);
    transform-style: preserve-3d;
    animation: isoCubeRotate 4s ease-in-out infinite;
}

@keyframes isoCubeRotate {
    0%, 100% { transform: rotateX(60deg) rotateZ(45deg); }
    50% { transform: rotateX(60deg) rotateZ(225deg); }
}

.iso-face {
    position: absolute;
    width: 80px;
    height: 80px;
    border: 1px solid rgba(0, 255, 171, 0.5);
}

.iso-top {
    background: rgba(0, 255, 171, 0.15);
    transform: translateZ(40px);
}

.iso-left {
    background: rgba(45, 27, 105, 0.4);
    transform: rotateY(-90deg) translateZ(40px);
}

.iso-right {
    background: rgba(45, 27, 105, 0.3);
    transform: rotateX(90deg) translateZ(40px);
}

/* --- Panel Grid (Systems) --- */
.panel-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 8px;
}

.grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 12px;
    border: 1px solid rgba(0, 255, 171, 0.15);
    border-radius: 2px;
    background: rgba(20, 20, 31, 0.5);
    transition: border-color 0.3s, background 0.3s;
}

.grid-item:hover {
    border-color: rgba(0, 255, 171, 0.4);
    background: rgba(20, 20, 31, 0.8);
}

.iso-icon {
    width: 80px;
    height: 60px;
}

.iso-icon svg {
    width: 100%;
    height: 100%;
}

.grid-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--antique-ivory);
    letter-spacing: 0.08em;
    text-align: center;
}

.grid-value {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--neon-mint);
    letter-spacing: 0.06em;
    opacity: 0.85;
}

/* --- Interface Modules --- */
.interface-modules {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.module-block {
    padding: 16px 20px;
    border: 1px solid rgba(0, 255, 171, 0.15);
    border-radius: 2px;
    background: rgba(20, 20, 31, 0.4);
}

.module-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.module-id {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--neon-magenta);
    letter-spacing: 0.06em;
    padding: 2px 8px;
    border: 1px solid rgba(255, 0, 110, 0.3);
    border-radius: 1px;
}

.module-name {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--antique-ivory);
    letter-spacing: 0.06em;
}

.module-bar {
    height: 4px;
    background: rgba(0, 255, 171, 0.1);
    border-radius: 1px;
    margin-bottom: 8px;
    overflow: hidden;
}

.module-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-mint), var(--aurora-teal));
    border-radius: 1px;
    transition: width 1s ease;
}

.module-status {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--gunmetal-gray);
    letter-spacing: 0.06em;
}

/* --- Locked Panel (Shake-Error Target) --- */
.locked-panel {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border: 1px solid rgba(160, 160, 176, 0.2);
    border-radius: 2px;
    background: rgba(20, 20, 31, 0.3);
    cursor: pointer;
    transition: border-color 0.6s ease;
    margin-top: 16px;
    position: relative;
}

.locked-panel:hover {
    border-color: rgba(160, 160, 176, 0.4);
}

.locked-icon {
    font-size: 1rem;
    color: var(--gunmetal-gray);
    opacity: 0.6;
}

.locked-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--gunmetal-gray);
    letter-spacing: 0.06em;
}

.locked-panel.shaking {
    animation: shake 0.4s ease;
    border-color: var(--neon-magenta);
}

.locked-panel .error-label {
    position: absolute;
    bottom: -22px;
    left: 20px;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--neon-magenta);
    letter-spacing: 0.08em;
    opacity: 0;
    transition: opacity 0.3s;
}

.locked-panel.shaking .error-label {
    opacity: 1;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* --- Pull Quote --- */
.pull-quote {
    padding: 32px 24px;
    margin: 24px 0 32px;
    border-left: 2px solid rgba(255, 0, 110, 0.5);
    background: rgba(45, 27, 105, 0.1);
    position: relative;
}

.pull-quote .quote-mark {
    font-family: var(--font-display);
    font-weight: 400;
    font-style: italic;
    font-size: 2rem;
    color: var(--neon-magenta);
    opacity: 0.4;
    line-height: 0;
    vertical-align: middle;
}

.pull-quote {
    font-family: var(--font-display);
    font-weight: 400;
    font-style: italic;
    font-size: clamp(1.1rem, 1.8vw, 1.4rem);
    color: var(--neon-magenta);
    line-height: 1.7;
    letter-spacing: 0.02em;
}

/* --- Engine Diagram --- */
.engine-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin-top: 16px;
}

.engine-layer {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 400px;
    padding: 12px 20px;
    border: 1px solid rgba(0, 255, 171, 0.2);
    border-radius: 2px;
    background: rgba(20, 20, 31, 0.4);
}

.engine-layer.output-layer {
    border-color: rgba(0, 255, 171, 0.5);
    background: rgba(0, 255, 171, 0.05);
}

.layer-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--neon-mint);
    letter-spacing: 0.08em;
    min-width: 100px;
}

.layer-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(0, 255, 171, 0.4), transparent);
}

.engine-connector {
    width: 1px;
    height: 16px;
    background: rgba(0, 255, 171, 0.25);
}

/* --- Transmission Entries --- */
.transmission-entries {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
}

.transmission-entry {
    padding: 16px 20px;
    border: 1px solid rgba(0, 255, 171, 0.1);
    border-left: 2px solid rgba(0, 255, 171, 0.4);
    border-radius: 0 2px 2px 0;
    background: rgba(20, 20, 31, 0.3);
}

.tx-timestamp {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--neon-mint);
    letter-spacing: 0.06em;
    display: block;
    margin-bottom: 4px;
    opacity: 0.7;
}

.tx-source {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--gunmetal-gray);
    letter-spacing: 0.06em;
    display: block;
    margin-bottom: 8px;
}

.tx-message {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--antique-ivory);
    letter-spacing: 0.03em;
    line-height: 1.7;
    opacity: 0.8;
}

/* --- Command Interface --- */
.command-input-area {
    margin-top: 8px;
}

.command-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--gunmetal-gray);
    letter-spacing: 0.08em;
    display: block;
    margin-bottom: 12px;
}

.input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-prompt {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--neon-mint);
    opacity: 0.8;
}

.hud-input {
    flex: 1;
    background: rgba(10, 10, 15, 0.8);
    border: 1px solid rgba(0, 255, 171, 0.25);
    border-radius: 1px;
    padding: 10px 14px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--neon-mint);
    letter-spacing: 0.04em;
    outline: none;
    transition: border-color 0.3s;
}

.hud-input::placeholder {
    color: rgba(160, 160, 176, 0.4);
}

.hud-input:focus {
    border-color: rgba(0, 255, 171, 0.6);
}

.hud-input.invalid {
    border-color: var(--neon-magenta);
    animation: shake 0.4s ease;
}

.hud-button.execute {
    background: none;
    border: 1px solid rgba(0, 255, 171, 0.4);
    border-radius: 1px;
    padding: 10px 20px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--neon-mint);
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: background 0.3s, border-color 0.3s;
}

.hud-button.execute:hover {
    background: rgba(0, 255, 171, 0.1);
    border-color: var(--neon-mint);
}

.command-response {
    margin-top: 12px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--neon-mint);
    letter-spacing: 0.04em;
    line-height: 1.6;
    min-height: 24px;
    opacity: 0.85;
}

/* --- Thrust Bar (Scroll Progress) --- */
#thrust-bar {
    position: fixed;
    bottom: calc(var(--bezel-inset) + 8px);
    left: calc(var(--bezel-inset) + 24px);
    right: calc(var(--bezel-inset) + 24px);
    height: var(--thrust-bar-height);
    background: rgba(0, 255, 171, 0.1);
    z-index: 500;
    border-radius: 1px;
}

#thrust-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--neon-mint), var(--aurora-teal));
    border-radius: 1px;
    transition: width 0.1s linear;
}

#thrust-fill.complete {
    animation: thrustPulse 1.5s ease-in-out infinite;
}

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

/* --- Mobile Channel Overlay --- */
#mobile-channel-overlay {
    position: fixed;
    top: calc(var(--bezel-inset) + var(--status-bar-height));
    left: var(--bezel-inset);
    right: var(--bezel-inset);
    bottom: calc(var(--bezel-inset) + 20px);
    background: var(--charcoal-cockpit);
    z-index: 450;
    overflow-y: auto;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#mobile-channel-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

#mobile-channel-overlay.hidden {
    display: none;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    :root {
        --bezel-inset: 12px;
        --side-channel-width: 0px;
    }

    .side-channel {
        display: none;
    }

    #main-viewport {
        margin-left: 0;
        margin-right: 0;
        padding: calc(var(--status-bar-height) + 24px) 16px 60px;
    }

    .nav-cluster {
        display: none;
    }

    #mobile-menu-btn {
        display: flex;
    }

    .panel-content {
        padding: 24px 16px;
    }

    .hero .panel-content {
        padding: 40px 16px;
    }

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

    .status-center {
        display: none;
    }

    #mobile-channel-overlay.hidden {
        display: block;
    }

    .input-row {
        flex-wrap: wrap;
    }

    .hud-input {
        flex: 1 1 100%;
        order: 1;
    }

    .input-prompt {
        order: 0;
    }

    .hud-button.execute {
        order: 2;
        width: 100%;
        margin-top: 8px;
    }
}

@media (max-width: 480px) {
    .hero-headline {
        font-size: 2.4rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .panel-heading {
        font-size: 1.2rem;
    }
}

/* --- Utility --- */
.hidden {
    display: none;
}

/* Glow effects for neon elements */
.neon-glow {
    text-shadow: 0 0 10px rgba(0, 255, 171, 0.3), 0 0 20px rgba(0, 255, 171, 0.1);
}
