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

body {
    font-family: 'Montserrat', sans-serif;
    background: #1e1e1e;
    color: #ffffff;
    overflow: hidden;
    position: relative;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1e1e1e;
    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 #3e3e42;
    border-top: 3px solid #4fc3f7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loading-text {
    font-size: 16px;
    font-weight: 600;
    color: #4fc3f7;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.loading-subtext {
    font-size: 12px;
    font-weight: 400;
    color: #858585;
}

#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 Bar */
.top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #252526;
    border-bottom: 1px solid #3e3e42;
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-logo {
    font-size: 28px;
}

.app-title {
    font-size: 16px;
    font-weight: 700;
    color: #4fc3f7;
    letter-spacing: 1px;
}

.top-bar-center {
    flex: 1;
    max-width: 600px;
}

.search-container {
    width: 100%;
}

#global-search {
    width: 100%;
    background: #1e1e1e;
    border: 1px solid #3e3e42;
    border-radius: 4px;
    color: #ffffff;
    padding: 8px 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 500;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#global-search:focus {
    border-color: #4fc3f7;
    box-shadow: 0 0 0 2px rgba(79, 195, 247, 0.3);
}

.search-filters {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.search-filters select {
    flex: 1;
    background: #1e1e1e;
    border: 1px solid #3e3e42;
    border-radius: 4px;
    color: #cccccc;
    padding: 6px 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    outline: none;
    cursor: pointer;
}

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

.icon-button {
    position: relative;
    background: #2d2d30;
    border: 1px solid #3e3e42;
    border-radius: 4px;
    color: #cccccc;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}

.icon-button:hover {
    background: #37373d;
    box-shadow: 0 0 12px rgba(79, 195, 247, 0.3);
}

.icon-button .icon {
    font-size: 18px;
}

.icon-button .count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ec407a;
    color: #ffffff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Qt Panels */
.qt-panel {
    background: linear-gradient(to bottom, #252526, #232324);
    border: 1px solid #3e3e42;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.panel-header {
    background: #2d2d30;
    border-bottom: 1px solid #3e3e42;
    padding: 12px 16px;
    border-radius: 6px 6px 0 0;
}

.header-title {
    font-size: 11px;
    font-weight: 700;
    color: #4fc3f7;
    letter-spacing: 2px;
}

/* Left Panel */
.left-panel {
    position: absolute;
    top: 80px;
    left: 20px;
    width: 320px;
    max-height: calc(100vh - 240px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.region-search, .station-search {
    padding: 12px 16px;
    border-bottom: 1px solid #3e3e42;
}

.region-search input, .station-search input {
    width: 100%;
    background: #1e1e1e;
    border: 1px solid #3e3e42;
    border-radius: 4px;
    color: #ffffff;
    padding: 8px 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    outline: none;
}

.region-search input:focus, .station-search input:focus {
    border-color: #4fc3f7;
    box-shadow: 0 0 0 2px rgba(79, 195, 247, 0.3);
}

.region-list, .stations-container {
    overflow-y: auto;
    flex: 1;
}

.region-item {
    padding: 12px 16px;
    border-bottom: 1px solid #3e3e42;
    cursor: pointer;
    transition: background 0.2s;
}

.region-item:hover {
    background: #2d2d30;
}

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

.region-emoji {
    font-size: 20px;
}

.region-name {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
}

.region-meta {
    font-size: 11px;
    color: #858585;
}

.station-count {
    background: #2d2d30;
    padding: 2px 8px;
    border-radius: 3px;
}

.list-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #3e3e42;
    background: #2d2d30;
}

.back-btn {
    background: transparent;
    border: 1px solid #3e3e42;
    border-radius: 4px;
    color: #4fc3f7;
    padding: 6px 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.back-btn:hover {
    background: #37373d;
}

.station-item {
    padding: 12px 16px;
    border-bottom: 1px solid #3e3e42;
    transition: background 0.2s;
}

.station-item:hover {
    background: #2d2d30;
}

.station-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.station-item-name {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
}

.station-item-location {
    font-size: 11px;
    color: #858585;
}

.station-play-btn {
    background: #4fc3f7;
    border: none;
    border-radius: 50%;
    color: #1e1e1e;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.station-play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 12px rgba(79, 195, 247, 0.5);
}

.station-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.genre-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.station-genre {
    font-size: 10px;
    color: #858585;
    text-transform: uppercase;
}

/* Right Panel */
.right-panel {
    position: absolute;
    top: 80px;
    right: 20px;
    width: 320px;
    max-height: calc(100vh - 240px);
    overflow-y: auto;
}

.now-playing {
    padding: 20px;
    border-bottom: 1px solid #3e3e42;
}

.station-artwork {
    width: 100%;
    aspect-ratio: 1;
    background: #1e1e1e;
    border: 1px solid #3e3e42;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.artwork-placeholder {
    font-size: 64px;
    opacity: 0.3;
}

.station-name {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
}

.station-location {
    font-size: 13px;
    font-weight: 500;
    color: #cccccc;
    margin-bottom: 12px;
}

.genre-tag {
    display: inline-block;
    background: #4fc3f7;
    color: #1e1e1e;
    padding: 4px 12px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.audio-controls {
    padding: 20px;
    border-bottom: 1px solid #3e3e42;
}

.play-button {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #4fc3f7;
    border: none;
    color: #1e1e1e;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 0 auto 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.play-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(79, 195, 247, 0.5);
}

.volume-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mute-btn {
    background: transparent;
    border: none;
    color: #cccccc;
    font-size: 20px;
    cursor: pointer;
}

.volume-slider {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    background: #3e3e42;
    border-radius: 2px;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #4fc3f7;
    border-radius: 50%;
    cursor: pointer;
}

.volume-value {
    font-size: 12px;
    font-weight: 600;
    color: #858585;
    min-width: 40px;
    text-align: right;
}

.signal-analytics {
    padding: 20px;
    border-bottom: 1px solid #3e3e42;
}

.analytics-header {
    font-size: 11px;
    font-weight: 700;
    color: #4fc3f7;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.gauge-container {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
    justify-content: center;
}

.circular-gauge {
    text-align: center;
}

.gauge-label {
    font-size: 10px;
    color: #858585;
    margin-top: 8px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #3e3e42;
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-label {
    font-size: 12px;
    font-weight: 500;
    color: #cccccc;
}

.stat-value {
    font-size: 12px;
    font-weight: 600;
    color: #4fc3f7;
}

.quick-actions {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.action-btn {
    background: #2d2d30;
    border: 1px solid #3e3e42;
    border-radius: 4px;
    color: #cccccc;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}

.action-btn:hover {
    background: #37373d;
    box-shadow: 0 0 12px rgba(79, 195, 247, 0.3);
}

.action-btn .icon {
    font-size: 16px;
}

/* Bottom Bar */
.bottom-bar {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(to bottom, #252526, #232324);
    border: 1px solid #3e3e42;
    border-radius: 6px;
    padding: 12px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.view-controls {
    display: flex;
    gap: 8px;
}

.view-btn {
    background: #2d2d30;
    border: 1px solid #3e3e42;
    border-radius: 4px;
    color: #cccccc;
    padding: 8px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    min-width: 90px;
}

.view-btn:hover {
    background: #37373d;
}

.view-btn.active {
    background: rgba(79, 195, 247, 0.2);
    border-color: #4fc3f7;
}

.view-btn .icon {
    font-size: 20px;
}

.view-btn .label {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.global-stats {
    display: flex;
    gap: 20px;
    padding: 0 20px;
    border-left: 1px solid #3e3e42;
    border-right: 1px solid #3e3e42;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 16px;
    font-weight: 700;
    color: #4fc3f7;
}

.stat-text {
    font-size: 10px;
    color: #858585;
}

.globe-controls {
    display: flex;
    gap: 8px;
}

.control-btn {
    background: #2d2d30;
    border: 1px solid #3e3e42;
    border-radius: 4px;
    color: #cccccc;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s, box-shadow 0.2s;
}

.control-btn:hover {
    background: #37373d;
    box-shadow: 0 0 12px rgba(79, 195, 247, 0.3);
}

/* Footer */
.footer {
    position: fixed;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 500;
    color: #858585;
    z-index: 50;
}

.footer a {
    color: #4fc3f7;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Scrollbars */
.region-list::-webkit-scrollbar,
.stations-container::-webkit-scrollbar,
.right-panel::-webkit-scrollbar {
    width: 8px;
}

.region-list::-webkit-scrollbar-track,
.stations-container::-webkit-scrollbar-track,
.right-panel::-webkit-scrollbar-track {
    background: #1e1e1e;
}

.region-list::-webkit-scrollbar-thumb,
.stations-container::-webkit-scrollbar-thumb,
.right-panel::-webkit-scrollbar-thumb {
    background: #3e3e42;
    border-radius: 4px;
}

.region-list::-webkit-scrollbar-thumb:hover,
.stations-container::-webkit-scrollbar-thumb:hover,
.right-panel::-webkit-scrollbar-thumb:hover {
    background: #4fc3f7;
}

/* Responsive */
@media (max-width: 1200px) {
    .left-panel, .right-panel {
        display: none;
    }
    
    .bottom-bar {
        flex-direction: column;
        gap: 12px;
    }
    
    .global-stats {
        border: none;
        padding: 0;
    }
}

@media (max-width: 768px) {
    .top-bar {
        flex-wrap: wrap;
        height: auto;
        padding: 12px;
    }
    
    .top-bar-center {
        order: 3;
        width: 100%;
        margin-top: 12px;
    }
    
    .search-filters {
        flex-direction: column;
    }
    
    .view-btn .label {
        display: none;
    }
    
    .bottom-bar {
        bottom: 10px;
        padding: 8px;
    }
}