/* Main wrapper - contains everything */
.antifatal-wrapper {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 200px !important;
    overflow: hidden !important; /* Keep everything contained */
    background: transparent !important;
}

/* Map container */
.map-container {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 1 !important; /* Base layer */
}

#antifatal-map {
    width: 100% !important;
    height: 100% !important;
    background: transparent !important;
    position: relative !important;
    margin: 0 auto !important;
    max-width: 100% !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* Feathered edge */
.map-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    pointer-events: none !important;
    z-index: 500 !important;
}

.map-overlay::before,
.map-overlay::after {
    display: none !important;
}

/* Map border animation */
.map-border {
    stroke: url(#map-line-gradient) !important;
    stroke-width: 0.75px !important;
    stroke-dasharray: none !important;
    stroke-linecap: round !important;
    stroke-opacity: 1 !important;
    filter: drop-shadow(0 0 3px rgba(74, 219, 11, 0.7)) !important;
}

/* Enhanced marker styles */
.threat-marker {
    animation: marker-pulse 2s ease-in-out infinite !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    filter: drop-shadow(0 0 4px rgba(255, 0, 0, 0.8)) !important;
    touch-action: none !important;
    z-index: 1000 !important;
    min-width: 24px !important;
    min-height: 24px !important;
    margin-left: -12px !important;
    margin-top: -12px !important;
}

.threat-marker-static {
    pointer-events: auto !important;
    cursor: pointer !important;
    filter: drop-shadow(0 0 2px rgba(255, 0, 0, 0.5)) !important;
    touch-action: none !important;
    z-index: 1000 !important;
    min-width: 24px !important;
    min-height: 24px !important;
    margin-left: -12px !important;
    margin-top: -12px !important;
}

@keyframes marker-pulse {
    0% {
        opacity: 0.6;
        filter: drop-shadow(0 0 4px rgba(255, 0, 0, 0.8));
        transform: scale(1);
    }
    50% {
        opacity: 1;
        filter: drop-shadow(0 0 8px rgba(255, 0, 0, 1));
        transform: scale(1.1);
    }
    100% {
        opacity: 0.6;
        filter: drop-shadow(0 0 4px rgba(255, 0, 0, 0.8));
        transform: scale(1);
    }
}

/* SVG filter for enhanced glow */
#antifatal-map svg defs {
    position: absolute;
}

#glow-filter {
    position: absolute;
}

.glow-filter feGaussianBlur {
    stdDeviation: 2;
}

.glow-filter feColorMatrix {
    type: "matrix";
    values: "0 0 0 0 1   0 0 0 0 0  0 0 0 0 0  0 0 0 1 0";
}

.glow-filter feMerge {
    result: merge;
}

/* Remove any transform animations */
.threat-marker, .leaflet-marker-icon {
    transform: none !important;
    transition: none !important;
}

.leaflet-interactive {
    cursor: pointer !important;
    pointer-events: auto !important;
}

/* Popup styles */
.leaflet-popup-content-wrapper {
    background: rgba(0, 0, 0, 0.95) !important;
    color: #fff !important;
    border: 1px solid #ff3333 !important;
    border-radius: 4px !important;
    padding: 10px !important;
    max-height: 80vh !important;
    overflow-y: auto !important;
    width: 400px !important;
    font-size: 12px !important;
}

.leaflet-popup-tip {
    background: rgba(0, 0, 0, 0.95) !important;
    border: 1px solid #ff3333 !important;
}

/* Basic z-index layering */
.leaflet-popup-pane {
    z-index: 1400 !important;
}

.map-counter, .visitor-panel {
    z-index: 1600 !important;
}

