:root {
    --bg-dark: #0f172a;
    --accent: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.6);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(15, 23, 42, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-dark);
    overflow: hidden;
    display: block;
    touch-action: manipulation; /* Prevents double-tap zooming */
    overscroll-behavior: none; /* Stops pull-to-refresh on mobile */
}

#map {
    width: 100vw;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

/* Sidebar Layout */
.sidebar {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 320px;
    min-width: 320px;
    height: auto;
    max-height: calc(100vh - 40px);
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    padding: 25px 20px;
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    overflow: hidden;
    transition: transform 0.3s ease, max-height 0.3s ease;
    transform: translateZ(0);
    will-change: transform, max-height;
}

.sidebar-header {
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.sidebar-header h1 {
    font-weight: 800;
    font-size: 2.2rem;
    background: linear-gradient(135deg, #fff, var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 5px;
}

.sidebar-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.3;
}

.sidebar-nav {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
    max-height: 520px;
    opacity: 1;
    transition: all 0.3s ease;
    padding: 10px;
    margin-left: -10px;
    margin-right: -10px;
    margin-bottom: -10px;
}

.sidebar.collapsed .sidebar-nav {
    max-height: 0;
    margin-top: 0;
    opacity: 0;
    pointer-events: none;
}

.toggle-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.3s;
    padding: 10px 0;
    width: 100%;
    background: transparent;
    border: none;
}

.toggle-container:hover {
    color: var(--text-main);
}

.toggle-container .line {
    flex: 1;
    height: 1px;
    background: var(--glass-border);
    transition: background 0.3s;
}

.toggle-container:hover .line {
    background: rgba(255, 255, 255, 0.2);
}

.chevron {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.sidebar.collapsed .chevron {
    transform: rotate(0deg);
}

.sidebar:not(.collapsed) .chevron {
    transform: rotate(180deg);
}

.sidebar-nav h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text-main);
}

.glow-button {
    background: var(--accent);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px var(--accent-glow);
    pointer-events: auto;
    width: max-content;
}

.glow-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 0 25px var(--accent-glow);
}

.glow-button:disabled {
    background: #334155;
    box-shadow: none;
    cursor: not-allowed;
    color: #64748b;
}

.w-full {
    width: 100%;
}

/* Modals */
.modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s;
    transform: translateZ(0);
    will-change: opacity, visibility;
}

.modal.hidden,
#login-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    position: relative;
    transform: translateY(0) translateZ(0);
    transition: transform 0.3s ease;
    will-change: transform;
}

.modal.hidden .glass-panel {
    transform: translateY(30px) translateZ(0);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: white;
}

.glass-panel h2 {
    font-weight: 600;
    margin-bottom: 5px;
}

.subtitle {
    color: var(--accent);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    padding: 12px;
    border-radius: 8px;
    color: white;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 480px;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 1;
    visibility: visible;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cookie-banner.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 60px);
    pointer-events: none;
}

.cookie-banner h3 {
    margin-bottom: 2px;
    font-size: 1.15rem;
}

.cookie-banner p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 10px;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    width: 100%;
}

.cookie-btn-accept {
    flex: 2;
    padding: 12px;
    font-size: 0.95rem;
    width: auto;
    text-align: center;
}

.cookie-btn-decline {
    flex: 1;
    padding: 12px;
    font-size: 0.95rem;
    width: auto;
    text-align: center;
    background: rgba(255, 255, 255, 0.08);color: var(--text-muted);
}
.cookie-btn-decline:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

@media (max-width: 480px) {
    .cookie-buttons {
        flex-direction: column;
    }
}

.filter-select {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    color: white;
    font-size: 0.95rem;
    cursor: pointer;
    appearance: none;
    outline: none;
    font-family: inherit;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2214%22%20height%3D%228%22%20viewBox%3D%220%200%2014%208%22%3E%3Cpath%20fill%3D%22none%22%20stroke%3D%22%23ccc%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20d%3D%22M1%201l6%206%206-6%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px;
    transition: all 0.3s;
}

.filter-select:focus,
.filter-select:hover {
    border-color: var(--accent);
}

.filter-select option {
    background: #0f172a;
    color: white;
}



/* Custom Marker */
.custom-marker {
    background: var(--accent);
    border: 2px solid white;
    border-radius: 50%;
    position: relative;
    /* Force Hardware Acceleration for panning/zooming */
    transform: translateZ(0); 
    will-change: transform;
}

