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

body {
    font-family: 'Courier New', monospace;
    background: #0a0e1a;
    color: #ffffff;
    overflow: hidden;
    position: relative;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0e1a;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s;
}

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

.loader {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(0, 217, 255, 0.1);
    border-top: 3px solid #00d9ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 18px;
    color: #00d9ff;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 10px;
    text-shadow: 0 0 10px #00d9ff;
}

.loading-subtext {
    font-size: 12px;
    color: #9d00ff;
    opacity: 0.7;
    margin-bottom: 15px;
}

.loading-progress {
    width: 200px;
    height: 4px;
    background: rgba(0, 217, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #00d9ff, #ff0080);
    width: 0%;
    transition: width 0.3s;
}

/* Glitch Effect */
.glitch {
    position: relative;
    animation: glitch 3s infinite;
}

@keyframes glitch {
    0%, 100% { text-shadow: 0 0 20px #00d9ff; }
    25% { text-shadow: -2px 0 20px #ff0080, 2px 0 20px #00d9ff; }
    50% { text-shadow: 2px 0 20px #00d9ff, -2px 0 20px #ff0080; }
    75% { text-shadow: 0 0 20px #9d00ff; }
}

#scene-container {
    width: 100%;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
}

#ui-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#ui-overlay > * {
    pointer-events: auto;
}

/* Top Header */
.top-header {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 100;
    width: calc(100% - 40px);
    max-width: 700px;
}

.header-title {
    text-align: center;
}

.title-glow {
    font-size: 36px;
    font-weight: bold;
    color: #00d9ff;
    text-shadow: 0 0 20px #00d9ff, 0 0 40px #00d9ff;
    letter-spacing: 8px;
}

.subtitle {
    font-size: 11px;
    color: #9d00ff;
    letter-spacing: 3px;
    opacity: 0.8;
}

.status-bar {
    display: flex;
    gap: 10px;
    font-size: 10px;
    color: #00d9ff;
    align-items: center;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #666;
}

.status-dot.active {
    background: #00d9ff;
    box-shadow: 0 0 8px #00d9ff;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.status-divider {
    opacity: 0.3;
}

.search-controls {
    display: flex;
    gap: 8px;
    background: rgba(10, 14, 26, 0.9);
    padding: 10px;
    border: 2px solid #00d9ff;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
    width: 100%;
    flex-wrap: wrap;
}

.search-wrapper {
    flex: 1;
    min-width: 200px;
    display: flex;
    gap: 5px;
}

#search-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #0066ff;
    color: #ffffff;
    padding: 8px 12px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    outline: none;
    border-radius: 4px;
}

#search-input::placeholder {
    color: #666;
}

#genre-filter, #altitude-filter {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #0066ff;
    color: #00d9ff;
    padding: 8px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    outline: none;
    border-radius: 4px;
    cursor: pointer;
}

.icon-btn {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #ff0080;
    color: #ff0080;
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
}

.icon-btn:hover {
    background: rgba(255, 0, 128, 0.2);
    box-shadow: 0 0 10px #ff0080;
}

/* Side Panels */
.left-panel, .right-panel {
    position: absolute;
    top: 160px;
    width: 300px;
    background: rgba(10, 14, 26, 0.92);
    border: 2px solid #00d9ff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.2);
    max-height: calc(100vh - 320px);
    overflow-y: auto;
}

.left-panel {
    left: 20px;
}

.right-panel {
    right: 20px;
}

.panel-header {
    font-size: 10px;
    color: #00d9ff;
    letter-spacing: 2px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #00d9ff;
    text-shadow: 0 0 5px #00d9ff;
}

/* Gauges */
.gauges-container {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.gauge {
    flex: 1;
    text-align: center;
    position: relative;
}

.gauge canvas {
    width: 100%;
    height: auto;
}

.gauge-label {
    font-size: 9px;
    color: #9d00ff;
    margin-top: 5px;
    letter-spacing: 1px;
}

.gauge-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    color: #00d9ff;
    font-weight: bold;
    text-shadow: 0 0 10px #00d9ff;
}