.leaflet-marker-pane {
    z-index: 5 !important;
    filter: url(#glow-filter);
}

/* Scrollbar styling */
.leaflet-popup-content-wrapper::-webkit-scrollbar {
    width: 8px;
}

.leaflet-popup-content-wrapper::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.leaflet-popup-content-wrapper::-webkit-scrollbar-thumb {
    background: #ff3333;
    border-radius: 4px;
}

/* Threat badge styling */
.threat-badge {
    display: block;
    background: #ff0000 !important;
    color: white !important;
    padding: 6px 10px;
    border-radius: 4px;
    margin-bottom: 12px;
    font-weight: bold;
    font-size: 13px;
    text-align: center;
}

/* Info grid layout */
.threat-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.info-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.info-section.full-width {
    grid-column: 1 / -1;
    margin: 0 0 12px 0;
    padding: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.info-label {
    color: #0bbd93 !important;
    font-weight: 500 !important;
    white-space: nowrap;
    font-size: 10px !important;
}

.info-value {
    color: #fff !important;
    text-align: right !important;
    word-break: break-word !important;
    font-size: 11px !important;
    line-height: 1.3 !important;
}

/* Section titles */
.section-title {
    color: #ffffff !important;
    font-weight: 600 !important;
    margin: 24px 0 12px 0 !important;
    font-size: 11px !important;
    border-bottom: 1px solid rgba(255, 51, 51, 0.3) !important;
    padding-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.section-title .info-icon {
    color: rgba(255, 255, 255, 0.6);
    cursor: help;
}

/* Badge containers */
.badge-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

/* Info badges */
.info-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    background: rgba(11, 189, 147, 0.1);
    border: 1px solid rgba(11, 189, 147, 0.3);
    color: #0bbd93 !important;
}

.hostname-badge {
    background: rgba(255, 166, 0, 0.1);
    border-color: rgba(255, 166, 0, 0.3);
    color: #ffa600 !important;
}

.domain-badge {
    background: rgba(0, 150, 255, 0.1);
    border-color: rgba(0, 150, 255, 0.3);
    color: #0096ff !important;
}

.tag-badge {
    background: rgba(255, 51, 255, 0.1);
    border-color: rgba(255, 51, 255, 0.3);
    color: #ff33ff !important;
}

/* Raw data section */
.raw-data-section {
    margin-top: 12px;
}

.raw-data-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 6px !important;
    cursor: pointer !important;
    padding: 8px !important;
    border-radius: 4px !important;
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 51, 51, 0.2) !important;
    transition: all 0.2s ease !important;
}

.raw-data-header:hover {
    background: rgba(11, 189, 147, 0.1) !important;
}

.raw-data-header .section-title {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.raw-data-header .toggle-icon {
    color: #0bbd93;
    transition: transform 0.2s ease;
}

.raw-data-header.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.raw-data-box {
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 51, 51, 0.2) !important;
    border-radius: 4px !important;
    padding: 8px !important;
    max-height: 200px !important;
    overflow-y: auto !important;
    margin-top: 8px !important;
}

.raw-data-box.collapsed {
    display: none;
}

.raw-data-box pre {
    margin: 0 !important;
    font-family: monospace !important;
    font-size: 11px !important;
    white-space: pre-wrap !important;
    word-break: break-all !important;
    color: #fff !important;
    background: transparent !important;
}

/* Raw data scrollbar styling */
.leaflet-popup-content-wrapper .raw-data-box::-webkit-scrollbar,
.raw-data-box::-webkit-scrollbar {
    width: 8px;
}

.leaflet-popup-content-wrapper .raw-data-box::-webkit-scrollbar-track,
.raw-data-box::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.leaflet-popup-content-wrapper .raw-data-box::-webkit-scrollbar-thumb,
.raw-data-box::-webkit-scrollbar-thumb {
    background: #ff3333;
    border-radius: 4px;
}