.custom-marker::after {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    border-radius: 50%;
    background: var(--accent-glow);
    z-index: -1;
    animation: pulse-hardware 2s infinite;
    pointer-events: none;
}

@keyframes pulse-hardware {
    0% {
        transform: scale(0.9);
        opacity: 1;
    }
    70% {
        transform: scale(2.2);
        opacity: 0;
    }
    100% {
        transform: scale(0.9);
        opacity: 0;
    }
}

.temp-marker {
    background: #eab308;
    pointer-events: none !important;
}

.temp-marker::after {
    background: rgba(234, 179, 8, 0.6);
}

.view-panel {
    max-width: 480px;
    width: 95%;
    max-height: 95vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.view-panel h2 {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.view-badges-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 5px;
}

.view-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.badge-env {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.badge-lowered {
    background: rgba(234, 179, 8, 0.2);
    color: #facc15;
    border: 1px solid rgba(234, 179, 8, 0.4);
}

.badge-approved {
    background: linear-gradient(135deg, #f59e0b, #b45309);
    color: white;
    border: 1px solid #fbbf24;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.5);
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    padding: 3px 12px;
}

body.light-mode .badge-env {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

body.light-mode .badge-lowered {
    background: rgba(234, 179, 8, 0.1);
    color: #ca8a04;
}

body.light-mode .badge-approved {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-color: #d97706;
    color: white;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.star-rating {
    display: flex;
    gap: 3px;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--glass-border);
}

.star-rating span {
    transition: all 0.2s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.star-rating span:hover {
    transform: scale(1.1);
}

body.light-mode .star-rating {
    color: rgba(0, 0, 0, 0.15);
}

.desc-box {
    margin: 10px 0;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.ig-embed-container {
    width: 100%;
    flex: 1;
    min-height: 10px;
    background: transparent;
    border-radius: 8px;
    overflow: hidden; /* no scrolling */
    position: relative;
    text-align: center;
}

/* Dynamically scale the iframe so it fits entirely without scrolling using standard screen height queries */
.ig-embed-container > iframe, 
.ig-embed-container > blockquote {
    transform-origin: top center;
    margin: 0 auto !important;
    display: inline-block !important;
    max-width: 360px !important;
    transform: scale(0.85);
}

@media (max-height: 850px) { .ig-embed-container > iframe, .ig-embed-container > blockquote { transform: scale(0.75); } }
@media (max-height: 750px) { .ig-embed-container > iframe, .ig-embed-container > blockquote { transform: scale(0.65); } }
@media (max-height: 650px) { .ig-embed-container > iframe, .ig-embed-container > blockquote { transform: scale(0.55); } }
@media (max-height: 550px) { .ig-embed-container > iframe, .ig-embed-container > blockquote { transform: scale(0.45); } }
@media (max-height: 450px) { .ig-embed-container > iframe, .ig-embed-container > blockquote { transform: scale(0.35); } }

/* Scrollbar tweaks */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 4px;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    box-shadow: none;
    width: 100%;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: none;
}

#map-toast.hidden {
    opacity: 0;
    transform: translate(-50%, -40px) !important;
}

/* Light Mode support */
body.light-mode {
    --bg-dark: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #475569;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(0, 0, 0, 0.1);
    --accent: #2563eb;
    --accent-glow: rgba(37, 99, 235, 0.3);
}

/* Buttons */

.menu-btn {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--glass-border);
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: all 0.2s;
}

.menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
}

.menu-btn.hidden {
    display: none !important;
}

.lang-switcher {
    display: flex;
    gap: 10px;
    width: 100%;
}

.lang-btn {
    flex: 1;
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 8px 0;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s;
    font-family: inherit;
}

.lang-btn.active {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--accent);
    color: var(--text-main);
    box-shadow: 0 0 10px var(--accent-glow);
}

.lang-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.nav-divider {
    border: 0;
    height: 1px;
    background: var(--glass-border);
    margin: 4px 0;
}

/* List Panel */
.list-panel {
    max-width: 600px;
    width: 95%;
    height: 75vh;
    max-height: 75vh;
    display: flex;
    flex-direction: column;
}

.scrollable-list {
    flex: 1;
    overflow-y: auto;
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-right: 10px;
}

.list-item {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    padding: 15px;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.list-item:hover {
    border-color: var(--accent);
}

.list-item h4 {
    margin-bottom: 5px;
    color: var(--text-main);
}

.list-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

body.light-mode .list-item {
    background: rgba(0, 0, 0, 0.05);
}

body.light-mode .form-group input,
body.light-mode .form-group textarea {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.8);
}

/* Filters UI */
.filter-container {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.env-pills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.env-pill {
    cursor: pointer;
    user-select: none;
}

.env-pill input[type="checkbox"] {
    display: none;
}

.env-pill span {
    display: inline-block;
    padding: 8px 14px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.env-pill input[type="checkbox"]:checked + span {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

.filter-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 12px 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.4);
    transition: all 0.3s;
    font-size: 0.95rem;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
    user-select: none;
}

.filter-checkbox-label:hover {
    border-color: var(--accent);
}

.filter-checkbox-label input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-muted);
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    outline: none;
    margin: 0;
}