/* Resource Bars */
.resource-bars {
    margin-bottom: 20px;
}

.resource-bar {
    margin-bottom: 12px;
}

.bar-label {
    font-size: 9px;
    color: #00d9ff;
    margin-bottom: 4px;
    letter-spacing: 1px;
    display: flex;
    justify-content: space-between;
}

.bar-delta {
    color: #00ff88;
    font-size: 8px;
}

.bar-container {
    background: rgba(0, 0, 0, 0.5);
    height: 8px;
    border: 1px solid #0066ff;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #00d9ff, #9d00ff);
    width: 0%;
    transition: width 0.5s;
    box-shadow: 0 0 10px #00d9ff;
}

.orbital-bar {
    background: linear-gradient(90deg, #00ff88, #00d9ff);
}

.bar-value {
    font-size: 10px;
    color: #9d00ff;
    text-align: right;
}

/* System Data */
.system-data {
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border: 1px solid #0066ff;
    border-radius: 4px;
    margin-bottom: 15px;
}

.data-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 11px;
}

.data-row:last-child {
    margin-bottom: 0;
}

.data-label {
    color: #00d9ff;
}

.data-value {
    color: #9d00ff;
    font-weight: bold;
}

/* Station Info */
.station-info {
    background: rgba(0, 0, 0, 0.3);
    padding: 12px;
    border: 1px solid #ff0080;
    border-radius: 4px;
    margin-bottom: 15px;
}

.info-header {
    font-size: 9px;
    color: #ff0080;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.station-badge {
    display: inline-block;
    background: rgba(0, 217, 255, 0.2);
    color: #00d9ff;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 9px;
    margin-bottom: 8px;
    border: 1px solid #00d9ff;
}

.station-name {
    font-size: 14px;
    color: #00d9ff;
    margin-bottom: 6px;
    font-weight: bold;
}

.station-location, .station-genre, .station-coords, .station-altitude {
    font-size: 10px;
    color: #9d00ff;
    margin-bottom: 4px;
}

.station-controls {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.station-btn {
    flex: 1;
    background: rgba(0, 217, 255, 0.1);
    border: 1px solid #00d9ff;
    color: #00d9ff;
    padding: 6px;
    font-size: 9px;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.3s;
    font-family: 'Courier New', monospace;
}

.station-btn:hover:not(:disabled) {
    background: rgba(0, 217, 255, 0.3);
}

.station-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.station-btn.boost {
    border-color: #ff0080;
    color: #ff0080;
    background: rgba(255, 0, 128, 0.1);
}

.station-btn.boost:hover:not(:disabled) {
    background: rgba(255, 0, 128, 0.3);
}

/* Audio Spectrum */
.audio-spectrum {
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border: 1px solid #00d9ff;
    border-radius: 4px;
}

#spectrum-canvas {
    width: 100%;
    height: 80px;
    border-radius: 3px;
}

.spectrum-label {
    font-size: 8px;
    color: #00d9ff;
    text-align: center;
    margin-top: 5px;
    letter-spacing: 1px;
}

/* Radar */
.radar-container {
    position: relative;
    margin-bottom: 20px;
}

#radar-display {
    width: 100%;
    height: 220px;
    border: 1px solid #00d9ff;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.3);
}

.radar-label {
    font-size: 9px;
    color: #00d9ff;
    text-align: center;
    margin-top: 5px;
    letter-spacing: 1px;
}

.radar-controls {
    margin-top: 10px;
}

.radar-btn {
    width: 100%;
    background: rgba(0, 217, 255, 0.1);
    border: 1px solid #00d9ff;
    color: #00d9ff;
    padding: 8px;
    font-size: 9px;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.3s;
    font-family: 'Courier New', monospace;
}

