<style>
        /* ============================================
           GLOBAL STYLES
           ============================================ */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            height: 100vh;
            overflow: hidden;
        }
        
        /* ============================================
           MAIN LAYOUT
           ============================================ */
        .app-container {
            display: flex;
            flex-direction: column;
            height: 100vh;
        }
        
        /* Top Panel */
        .top-panel {
            background: linear-gradient(135deg, #1a252f, #2c3e50);
            color: white;
            padding: 12px 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            z-index: 10;
        }
        
        .title-section h1 {
            font-size: 1.3rem;
            margin-bottom: 4px;
        }
        
        .title-section p {
            font-size: 0.75rem;
            opacity: 0.9;
        }
        
        .controls-section {
            display: flex;
            gap: 15px;
            align-items: center;
        }
        
        .control-btn {
            background: rgba(255,255,255,0.2);
            border: none;
            color: white;
            padding: 6px 12px;
            border-radius: 5px;
            cursor: pointer;
            transition: all 0.3s;
            font-size: 0.85rem;
        }
        
        .control-btn:hover {
            background: rgba(255,255,255,0.3);
            transform: translateY(-1px);
        }
        
        .coord-display {
            background: rgba(0,0,0,0.5);
            padding: 5px 12px;
            border-radius: 5px;
            font-family: monospace;
            font-size: 0.8rem;
        }
        
        /* Left Panel */
        .main-content {
            display: flex;
            flex: 1;
            overflow: hidden;
        }
        
        .left-panel {
            width: 350px;
            background: rgba(255,255,255,0.98);
            border-right: 1px solid #ddd;
            overflow-y: auto;
            box-shadow: 2px 0 10px rgba(0,0,0,0.05);
            z-index: 5;
        }
        
        /* Collapsible Menu Styles */
        .collapsible-menu {
            border-bottom: 1px solid #e0e0e0;
        }
        
        .menu-header {
            background: #f8f9fa;
            padding: 15px 20px;
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
            transition: background 0.3s;
            user-select: none;
        }
        
        .menu-header:hover {
            background: #e9ecef;
        }
        
        .menu-header h3 {
            margin: 0;
            font-size: 1rem;
            color: #2c3e50;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .menu-arrow {
            transition: transform 0.3s;
            font-size: 0.8rem;
            color: #7f8c8d;
        }
        
        .menu-arrow.rotated {
            transform: rotate(90deg);
        }
        
        .menu-content {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease-out;
            background: white;
        }
        
        .menu-content.active {
            max-height: 1500px;
            transition: max-height 0.5s ease-in;
        }
        
        .panel-section {
            padding: 20px;
        }
        
        /* Form Elements */
        .form-group {
            margin-bottom: 15px;
        }
        
        .form-group label {
            display: block;
            margin-bottom: 6px;
            font-weight: 500;
            color: #2c3e50;
            font-size: 0.85rem;
        }
        
        .form-group select,
        .form-group input {
            width: 100%;
            padding: 8px 10px;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 0.85rem;
            font-family: inherit;
        }
        
        .coord-input-group {
            display: flex;
            gap: 10px;
        }
        
        .coord-input-group input {
            flex: 1;
        }
        
        .vs30-group {
            display: flex;
            gap: 10px;
            align-items: center;
        }
        
        .vs30-group select {
            flex: 2;
        }
        
        .vs30-group input {
            flex: 1;
        }
        
        /* Buttons */
        .action-btn {
            background: #3498db;
            color: white;
            border: none;
            padding: 10px;
            border-radius: 5px;
            cursor: pointer;
            width: 100%;
            font-size: 0.85rem;
            margin-top: 10px;
            transition: background 0.3s;
        }
        
        .action-btn:hover {
            background: #2980b9;
        }
        
        .action-btn.danger {
            background: #e74c3c;
        }
        
        .action-btn.danger:hover {
            background: #c0392b;
        }
        
        .action-btn.success {
            background: #27ae60;
        }
        
        .action-btn.success:hover {
            background: #229954;
        }
        
        .action-btn.warning {
            background: #e67e22;
        }
        
        .action-btn.warning:hover {
            background: #d35400;
        }
        
        .action-btn.info {
            background: #9b59b6;
        }
        
        .action-btn.info:hover {
            background: #8e44ad;
        }
        
        /* Info Boxes */
        .info-box {
            background: #e8f4f8;
            padding: 10px;
            border-radius: 5px;
            font-size: 0.8rem;
            margin-top: 10px;
        }
        
        .warning-box {
            background: #fff3cd;
            border-left: 4px solid #ffc107;
            padding: 10px;
            border-radius: 5px;
            font-size: 0.8rem;
            margin-top: 10px;
        }
        
        .distance-result {
            background: #2c3e50;
            color: white;
            padding: 12px;
            border-radius: 5px;
            margin-top: 10px;
            text-align: center;
        }
        
        .distance-result h4 {
            font-size: 0.8rem;
            margin-bottom: 5px;
            opacity: 0.9;
        }
        
        .distance-value {
            font-size: 1.8rem;
            font-weight: bold;
        }
        
        .stats {
            background: #f8f9fa;
            padding: 10px;
            border-radius: 5px;
            font-size: 0.8rem;
        }
        
        /* Legend */
        .legend {
            display: flex;
            flex-direction: column;
            gap: 8px;
            margin-top: 10px;
        }
        
        .legend-item {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 0.8rem;
        }
        
        .legend-color {
            width: 25px;
            height: 3px;
        }
        
        .legend-marker {
            width: 20px;
            height: 20px;
            border-radius: 50%;
        }
        
        /* Map */
        .map-container {
            flex: 1;
            position: relative;
        }
        
        #map {
            height: 100%;
            width: 100%;
        }
        
        /* Scrollbar */
        .left-panel::-webkit-scrollbar {
            width: 6px;
        }
        
        .left-panel::-webkit-scrollbar-track {
            background: #f1f1f1;
        }
        
        .left-panel::-webkit-scrollbar-thumb {
            background: #888;
            border-radius: 3px;
        }
        
        /* Status Badge */
        .status-badge {
            display: inline-block;
            padding: 2px 8px;
            border-radius: 12px;
            font-size: 0.7rem;
            font-weight: bold;
            margin-left: 8px;
        }
        
        .status-implemented {
            background: #27ae60;
            color: white;
        }
        
        .status-pending {
            background: #e67e22;
            color: white;
        }
        
        /* GMPE Applicability Box */
        .applicability-warning {
            background: #fff3cd;
            border-left: 4px solid #ffc107;
        }
        
        .applicability-error {
            background: #f8d7da;
            border-left: 4px solid #dc3545;
        }
        
        .applicability-info {
            background: #d1ecf1;
            border-left: 4px solid #17a2b8;
        }
        
        /* Loading Spinner */
        .loader {
            display: none;
            margin-top: 10px;
            padding: 8px;
            background: #f0f0f0;
            border-radius: 5px;
            text-align: center;
        }
        
        /* Earthquake Quick Info */
        .eq-quick-info {
            background: #f8f9fa;
            padding: 10px;
            border-radius: 5px;
            margin-bottom: 15px;
            border-left: 4px solid #e74c3c;
            display: none;
        }
        
        /* Custom popup styling */
        .leaflet-popup-content-wrapper {
            border-radius: 8px;
            box-shadow: 0 3px 14px rgba(0,0,0,0.2);
            padding: 0;
        }
        
        .leaflet-popup-content {
            margin: 12px;
            min-width: 280px;
        }
        
        /* Distance details */
        .distance-details {
            font-size: 0.7rem;
            margin-top: 8px;
            padding-top: 8px;
            border-top: 1px solid rgba(255,255,255,0.2);
            text-align: left;
        }
        
        .distance-details span {
            display: inline-block;
            margin-right: 10px;
        }
    </style>