/**
 * GPSS Animated Threat Map - PUBLIC Frontend Styles
 * CheckPoint-style cyber threat visualization
 */

/* Container principal */
.gpss-threat-map-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    border-radius: 8px;
}

/* Dark Theme */
.gpss-threat-map-container.theme-dark {
    background: #0a0e27;
    color: #fff;
}

.gpss-threat-map-container.theme-dark .threat-map-canvas {
    background: #0a0e27;
}

/* Light Theme */
.gpss-threat-map-container.theme-light {
    background: #f5f7fa;
    color: #1a202c;
}

.gpss-threat-map-container.theme-light .threat-map-canvas {
    background: #f5f7fa;
}

/* CISA Theme - Inspired by CISA Threat Map */
.gpss-threat-map-container.theme-cisa {
    background: #000000;  /* Pure black like CISA */
    color: #fff;
}

.gpss-threat-map-container.theme-cisa .threat-map-canvas {
    background: #000000;  /* Pure black */
}

/* CISA: ASCUNDE PANOURILE LATERALE - Full screen map only! */
.theme-cisa .stats-panel-left,
.gpss-threat-map-container.theme-cisa .stats-panel-left,
div.theme-cisa .stats-panel-left {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
}

.theme-cisa .filters-panel-right,
.gpss-threat-map-container.theme-cisa .filters-panel-right,
div.theme-cisa .filters-panel-right {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
}

/* CISA: STATIC BACKGROUND IMAGE - No Leaflet tiles! */
.theme-cisa #threat-map {
    position: relative;
    width: 100%;
    height: 100%;
    background-image: url('../images/world-map-cisa.svg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #000000;
}

/* CISA: Hide Leaflet container if present (static mode) */
.theme-cisa .leaflet-container {
    display: none !important;
}

/* CISA: Hide Leaflet tiles (we use static background) */
.theme-cisa .leaflet-tile-pane {
    display: none !important;
}

.theme-cisa .leaflet-tile {
    display: none !important;
}

/* CISA Header - Minimalist, small, top-left only */
.theme-cisa .threat-map-header {
    background: transparent;  /* No background gradient */
    border-bottom: none;
    padding: 10px 20px;
    height: auto;
}

.theme-cisa .header-left {
    flex-direction: row;
    gap: 15px;
}

.theme-cisa .header-right {
    display: none;  /* Hide active attacks badge in CISA mode */
}

.theme-cisa .map-title {
    color: #00d9ff;
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-size: 16px;  /* Smaller, minimalist */
}

.theme-cisa .live-indicator {
    color: #00d9ff;
}

