* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #7e905c 0%, #5a6b42 100%);
    color: white;
    border-radius: 10px;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 36px;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 18px;
    opacity: 0.9;
}

/* Stats Section */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.stat-number {
    font-size: 48px;
    font-weight: bold;
    color: #7e905c;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Controls Section */
.controls-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.controls-section h2 {
    color: #7e905c;
    margin-bottom: 20px;
    font-size: 24px;
}

.add-location-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.btn {
    padding: 15px 25px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    background: #7e905c;
    color: white;
}

.btn-primary:hover {
    background: #6a7a4e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(126, 144, 92, 0.3);
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background: #d0d0d0;
    transform: translateY(-2px);
}

.btn-secondary.active {
    background: #7e905c;
    color: white;
}

.btn-icon {
    font-size: 20px;
}

/* Search Box */
.search-box {
    margin-top: 20px;
}

.search-box.hidden {
    display: none;
}

#search-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

#search-input:focus {
    outline: none;
    border-color: #7e905c;
}

.search-results {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-top: 10px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.search-results.show {
    display: block;
}

.search-result-item {
    padding: 12px 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: #f5f5f5;
}

.search-result-item:not(:last-child) {
    border-bottom: 1px solid #e0e0e0;
}

/* Map */
#map {
    width: 100%;
    height: 600px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

/* Map Popup Styling – Forced Override */
.mapboxgl-popup .mapboxgl-popup-content {
    padding: 20px !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    min-width: 250px !important;
    background: #fff !important;
}

.mapboxgl-popup .popup-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #7e905c !important;
    margin-bottom: 12px !important;
}

.mapboxgl-popup .popup-info {
    font-size: 14px !important;
    margin: 8px 0 !important;
    color: #333 !important;
}

.mapboxgl-popup .popup-info strong {
    color: #7e905c !important;
}

.mapboxgl-popup .popup-nearby {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #7e905c !important;
    margin-top: 12px !important;
    padding-top: 12px !important;
    border-top: 1px solid #e0e0e0 !important;
}

.mapboxgl-popup .popup-privacy {
    font-size: 12px !important;
    color: #666 !important;
    margin-top: 12px !important;
    padding-top: 12px !important;
    border-top: 1px solid #e0e0e0 !important;
    font-style: italic !important;
}

.mapboxgl-popup-close-button {
    font-size: 18px !important;
    padding: 5px 8px !important;
    color: #4c5a2d !important;
    transition: color 0.2s ease !important;
}

.mapboxgl-popup-close-button:hover {
    color: #7e905c !important;
}

/* Info Section */
.info-section {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.info-section h2 {
    color: #7e905c;
    font-size: 28px;
    margin-bottom: 30px;
    text-align: center;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.info-card {
    text-align: center;
    padding: 20px;
}

.info-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.info-card h3 {
    color: #7e905c;
    font-size: 20px;
    margin-bottom: 10px;
}

.info-card p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal:not(.hidden) {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: #333;
}

.modal-content h2 {
    color: #7e905c;
    margin-bottom: 25px;
    font-size: 24px;
}

/* Form */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #7e905c;
}

.form-group textarea {
    resize: vertical;
}

.privacy-notice {
    background: #fff3cd;
    border: 1px solid #ffecb5;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    font-size: 13px;
    color: #856404;
}

.privacy-notice strong {
    color: #7e905c;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.form-actions .btn {
    flex: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header h1 {
        font-size: 28px;
    }
    
    .subtitle {
        font-size: 16px;
    }
    
    .stat-number {
        font-size: 36px;
    }
    
    .add-location-buttons {
        grid-template-columns: 1fr;
    }
    
    #map {
        height: 400px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        padding: 20px;
    }
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #7e905c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: white;
    padding: 16px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    min-width: 300px;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
    border-left: 4px solid #7e905c;
}

.toast.success {
    border-left-color: #4CAF50;
}

.toast.success .toast-icon {
    color: #4CAF50;
}

.toast.error {
    border-left-color: #f44336;
}

.toast.error .toast-icon {
    color: #f44336;
}

.toast.info {
    border-left-color: #2196F3;
}

.toast.info .toast-icon {
    color: #2196F3;
}

.toast.warning {
    border-left-color: #ff9800;
}

.toast.warning .toast-icon {
    color: #ff9800;
}

.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.toast-message {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.toast-close {
    cursor: pointer;
    color: #999;
    font-size: 20px;
    flex-shrink: 0;
    padding: 0 5px;
    transition: color 0.3s;
}

.toast-close:hover {
    color: #333;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.toast.slide-out {
    animation: slideOut 0.3s ease forwards;
}