body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 10px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Toggle moved to own line */
.theme-switch-row {
    display: block;
    width: 100%;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.theme-switch-container {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    font-weight: bold;
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
}

.theme-switch input { display: none; }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px; width: 16px;
    left: 3px; bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider { background-color: green; }
input:checked + .slider:before { transform: translateX(22px); }

.search-section { display: flex; gap: 20px; margin-bottom: 20px; }
.form-group { flex: 1; display: flex; flex-direction: column; }
.row { display: flex; gap: 10px; }
.col { flex: 1; }

label { font-size: 0.85rem; font-weight: bold; margin-top: 10px; color: #444; }
input, select { 
    width: 100%; 
    padding: 10px; 
    margin-top: 4px; 
    border: 1px solid #ccc; 
    border-radius: 4px; 
    box-sizing: border-box; 
    font-size: 16px;
}

.btn-primary { background-color: green; color: white; border: none; padding: 14px; margin-top: 15px; border-radius: 4px; cursor: pointer; font-weight: bold; }
.btn-secondary { background-color: transparent; color: red; border: 1px solid red; padding: 8px; margin-top: 8px; border-radius: 4px; cursor: pointer; }

.map { height: 500px; width: 100%; border-radius: 8px; border: 1px solid #ddd; margin-top: 10px; }

/* Popup Styles */
.popup-title { font-weight: bold; display: block; margin-bottom: 3px; }
.popup-desc { font-size: 0.85rem; color: #666; display: block; }

/* Dark Mode Overrides */
body.dark-theme { background-color: #121212; color: #e0e0e0; }
.dark-theme .container { background-color: #1e1e1e; border: 1px solid #333; }
.dark-theme .theme-switch-row { border-color: #333; }
.dark-theme label { color: #bbb; }
.dark-theme input, .dark-theme select { background-color: #2c2c2c; border-color: #444; color: white; }
.dark-theme .leaflet-tile-pane { filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%) !important; }
.dark-theme .leaflet-marker-icon, .dark-theme .leaflet-popup-content-wrapper { filter: invert(100%) hue-rotate(180deg) !important; }
.dark-theme .popup-desc { color: #bbb; }

@media (max-width: 768px) {
    .search-section { flex-direction: column; }
}