.theme-cisa .live-indicator .pulse {
    background: #00d9ff;
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

.theme-cisa .active-count-badge {
    background: rgba(0, 217, 255, 0.1);
    border: 1px solid rgba(0, 217, 255, 0.3);
}

.theme-cisa .badge-value {
    color: #00d9ff;
}

/* CISA Stats panels - Pure black, minimal */
.theme-cisa .stats-card {
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(0, 217, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 217, 255, 0.15);
}

.theme-cisa .stats-card-title {
    color: #00d9ff;
    border-bottom-color: rgba(0, 217, 255, 0.3);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.theme-cisa .stat-label {
    color: #8b99b0;
}

.theme-cisa .stat-value {
    color: #00d9ff;
}

.theme-cisa .stat-bar-fill {
    background: linear-gradient(to right, #00d9ff, #00a8cc);
}

/* CISA Filters panel */
.theme-cisa .filter-card,
.theme-cisa .legend-card {
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(0, 217, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 217, 255, 0.15);
}

.theme-cisa .filter-card-title,
.theme-cisa .legend-card-title {
    color: #00d9ff;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.theme-cisa .filter-select {
    background: rgba(0, 0, 0, 0.95);
    border-color: rgba(0, 217, 255, 0.4);
    color: #fff;
}

.theme-cisa .filter-select:focus {
    border-color: #00d9ff;
    box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.1);
}

.theme-cisa .filter-btn-primary {
    background: linear-gradient(to right, #00d9ff, #00a8cc);
    color: #000000;  /* Pure black text on cyan button */
}

.theme-cisa .filter-btn-primary:hover {
    box-shadow: 0 10px 20px rgba(0, 217, 255, 0.3);
}

/* CISA Bottom controls - Minimalist, smaller */
.theme-cisa .threat-map-controls {
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid rgba(0, 217, 255, 0.2);
    box-shadow: none;
    padding: 8px 15px;
    bottom: 15px;
}

.theme-cisa .control-btn {
    padding: 6px 12px;
    font-size: 12px;
}

.theme-cisa .control-label {
    display: inline;  /* Show labels in CISA for minimal controls */
}

/* CISA: Hide Animation button (automatic, always on) */
.theme-cisa #toggle-animation {
    display: none !important;
}

/* CISA: Bottom stats panel (minimalist) - Similar cu poza CISA */
.cisa-bottom-stats {
    display: none;  /* Hidden by default (dark/light themes) */
}

.theme-cisa .cisa-bottom-stats {
    display: flex;  /* Show ONLY in CISA theme */
    position: absolute;
    bottom: 60px;
    left: 20px;
    right: 20px;
    justify-content: center;
    gap: 40px;
    z-index: 999;
    pointer-events: none;
}

.theme-cisa .cisa-stat-item {
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid rgba(0, 217, 255, 0.2);
    padding: 10px 20px;
    border-radius: 4px;
    text-align: center;
    min-width: 120px;
}

.theme-cisa .cisa-stat-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #8b99b0;
    display: block;
    margin-bottom: 5px;
}

.theme-cisa .cisa-stat-value {
    font-size: 24px;
    font-weight: 300;
    color: #00d9ff;
    letter-spacing: 1px;
}

.theme-cisa .control-btn {
    background: rgba(0, 217, 255, 0.1);
    border-color: rgba(0, 217, 255, 0.3);
    color: #00d9ff;
}

.theme-cisa .control-btn:hover {
    background: rgba(0, 217, 255, 0.2);
    border-color: #00d9ff;
}

.theme-cisa .control-btn.active {
    background: #00d9ff;
    border-color: #00d9ff;
    color: #000000;  /* Pure black text on cyan button */
}

/* CISA Attack lines - Cyan glow */
.theme-cisa .attack-line {
    stroke: #00d9ff;
    filter: drop-shadow(0 0 3px #00d9ff) drop-shadow(0 0 6px #00a8cc);
}

.theme-cisa .attack-pulse {
    fill: #00d9ff;
    filter: drop-shadow(0 0 5px #00d9ff) drop-shadow(0 0 10px #00a8cc);
}

/* CISA Popups - Pure black */
.theme-cisa .leaflet-popup-content-wrapper {
    background: rgba(0, 0, 0, 0.98);  /* Pure black background */
    border: 1px solid rgba(0, 217, 255, 0.4);
}

.theme-cisa .leaflet-popup-tip {
    background: rgba(0, 0, 0, 0.98);  /* Pure black */
}

/* CISA Loading spinner */
.theme-cisa .loading-spinner {
    border-color: rgba(0, 217, 255, 0.3);
    border-top-color: #00d9ff;
}

/* CISA Scrollbar */
.theme-cisa .stats-panel-left::-webkit-scrollbar-thumb,
.theme-cisa .filters-panel-right::-webkit-scrollbar-thumb {
    background: rgba(0, 217, 255, 0.4);
}

.theme-cisa .stats-panel-left::-webkit-scrollbar-thumb:hover,
.theme-cisa .filters-panel-right::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 217, 255, 0.6);
}

/* Header bar */
.threat-map-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: linear-gradient(to bottom, rgba(10, 14, 39, 0.95), transparent);
    padding: 15px 30px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.theme-light .threat-map-header {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.95), transparent);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.map-title {
    margin: 0;
    font-size: 24px;
    font-weight: 300;
    letter-spacing: 1px;
    color: #fff;
}

