@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

:root {
    --neon-cyan: #00f0ff;
    --neon-magenta: #ff00aa;
    --neon-green: #00ff88;
    --neon-yellow: #f0ff00;
    --neon-red: #ff2244;
    --dark-bg: #0a0a0f;
    --panel-bg: rgba(13, 13, 26, 0.9);
    --panel-border: #1a1a3a;
    /* Readability pass: bumped --text-primary + --text-dim brighter so
       panel labels don't wash out against the black space background.
       Defined --text-bright so templates that reference it stop
       falling back to --text-primary. */
    --text-primary: #d8d8ec;
    --text-bright: #f0f0ff;
    --text-dim: #9090b0;
}

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

body {
    background: var(--dark-bg);
    color: var(--text-primary);
    font-family: 'Share Tech Mono', monospace;
    overflow: hidden;
}

.hidden {
    display: none !important;
}

.cyber-btn {
    background: transparent;
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    font-family: 'Share Tech Mono', monospace;
    padding: 8px 16px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85em;
    transition: all 0.2s;
}

.cyber-btn:hover {
    background: rgba(0, 240, 255, 0.1);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

/* ============================================
   Radio Player
   ============================================ */

.radio-player {
    position: fixed;
    bottom: 12px;
    left: 228px;
    width: 260px;
    background: rgba(10, 10, 20, 0.95);
    border: 1px solid rgba(255, 0, 170, 0.2);
    border-radius: 4px;
    padding: 8px 10px;
    z-index: 80;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Cockpit variant. sits just above the floating dashboard */
.radio-player.cockpit {
    position: absolute;
    left: 10px;
    bottom: 230px;
    top: auto;
    right: auto;
    width: 240px;
    background: rgba(5, 5, 15, 0.75);
    border-color: rgba(255, 0, 170, 0.15);
}

/* Station row. prev/name/next */
.radio-station-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.radio-station-prev,
.radio-station-next {
    background: transparent;
    border: none;
    color: var(--neon-magenta);
    font-size: 0.7em;
    cursor: pointer;
    padding: 2px 4px;
    opacity: 0.6;
    transition: opacity 0.12s;
}

.radio-station-prev:hover,
.radio-station-next:hover {
    opacity: 1;
}

.radio-station-info {
    flex: 1;
    text-align: center;
    min-width: 0;
}

.radio-station-name {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7em;
    color: var(--neon-magenta);
    letter-spacing: 2px;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.radio-station-tagline {
    display: block;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.5em;
    color: var(--text-dim);
    letter-spacing: 1px;
}

/* Progress bar */
.radio-progress-track {
    width: 100%;
    height: 2px;
    background: rgba(255, 0, 170, 0.1);
    border-radius: 1px;
    overflow: hidden;
}

.radio-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--neon-magenta);
    box-shadow: 0 0 4px rgba(255, 0, 170, 0.3);
    transition: width 0.3s linear;
}

/* Track name */
.radio-track-row {
    text-align: center;
}

.radio-track-name {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.6em;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

/* Controls row */
.radio-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.radio-prev-btn,
.radio-play-btn,
.radio-next-btn,
.radio-mute-btn {
    background: transparent;
    border: 1px solid rgba(255, 0, 170, 0.15);
    color: var(--neon-magenta);
    font-size: 0.7em;
    width: 28px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.12s;
    padding: 0;
}

.radio-play-btn {
    width: 34px;
    border-color: rgba(255, 0, 170, 0.3);
}

.radio-prev-btn:hover,
.radio-play-btn:hover,
.radio-next-btn:hover,
.radio-mute-btn:hover {
    background: rgba(255, 0, 170, 0.1);
    border-color: var(--neon-magenta);
}

.radio-mute-btn {
    font-size: 0.8em;
    margin-left: 2px;
}

/* Volume slider */
.radio-volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 60px;
    height: 3px;
    background: rgba(255, 0, 170, 0.15);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    margin-left: 2px;
}

.radio-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    background: var(--neon-magenta);
    cursor: pointer;
}

.radio-volume-slider::-moz-range-thumb {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    background: var(--neon-magenta);
    border: none;
    cursor: pointer;
}

