@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Inter', sans-serif;
    background-color: #0f172a;
    /* Ambient Mesh Gradient Background */
    background-image:
        radial-gradient(circle at 15% 15%, rgba(0, 198, 86, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 85% 85%, rgba(88, 28, 135, 0.1) 0%, transparent 40%);
    background-attachment: fixed;
    color: #e5e5e5;
}

/* Custom Scrollbar for Webkit */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 198, 86, 0.5);
}

/* Leaflet Controls Dark Mode */
.leaflet-control-zoom-in,
.leaflet-control-zoom-out,
.leaflet-control-attribution {
    filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%);
}

#map {
    z-index: 1;
}

/* Leaflet Tile Pane Filter (Neon/Cyberpunk Tone) */
.leaflet-tile-pane {
    filter: contrast(1.1) brightness(0.8) sepia(0.2) hue-rotate(100deg) saturate(0.5);
}

/* Table Row Hover Gradient */
.table-row-hover:hover {
    background: linear-gradient(90deg, rgba(37, 37, 37, 0.5) 0%, rgba(45, 45, 45, 0.5) 100%);
}

/* Premium Glass Panel (True Glass Effect) */
.glass-panel {
    /* Gradient Background for Depth */
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.01) 100%);

    /* Strong Blur */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    /* Light Directional Borders (Top-Left Light Source) */
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);

    /* Deep Shadow */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Ambient Inner Glow (Optional helper) */
.glass-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.03), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Log Item Hover Glow */
.log-item-glass:hover {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

/* Neon Text Glow Enhanced */
.text-glow-enhanced {
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.text-glow-green {
    text-shadow: 0 0 15px rgba(0, 198, 86, 0.5);
}

.text-glow-red {
    text-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
}

/* Circular Chart Styles */
.circular-chart {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    max-height: 100%;
    transform: rotate(-90deg);
    overflow: visible;
}

.circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.03);
    stroke-width: 8;
}

.circle {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1.5s ease-out;
}

/* Neon Path Filters */
.neon-path-green {
    stroke: #00c656;
    filter: drop-shadow(0 0 6px rgba(0, 198, 86, 0.9));
}

.neon-path-red {
    stroke: #ef4444;
    filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.9));
}

/* Custom Leaflet Popup Glass Effect */
.leaflet-popup-content-wrapper {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4) !important;
    color: #e5e5e5 !important;
    padding: 0 !important;
}

.leaflet-popup-tip {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: none !important;
}

.leaflet-popup-content {
    margin: 0 !important;
    width: auto !important;
}

.map-popup-content {
    padding: 16px;
    min-width: 200px;
    font-family: 'Inter', sans-serif;
}

.popup-title {
    margin: 0 0 12px 0;
    font-weight: 700;
    font-size: 15px;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
    letter-spacing: -0.01em;
}

.popup-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.popup-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.popup-label {
    color: #94a3b8;
    font-weight: 500;
}

.popup-value {
    color: #f1f5f9;
    font-weight: 600;
}

.popup-btn {
    width: 100%;
    background-color: #00c656;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 198, 86, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.popup-btn:hover {
    background-color: #00e060;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 198, 86, 0.4);
}

.popup-btn:active {
    transform: translateY(0);
}

/* Custom Leaflet MarkerCluster Design */
.custom-cluster-icon {
    background: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.cluster-green {
    box-shadow: 0 0 20px rgba(0, 198, 86, 0.8), inset 0 0 10px rgba(0, 198, 86, 0.3);
}

.cluster-red {
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.8), inset 0 0 10px rgba(239, 68, 68, 0.3);
}

.custom-cluster-icon div {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}