.radar-btn:hover {
    background: rgba(0, 217, 255, 0.3);
}

/* Signal Analytics */
.signal-analytics {
    margin-bottom: 20px;
}

.analytic-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.analytic-label {
    font-size: 9px;
    color: #00d9ff;
    width: 80px;
    letter-spacing: 1px;
}

.analytic-bars {
    flex: 1;
    display: flex;
    gap: 3px;
    align-items: flex-end;
    height: 20px;
}

.bar-mini {
    flex: 1;
    background: #0066ff;
    border-radius: 2px;
    transition: all 0.3s;
}

.active-bar {
    background: linear-gradient(to top, #00d9ff, #9d00ff);
    animation: bar-pulse 1s ease-in-out infinite;
}

@keyframes bar-pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.analytic-value {
    font-size: 10px;
    color: #9d00ff;
    width: 50px;
    text-align: right;
}

/* Connection Indicators */
.connection-indicators {
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border: 1px solid #0066ff;
    border-radius: 4px;
    margin-bottom: 15px;
}

.indicator-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 9px;
    color: #9d00ff;
}

.indicator-item:last-child {
    margin-bottom: 0;
}

.indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #666;
}

.indicator-dot.streaming {
    background: #00d9ff;
    box-shadow: 0 0 10px #00d9ff;
    animation: blink 1s infinite;
}

/* Orbital Controls */
.orbital-controls {
    background: rgba(0, 0, 0, 0.3);
    padding: 12px;
    border: 1px solid #ff0080;
    border-radius: 4px;
}

.control-header {
    font-size: 9px;
    color: #ff0080;
    letter-spacing: 2px;
    margin-bottom: 10px;
    text-align: center;
}

.orbital-control-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    align-items: center;
}

.orbital-control-row:last-child {
    margin-bottom: 0;
}

.orbital-btn {
    flex: 1;
    background: rgba(255, 0, 128, 0.1);
    border: 1px solid #ff0080;
    color: #ff0080;
    padding: 8px;
    font-size: 9px;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.3s;
    font-family: 'Courier New', monospace;
}

.orbital-btn:hover {
    background: rgba(255, 0, 128, 0.3);
}

.orbital-btn.wide {
    width: 100%;
}

.slider-label {
    font-size: 9px;
    color: #ff0080;
    width: 90px;
}

.orbital-slider {
    flex: 1;
    cursor: pointer;
}

/* Bottom Controls */
.bottom-controls {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    background: rgba(10, 14, 26, 0.95);
    padding: 12px;
    border: 2px solid #00d9ff;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.3);
    flex-wrap: wrap;
    justify-content: center;
    max-width: calc(100% - 40px);
}

.view-mode-btn {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #0066ff;
    color: #00d9ff;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
    text-align: center;
    min-width: 85px;
}

.view-mode-btn:hover {
    background: rgba(0, 102, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 102, 255, 0.5);
}

.view-mode-btn.active {
    background: rgba(0, 217, 255, 0.2);
    border-color: #00d9ff;
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.5);
}

.btn-icon {
    font-size: 18px;
    margin-bottom: 4px;
}

.btn-label {
    font-size: 8px;
    letter-spacing: 1px;
}

.view-mode-btn.roulette {
    border-color: #ff0080;
    color: #ff0080;
}

.view-mode-btn.roulette:hover {
    background: rgba(255, 0, 128, 0.2);
    box-shadow: 0 0 15px rgba(255, 0, 128, 0.5);
}

/* Audio Player */
.audio-player {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 700px;
    background: rgba(10, 14, 26, 0.95);
    border: 2px solid #ff0080;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 0 30px rgba(255, 0, 128, 0.3);
    flex-wrap: wrap;
}

.player-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 180px;
}

.station-icon {
    font-size: 28px;
}

.station-icon.spinning {
    animation: spin 2s linear infinite;
}