/* Sidebar variant. sits at bottom of station sidebar */
.radio-player.sidebar-radio {
    position: static;
    width: auto;
    margin: auto 10px 10px 10px;
    background: rgba(8, 8, 18, 0.9);
    border-color: rgba(255, 0, 170, 0.15);
    z-index: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .radio-player {
        left: 12px;
        width: 220px;
    }
    .radio-player.sidebar-radio {
        margin: auto 6px 6px 6px;
    }
}

/* ============ System Broadcast Banner (shared across all pages) ============ */
.broadcast-banner {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 420px;
    max-width: 80vw;
    background: rgba(4, 8, 16, 0.95);
    border: 2px solid var(--neon-cyan);
    padding: 16px 50px 16px 20px;
    z-index: 9999;
    font-family: 'Share Tech Mono', monospace;
    color: var(--text-primary);
    box-shadow: 0 0 40px rgba(0, 240, 255, 0.5);
    animation: broadcast-slide-in 0.4s ease-out;
    backdrop-filter: blur(4px);
}

@keyframes broadcast-slide-in {
    from { transform: translate(-50%, -100%); opacity: 0; }
    to   { transform: translate(-50%, 0); opacity: 1; }
}

.broadcast-header {
    font-size: 0.72em;
    letter-spacing: 3px;
    color: var(--neon-cyan);
    text-transform: uppercase;
    margin-bottom: 8px;
    opacity: 0.8;
}

.broadcast-body {
    font-size: 0.95em;
    line-height: 1.5;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-wrap: break-word;
}

.broadcast-dismiss {
    position: absolute;
    top: 8px;
    right: 10px;
    background: transparent;
    border: none;
    color: var(--neon-cyan);
    font-size: 1.4em;
    cursor: pointer;
    width: 28px;
    height: 28px;
    line-height: 1;
    padding: 0;
    opacity: 0.6;
    transition: opacity 0.2s;
}
.broadcast-dismiss:hover { opacity: 1; }

.broadcast-banner.broadcast-warning {
    border-color: var(--neon-yellow);
    box-shadow: 0 0 40px rgba(240, 255, 0, 0.5);
}
.broadcast-banner.broadcast-warning .broadcast-header,
.broadcast-banner.broadcast-warning .broadcast-dismiss {
    color: var(--neon-yellow);
}

.broadcast-banner.broadcast-alert {
    border-color: var(--neon-red);
    box-shadow: 0 0 50px rgba(255, 34, 68, 0.6);
    animation: broadcast-slide-in 0.4s ease-out, broadcast-pulse 2s ease-in-out infinite;
}
.broadcast-banner.broadcast-alert .broadcast-header,
.broadcast-banner.broadcast-alert .broadcast-dismiss {
    color: var(--neon-red);
}

.broadcast-banner.broadcast-success {
    border-color: var(--neon-green);
    box-shadow: 0 0 40px rgba(0, 255, 136, 0.5);
}
.broadcast-banner.broadcast-success .broadcast-header,
.broadcast-banner.broadcast-success .broadcast-dismiss {
    color: var(--neon-green);
}

@keyframes broadcast-pulse {
    0%, 100% { box-shadow: 0 0 40px rgba(255, 34, 68, 0.5); }
    50%      { box-shadow: 0 0 70px rgba(255, 34, 68, 0.9); }
}

/* In-flight location badge. top-left, tells the pilot where they are
   so they don't have to hunt for the radar label. */
#flight-location {
    position: fixed;
    top: 10px;
    left: 14px;
    z-index: 40;
    padding: 8px 14px;
    background: rgba(5, 10, 22, 0.6);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-left-width: 3px;
    backdrop-filter: blur(4px);
    font-family: 'Share Tech Mono', monospace;
    pointer-events: none;
    min-width: 150px;
}
#flight-location .floc-label {
    font-size: 0.6em;
    letter-spacing: 2.5px;
    color: rgba(0, 240, 255, 0.6);
    margin-bottom: 2px;
}
#flight-location .floc-sector {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 1em;
    letter-spacing: 2px;
    color: var(--neon-cyan);
    text-shadow: 0 0 6px rgba(0, 240, 255, 0.5);
    text-transform: uppercase;
    line-height: 1.1;
}
#flight-location .floc-zone {
    font-size: 0.62em;
    letter-spacing: 2px;
    margin-top: 3px;
    opacity: 0.85;
}
#flight-location[data-zone="safe"] {
    border-left-color: var(--neon-green);
}
#flight-location[data-zone="safe"] .floc-zone { color: var(--neon-green); }
#flight-location[data-zone="neutral"] {
    border-left-color: var(--neon-yellow);
}
#flight-location[data-zone="neutral"] .floc-zone { color: var(--neon-yellow); }
#flight-location[data-zone="pvp"] {
    border-left-color: var(--neon-red);
}
#flight-location[data-zone="pvp"] .floc-zone {
    color: var(--neon-red);
    text-shadow: 0 0 6px rgba(255, 34, 68, 0.4);
}