/* Mobile responsiveness */
@media screen and (max-width: 768px) {
    .map-container {
        width: 100vw !important;
        margin: 0 -20px !important; /* Compensate for page padding */
        overflow: visible !important;
    }

    .map-counter {
        top: 10px !important;
        left: 10px !important;
        right: 10px !important;
        min-width: unset !important;
        max-width: unset !important;
        width: calc(100% - 20px) !important;
        font-size: 12px !important;
        padding: 10px !important;
    }

    .visitor-panel {
        top: unset !important;
        bottom: 10px !important;
        right: 10px !important;
        left: 10px !important;
        width: calc(100% - 20px) !important;
        max-height: 200px !important;
    }

    .copyright-notice {
        bottom: 220px !important;
        font-size: 10px !important;
    }

    .map-controls {
        flex-wrap: wrap !important;
        width: calc(100% - 40px) !important;
    }

    .control-group {
        flex-wrap: wrap !important;
    }

    .visitor-toggle span:last-child {
        display: none !important;
    }

    .height-control {
        left: 60px !important;
        bottom: 20px !important;
    }

    .height-control input {
        width: 50px;
        font-size: 11px;
    }

    .leaflet-control-zoom {
        margin: 0 !important;
    }

    .leaflet-control-zoom a {
        width: 32px !important;
        height: 32px !important;
        line-height: 32px !important;
        font-size: 16px !important;
    }

    .map-overlay::before,
    .map-overlay::after {
        height: 100px !important; /* Smaller gradient on mobile */
    }
}

/* Even smaller screens */
@media screen and (max-width: 480px) {
    .map-counter {
        padding: 8px !important;
    }

    .counter-main {
        font-size: 11px !important;
    }

    .counter-timestamp {
        font-size: 10px !important;
    }

    .visitor-panel {
        max-height: 180px !important;
    }

    .copyright-notice {
        bottom: 200px !important;
        font-size: 9px !important;
    }

    .control-group {
        gap: 5px !important;
    }

    .height-control {
        padding: 2px 4px !important;
    }

    .height-control input {
        width: 40px !important;
        height: 20px !important;
        font-size: 10px !important;
    }

    .visitor-toggle {
        padding: 6px 8px !important;
        height: 28px !important;
    }

    .leaflet-control-zoom a {
        width: 28px !important;
        height: 28px !important;
        line-height: 28px !important;
    }
}

/* Ensure controls stay above feathering on all screen sizes */
.map-counter,
.map-controls,
.control-group,
.height-control,
.visitor-panel,
.visitor-toggle,
.leaflet-control-zoom {
    z-index: 9999 !important;
    pointer-events: auto !important;
}

/* Font imports */
@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@400;500;600&display=swap');

/* Base font settings */
#antifatal-map, 
.leaflet-popup-content-wrapper,
.info-label,
.info-value,
.section-title,
.threat-badge {
    font-family: 'Rubik', sans-serif !important;
}

/* Threat Counter and Visitor Info Panels */
.map-counter {
    position: absolute !important;
    top: 20px !important;
    left: 20px !important;
    background: rgba(0, 0, 0, 0.95) !important;
    border: 1px solid #0bbd93 !important;
    border-radius: 4px !important;
    padding: 12px 15px !important;
    color: #fff !important;
    font-size: 14px !important;
    z-index: 1600 !important;
    min-width: 300px !important;
    max-width: 400px !important;
    box-shadow: 0 0 10px rgba(11, 189, 147, 0.3) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

.counter-main {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    white-space: nowrap !important;
}

.counter-timestamp {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    font-size: 11px !important;
    color: #888 !important;
}

.timestamp-box {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    white-space: nowrap !important;
    font-size: 10px !important;
}

.copyright-notice {
    font-size: 10px !important;
    color: #666 !important;
    text-align: right !important;
    margin-top: 4px !important;
    opacity: 0.8 !important;
    border-top: 1px solid rgba(11, 189, 147, 0.1) !important;
    padding-top: 4px !important;
}

.visitor-panel {
    position: absolute !important;
    top: 20px !important;
    right: 20px !important;
    background: rgba(0, 0, 0, 0.85) !important;
    border: 1px solid #0bbd93 !important;
    border-radius: 4px !important;
    padding: 15px !important;
    color: #fff !important;
    z-index: 1500 !important;
    width: 300px !important;
    max-height: calc(100% - 40px) !important;
    overflow-y: auto !important;
    transform: translateX(0) !important;
    transition: transform 0.3s ease-in-out !important;
}

.visitor-panel.hidden {
    opacity: 0;
    pointer-events: none;
}

.visitor-content {
    padding: 12px;
}

.visitor-info-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.visitor-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 51, 51, 0.2);
}

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

