﻿/* ===== RadioWorld Custom Styles ===== */

:root {
    --rw-primary: #6c63ff;
    --rw-primary-glow: rgba(108, 99, 255, 0.3);
    --rw-accent: #00d4aa;
    --rw-gradient: linear-gradient(135deg, #6c63ff 0%, #00d4aa 100%);
}

/* ===== Global ===== */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== Glass Navbar ===== */
.glass-nav {
    background: rgba(var(--bs-body-bg-rgb, 33,37,41), 0.85) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    z-index: 1050;
}

[data-bs-theme="light"] .glass-nav {
    background: rgba(255,255,255,0.85) !important;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.brand-text {
    background: var(--rw-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.3rem;
}

/* ===== Pulse Animation ===== */
.pulse-icon {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.15); }
}

/* ===== Now Playing Bar ===== */
.now-playing-bar {
    background: rgba(var(--bs-body-bg-rgb, 33,37,41), 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding: 0.6rem 0;
    position: sticky;
    top: 56px;
    z-index: 1040;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

[data-bs-theme="light"] .now-playing-bar {
    background: rgba(255,255,255,0.95);
    border-bottom: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.np-favicon {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border: 2px solid var(--rw-primary);
}

.np-title {
    max-width: 300px;
}

.play-btn-main {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 0 20px var(--rw-primary-glow);
    transition: all 0.3s ease;
}

.play-btn-main:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px var(--rw-primary-glow);
}

.volume-slider {
    width: 100px;
    accent-color: var(--rw-primary);
}

.audio-visualizer {
    height: 3px;
    background: var(--rw-gradient);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.audio-visualizer.active {
    opacity: 1;
    animation: visualizer 1.5s ease-in-out infinite;
}

@keyframes visualizer {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* ===== Map ===== */
.map-wrapper {
    position: relative;
    height: calc(100vh - 60px);
}

.geo-map {
    height: 100%;
    width: 100%;
    background: #1a1a2e;
}

[data-bs-theme="light"] .geo-map {
    background: #e8e8e8;
}

.map-overlay-controls {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1000;
}

.map-sidebar {
    height: calc(100vh - 60px);
    overflow-y: auto;
    border-left: 1px solid rgba(255,255,255,0.05);
}

[data-bs-theme="light"] .map-sidebar {
    border-left: 1px solid rgba(0,0,0,0.08);
}

.map-station-list {
    max-height: calc(100vh - 140px);
    overflow-y: auto;
}

/* ===== Station Card ===== */
.station-card {
    background: rgba(var(--bs-body-bg-rgb, 33,37,41), 0.6);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.station-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--rw-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.station-card:hover {
    border-color: var(--rw-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 99, 255, 0.15);
}

.station-card:hover::before {
    opacity: 1;
}

.station-card.playing {
    border-color: var(--rw-accent);
    box-shadow: 0 0 20px rgba(0, 212, 170, 0.2);
}

.station-card.playing::before {
    opacity: 1;
    background: var(--rw-accent);
}

[data-bs-theme="light"] .station-card {
    background: rgba(255,255,255,0.8);
    border-color: rgba(0,0,0,0.08);
}

.station-favicon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    background: rgba(108, 99, 255, 0.1);
}

.station-card-mini {
    background: rgba(var(--bs-body-bg-rgb, 33,37,41), 0.4);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
}

.station-card-mini:hover {
    background: rgba(108, 99, 255, 0.1);
    border-color: var(--rw-primary);
}

[data-bs-theme="light"] .station-card-mini {
    background: rgba(0,0,0,0.02);
    border-color: rgba(0,0,0,0.06);
}

/* ===== Search Bar ===== */
.search-bar .form-control:focus {
    box-shadow: 0 0 0 0.2rem var(--rw-primary-glow);
    border-color: var(--rw-primary);
}

.search-bar .input-group-text {
    border-color: var(--bs-border-color);
}

.search-bar .form-control {
    border-color: var(--bs-border-color);
}

/* ===== Quick Tags ===== */
.quick-tag {
    cursor: pointer;
    padding: 0.5em 1em;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.quick-tag:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(108, 99, 255, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(108, 99, 255, 0.5);
}

/* ===== Custom Leaflet Marker ===== */
.country-marker {
    background: var(--rw-gradient);
    color: white;
    border-radius: 50%;
    text-align: center;
    font-weight: 700;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 12px rgba(108, 99, 255, 0.4);
    border: 2px solid rgba(255,255,255,0.3);
    transition: transform 0.2s ease;
}

.country-marker:hover {
    transform: scale(1.15);
}

.leaflet-popup-content-wrapper {
    border-radius: 12px !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2) !important;
}

/* ===== Country Stats Bars ===== */
.stat-bar {
    height: 24px;
    background: var(--rw-gradient);
    border-radius: 6px;
    transition: width 0.8s ease;
    min-width: 4px;
}

.stat-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.stat-label {
    min-width: 130px;
    font-size: 0.85rem;
    text-align: right;
}

.stat-value {
    min-width: 60px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ===== Section Panel ===== */
.main-content {
    flex: 1;
}

/* ===== Responsive ===== */
@media (max-width: 991.98px) {
    .map-wrapper {
        height: 55vh;
    }
    .map-sidebar {
        height: auto;
        max-height: 45vh;
        border-left: none;
        border-top: 1px solid rgba(255,255,255,0.05);
    }
    .np-title {
        max-width: 150px;
    }
}

@media (max-width: 575.98px) {
    .map-wrapper {
        height: 45vh;
    }
    .brand-text {
        font-size: 1rem;
    }
}

/* ===== Fade-in animation ===== */
.fade-in {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Marker Cluster Custom ===== */
.marker-cluster-small {
    background-color: rgba(108, 99, 255, 0.3) !important;
}
.marker-cluster-small div {
    background-color: rgba(108, 99, 255, 0.6) !important;
    color: white !important;
}
.marker-cluster-medium {
    background-color: rgba(0, 212, 170, 0.3) !important;
}
.marker-cluster-medium div {
    background-color: rgba(0, 212, 170, 0.6) !important;
    color: white !important;
}
.marker-cluster-large {
    background-color: rgba(255, 107, 107, 0.3) !important;
}
.marker-cluster-large div {
    background-color: rgba(255, 107, 107, 0.6) !important;
    color: white !important;
}