.filter-checkbox-label input[type="checkbox"]:checked {
    background: var(--accent);
    border-color: var(--accent);
}

.filter-checkbox-label input[type="checkbox"]:checked::after {
    content: '✔';
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.8rem;
}

/* Unique Approved Checkbox */
.filter-checkbox-approved {
    border-color: rgba(245, 158, 11, 0.5);
}
.filter-checkbox-approved:hover {
    border-color: #f59e0b;
}
.filter-checkbox-approved span {
    color: #fbbf24;
    font-weight: 600;
}
.filter-checkbox-approved input[type="checkbox"] {
    border-color: #f59e0b;
}
.filter-checkbox-approved input[type="checkbox"]:checked {
    background: #f59e0b;
    border-color: #f59e0b;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

body.light-mode .env-pill span,
body.light-mode .filter-checkbox-label {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-main);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

body.light-mode .env-pill input[type="checkbox"]:checked + span {
    background: var(--accent);
    color: white;
}

body.light-mode .filter-checkbox-label input[type="checkbox"] {
    border-color: rgba(0, 0, 0, 0.3);
    color: rgba(0, 0, 0, 0.5);
}

body.light-mode .filter-checkbox-approved {
    background: rgba(245, 158, 11, 0.1);
}
body.light-mode .filter-checkbox-approved span {
    color: #b45309;
}
body.light-mode .filter-checkbox-approved input[type="checkbox"] {
    border-color: #d97706;
}

#view-nav-btn:hover {
    background: rgba(59, 130, 246, 0.25) !important;
    border-color: rgba(59, 130, 246, 0.6) !important;
    transform: scale(1.02);
}

body.light-mode #view-nav-btn {
    background: rgba(59, 130, 246, 0.1) !important;
    color: #2563eb !important;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.1);
}

body.light-mode .filter-select {
    background-color: rgba(255, 255, 255, 0.6);
    border-color: rgba(0, 0, 0, 0.1);
    color: #111827;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2214%22%20height%3D%228%22%20viewBox%3D%220%200%2014%208%22%3E%3Cpath%20fill%3D%22none%22%20stroke%3D%22%23666%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20d%3D%22M1%201l6%206%206-6%22%2F%3E%3C%2Fsvg%3E");
}

body.light-mode .filter-select:focus,
body.light-mode .filter-select:hover {
    border-color: rgba(0, 0, 0, 0.3);
    background-color: #ffffff;
}

body.light-mode .filter-select option {
    background: white;
    color: #111827;
}

.list-edit-btn {
    background: transparent;
    border: 1px solid rgba(59, 130, 246, 0.5);
    border-radius: 6px;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    transition: all 0.2s;
    color: white;
}
.list-edit-btn:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 1);
    transform: scale(1.05);
}

/* Custom Delete Button */
.list-delete-btn {
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.5);
    border-radius: 6px;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    transition: all 0.2s;
    color: white;
}
.list-delete-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 1);
    transform: scale(1.05);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.8);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}
.btn-danger:hover:not(:disabled) {
    background: rgba(239, 68, 68, 1);
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.6);
}

.confirm-panel {
    max-width: 380px;
    text-align: center;
    padding: 30px 25px;
}

#confirm-modal {
    z-index: 2500; /* Must be above other modals like list-modal */
}

/* Error Validation State */
.input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4) !important;
    animation: shake-error 0.4s ease-in-out;
}