/* Ability bar. 10 slots centered at the bottom of the flight HUD, classic
   MMORPG hotbar. Player assigns fitted modules to slots at a station and
   triggers them mid-flight with hotkeys 1..9,0. */
#ability-bar {
    position: fixed;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    z-index: 30;
    pointer-events: none;
}
.ab-drag-handle {
    width: 60px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(0, 240, 255, 0.5);
    background: rgba(5, 10, 22, 0.55);
    border: 1px solid rgba(0, 240, 255, 0.18);
    border-bottom: none;
    cursor: move;
    pointer-events: auto;
    font-size: 1.1em;
    letter-spacing: 2px;
    user-select: none;
}
.ab-drag-handle:hover { color: var(--neon-cyan); }
.ab-slots {
    display: flex;
    gap: 6px;
}
.ab-slot {
    width: 54px;
    height: 54px;
    position: relative;
    background: rgba(5, 10, 22, 0.7);
    border: 1px solid rgba(0, 240, 255, 0.22);
    backdrop-filter: blur(3px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Share Tech Mono', monospace;
    color: var(--text-dim);
    pointer-events: auto;
    transition: border-color 0.12s, box-shadow 0.12s;
}
.ab-slot.bound { border-color: rgba(0, 240, 255, 0.5); color: var(--text-primary); }
.ab-slot.bound.rarity-uncommon { border-color: rgba(0, 255, 136, 0.7); }
.ab-slot.bound.rarity-rare { border-color: rgba(0, 136, 255, 0.7); }
.ab-slot.bound.rarity-epic { border-color: rgba(170, 68, 255, 0.7); }
.ab-slot.bound.rarity-legendary { border-color: rgba(255, 180, 58, 0.8); }
.ab-slot.active {
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.7), inset 0 0 18px rgba(0, 240, 255, 0.35);
}
/* Selected weapon slot. LMB fires this weapon. */
.ab-slot.weapon-active {
    border-color: var(--neon-magenta) !important;
    box-shadow: 0 0 14px rgba(255, 46, 136, 0.6), inset 0 0 10px rgba(255, 46, 136, 0.2);
}
.ab-slot.weapon-active .ab-key {
    color: var(--neon-magenta);
}
.ab-slot .ab-key {
    position: absolute;
    top: 1px; left: 4px;
    font-size: 0.7em;
    color: rgba(0, 240, 255, 0.8);
    font-weight: 700;
    letter-spacing: 1px;
    pointer-events: none;
}
.ab-slot .ab-name {
    font-size: 0.58em;
    letter-spacing: 0.5px;
    text-align: center;
    padding: 0 4px;
    line-height: 1.1;
    max-height: 32px;
    overflow: hidden;
    text-overflow: ellipsis;
    color: inherit;
    margin-top: 10px;
}
.ab-slot .ab-cd {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    color: var(--neon-yellow);
    text-shadow: 0 0 6px rgba(240, 255, 0, 0.6);
    background: rgba(0, 0, 0, 0.55);
    font-size: 1.1em;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
}
.ab-slot.cooling .ab-cd { opacity: 1; }

/* In-flight top navigation. subtle links in the top-right corner */
#flight-topnav {
    position: fixed;
    top: 10px;
    right: 14px;
    z-index: 40;
    display: flex;
    gap: 6px;
    pointer-events: auto;
}
#flight-topnav a {
    color: rgba(255, 180, 58, 0.75);
    text-decoration: none;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.72em;
    letter-spacing: 2px;
    padding: 4px 12px;
    border: 1px solid rgba(255, 180, 58, 0.3);
    background: rgba(5, 10, 22, 0.55);
    backdrop-filter: blur(4px);
    transition: all 0.12s ease;
}
#flight-topnav a:hover {
    color: #ffd26b;
    border-color: #ffb43a;
    background: rgba(255, 180, 58, 0.12);
    box-shadow: 0 0 10px rgba(255, 180, 58, 0.3);
}