.visitor-warning {
    margin-top: 8px;
    padding: 8px;
    background: rgba(255, 51, 51, 0.1);
    border: 1px solid rgba(255, 51, 51, 0.3);
    border-radius: 3px;
    color: #ff3333;
    font-size: 11px;
    text-align: center;
    animation: warning-pulse 2s infinite;
}

@keyframes warning-pulse {
    0% {
        opacity: 0.8;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.8;
    }
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 51, 51, 0.3);
    border-top: 2px solid #ff3333;
    border-radius: 50%;
    margin: 10px auto;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Status icon animation */
.status-icon {
    fill: #4adb0b !important;
    animation: status-pulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 2px rgba(74, 219, 11, 0.7));
}

@keyframes status-pulse {
    0% {
        opacity: 0.7;
        filter: drop-shadow(0 0 2px rgba(74, 219, 11, 0.6));
    }
    50% {
        opacity: 1;
        filter: drop-shadow(0 0 4px rgba(74, 219, 11, 0.9));
    }
    100% {
        opacity: 0.7;
        filter: drop-shadow(0 0 2px rgba(74, 219, 11, 0.6));
    }
}

/* Analysis status */
.analysis-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 12px;
}

/* User location marker */
.user-location-marker {
    animation: location-pulse 2s ease-in-out infinite !important;
    filter: drop-shadow(0 0 3px rgba(0, 150, 255, 0.8)) !important;
    z-index: 1001 !important;
}

@keyframes location-pulse {
    0% {
        opacity: 0.6;
        filter: drop-shadow(0 0 2px rgba(0, 150, 255, 0.6));
    }
    50% {
        opacity: 1;
        filter: drop-shadow(0 0 6px rgba(0, 150, 255, 0.9));
    }
    100% {
        opacity: 0.6;
        filter: drop-shadow(0 0 2px rgba(0, 150, 255, 0.6));
    }
}

/* Warning details */
.warning-details {
    margin-top: 6px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
}

/* Compromise reason section */
.compromise-reason {
    background: rgba(255, 51, 51, 0.1);
    border: 1px solid rgba(255, 51, 51, 0.3);
    border-radius: 3px;
    padding: 12px;
    margin: 16px 0;
    font-size: 11px;
    color: #ffffff;
    line-height: 1.5;
}

.compromise-reason-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: #ff3333;
    font-weight: 500;
    font-size: 12px;
}

.compromise-reason-content {
    color: rgba(255, 255, 255, 0.9);
    font-size: 11px;
    line-height: 1.5;
}

/* User location popup styles */
.user-popup .leaflet-popup-content-wrapper {
    background: rgba(0, 150, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(0, 150, 255, 0.3) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 150, 255, 0.1) !important;
}