@keyframes shake-error {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* Custom Cluster Marker */
.custom-cluster {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 2px solid var(--accent);
    color: white;
    font-weight: 800;
    font-size: 1.1rem;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 15px var(--accent-glow);
    transition: background 0.3s ease, box-shadow 0.3s ease;
    font-family: 'Outfit', sans-serif;
}

.custom-cluster:hover {
    background: var(--accent);
    box-shadow: 0 0 25px var(--accent-glow);
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 450px;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 1;
    visibility: visible;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cookie-banner.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 60px);
    pointer-events: none;
}

.cookie-banner h3 {
    margin-bottom: 2px;
    font-size: 1.15rem;
}

.cookie-banner p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 10px;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    width: 100%;
}

.cookie-btn-accept {
    flex: 2;
    padding: 12px;
    font-size: 0.95rem;
}

.cookie-btn-decline {
    flex: 1;
    padding: 12px;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: all 0.2s;
}
.cookie-btn-decline:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

#cookie-read-more:hover {
    color: white !important;
}

body.light-mode .cookie-banner {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}
body.light-mode .cookie-banner h3 {
    color: #111827;
}
body.light-mode .cookie-banner p {
    color: #4b5563;
}
body.light-mode .cookie-btn-decline {
    background: rgba(0, 0, 0, 0.05);
    color: #4b5563;
}
body.light-mode .cookie-btn-decline:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #111827;
}

@media (max-width: 480px) {
    .cookie-buttons {
        flex-direction: column;
    }
}