.theme-light .map-title {
    color: #1a202c;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #00ff88;
    font-size: 13px;
    font-weight: 600;
}

.live-indicator .pulse {
    width: 10px;
    height: 10px;
    background: #00ff88;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.7);
    }
    50% {
        opacity: 0.5;
        box-shadow: 0 0 0 10px rgba(0, 255, 136, 0);
    }
}

.active-count-badge {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.5);
    border-radius: 20px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge-label {
    font-size: 12px;
    color: #94a3b8;
}

.badge-value {
    font-size: 16px;
    font-weight: 700;
    color: #3b82f6;
}

/* Map canvas */
.threat-map-canvas {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Attack lines canvas layer (above map, below UI) */
#attack-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 500;
}

/* Loading indicator */
.threat-map-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10000;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(59, 130, 246, 0.3);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

.loading-text {
    color: #94a3b8;
    font-size: 14px;
}

/* Statistics panel - LEFT */
.stats-panel-left {
    position: absolute;
    top: 90px;
    left: 20px;
    width: 320px;
    max-height: calc(100% - 150px);
    overflow-y: auto;
    z-index: 1000;
}

.stats-card {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.theme-light .stats-card {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(203, 213, 225, 0.5);
}

.stats-card-title {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(59, 130, 246, 0.5);
    color: #fff;
}

.theme-light .stats-card-title {
    color: #1a202c;
    border-bottom-color: rgba(100, 116, 139, 0.3);
}

.stats-card-content {
    font-size: 13px;
}

.stat-item {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-light .stat-item {
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

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

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

.stat-label {
    font-weight: 500;
    color: #cbd5e1;
}

.theme-light .stat-label {
    color: #475569;
}

.stat-value {
    font-weight: 700;
    color: #3b82f6;
    font-size: 15px;
}

.stat-bar {
    height: 6px;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.stat-bar-fill {
    height: 100%;
    background: linear-gradient(to right, #3b82f6, #06b6d4);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* Severity colors */
.stat-item.critical .stat-value { color: #ef4444; }
.stat-item.high .stat-value { color: #f59e0b; }
.stat-item.medium .stat-value { color: #eab308; }
.stat-item.low .stat-value { color: #22c55e; }

/* Skeleton loader */
.stat-item-skeleton {
    height: 60px;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.1) 25%, rgba(59, 130, 246, 0.2) 50%, rgba(59, 130, 246, 0.1) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Filters panel - RIGHT SIDEBAR (toggleable) */
.filters-panel-right {
    position: absolute;
    top: 90px;
    right: 20px;
    width: 320px;
    max-height: calc(100% - 150px);
    overflow-y: auto;
    z-index: 1000;
    opacity: 0.95;
    transition: all 0.3s ease;
}

.filter-card,
.legend-card {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 0 20px rgba(0, 255, 136, 0.1);
}

.theme-light .filter-card,
.theme-light .legend-card {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(203, 213, 225, 0.5);
}

.filter-card-title,
.legend-card-title {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.theme-light .filter-card-title,
.theme-light .legend-card-title {
    color: #1a202c;
}

.filter-group {
    margin-bottom: 15px;
}

.filter-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
}

.filter-select {
    width: 100%;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.5);
    border-radius: 6px;
    padding: 10px;
    color: #fff;
    font-size: 13px;
    transition: all 0.3s ease;
}

.theme-light .filter-select {
    background: #fff;
    border-color: rgba(203, 213, 225, 0.8);
    color: #1a202c;
}

.filter-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-btn {
    width: 100%;
    border: none;
    border-radius: 6px;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn-primary {
    background: linear-gradient(to right, #3b82f6, #06b6d4);
    color: #fff;
}

.filter-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

.filter-btn-secondary {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #ef4444;
}

.theme-light .filter-btn-secondary {
    background: rgba(239, 68, 68, 0.1);
}

.filter-btn-secondary:hover {
    background: rgba(239, 68, 68, 0.3);
}

/* Legend */
.legend-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #cbd5e1;
}

.theme-light .legend-item {
    color: #475569;
}

.legend-marker {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #fff;
}

.legend-line {
    width: 30px;
    height: 2px;
    background: linear-gradient(to right, #3b82f6, #06b6d4);
    position: relative;
}

.legend-line::after {
    content: '';
    position: absolute;
    right: 0;
    top: -2px;
    width: 6px;
    height: 6px;
    background: #06b6d4;
    border-radius: 50%;
}

/* Theme Selector - TOP RIGHT */
.theme-selector {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1001;
    display: flex;
    gap: 8px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 8px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.theme-light .theme-selector {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(203, 213, 225, 0.5);
}

.theme-cisa .theme-selector {
    background: rgba(0, 0, 0, 0.95);  /* Pure black background */
    border: 1px solid rgba(0, 217, 255, 0.3);
}

.theme-btn {
    width: 40px;
    height: 40px;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.theme-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
}

.theme-btn.active {
    border-color: #3b82f6;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.7);
}

.theme-cisa .theme-btn.active {
    border-color: #00d9ff;
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.7);
}

.theme-btn-dark {
    background: linear-gradient(135deg, #0a0e27, #1e293b);
}

.theme-btn-light {
    background: linear-gradient(135deg, #f5f7fa, #e2e8f0);
}

.theme-btn-cisa {
    background: linear-gradient(135deg, #000000, #00d9ff);  /* Pure black to cyan */
}

.theme-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
}

.theme-btn-dark::after {
    content: '🌑';
}

.theme-btn-light::after {
    content: '☀️';
}

.theme-btn-cisa::after {
    content: '🔷';
}

/* Bottom controls */
.threat-map-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 50px;
    padding: 12px 20px;
    z-index: 1000;
    display: flex;
    gap: 15px;
    align-items: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.theme-light .threat-map-controls {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(203, 213, 225, 0.5);
}

.control-btn {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.5);
    border-radius: 8px;
    padding: 8px 16px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.theme-light .control-btn {
    color: #1a202c;
    background: rgba(59, 130, 246, 0.1);
}

.control-btn:hover {
    background: rgba(59, 130, 246, 0.4);
    border-color: #3b82f6;
}

.control-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

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

.control-label {
    font-size: 12px;
}

/* Attack trajectory animations - NEON STYLE */
.attack-line {
    stroke: #00ff88;
    stroke-width: 2.5;
    stroke-opacity: 0.9;
    fill: none;
    stroke-dasharray: 5, 5;
    animation: dash 1s linear infinite;
    filter: drop-shadow(0 0 3px #00ff88) drop-shadow(0 0 6px #00ff88);
}

@keyframes dash {
    to {
        stroke-dashoffset: -10;
    }
}

/* Beautiful expanding pulse effect */
.attack-pulse {
    fill: #ffd700;
    opacity: 0.9;
    animation: pulse-grow 2s ease-out forwards;
    filter: drop-shadow(0 0 5px #ffd700) drop-shadow(0 0 10px #ffed4e);
}

/* CISA Theme: MUCH STRONGER pulse effect with cyan glow */
.theme-cisa .attack-pulse {
    fill: #00d9ff;
    opacity: 1.0;
    animation: pulse-grow-cisa 2s ease-out forwards;
    filter: drop-shadow(0 0 10px #00d9ff) drop-shadow(0 0 20px #00a8cc) drop-shadow(0 0 30px rgba(0, 217, 255, 0.5));
}

@keyframes pulse-grow {
    0% {
        r: 5;
        opacity: 0.9;
        fill: #ffd700;
    }
    50% {
        r: 15;
        opacity: 0.6;
        fill: #ffed4e;
    }
    100% {
        r: 25;
        opacity: 0;
        fill: #00ff88;
    }
}

/* CISA Theme: BIGGER, MORE VISIBLE pulse animation with cyan */
@keyframes pulse-grow-cisa {
    0% {
        r: 6;
        opacity: 1.0;
        fill: #00d9ff;
    }
    40% {
        r: 20;
        opacity: 0.8;
        fill: #00d9ff;
    }
    70% {
        r: 35;
        opacity: 0.4;
        fill: #00a8cc;
    }
    100% {
        r: 50;
        opacity: 0;
        fill: #00d9ff;
    }
}

/* CISA Theme: Glow effect on markers (attack points) */
.theme-cisa .leaflet-interactive {
    filter: drop-shadow(0 0 8px #00d9ff) drop-shadow(0 0 12px rgba(0, 217, 255, 0.6));
}

.theme-cisa .leaflet-marker-icon {
    filter: drop-shadow(0 0 8px #00d9ff) drop-shadow(0 0 12px rgba(0, 217, 255, 0.6));
}

/* Leaflet popup customization */
.leaflet-popup-content-wrapper {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(59, 130, 246, 0.5);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.theme-light .leaflet-popup-content-wrapper {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(203, 213, 225, 0.5);
}

.leaflet-popup-content {
    color: #fff;
    margin: 15px;
}

.theme-light .leaflet-popup-content {
    color: #1a202c;
}

.leaflet-popup-tip {
    background: rgba(15, 23, 42, 0.95);
}

.theme-light .leaflet-popup-tip {
    background: rgba(255, 255, 255, 0.95);
}

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

.stats-panel-left::-webkit-scrollbar-track,
.filters-panel-right::-webkit-scrollbar-track {
    background: rgba(30, 41, 59, 0.5);
    border-radius: 3px;
}

.stats-panel-left::-webkit-scrollbar-thumb,
.filters-panel-right::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.5);
    border-radius: 3px;
}

.stats-panel-left::-webkit-scrollbar-thumb:hover,
.filters-panel-right::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.8);
}

/* Responsive Design */
@media screen and (max-width: 1200px) {
    .stats-panel-left {
        width: 280px;
    }

    .filters-panel-right {
        width: 280px;
    }
}

@media screen and (max-width: 992px) {
    .threat-map-header {
        flex-direction: column;
        height: auto;
        padding: 15px 20px;
        gap: 10px;
    }

    .header-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .map-title {
        font-size: 20px;
    }

    .stats-panel-left {
        top: 120px;
        width: 260px;
        max-height: calc(100% - 220px);
    }

    .filters-panel-right {
        top: 120px;
        width: 260px;
    }
}

@media screen and (max-width: 768px) {
    /* On mobile, hide stats and filters by default - full-screen map */
    .stats-panel-left {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-height: 100%;
        background: rgba(10, 14, 39, 0.98);
        z-index: 10001;
        padding: 20px;
        overflow-y: auto;
    }

    .stats-panel-left.mobile-visible {
        display: block;
    }

    .filters-panel-right {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-height: 100%;
        background: rgba(10, 14, 39, 0.98);
        z-index: 10001;
        padding: 20px;
        overflow-y: auto;
    }

    .filters-panel-right.mobile-visible {
        display: block;
    }

    .threat-map-controls {
        flex-wrap: wrap;
        justify-content: center;
        padding: 10px;
        gap: 8px;
    }

    .control-btn {
        padding: 6px 12px;
        font-size: 11px;
    }

    .control-label {
        display: none;
    }
}

@media screen and (max-width: 480px) {
    .threat-map-header {
        padding: 10px 15px;
    }

    .map-title {
        font-size: 16px;
    }

    .active-count-badge {
        padding: 6px 12px;
    }

    .badge-label {
        font-size: 10px;
    }

    .badge-value {
        font-size: 14px;
    }

    .threat-map-controls {
        bottom: 10px;
        padding: 8px;
        gap: 6px;
    }
}