.user-popup .leaflet-popup-tip {
    background: rgba(0, 150, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(0, 150, 255, 0.3) !important;
}

.user-info-popup {
    padding: 8px;
}

.user-info-popup .section-title {
    color: #0096ff !important;
    border-bottom-color: rgba(0, 150, 255, 0.3) !important;
}

.user-info-popup .info-label {
    color: #0096ff !important;
}

/* Ensure popups stay above markers */
.leaflet-popup {
    z-index: 1002 !important;
}

.leaflet-popup-content-wrapper {
    transform-origin: 50% 100% !important;
    will-change: transform !important;
}

/* Visitor Panel and Toggle Button */
.visitor-toggle {
    position: absolute !important;
    bottom: 80px !important;
    left: 20px !important;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(11, 189, 147, 0.3);
    color: #fff;
    padding: 8px 12px !important;
    border-radius: 4px;
    z-index: 1001;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Rubik', sans-serif;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap !important;
}

.visitor-toggle:hover {
    background: rgba(11, 189, 147, 0.2);
    color: #0bbd93;
}

/* Zoom control styles */
.leaflet-control-zoom {
    position: absolute !important;
    left: 20px !important;
    bottom: 20px !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
    z-index: 1001 !important;
}

.leaflet-control-zoom a {
    width: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
    color: #fff !important;
    background: rgba(0, 0, 0, 0.8) !important;
    border: 1px solid rgba(11, 189, 147, 0.3) !important;
    transition: all 0.2s ease !important;
}

.leaflet-control-zoom a:hover {
    background: rgba(11, 189, 147, 0.2) !important;
    color: #0bbd93 !important;
}

/* Mobile styles */
@media screen and (max-width: 768px) {
    .visitor-panel {
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
    }
    
    .map-counter {
        width: calc(100% - 40px) !important;
        min-width: unset !important;
    }
}

/* Height control */
.height-control {
    position: absolute !important;
    left: 70px !important;
    bottom: 20px !important;
    background: rgba(0, 0, 0, 0.8) !important;
    border: 1px solid rgba(11, 189, 147, 0.3) !important;
    border-radius: 4px !important;
    padding: 4px 8px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    z-index: 1001 !important;
}

.height-control i {
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    font-size: 14px;
    cursor: pointer;
    color: #0bbd93;
    transition: color 0.3s ease;
}

.height-control i:hover {
    color: #fff;
}

.height-control input {
    width: 60px !important;
    height: 24px !important;
    padding: 0 5px !important;
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(11, 189, 147, 0.3) !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    text-align: center !important;
    color: #fff !important;
}

.height-control input:focus {
    outline: none;
    border-color: #0bbd93;
}

.height-control input::-webkit-inner-spin-button,
.height-control input::-webkit-outer-spin-button {
    opacity: 1;
    background: rgba(11, 189, 147, 0.1);
}

/* Mobile adjustments */
@media screen and (max-width: 768px) {
    .height-control {
        left: 60px !important;
        bottom: 20px !important;
    }
    
    .height-control input {
        width: 50px;
        font-size: 11px;
    }
}

/* Map counter should be above other elements */
.map-counter {
    position: absolute !important;
    top: 20px !important;
    left: 20px !important;
    z-index: 99999 !important;  /* Extremely high z-index to ensure it's above everything */
    background: rgba(0, 0, 0, 0.95) !important;
    border: 1px solid rgba(11, 189, 147, 0.3) !important;
    border-radius: 4px !important;
    padding: 12px 15px !important;
    width: 500px !important; /* Fixed width to prevent wrapping */
    pointer-events: auto !important;
    white-space: nowrap !important;
}

.counter-main {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
}

/* Ensure copyright notice is visible */
.copyright-notice {
    font-size: 10px;
    color: #666;
    text-align: right;
    margin-top: 4px !important;
    opacity: 0.8;
}

/* Mobile adjustments */
@media screen and (max-width: 768px) {
    .height-control {
        left: 60px !important;
        bottom: 20px !important;
    }
    
    .map-counter {
        width: calc(100% - 40px) !important;
        padding: 12px !important;
        font-size: 12px !important;
    }
}

/* Make sure the feathered edges stay in place */
.leaflet-container {
    background: transparent !important;
}

/* Ensure map elements are below the feathered edges */
.leaflet-map-pane {
    z-index: 2 !important;
}

.leaflet-objects-pane {
    z-index: 3 !important;
}

.leaflet-overlay-pane {
    z-index: 4 !important;
}

.leaflet-marker-pane {
    z-index: 5 !important;
}

.leaflet-popup-pane {
    z-index: 1400 !important;
}

.leaflet-tooltip-pane {
    z-index: 1400 !important;
}

/* Counter should be above feathered edges */
.map-counter {
    z-index: 1001 !important;
}

/* Ensure proper z-indexing */
.leaflet-container {
    z-index: 1 !important;
}

.leaflet-map-pane {
    z-index: 2 !important;
}

.leaflet-objects-pane {
    z-index: 3 !important;
}

.leaflet-overlay-pane {
    z-index: 4 !important;
}

.leaflet-marker-pane {
    z-index: 5 !important;
}

.leaflet-popup-pane {
    z-index: 1400 !important;
}

.leaflet-tooltip-pane {
    z-index: 1400 !important;
}

/* Force the map to be visible */
.leaflet-container {
    visibility: visible !important;
    display: block !important;
    opacity: 1 !important;
}

/* Map Controls Container */
.map-controls {
    position: absolute !important;
    left: 20px !important;
    bottom: 20px !important;
    z-index: 9999 !important;
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    pointer-events: auto !important;
}

/* Control Group - Contains zoom and height controls */
.control-group {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

/* Zoom Controls */
.leaflet-control-zoom {
    position: static !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1px !important;
}

/* Height Control */
.height-control {
    position: static !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: rgba(0, 0, 0, 0.95) !important;
    border: 1px solid rgba(11, 189, 147, 0.3) !important;
    border-radius: 4px !important;
    padding: 0 8px !important;
    height: 36px !important;
}

/* Network Analysis Toggle */
.visitor-toggle {
    height: 36px !important;
    background: rgba(0, 0, 0, 0.95) !important;
    border: 1px solid rgba(11, 189, 147, 0.3) !important;
    border-radius: 4px !important;
    color: #fff !important;
    padding: 0 15px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    font-size: 13px !important;
    transition: all 0.2s ease !important;
    position: static !important;
}

/* Counter styles */
.map-counter {
    position: absolute !important;
    top: 20px !important;
    left: 20px !important;
    z-index: 99999 !important;
    background: rgba(0, 0, 0, 0.95) !important;
    border: 1px solid rgba(11, 189, 147, 0.3) !important;
    border-radius: 4px !important;
    padding: 12px 15px !important;
    min-width: 300px !important;
    pointer-events: auto !important;
}

/* Visitor Panel */
.visitor-panel {
    display: none !important;
    position: absolute !important;
    top: 90px !important;
    left: 20px !important;
    width: 280px !important;
    background: rgba(0, 0, 0, 0.95) !important;
    border: 1px solid rgba(255, 51, 51, 0.3) !important;
    border-radius: 4px !important;
    color: #fff !important;
    z-index: 1001 !important;
}

.visitor-panel.active {
    display: block !important;
}

/* Mobile styles */
@media screen and (max-width: 768px) {
    .map-controls {
        width: auto !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
    }

    .control-group {
        gap: 10px !important;
    }

    .visitor-toggle span:last-child {
        display: none !important;
    }

    .map-counter {
        width: calc(100% - 40px) !important;
        min-width: unset !important;
        padding: 8px 12px !important;
        font-size: 12px !important;
    }

    .visitor-panel {
        width: calc(100% - 40px) !important;
        top: auto !important;
        bottom: 80px !important;
        display: none !important;
    }

    .visitor-panel.active {
        display: block !important;
    }

    .height-control input {
        width: 50px !important;
    }
}

/* Even smaller screens */
@media screen and (max-width: 480px) {
    .map-counter {
        font-size: 11px !important;
        padding: 6px 10px !important;
    }

    .control-group {
        gap: 5px !important;
    }

    .height-control {
        padding: 2px 4px !important;
    }

    .height-control input {
        width: 40px !important;
        font-size: 10px !important;
    }

    .visitor-toggle {
        padding: 6px 8px !important;
        height: 28px !important;
    }
}

#threat-count {
    display: inline !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: #ff3333 !important;
    font-weight: bold !important;
}

.map-counter {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.counter-main {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
}

.counter-label {
    color: #fff !important;
    display: inline-block !important;
}

.counter-value {
    color: #ff3333 !important;
    font-weight: bold !important;
    font-size: 16px !important;
    display: inline-block !important;
    min-width: 20px !important;
    text-shadow: 0 0 10px rgba(255, 51, 51, 0.5) !important;
    z-index: 1001 !important;
    position: relative !important;
}

#threat-counter {
    z-index: 1000 !important;
    position: relative !important;
}

.counter-main {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    white-space: nowrap !important;
}

/* Ensure counter is visible and properly positioned */
.map-counter {
    background: rgba(0, 0, 0, 0.8) !important;
    border: 1px solid rgba(255, 51, 51, 0.3) !important;
    padding: 10px !important;
    border-radius: 4px !important;
    position: absolute !important;
    top: 20px !important;
    left: 20px !important;
    min-width: 200px !important;
    z-index: 1000 !important;
}

/* Remove any potential overlapping elements */
#threat-count {
    position: relative !important;
    z-index: 1001 !important;
}