/* Mobile Responsive Side Menu & FAB */
@media (max-width: 768px) {
    /* 1. Make the main sidebar an invisible wrapper covering the screen */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border: none;
        box-shadow: none;
        pointer-events: none; /* Let clicks pass to map */
        padding: 0;
        border-radius: 0;
        z-index: 2000;
        transition: none; /* Remove any transitions on the wrapper itself */
    }

    /* All elements inside it should be selectively visible / clickable and positioned absolutely */
    .sidebar > * {
        pointer-events: auto;
        position: absolute;
    }

    /* 2. Logo Header -> Top Left Floating Pill */
    .sidebar-header {
        top: 15px;
        left: 15px;
        background: var(--glass-bg);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        padding: 12px 20px;
        border-radius: 15px;
        border: 1px solid var(--glass-border);
        box-shadow: 0 5px 20px rgba(0,0,0,0.3);
        margin: 0;
        z-index: 2001;
    }
    
    .sidebar-header h1 {
        font-size: 1.5rem;
        margin: 0;
    }
    
    .sidebar-header p {
        display: block;
        font-size: 0.75rem;
        opacity: 0.8;
        margin-top: 3px;
        max-width: 190px;
        line-height: 1.25;
    }

    /* 3. Add Location Button -> Floating Action Button bottom right */
    #add-btn {
        bottom: max(100px, env(safe-area-inset-bottom) + 80px);
        right: 15px;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        padding: 0;
        margin: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 2.2rem;
        color: white;
        z-index: 2001;
        box-shadow: 0 5px 25px var(--accent-glow);
    }
    
    /* Hide the text "+ Pridať lokáciu" natively */
    #add-btn { text-indent: -9999px; }
    #add-btn::after {
        content: '+';
        text-indent: 0;
        position: absolute;
        line-height: 1;
        font-weight: 300;
    }

    /* 4. Settings Toggle Button -> Top Right Hamburger */
    .toggle-container {
        top: 15px;
        right: 15px;
        width: 48px;
        height: 48px;
        margin: 0;
        background: var(--glass-bg);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border: 1px solid var(--glass-border);
        border-radius: 15px;
        box-shadow: 0 5px 20px rgba(0,0,0,0.3);
        z-index: 2003; /* Must be above the sliding nav */
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        gap: 5px;
        padding: 0;
    }
    
    /* Convert existing lines into a Hamburger Menu */
    .toggle-container .chevron { display: none; }
    .toggle-container .line {
        background: var(--text-main);
        height: 2px;
        width: 20px;
        flex: none;
        transition: all 0.3s;
    }
    .toggle-container::after {
        content: '';
        background: var(--text-main);
        height: 2px;
        width: 20px;
        transition: all 0.3s;
    }

    /* Transform Hamburger into X when menu runs */
    .sidebar:not(.collapsed) .toggle-container {
        background: transparent;
        border-color: transparent;
        box-shadow: none;
    }
    .sidebar:not(.collapsed) .toggle-container .line:first-child {
        transform: translateY(7px) rotate(45deg);
    }
    .sidebar:not(.collapsed) .toggle-container .line:last-child {
        opacity: 0;
    }
    .sidebar:not(.collapsed) .toggle-container::after {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* 5. Nav Panel -> Off-Canvas Sliding Menu */
    .sidebar-nav {
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        max-height: 100vh !important;
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-left: 1px solid var(--glass-border);
        border-radius: 0;
        margin: 0;
        padding: 90px 20px 30px;
        transform: translateX(100%);
        opacity: 1 !important; /* Override standard JS collapse */
        z-index: 2002;
        transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
        pointer-events: auto;
    }

    .sidebar-nav::after {
        content: '';
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;
        background-image: 
            url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='0.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='rotate(15 12 12)'%3E%3Cpath d='M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z'/%3E%3Ccircle cx='12' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E"), 
            url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='0.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='rotate(-25 12 12)'%3E%3Cpath d='M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z'/%3E%3Ccircle cx='12' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E"),
            url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='0.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='rotate(-10 12 12)'%3E%3Cpath d='M4 11l1-3c.2-.5.8-1 1.4-1h11.2c.6 0 1.2.5 1.4 1l1 3m-16 0h16v6a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-6z'/%3E%3Ccircle cx='7' cy='16' r='1.5'/%3E%3Ccircle cx='17' cy='16' r='1.5'/%3E%3C/g%3E%3C/svg%3E"), 
            url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='0.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='rotate(20 12 12)'%3E%3Cpath d='M4 11l1-3c.2-.5.8-1 1.4-1h11.2c.6 0 1.2.5 1.4 1l1 3m-16 0h16v6a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-6z'/%3E%3Ccircle cx='7' cy='16' r='1.5'/%3E%3Ccircle cx='17' cy='16' r='1.5'/%3E%3C/g%3E%3C/svg%3E"),
            url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='0.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='rotate(30 12 12)'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/g%3E%3C/svg%3E"), 
            url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='0.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='rotate(-40 12 12)'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/g%3E%3C/svg%3E"),
            url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='0.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='rotate(45 12 12)'%3E%3Crect x='5' y='2' width='14' height='20' rx='2' ry='2'/%3E%3Cpath d='M12 18h.01'/%3E%3C/g%3E%3C/svg%3E"), 
            url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='0.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='rotate(-15 12 12)'%3E%3Crect x='5' y='2' width='14' height='20' rx='2' ry='2'/%3E%3Cpath d='M12 18h.01'/%3E%3C/g%3E%3C/svg%3E"),
            url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='0.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='rotate(-20 12 12)'%3E%3Cpolygon points='1 6 8 2 16 6 23 2 23 18 16 22 8 18 1 22'/%3E%3Cline x1='8' y1='2' x2='8' y2='18'/%3E%3Cline x1='16' y1='6' x2='16' y2='22'/%3E%3C/g%3E%3C/svg%3E"),
            url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='0.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='rotate(35 12 12)'%3E%3Cpolygon points='1 6 8 2 16 6 23 2 23 18 16 22 8 18 1 22'/%3E%3Cline x1='8' y1='2' x2='8' y2='18'/%3E%3Cline x1='16' y1='6' x2='16' y2='22'/%3E%3C/g%3E%3C/svg%3E");
        background-position: 
            15% 15%, 
            80% 85%, 
            10% 80%, 
            85% 20%, 
            40% 65%, 
            70% 50%, 
            25% 40%, 
            90% 10%, 
            10% 55%, 
            65% 95%;
        background-size: 
            55px, 
            45px, 
            75px, 
            50px, 
            35px, 
            30px, 
            50px, 
            35px, 
            45px, 
            60px;
        background-repeat: no-repeat;
        opacity: 0.05;
        z-index: -1;
        pointer-events: none;
    }

    .sidebar:not(.collapsed) .sidebar-nav {
        transform: translateX(0); /* Slide In */
    }

    /* Keep Modals and Iframes neat on phones */
    .modal {
        align-items: flex-start;
        overflow-y: auto;
        padding: 20px 0;
    }

    .glass-panel {
        padding: 25px 15px;
        margin: auto;
        width: 95%;
    }

    .close-btn { top: 15px; right: 15px; }

    .ig-embed-container > iframe, 
    .ig-embed-container > blockquote {
        transform-origin: top center;
        transform: scale(0.65) !important;
    }

    /* Hide Map Zoom Controls on Mobile */
    .leaflet-control-zoom {
        display: none !important;
    }
}
