/* ─────────────────────────────────────────────────────────
   FIGHTER JET HUD STYLES — more.html
   All values use global design tokens from styles.css
   ───────────────────────────────────────────────────────── */

/* ── Background grid for more.html ─────────────────────── */
/* NOTE: body already has the grid via background-image.
   .hud-grid-bg provides a slightly larger minor grid scale
   on top, but at very low opacity so they don't clash. */
.hud-grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    /* Larger squares = different scale than body grid → visible depth */
    background-image:
        linear-gradient(rgba(var(--accent-rgb), 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(var(--accent-rgb), 0.04) 1px, transparent 1px);
    background-size: 120px 120px;
    background-position: center center;
    z-index: -1;
    pointer-events: none;
    /* CRT screen edge vignette */
    -webkit-mask-image: radial-gradient(ellipse 90% 90% at center, black 55%, transparent 100%);
    mask-image: radial-gradient(ellipse 90% 90% at center, black 55%, transparent 100%);
}

/* ── HUD Container ──────────────────────────────────────── */
.hud-container {
    position: relative;
    z-index: 10;
}

/* ── Hero Section ───────────────────────────────────────── */
.fighter-hero {
    position: relative;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: var(--space-2xl);
    overflow: hidden;
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
    margin-bottom: 24px;
}

/* ── HUD Telemetry Readouts ─────────────────────────────── */
.hud-telemetry {
    position: absolute;
    font-family: var(--ui-font);
    font-size: 0.7rem;
    color: var(--accent-green);
    opacity: 0.75;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    gap: 3px;
    pointer-events: none;
}

.hud-top-left {
    top: 18px;
    left: 48px;
}

.hud-top-right {
    top: 18px;
    right: 48px;
    text-align: right;
}

.hud-bottom-left {
    bottom: 18px;
    left: 48px;
}

.hud-bottom-right {
    bottom: 18px;
    right: 48px;
    text-align: right;
}

/* Responsive tweaks for telemetry */
@media (max-width: 768px) {
    .hud-telemetry {
        font-size: 0.55rem;
        letter-spacing: 1px;
    }

    .hud-top-left,
    .hud-bottom-left {
        left: 15px;
    }

    .hud-top-right,
    .hud-bottom-right {
        right: 15px;
    }
}

@media (max-width: 480px) {

    /* Hide some telemetry to save space on very small screens */
    .hud-bottom-left,
    .hud-top-right {
        display: none;
    }

    .fighter-hero .hero-title {
        font-size: 2.2rem !important;
        /* Force smaller title */
    }
}

/* Target lock — amber pulse */
.hud-target-lock {
    color: var(--accent-amber);
    animation: pulseLock 2.5s ease-in-out infinite;
}

@keyframes pulseLock {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
        color: var(--accent-red);
    }
}

/* ── MFD Cards ──────────────────────────────────────────── */
.mfd-card {
    position: relative;
    border: 1px solid var(--panel-border);
    background: var(--panel-bg);
    overflow: visible;
    transition: border-color var(--t-base), background var(--t-base);
    will-change: border-color;
}

.mfd-card:hover {
    border-color: var(--accent-amber);
    background: var(--bg-secondary);
}

/* ── MFD Corner Brackets ────────────────────────────────── */
.mfd-brackets {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
}

.mfd-brackets::before,
.mfd-brackets::after,
.mfd-brackets .btm::before,
.mfd-brackets .btm::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border: 2px solid var(--accent);
    opacity: 0.55;
    transition: opacity var(--t-base), width var(--t-base), height var(--t-base);
}

.mfd-card:hover .mfd-brackets::before,
.mfd-card:hover .mfd-brackets::after,
.mfd-card:hover .mfd-brackets .btm::before,
.mfd-card:hover .mfd-brackets .btm::after {
    opacity: 1;
    width: 16px;
    height: 16px;
}

.mfd-brackets::before {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
}

.mfd-brackets::after {
    top: -2px;
    right: -2px;
    border-left: none;
    border-bottom: none;
}

.mfd-brackets .btm::before {
    bottom: -2px;
    left: -2px;
    border-right: none;
    border-top: none;
}

.mfd-brackets .btm::after {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
}

