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

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

#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;
}

#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: 15px;
    z-index: 100;
    width: calc(100% - 40px);
    max-width: 600px;
}

.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;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { text-shadow: 0 0 20px #00d9ff, 0 0 40px #00d9ff; }
    50% { text-shadow: 0 0 30px #00d9ff, 0 0 60px #00d9ff, 0 0 80px #ff0080; }
}

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

.search-controls {
    display: flex;
    gap: 10px;
    background: rgba(10, 14, 26, 0.8);
    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-input {
    flex: 1;
    min-width: 200px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #0066ff;
    color: #ffffff;
    padding: 8px 12px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    outline: none;
    border-radius: 4px;
}

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

#genre-filter {
    flex: 1;
    min-width: 150px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #0066ff;
    color: #00d9ff;
    padding: 8px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    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: 16px;
    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: 140px;
    width: 280px;
    background: rgba(10, 14, 26, 0.85);
    border: 2px solid #00d9ff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.2);
    max-height: calc(100vh - 290px);
    overflow-y: auto;
}

.left-panel {
    left: 20px;
}

.right-panel {
    right: 20px;
}

.panel-header {
    font-size: 11px;
    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;
}

.gauge canvas {
    width: 100px;
    height: 100px;
}

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

/* 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;
}

.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;
}

.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;
}

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

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

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

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

#radar-display {
    width: 100%;
    height: 200px;
    border: 1px solid #00d9ff;
    border-radius: 4px;
}

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

/* 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: height 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;
}

.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;
}

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

/* Bottom Controls */
.bottom-controls {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    background: rgba(10, 14, 26, 0.9);
    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: 10px 15px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
    text-align: center;
    min-width: 90px;
}

.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: 20px;
    margin-bottom: 5px;
}

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

#roulette-btn {
    border-color: #ff0080;
    color: #ff0080;
}

#roulette-btn: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: 600px;
    background: rgba(10, 14, 26, 0.95);
    border: 2px solid #ff0080;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 0 30px rgba(255, 0, 128, 0.3);
    flex-wrap: wrap;
}

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

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

.player-info {
    flex: 1;
}

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

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

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

.control-btn {
    background: rgba(0, 217, 255, 0.2);
    border: 1px solid #00d9ff;
    color: #00d9ff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    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: 30px;
    height: 30px;
    font-size: 14px;
}

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

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

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

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

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

/* Footer */
.footer {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    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 10px;
}

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

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

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

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .title-glow {
        font-size: 24px;
        letter-spacing: 4px;
    }
    
    .subtitle {
        font-size: 9px;
        letter-spacing: 2px;
    }
    
    .top-header {
        top: 10px;
    }
    
    .search-controls {
        padding: 8px;
    }
    
    #search-input {
        min-width: 100%;
        font-size: 14px;
    }
    
    #genre-filter {
        min-width: 100%;
        font-size: 14px;
    }
    
    .left-panel, .right-panel {
        display: none;
    }
    
    .globe-controls {
        right: 10px;
        top: auto;
        bottom: 200px;
    }
    
    .bottom-controls {
        bottom: 140px;
        padding: 8px;
        gap: 8px;
    }
    
    .view-mode-btn {
        min-width: 70px;
        padding: 8px 10px;
        font-size: 10px;
    }
    
    .btn-icon {
        font-size: 16px;
        margin-bottom: 3px;
    }
    
    .btn-label {
        font-size: 8px;
    }
    
    .audio-player {
        bottom: 10px;
        padding: 10px;
        gap: 10px;
    }
    
    .player-left {
        width: 100%;
        min-width: auto;
    }
    
    .station-icon {
        font-size: 24px;
    }
    
    .player-station {
        font-size: 12px;
    }
    
    .player-location {
        font-size: 9px;
    }
    
    .player-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .volume-control {
        flex: 1;
    }
    
    #volume-slider {
        width: 100%;
    }
    
    .player-right {
        justify-content: flex-end;
    }
    
    .footer {
        display: none;
    }
}

@media (max-width: 480px) {
    .title-glow {
        font-size: 18px;
        letter-spacing: 2px;
    }
    
    .subtitle {
        font-size: 8px;
    }
    
    .view-mode-btn {
        min-width: 60px;
        padding: 6px 8px;
    }
    
    .btn-icon {
        font-size: 14px;
    }
    
    .btn-label {
        font-size: 7px;
    }
    
    .control-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
}