* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #f0f2f5 0%, #e8ecef 100%);
            overflow: hidden;
        }

        /* Header - More prominent with glass effect */
        .header {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: 70px;
            background: linear-gradient(90deg, rgba(255,255,255,0.95), rgb(221, 247, 227));

            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
            z-index: 1000;
            display: flex;
            align-items: center;
            padding: 0 30px;
        }

        .header h1 {
            flex: 1;
            font-family:'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
            font-size: 28px;
            color: #261b36;
            font-weight: 700;
            letter-spacing: -0.5px;
        }

        .header-links {
            display: flex;
            gap: 25px;
        }

        .header-links a {
            color: #4a90e2;
            text-decoration: none;
            font-weight: 600;
            padding: 10px 20px;
            border-radius: 12px;
            transition: all 0.3s ease;
            background: rgba(74, 144, 226, 0.1);
        }

        .header-links a:hover {
            background: rgba(74, 144, 226, 0.15);
            transform: translateY(-1px);
        }

        .header-links a.help {
  color: #8b0000; /* dark red text */
  background: rgba(255, 167, 184, 0.364); /* light red background */
}

.header-links a.help:hover {
  background: rgba(255, 160, 179, 0.551); /* darker red background */
  transform: translateY(-1px);
}

        /* Search Bar */
        .search-container {
            position: fixed;
            top: 80px;
            left: 370px;
            z-index: 1000;
        }

        .container {
            display: flex;
            height: 100vh;
            padding-top: 70px;
        }

        /* Left Control Panel - Glass effect */
        .control-panel {
            width: 350px;
            background: rgba(255, 255, 255, 0.05);
            backdrop-filter: blur(15px);
            -webkit-backdrop-filter: blur(5px);
            border-right: 1px solid rgba(255, 255, 255, 0.2);
            display: flex;
            flex-direction: column;
            overflow-y: auto;
            box-shadow: 4px 0 20px rgba(0, 0, 0, 0.06);
            z-index: 1000;
        }

        .panel-section {
            padding: 20px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.3);
        }

        .panel-section h3 {
            margin-bottom: 15px;
            color: #2c3e50;
            font-size: 16px;
            font-weight: 600;
        }

        /* Visualization Mode - Toggle style with rounded corners */
        .mode-selector {
            display: flex;
            background: rgba(74, 144, 226, 0.1);
            border-radius: 20px;
            padding: 4px;
            margin-bottom: 15px;
            border: 1px solid rgba(74, 144, 226, 0.2);
        }

        .mode-btn {
            flex: 1;
            padding: 12px 16px;
            border: none;
            background: transparent;
            border-radius: 16px;
            cursor: pointer;
            transition: all 0.3s ease;
            text-align: center;
            font-weight: 600;
            color: #4a90e2;
            font-size: 14px;
        }

        .mode-btn.active {
            background: rgba(255, 255, 255, 0.9);
            color: #2c3e50;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            transform: translateY(-1px);
        }

        .mode-btn:hover:not(.active) {
            background: rgba(255, 255, 255, 0.5);
        }

        /* Category Management - Different style from mode buttons */
        .category-controls {
            display: flex;
            gap: 12px;
            margin-bottom: 15px;
        }

        .btn {
            padding: 10px 18px;
            border: none;
            border-radius: 10px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 600;
            transition: all 0.3s ease;
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
        }

        .btn-primary {
            background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
            color: white;
            box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
        }

        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(74, 144, 226, 0.4);
        }

        .btn-secondary {
            background: linear-gradient(135deg, #8e9aaf 0%, #6c7b8a 100%);
            color: white;
            box-shadow: 0 4px 12px rgba(142, 154, 175, 0.3);
        }

        .btn-secondary:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(142, 154, 175, 0.4);
        }

        .btn-success {
            background: linear-gradient(135deg, #48c78e 0%, #3aa76d 100%);
            color: white;
            box-shadow: 0 4px 12px rgba(72, 199, 142, 0.3);
        }

        .btn-success:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(72, 199, 142, 0.4);
        }

        .btn-danger {
            background: linear-gradient(135deg, #e17055 0%, #d63031 100%);
            color: white;
            box-shadow: 0 4px 12px rgba(225, 112, 85, 0.3);
        }

        .btn-danger:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(225, 112, 85, 0.4);
        }

        /* Selected Items */
        .selected-items {
            max-height: 300px;
            overflow-y: auto;
        }

        .selected-item {
            display: flex;
            align-items: center;
            padding: 12px;
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 10px;
            margin-bottom: 10px;
            background: rgba(255, 255, 255, 0.2);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
        }

        .selected-item input[type="checkbox"] {
            margin-right: 12px;
        }

        .item-name {
            flex: 1;
            font-weight: 600;
            color: #1a1a1a;
            text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
        }

        .weight-selector {
            padding: 6px 10px;
            border: 1px solid rgba(255, 255, 255, 0.4);
            border-radius: 8px;
            margin-left: 10px;
            background: rgba(255, 255, 255, 0.3);
            backdrop-filter: blur(15px);
            color: #1a1a1a;
        }

        /* Map Container */
        .map-container {
            position: absolute;
            top: 70px; /* header height */
            left: 0;
            right: 0;
            bottom: 0;
            z-index: 1;
        }
        

        #map {
            width: 150%;
            height: 100%;
        }

        /* Opacity Control - Slimmer and wider */
        .opacity-control {
            position: absolute;
            bottom: 140px;
            right: 30px;
            background: rgba(255, 255, 255, 0.05);
            backdrop-filter: blur(15px);
            -webkit-backdrop-filter: blur(15px);
            padding: 12px 20px;
            border-radius: 12px;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.3);
            z-index: 1000;
            min-width: 250px;
        }

        .opacity-control h4 {
            margin-bottom: 8px;
            font-size: 13px;
            color: #2c3e50;
            font-weight: 600;
        }

        .opacity-slider {
            width: 100%;
            margin-bottom: 8px;
            height: 6px;
            border-radius: 3px;
            background: rgba(74, 144, 226, 0.2);
        }

        .opacity-value {
            font-size: 0px;   
        }

        /* Legend - Slimmer and wider */
        .legend {
            position: absolute;
            bottom: 30px;
            right: 30px;
            background: rgba(255, 255, 255, 0.05);
            backdrop-filter: blur(15px);
            -webkit-backdrop-filter: blur(15px);
            padding: 12px 20px;
            border-radius: 12px;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.3);
            z-index: 1000;
            min-width: 250px;
        }

        .legend h4 {
            margin-bottom: 8px;
            font-size: 13px;
            color: #2c3e50;
            font-weight: 600;
        }

        .legend-gradient {
            height: 12px;
            width: 100%;
            background: linear-gradient(to right, #440154, #31688e, #35b779, #fde725);
            border-radius: 6px;
            margin-bottom: 8px;
        }

        .legend-labels {
            display: flex;
            justify-content: space-between;
            font-size: 11px;
            color: #5a6c7d;
            font-weight: 500;
        }

        /* Modal Styles */
        .modal {
            display: none;
            position: fixed;
            z-index: 2000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.4);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
        }

        .modal-content {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            margin: 5% auto;
            padding: 20px;
            border-radius: 16px;
            width: 80%;
            max-width: 600px;
            max-height: 80%;
            overflow-y: auto;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
            border: 1px solid rgba(255, 255, 255, 0.3);
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.3);
        }

        .close {
            font-size: 24px;
            font-weight: bold;
            cursor: pointer;
            color: #8e9aaf;
            transition: color 0.3s ease;
        }

        .close:hover {
            color: #2c3e50;
        }

        .category-list {
            max-height: 300px;
            overflow-y: auto;
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 10px;
            margin-bottom: 15px;
            background: rgba(255, 255, 255, 0.5);
        }

        .category-item {
            padding: 12px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.3);
            cursor: pointer;
            display: flex;
            align-items: center;
            transition: background 0.3s ease;
        }

        .category-item:hover {
            background: rgba(74, 144, 226, 0.1);
        }

        .category-item input[type="checkbox"] {
            margin-right: 12px;
        }

        .category-item:last-child {
            border-bottom: none;
        }

        /* Loading indicator */
        .loading {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            z-index: 1500;
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(15px);
            -webkit-backdrop-filter: blur(15px);
            padding: 25px;
            border-radius: 16px;
            text-align: center;
            display: none;
            box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.3);
        }

        .spinner {
            border: 3px solid rgba(74, 144, 226, 0.2);
            border-top: 3px solid #4a90e2;
            border-radius: 50%;
            width: 30px;
            height: 30px;
            animation: spin 1s linear infinite;
            margin: 0 auto 10px;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
/* Mobile Responsive */
@media (max-width: 768px) {
    .header {
        height: 60px;
        padding: 0 15px;
        flex-wrap: wrap;
    }
    
    .header h1 {
        font-size: 20px;
        flex: none;
        width: 100%;
        margin-bottom: 8px;
    }
    
    .header-links {
        gap: 15px;
        width: 100%;
        justify-content: center;
    }
    
    .header-links a {
        padding: 6px 12px;
        font-size: 12px;
        border-radius: 8px;
    }
    
    .search-container {
        top: 65px;
        left: 15px;
        right: 15px;
        width: auto;
        position: relative;
        z-index: 999;
    }
    
    .container {
        flex-direction: column;
        padding-top: 65px;
        height: calc(100vh - 65px);
    }
    
    .control-panel {
        width: 100%;
        height: auto;
        max-height: 45vh;
        min-height: 300px;
        position: relative;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        overflow-y: auto;
        z-index: 998;
    }
    
    .panel-section {
        padding: 15px;
    }
    
    .panel-section h3 {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .mode-selector {
        margin-bottom: 12px;
        padding: 3px;
    }
    
    .mode-btn {
        padding: 8px 12px;
        font-size: 12px;
        border-radius: 12px;
    }
    
    .category-controls {
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 12px;
    }
    
    .btn {
        padding: 8px 14px;
        font-size: 12px;
        border-radius: 8px;
        flex: 1;
        min-width: calc(50% - 4px);
    }
    
    .selected-items {
        max-height: 200px;
    }
    
    .selected-item {
        padding: 10px;
        margin-bottom: 8px;
        border-radius: 8px;
    }
    
    .item-name {
        font-size: 14px;
    }
    
    .weight-selector {
        padding: 4px 8px;
        font-size: 12px;
        margin-left: 8px;
    }
    
    .map-container {
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        height: 55vh;
        position: relative;
        z-index: 1;
    }
    
    #map {
        width: 100%;
        height: 150%;
    }
    
    .opacity-control {
        bottom: 80px;
        right: 10px;
        left: 10px;
        width: auto;
        min-width: auto;
        padding: 10px 15px;
    }
    
    .opacity-control h4 {
        font-size: 12px;
        margin-bottom: 6px;
    }
    
    .opacity-slider {
        height: 5px;
        margin-bottom: 6px;
    }
    
    .legend {
        bottom: 15px;
        right: 10px;
        left: 10px;
        width: auto;
        min-width: auto;
        padding: 10px 15px;
    }
    
    .legend h4 {
        font-size: 12px;
        margin-bottom: 6px;
    }
    
    .legend-gradient {
        height: 10px;
        margin-bottom: 6px;
    }
    
    .legend-labels {
        font-size: 10px;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 90%;
        max-width: none;
        padding: 20px;
        border-radius: 12px;
        max-height: 70vh;
    }
    
    .modal-header {
        margin-bottom: 15px;
        padding-bottom: 12px;
    }
    
    .category-list {
        max-height: 200px;
        margin-bottom: 12px;
    }
    
    .category-item {
        padding: 10px;
        font-size: 14px;
    }
    
    .loading {
        padding: 20px;
        border-radius: 12px;
        width: 80%;
        max-width: 280px;
    }
    
    .spinner {
        width: 25px;
        height: 25px;
        border-width: 2px;
        margin-bottom: 8px;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .header {
        height: 55px;
        padding: 0 10px;
    }
    
    .header h1 {
        font-size: 18px;
    }
    
    .header-links a {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .search-container {
        top: 60px;
        left: 10px;
        right: 10px;
    }
    
    .container {
        padding-top: 60px;
        height: calc(100vh - 60px);
    }
    
    .control-panel {
        max-height: 40vh;
        min-height: 280px;
    }
    
    .panel-section {
        padding: 12px;
    }
    
    .btn {
        font-size: 11px;
        padding: 6px 10px;
    }
    
    .map-container {
        height: 60vh;
    }
    
    .opacity-control,
    .legend {
        right: 5px;
        left: 5px;
        padding: 8px 12px;
    }
    
    .modal-content {
        width: 95%;
        padding: 15px;
        margin: 5% auto;
        max-height: 80vh;
    }
}





/* Selected items - Updated styles following reference design language */
        .selected-item {
            display: flex;
            align-items: center;
            padding: 12px;
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 10px;
            margin-bottom: 10px;
            background: rgba(255, 255, 255, 0.2);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            cursor: pointer;
            transition: all 0.3s ease;
            user-select: none;
        }

        .selected-item:hover {
            background: rgba(72, 199, 142, 0.15);
            border-color: rgba(72, 199, 142, 0.4);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(72, 199, 142, 0.2);
        }

        .selected-item.selected {
            background: linear-gradient(135deg, #48c78e 0%, #3aa76d 100%);
            color: white;
            border-color: rgba(72, 199, 142, 0.6);
            box-shadow: 0 4px 12px rgba(72, 199, 142, 0.3);
            transform: translateY(-1px);
        }

        .selected-item.selected .item-name {
            color: white;
            font-weight: 600;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
        }

        .item-name {
            flex: 1;
            font-weight: 600;
            color: #1a1a1a;
            text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
        }

        .weight-selector {
            padding: 6px 10px;
            border: 1px solid rgba(255, 255, 255, 0.4);
            border-radius: 8px;
            margin-left: 10px;
            background: rgba(255, 255, 255, 0.3);
            backdrop-filter: blur(15px);
            color: #1a1a1a;
            cursor: pointer;
            font-size: 12px;
            transition: all 0.3s ease;
        }

        .weight-selector:hover {
            background: rgba(255, 255, 255, 0.5);
            border-color: rgba(255, 255, 255, 0.6);
        }

        .selected-item.selected .weight-selector {
            background: rgba(255, 255, 255, 0.9);
            color: #1a1a1a;
            border-color: rgba(255, 255, 255, 0.7);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        .selected-item.selected .weight-selector:hover {
            background: rgba(255, 255, 255, 1);
            transform: translateY(-1px);
            box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
        }

        /* Additional green accent for consistency with design language */
        .selected-item.selected:hover {
            background: linear-gradient(135deg, #3aa76d 0%, #2d8a5a 100%);
            box-shadow: 0 6px 16px rgba(72, 199, 142, 0.4);
        }

        /* Group Modal Category Items - Green theme consistency */
        .category-item {
            padding: 12px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.3);
            cursor: pointer;
            display: flex;
            align-items: center;
            transition: all 0.3s ease;
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
        }

        .category-item:hover {
            background: rgba(72, 199, 142, 0.15);
            transform: translateY(-1px);
        }

        .category-item.selected,
        .category-item:has(input[type="checkbox"]:checked) {
            background: linear-gradient(135deg, #48c78e 0%, #3aa76d 100%);
            color: white;
            box-shadow: 0 2px 8px rgba(72, 199, 142, 0.2);
        }

        .category-item.selected:hover,
        .category-item:has(input[type="checkbox"]:checked):hover {
            background: linear-gradient(135deg, #3aa76d 0%, #2d8a5a 100%);
            box-shadow: 0 4px 12px rgba(72, 199, 142, 0.3);
        }

        .category-item input[type="checkbox"] {
            margin-right: 12px;
            accent-color: #48c78e;
        }

        /* Category modal items consistency - also button-like */
        #categoryModal .category-item {
            padding: 12px;
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 10px;
            margin-bottom: 8px;
            cursor: pointer;
            display: flex;
            align-items: center;
            transition: all 0.3s ease;
            background: rgba(255, 255, 255, 0.2);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            user-select: none;
            font-weight: 600;
            color: #1a1a1a;
            text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
        }

        #categoryModal .category-item:hover {
            background: rgba(72, 199, 142, 0.15);
            border-color: rgba(72, 199, 142, 0.4);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(72, 199, 142, 0.2);
        }

        #categoryModal .category-item.selected {
            background: linear-gradient(135deg, #48c78e 0%, #3aa76d 100%);
            color: white;
            border-color: rgba(72, 199, 142, 0.6);
            box-shadow: 0 4px 12px rgba(72, 199, 142, 0.3);
            transform: translateY(-1px);
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
        }

        #categoryModal .category-item.selected:hover {
            background: linear-gradient(135deg, #3aa76d 0%, #2d8a5a 100%);
            box-shadow: 0 6px 16px rgba(72, 199, 142, 0.4);
        }

        /* Hide checkboxes in category modal too */
        #categoryModal .category-item input[type="checkbox"] {
            display: none;
        }