.player-info {
    flex: 1;
}

.player-station {
    font-size: 13px;
    color: #00d9ff;
    font-weight: bold;
    margin-bottom: 3px;
}

.player-location {
    font-size: 9px;
    color: #9d00ff;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.control-btn {
    background: rgba(0, 217, 255, 0.2);
    border: 1px solid #00d9ff;
    color: #00d9ff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    background: rgba(0, 217, 255, 0.4);
    box-shadow: 0 0 15px #00d9ff;
}

.control-btn.small {
    width: 28px;
    height: 28px;
    font-size: 12px;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 6px;
}

.volume-icon {
    font-size: 14px;
}

#volume-slider {
    width: 80px;
    cursor: pointer;
}

.audio-quality {
    display: flex;
    gap: 5px;
    font-size: 9px;
    color: #9d00ff;
}

.quality-label {
    opacity: 0.7;
}

.quality-value {
    color: #00d9ff;
}

.player-right {
    display: flex;
    gap: 6px;
}

/* Globe Controls */
.globe-controls {
    position: absolute;
    top: 170px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Footer */
.footer {
    position: fixed;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    color: #666;
    text-align: center;
    z-index: 50;
}

.footer a {
    color: #00d9ff;
    text-decoration: none;
}

.footer a:hover {
    text-shadow: 0 0 5px #00d9ff;
}

.divider {
    margin: 0 8px;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: rgba(10, 14, 26, 0.95);
    border: 2px solid #00d9ff;
    border-radius: 8px;
    padding: 20px;
    max-width: 500px;
    width: 90%;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.modal-header h3 {
    color: #00d9ff;
    font-size: 14px;
    letter-spacing: 2px;
}

.modal-close {
    background: none;
    border: none;
    color: #ff0080;
    font-size: 24px;
    cursor: pointer;
}

.modal-body textarea {
    width: 100%;
    height: 120px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #0066ff;
    color: #00d9ff;
    padding: 10px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    border-radius: 4px;
    margin-bottom: 10px;
    resize: none;
}

.copy-btn {
    width: 100%;
    background: rgba(0, 217, 255, 0.2);
    border: 1px solid #00d9ff;
    color: #00d9ff;
    padding: 10px;
    font-size: 11px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
    font-family: 'Courier New', monospace;
}

.copy-btn:hover {
    background: rgba(0, 217, 255, 0.4);
}

/* Scrollbar */
.left-panel::-webkit-scrollbar, .right-panel::-webkit-scrollbar {
    width: 6px;
}

.left-panel::-webkit-scrollbar-track, .right-panel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

.left-panel::-webkit-scrollbar-thumb, .right-panel::-webkit-scrollbar-thumb {
    background: #0066ff;
    border-radius: 3px;
}

.left-panel::-webkit-scrollbar-thumb:hover, .right-panel::-webkit-scrollbar-thumb:hover {
    background: #00d9ff;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .title-glow {
        font-size: 20px;
        letter-spacing: 3px;
    }
    
    .subtitle {
        font-size: 8px;
        letter-spacing: 1px;
    }
    
    .status-bar {
        font-size: 8px;
    }
    
    .top-header {
        top: 10px;
    }
    
    .search-controls {
        padding: 8px;
    }
    
    .left-panel, .right-panel {
        display: none;
    }
    
    .globe-controls {
        right: 10px;
        top: auto;
        bottom: 220px;
    }
    
    .bottom-controls {
        bottom: 150px;
        padding: 8px;
        gap: 6px;
    }
    
    .view-mode-btn {
        min-width: 65px;
        padding: 6px 8px;
    }
    
    .btn-icon {
        font-size: 14px;
    }
    
    .btn-label {
        font-size: 7px;
    }
    
    .audio-player {
        bottom: 10px;
        padding: 10px;
        gap: 8px;
    }
    
    .footer {
        display: none;
    }
}