/* assets/css/style.css */
:root {
    --bg-dark: #0f172a;
    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --danger: #ef4444;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow: hidden; /* App-like feel */
}

/* UI Overlay Layer */
.ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Let clicks pass through to map */
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
}

.header-glass {
    pointer-events: auto;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.header-glass h1 {
    font-size: 1.2rem;
    font-weight: 700;
}

.header-glass span {
    color: var(--primary);
}

.menu-container {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 40px;
    left: 0;
    list-style: none;
    padding: 10px 0;
    margin: 0;
    border-radius: 12px;
    min-width: 200px;
    display: none;
    flex-direction: column;
    z-index: 3000;
}

.dropdown-menu.active {
    display: flex;
    animation: popIn 0.2s ease;
}

.dropdown-menu li a {
    color: var(--text-main);
    text-decoration: none;
    padding: 10px 20px;
    display: block;
    font-weight: 500;
    transition: background 0.2s;
}

.dropdown-menu li a:hover {
    background: rgba(255,255,255,0.1);
}

.weather-widget {
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-primary {
    pointer-events: auto;
    background: var(--danger);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    align-self: center;
    margin-bottom: 20px;
}

.btn-primary:active {
    transform: scale(0.95);
}

/* Modal */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: flex-end; /* Bottom sheet on mobile */
    pointer-events: none; /* Let clicks pass through to the map */
}

.modal-backdrop.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content.glass-panel {
    pointer-events: auto; /* Re-enable clicks for the modal itself */
    background: rgba(30, 41, 59, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-width: 500px;
    padding: 30px 25px;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.3);
    position: relative;
    transform: translateY(100%);
    animation: slideUp 0.3s ease forwards;
}

@media (min-width: 600px) {
    .modal-backdrop {
        align-items: center;
    }
    .modal-content.glass-panel {
        border-radius: 24px;
        transform: translateY(20px);
        animation: popIn 0.3s ease forwards;
    }
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.form-group {
    margin-top: 20px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.odor-types {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.type-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.2s;
    font-weight: 500;
}

.type-btn.active {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-submit {
    width: 100%;
    margin-top: 30px;
    background: var(--primary);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

input[type=range] {
    width: 100%;
    accent-color: #f59e0b;
}

.intensity-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 5px;
}

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes popIn { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
