* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    font-size: 14px;
}

#map {
    height: 100vh;
    width: 100vw;
    z-index: 1;
}

.glass {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

.glass-dark {
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.25);
}

.search-input {
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(55, 65, 81, 0.25);
    color: #1f2937 !important;
}

.search-input:focus {
    background: rgba(255, 255, 255, 0.45);
    border-color: rgba(59, 130, 246, 0.7);
    outline: none;
}

.search-input::placeholder {
    color: rgba(55, 65, 81, 0.85) !important;
}

.glass-btn {
    background: rgba(59, 130, 246, 0.8);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.glass-btn:hover {
    background: rgba(59, 130, 246, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.leaflet-control-zoom {
    border: none !important;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.leaflet-control-zoom.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.leaflet-control-zoom a {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

#search-results {
    max-height: 200px;
    overflow-y: auto;
}

#search-results::-webkit-scrollbar {
    width: 4px;
}

#search-results::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

#search-results::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.search-result-item {
    transition: all 0.2s ease;
    padding: 8px 12px;
    color: #ffffff;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

.dock-container {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dock {
    display: flex;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.dock-item {
    position: relative;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: bottom center;
}

.dock-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dock-icon svg {
    width: 22px;
    height: 22px;
}

.dock-item:hover .dock-icon {
    transform: translateY(-12px) scale(1.25);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.dock-item:active .dock-icon {
    transform: translateY(-8px) scale(1.15);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.dock-item::after {
    content: attr(data-label);
    position: absolute;
    bottom: 54px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.2s ease;
    pointer-events: none;
}

.dock-item:hover::after {
    opacity: 1;
}

.dock-indicator {
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    background: white;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.dock-item.active .dock-indicator {
    opacity: 1;
}

.opacity-100 {
    opacity: 1;
}

.visible {
    visibility: visible;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.dock-item:active {
    animation: bounce 0.25s ease;
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.3), 0 4px 12px rgba(0, 0, 0, 0.15);
    }
}

/* Tab Styles */
.tab-active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.tab-content.hidden {
    display: none;
}

.dock-item.active .dock-icon {
    animation: glow 2s ease-in-out infinite;
}

/* Reset Leaflet divIcon default styles */
.segment-label, .area-label {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

/* Sidebar styles */
#sidebar-menu, #layer-sidebar {
    padding: 14px;
    max-height: 85vh;
    overflow-y: auto;
}

/* Popup info */
#popup-info {
    padding: 14px;
}

/* Modal About */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    padding: 24px;
    max-width: 340px;
    width: 90%;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    transform: translateY(30px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Foto Modal Specific */
#foto-modal .modal-content {
    max-width: 800px !important;
    width: 95vw !important;
    max-height: 90vh;
    overflow-y: auto;
}

@media (max-width: 768px) {
    #foto-modal .modal-content {
        max-width: 95vw !important;
        padding: 16px;
    }
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

/* Database Modal Input Styles */
#db-search {
    background: rgba(30, 41, 59, 0.6) !important;
    border-color: rgba(148, 163, 184, 0.4) !important;
    color: #f9fafb !important;
}

#db-search::placeholder {
    color: rgba(156, 163, 175, 0.8);
}

#db-filter-komoditi {
    background: rgba(30, 41, 59, 0.6) !important;
    border-color: rgba(148, 163, 184, 0.4) !important;
    color: #f9fafb !important;
}

/* Grey Glassmorphism Theme for ALL Modals */
.modal-content, .modal-content-database {
    background: linear-gradient(135deg, rgba(71, 85, 105, 0.8) 0%, rgba(30, 41, 59, 0.85) 100%);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(148, 163, 184, 0.3);
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.8);
}

/* Modal Headers & Titles */
.modal-content h2, .modal-content-database h2 {
    color: #f9fafb;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.modal-content h3 {
    color: #f3f4f6;
}

.modal-content p {
    color: rgba(249, 250, 251, 0.9);
}

/* Database Modal Specific Styles */
.modal-content-database table {
    color: #e5e7eb;
}

.modal-content-database thead {
    background: rgba(51, 65, 85, 0.7) !important;
}

.modal-content-database thead th {
    color: #f9fafb;
    font-weight: 700;
}

.modal-content-database tbody tr {
    border-bottom: 1px solid rgba(148, 163, 184, 0.2) !important;
}

.modal-content-database tbody tr:hover {
    background: rgba(75, 85, 99, 0.4) !important;
}

/* Form Labels & Inputs */
.modal-content label.text-green-200 {
    color: #e5e7eb !important;
}

.modal-content input, 
.modal-content select, 
.modal-content textarea {
    background: rgba(30, 41, 59, 0.6) !important;
    border-color: rgba(148, 163, 184, 0.4) !important;
    color: #f9fafb !important;
}

.modal-content input::placeholder,
.modal-content textarea::placeholder {
    color: rgba(156, 163, 175, 0.8) !important;
}

/*/* Measurement markers */
.measurement-marker {
    cursor: grab;
}
.measurement-marker-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background-color: #ef4444;
    border: 3px solid #fff;
    border-radius: 50%;
    transition: all 0.2s ease;
}
.measurement-marker-icon.hover {
    background-color: #22c55e;
    border-color: #fff;
    width: 24px;
    height: 24px;
}
.measurement-marker-icon.hover::after {
    content: '+';
    color: white;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
}
.measurement-marker-icon.dragging {
    cursor: grabbing;
    background-color: #f59e0b;
}

/* Custom scale ratio control styling */
.scale-ratio-control {
    color: white;
    font-size: 13px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    margin-bottom: 100px;
    margin-right: 15px;
    padding: 2px 6px;
}

/* Modal content styles with dark glassmorphism */
.modal-content h2 {
    font-size: 18px;
    margin-bottom: 12px;
    color: white;
}

.modal-content h3 {
    font-size: 16px;
    color: white;
}

.modal-content p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

/* Custom Alert Icons & Colors */
.custom-alert-info .custom-alert-icon svg { color: #60a5fa !important; }
.custom-alert-success .custom-alert-icon svg { color: #34d399 !important; }
.custom-alert-warning .custom-alert-icon svg { color: #fbbf24 !important; }
.custom-alert-error .custom-alert-icon svg { color: #f87171 !important; }

#custom-alert-icon {
    transition: transform 0.3s ease;
}

#custom-alert-close:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#custom-alert-close:active {
    transform: translateY(1px);
}

/* Splash Screen */
#splash-screen {
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.splash-slide {
    z-index: -1;
}

.splash-slide.opacity-100 {
    z-index: 1;
}

/* Ken Burns Animation */
@keyframes kenBurns {
    0% {
        transform: scale(1) translate(0, 0);
    }
    100% {
        transform: scale(1.1) translate(1%, 1%);
    }
}

/* Hidden class */
.hidden {
    display: none !important;
}