/* ── MFD Typography ─────────────────────────────────────── */
.mfd-header {
    font-family: var(--ui-font);
    font-size: 0.75rem;
    color: var(--accent-amber);
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 1px dashed rgba(var(--accent-rgb), 0.3);
    padding-bottom: 8px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
}

.mfd-sys-status {
    font-size: 0.6rem;
    padding: 2px 6px;
    background: var(--accent-amber-dim);
    border: 1px solid var(--panel-border);
    color: var(--accent-amber);
    font-family: var(--ui-font);
}

.mfd-card h2,
.mfd-card h3 {
    font-family: var(--ui-font);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mfd-card p {
    font-family: var(--body-font);
    opacity: 0.9;
}

/* ── Specific Card Tweaks ───────────────────────────────── */
.f1-stats {
    border-top: 1px solid var(--panel-border);
    padding-top: 10px;
}

.f1-badge {
    background: var(--accent-amber);
    color: var(--bg-primary);
    font-family: var(--ui-font);
    font-weight: bold;
    border-radius: 0;
    box-shadow: 0 0 8px var(--accent-amber);
}

.music-visual .bar {
    background: var(--accent);
}

/* ── Lifestyle Expansion Components ────────────────────── */

/* Field Notes / Terminal */
.terminal-window {
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

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

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Audio Intercepts */
.audio-tuner {
    background-image: repeating-linear-gradient(transparent,
            transparent 2px,
            rgba(0, 240, 255, 0.03) 2px,
            rgba(0, 240, 255, 0.03) 4px);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

/* Off-Duty Coordinates (Radar) moved to HTML element to fix centering */

@keyframes radarSpin {
    0% {
        transform: rotate(0deg);
    }

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

/* ── Signal Uplink (Visual Logs Redesign) ───────────────── */
.signal-uplink-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.signal-display {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--panel-border);
    height: 80px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.signal-wave {
    display: flex;
    gap: 4px;
    align-items: center;
    height: 60px;
}

.signal-wave .bar {
    width: 6px;
    background: var(--accent);
    animation: signalPulse 1.2s ease-in-out infinite alternate;
    box-shadow: 0 0 8px var(--accent-glow);
}

.signal-wave .bar:nth-child(1) {
    height: 20%;
    animation-delay: 0.1s;
    background: var(--accent-amber);
}

.signal-wave .bar:nth-child(2) {
    height: 40%;
    animation-delay: 0.3s;
}

.signal-wave .bar:nth-child(3) {
    height: 100%;
    animation-delay: 0.5s;
}

.signal-wave .bar:nth-child(4) {
    height: 60%;
    animation-delay: 0.2s;
}

.signal-wave .bar:nth-child(5) {
    height: 80%;
    animation-delay: 0.7s;
}

.signal-wave .bar:nth-child(6) {
    height: 30%;
    animation-delay: 0.4s;
}

.signal-wave .bar:nth-child(7) {
    height: 70%;
    animation-delay: 0.8s;
}

.signal-wave .bar:nth-child(8) {
    height: 20%;
    animation-delay: 0.2s;
    background: var(--accent-amber);
}

@keyframes signalPulse {
    0% {
        transform: scaleY(0.3);
        opacity: 0.5;
    }

    100% {
        transform: scaleY(1);
        opacity: 1;
    }
}

.signal-scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 10%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.4), transparent);
    animation: scanRight 3s linear infinite;
    pointer-events: none;
}

@keyframes scanRight {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(1000%);
    }
}

.signal-telemetry {
    background: var(--bg-secondary);
    border: 1px solid rgba(var(--accent-rgb), 0.2);
    padding: 12px;
    font-family: var(--ui-font);
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.telemetry-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    border-bottom: 1px dashed rgba(var(--accent-rgb), 0.1);
    padding-bottom: 4px;
}

.telemetry-row:last-of-type {
    margin-bottom: 0;
    border-bottom: none;
}

.t-label {
    opacity: 0.7;
    letter-spacing: 1px;
}

.t-val {
    color: var(--text-primary);
    font-weight: bold;
}

.t-val.ok {
    color: var(--accent-green);
}

.t-val.blink {
    animation: textBlink 1.5s infinite;
    color: var(--accent-amber);
}

@keyframes textBlink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

.uplink-btn:hover {
    background: var(--accent-amber);
    color: var(--bg-primary) !important;
    box-shadow: 0 0 18px rgba(217, 119, 6, 0.4);
}