/* Modern Sexy Dark Theme with Purple Accents */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --bg-card: #1e1e1e;
    --bg-modal: #1a1a1a;
    --bg-input: #2a2a2a;
    --border-color: #333333;
    --border-hover: #444444;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #808080;
    --accent-primary: #8b5cf6;
    --accent-secondary: #a855f7;
    --accent-tertiary: #c084fc;
    --accent-glow: rgba(139, 92, 246, 0.3);
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 20px var(--accent-glow);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Smooth scrolling and animations */
html {
    scroll-behavior: smooth;
}







/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Sleek Sidebar Design */
.left-sidebar {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.1) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Custom Range Slider Styling */
.slider {
    background: linear-gradient(to right, rgba(139, 92, 246, 0.3) 0%, rgba(139, 92, 246, 0.3) 20%, rgba(255, 255, 255, 0.1) 20%, rgba(255, 255, 255, 0.1) 100%);
    transition: background 0.3s ease;
}

/* Update slider background based on value */
.slider[data-value="1"] { background: linear-gradient(to right, rgba(139, 92, 246, 0.3) 0%, rgba(139, 92, 246, 0.3) 20%, rgba(255, 255, 255, 0.1) 20%, rgba(255, 255, 255, 0.1) 100%); }
.slider[data-value="2"] { background: linear-gradient(to right, rgba(139, 92, 246, 0.3) 0%, rgba(139, 92, 246, 0.3) 40%, rgba(255, 255, 255, 0.1) 40%, rgba(255, 255, 255, 0.1) 100%); }
.slider[data-value="3"] { background: linear-gradient(to right, rgba(139, 92, 246, 0.3) 0%, rgba(139, 92, 246, 0.3) 60%, rgba(255, 255, 255, 0.1) 60%, rgba(255, 255, 255, 0.1) 100%); }
.slider[data-value="4"] { background: linear-gradient(to right, rgba(139, 92, 246, 0.3) 0%, rgba(139, 92, 246, 0.3) 80%, rgba(255, 255, 255, 0.1) 80%, rgba(255, 255, 255, 0.1) 100%); }
.slider[data-value="5"] { background: linear-gradient(to right, rgba(139, 92, 246, 0.3) 0%, rgba(139, 92, 246, 0.3) 100%); }

.slider::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    background: rgba(139, 92, 246, 0.8);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
    transition: all 0.2s ease;
}

.slider::-webkit-slider-thumb:hover {
    background: rgba(139, 92, 246, 1);
    transform: scale(1.1);
}

.slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: rgba(139, 92, 246, 0.8);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
    transition: all 0.2s ease;
}

.slider::-moz-range-thumb:hover {
    background: rgba(139, 92, 246, 1);
    transform: scale(1.1);
}

/* Custom Radio and Checkbox Styling */
input[type="radio"], input[type="checkbox"] {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

input[type="radio"]:checked {
    background: rgba(139, 92, 246, 0.8);
    border-color: rgba(139, 92, 246, 0.8);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

input[type="checkbox"] {
    border-radius: 4px;
}

input[type="checkbox"]:checked {
    background: rgba(139, 92, 246, 0.8);
    border-color: rgba(139, 92, 246, 0.8);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

input[type="radio"]:hover, input[type="checkbox"]:hover {
    border-color: rgba(139, 92, 246, 0.6);
}

/* Focus states */
input[type="radio"]:focus, input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3);
}







/* Custom Pin Markers for Dark Theme */
.custom-pin-marker {
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6));
}

.pin-inner {
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.pin-inner:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}



/* Button Hover Effects */
button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Smooth Transitions */
* {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Age Gate Modal - Sexy Design */
#ageGateModal {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(10, 10, 10, 0.9) 100%);
    backdrop-filter: blur(30px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 50;
}

/* Hide age gate modal when hidden class is present */
#ageGateModal.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

#ageGateModal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(168, 85, 247, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(192, 132, 252, 0.1) 0%, transparent 50%);
    animation: backgroundPulse 8s ease-in-out infinite;
    pointer-events: none;
}

#ageGateModal::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(45deg, transparent 30%, rgba(139, 92, 246, 0.03) 50%, transparent 70%);
    animation: shimmer 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes backgroundPulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%);
    }
    100% {
        transform: translateX(100%) translateY(100%);
    }
}

#ageGateModal .bg-gray-800 {
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.95) 0%, rgba(26, 26, 26, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.8), 
        0 0 20px rgba(139, 92, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    backdrop-filter: blur(20px);
    transform: translateY(20px);
    animation: modalSlideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    position: relative;
    z-index: 1;
    max-width: 500px;
    width: 90%;
    margin: 0 auto;
    padding: 2rem;
}

#ageGateModal .bg-gray-800::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(168, 85, 247, 0.3), rgba(192, 132, 252, 0.3));
    border-radius: 24px;
    z-index: -1;
    opacity: 0;
    animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
}

/* Enhanced title styling to match sidebar */
#ageGateModal h1 {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    position: relative;
}

#ageGateModal h1::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.8), transparent);
    border-radius: 1px;
}

/* Enhanced button styling */
#ageGateModal button {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.9) 0%, rgba(168, 85, 247, 0.9) 100%);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 16px;
    padding: 16px 24px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

#ageGateModal button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
    z-index: -1;
}

#ageGateModal button:hover::before {
    left: 100%;
}

#ageGateModal button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4), 0 0 20px rgba(139, 92, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.6);
}

#ageGateModal button:active {
    transform: translateY(0);
}

/* Special styling for the "No" button */
#ageNo {
    background: linear-gradient(135deg, rgba(75, 85, 99, 0.9) 0%, rgba(55, 65, 81, 0.9) 100%);
    border-color: rgba(75, 85, 99, 0.3);
    box-shadow: 0 4px 16px rgba(75, 85, 99, 0.3);
}

#ageNo:hover {
    box-shadow: 0 8px 24px rgba(75, 85, 99, 0.4), 0 0 20px rgba(75, 85, 99, 0.3);
    border-color: rgba(75, 85, 99, 0.6);
}

/* Enhanced text styling */
#ageGateModal p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 16px;
}

#ageGateModal .text-gray-400 {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-weight: 400;
}

@keyframes modalSlideIn {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Enhanced Tutorial Overlay */
#howToOverlay {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(30px);
    animation: tutorialFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes tutorialFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Tutorial step transitions */
.how-to-step {
    animation: stepSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes stepSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tutorial navigation buttons */
#howToPrev, #howToNext {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    pointer-events: auto;
    min-width: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Ensure the entire button area is clickable */
    position: absolute !important;
    z-index: 10;
    /* Add padding to increase clickable area */
    padding: 12px;
    /* Ensure the button has a proper hit area */
    touch-action: manipulation;
    /* Force proper positioning */
    top: 50% !important;
    transform: translateY(-50%) !important;
}

#howToPrev:hover, #howToNext:hover {
    transform: translateY(-50%) scale(1.05) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

#howToPrev svg, #howToNext svg {
    pointer-events: none;
    user-select: none;
}

/* Add invisible clickable area around buttons */
#howToPrev::before, #howToNext::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    background: transparent;
    cursor: pointer;
    z-index: -1;
    pointer-events: none;
}

/* Final action button */
#howToFinalAction {
    animation: finalActionSlideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes finalActionSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#howToComplete {
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#howToComplete:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.6);
}

/* Safe Page - shown when under 18 */
#safePage {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(10, 10, 10, 0.9) 100%);
    backdrop-filter: blur(30px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

/* Hide safe page when hidden class is present */
#safePage.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

#howToOverlay .bg-gray-800 {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-tertiary) 100%);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-radius: 24px;
    backdrop-filter: blur(20px);
}

/* Main App Container */
#mainApp {
    background: #000000;
    position: relative;
    overflow: hidden;
}

#mainApp::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, var(--accent-glow) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, var(--accent-glow) 0%, transparent 50%);
    pointer-events: none;
    animation: backgroundFloat 20s ease-in-out infinite;
}

@keyframes backgroundFloat {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

/* Header - Sleek and Modern with smooth background transition */
header {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-tertiary) 100%);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(20px);
    border-radius: 0 0 32px 32px;
    position: relative;
    z-index: 100;
}

/* Smooth background transition from header to main content */
#mainApp > main {
    position: relative;
    z-index: 1;
}

#mainApp > main::before {
    content: '';
    position: absolute;
    top: -32px;
    left: 0;
    right: 0;
    height: 32px;
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-tertiary) 100%);
    border-radius: 32px 32px 0 0;
    z-index: -1;
}

/* Buttons - Sexy and Interactive */
button {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    border: none;
    border-radius: 16px;
    padding: 12px 24px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
    z-index: -1;
}

button:hover::before {
    left: 100%;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

button:active {
    transform: translateY(0);
}

/* Special button variants */
#heatmapToggle, #filtersToggle {
    background: linear-gradient(135deg, var(--bg-input) 0%, var(--bg-tertiary) 100%);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

#heatmapToggle:hover, #filtersToggle:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-sm), 0 0 0 1px var(--accent-primary);
}

#heatmapToggle.heatmap-active {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

/* Left Sidebar - Permanent Stats & Filters */
.left-sidebar {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-tertiary) 100%);
    border-right: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(20px);
    overflow-y: auto;
}

.left-sidebar::-webkit-scrollbar {
    width: 6px;
}

.left-sidebar::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

.left-sidebar::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 3px;
}

.left-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--accent-secondary);
}

/* Stats Widget in Sidebar */
.stats-widget {
    background: linear-gradient(135deg, var(--bg-input) 0%, var(--bg-tertiary) 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stats-widget:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-sm), 0 0 0 1px var(--accent-primary);
}

/* Filter Controls in Sidebar */
.filter-control {
    background: linear-gradient(135deg, var(--bg-input) 0%, var(--bg-tertiary) 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-control:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-sm);
}

/* Form Controls - Modern and Sexy */
input[type="text"], input[type="email"], input[type="password"], textarea, select {
    background: linear-gradient(135deg, var(--bg-input) 0%, var(--bg-tertiary) 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px 20px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
    transform: translateY(-1px);
}

/* Radio and Checkbox - Custom Design */
input[type="radio"], input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    background: var(--bg-input);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

input[type="radio"]:checked, input[type="checkbox"]:checked {
    border-color: var(--accent-primary);
    background: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Range Sliders - Sexy Design */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    height: 24px;
    width: 24px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-sm), var(--shadow-glow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

/* Star Rating Buttons - Sleek and Demure */
.star-btn, .difficulty-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: grayscale(1);
    opacity: 0.5;
    margin: 0 2px;
    padding: 4px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Star rating container styling */
.star-rating-container, .difficulty-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
}

.star-rating-container label, .difficulty-container label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    min-width: 80px;
}

.star-btn:hover, .difficulty-btn:hover {
    transform: scale(1.1);
    filter: grayscale(0);
    opacity: 0.8;
    background: rgba(139, 92, 246, 0.1);
}

.star-btn.active, .difficulty-btn.active {
    color: var(--accent-primary);
    filter: grayscale(0);
    opacity: 1;
    background: rgba(139, 92, 246, 0.15);
    box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.3);
}

@keyframes starGlow {
    from {
        text-shadow: 0 0 2px var(--accent-primary);
    }
    to {
        text-shadow: 0 0 8px var(--accent-primary);
    }
}

/* Modals - Sleek and Sexy - Matching Sidebar Design */
#pinModal, #pinInfoModal, #actionModal {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 9999 !important;
}

#pinModal .bg-gray-800, #pinInfoModal .bg-gray-800, #actionModal .bg-gray-800 {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-tertiary) 100%);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    border-radius: 24px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: modalPopIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

/* Add subtle inner glow effect like sidebar */
#pinModal .bg-gray-800::before, #pinInfoModal .bg-gray-800::before, #actionModal .bg-gray-800::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, transparent 50%);
    border-radius: 24px;
    pointer-events: none;
    z-index: -1;
}

@keyframes modalPopIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* CRITICAL: Ensure modals are properly visible when not hidden */
#pinModal:not(.hidden),
#pinInfoModal:not(.hidden),
#actionModal:not(.hidden) {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 9999 !important;
}

/* CRITICAL: Ensure modals are properly hidden when hidden class is present */
#pinModal.hidden,
#pinInfoModal.hidden,
#actionModal.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Stats Widget - Floating Card */
#statsWidget {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-tertiary) 100%);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md), var(--shadow-glow);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#statsWidget:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}





/* Debug button for manual pin refresh */
#debugRefreshPins {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: #ef4444;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

#debugRefreshPins:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

/* Debug button for tutorial reset */
#debugResetTutorial {
    position: fixed;
    top: 20px;
    right: 140px;
    z-index: 1000;
    background: #8b5cf6;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

#debugResetTutorial:hover {
    background: #7c3aed;
    transform: translateY(-2px);
}



/* Custom Cursors for Different Interactions */
button, .clickable {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="%238B5CF6" stroke="white" stroke-width="2"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/></svg>') 10 10, pointer;
}

input, textarea, select {
    cursor: text;
}

input[type="range"] {
    cursor: grab;
}

input[type="range"]:active {
    cursor: grabbing;
}

.star-btn, .difficulty-btn {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="%23FFD700" stroke="%238B5CF6" stroke-width="1"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg>') 10 10, pointer;
}

/* Custom scrollbar cursor */
.left-sidebar::-webkit-scrollbar-thumb {
    cursor: grab;
}

.left-sidebar::-webkit-scrollbar-thumb:active {
    cursor: grabbing;
}



/* Pin Markers - Animated and Consistent Size */
.custom-pin-marker {
    animation: pinBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.pin-inner {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pin-inner:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

.pin-inner::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

@keyframes pinBounce {
    0% {
        transform: scale(0) rotate(180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(90deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}



/* Hide default Leaflet popup wrapper and styling */
/* Custom Leaflet popup styling */
.leaflet-popup-content-wrapper {
    background: #1f2937 !important;
    border: 1px solid rgba(139, 92, 246, 0.2) !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
    padding: 0 !important;
}

.leaflet-popup-tip {
    background: #1f2937 !important;
    border: 1px solid rgba(139, 92, 246, 0.2) !important;
}

.leaflet-popup {
    background: transparent !important;
}

.leaflet-popup-content {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

/* Hide default close button */
.leaflet-popup-close-button {
    display: none !important;
}

/* Custom popup content styling */
.pin-popup {
    background: #1f2937;
    color: white;
    padding: 16px;
    min-width: 280px;
    font-family: 'Inter', sans-serif;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.popup-header h3 {
    margin: 0;
    flex: 1;
}

.popup-close-btn {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.popup-close-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.popup-content {
    color: #d1d5db;
}

.popup-content button {
    margin-top: 8px;
}

/* Badge styles for indoor/outdoor */
.bg-purple-100 {
    background-color: #f3e8ff;
}

.text-purple-800 {
    color: #5b21b6;
}

.bg-green-100 {
    background-color: #dcfce7;
}

.text-green-800 {
    color: #166534;
}


/* Notifications - Floating and Animated */
.notification {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    border-radius: 16px;
    box-shadow: var(--shadow-md), var(--shadow-glow);
    animation: notificationSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes notificationSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Loading Animation - Sexy Spinner */
.loading {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Temporary pin marker styles */
.temp-pin-marker {
    animation: tempPinPulse 2s infinite;
}

.temp-pin-inner {
    width: 24px;
    height: 24px;
    background-color: #f59e0b;
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

@keyframes tempPinPulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* Contextual modal styles */
.contextual-pin-modal {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.star-btn-contextual.active,
.difficulty-btn-contextual.active {
    color: #fbbf24;
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.6));
}

.star-btn-contextual:hover,
.difficulty-btn-contextual:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.4));
}

/* Enhanced contextual modal styling to match sidebar */
.contextual-pin-modal {
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.95) 0%, rgba(26, 26, 26, 0.95) 100%);
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.8), 0 0 20px rgba(139, 92, 246, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: modalPopIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 10000;
}

.contextual-pin-modal input[type="radio"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 50%;
    background: rgba(55, 65, 81, 0.8);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.contextual-pin-modal input[type="radio"]:checked {
    border-color: rgba(139, 92, 246, 0.8);
    background: rgba(139, 92, 246, 0.8);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.contextual-pin-modal input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
}

/* Hover Effects - Subtle and Sexy */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Text Gradients */
.text-gradient {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass Morphism Effect */
.glass {
    background: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-md);
}

/* Floating Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-20px) scale(1.2);
        opacity: 1;
    }
}

.float {
    animation: float 3s ease-in-out infinite;
}

/* Glow Effects */
.glow {
    box-shadow: var(--shadow-glow);
}

.glow:hover {
    box-shadow: var(--shadow-glow), 0 0 30px var(--accent-primary);
}

/* Enhanced Modal Styling to Match Sidebar */
#pinModal, #pinInfoModal, #actionModal {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
}

#pinModal .bg-gray-800, #pinInfoModal .bg-gray-800, #actionModal .bg-gray-800 {
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.9) 0%, rgba(26, 26, 26, 0.9) 100%);
    border: 1px solid rgba(139, 92, 246, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8), 0 0 20px rgba(139, 92, 246, 0.3);
    border-radius: 24px;
    backdrop-filter: blur(20px);
    animation: modalPopIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Enhanced Form Controls in Modals - Matching Sidebar */
#pinModal input[type="text"], #pinModal textarea, #pinInfoModal input[type="text"], #pinInfoModal textarea {
    background: linear-gradient(135deg, var(--bg-input) 0%, var(--bg-tertiary) 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px 20px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Form sections styling to match sidebar filter controls */
#pinModal .form-section, #pinInfoModal .form-section, #actionModal .form-section {
    background: linear-gradient(135deg, var(--bg-input) 0%, var(--bg-tertiary) 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#pinModal .form-section:hover, #pinInfoModal .form-section:hover, #actionModal .form-section:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-sm);
}

#pinModal input[type="text"]:focus, #pinModal textarea:focus, #pinInfoModal input[type="text"]:focus, #pinInfoModal textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
    transform: translateY(-1px);
}

/* Enhanced Radio and Checkbox in Modals - Matching Sidebar */
#pinModal input[type="radio"], #pinModal input[type="checkbox"], #pinInfoModal input[type="radio"], #pinInfoModal input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    background: var(--bg-input);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#pinModal input[type="radio"]:checked, #pinModal input[type="checkbox"]:checked, #pinInfoModal input[type="radio"]:checked, #pinInfoModal input[type="checkbox"]:checked {
    border-color: var(--accent-primary);
    background: var(--accent-primary);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

/* Enhanced Buttons in Modals - Matching Sidebar */
#pinModal button, #pinInfoModal button, #actionModal button {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    border: 1px solid var(--accent-primary);
    border-radius: 16px;
    padding: 12px 24px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

#pinModal button:hover, #pinInfoModal button:hover, #actionModal button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), var(--shadow-glow);
    border-color: var(--accent-secondary);
}

/* Special button styling for cancel and report */
#cancelPin {
    background: linear-gradient(135deg, rgba(75, 85, 99, 0.8) 0%, rgba(55, 65, 81, 0.8) 100%);
    border-color: rgba(75, 85, 99, 0.3);
}

#cancelPin:hover {
    background: linear-gradient(135deg, rgba(75, 85, 99, 1) 0%, rgba(55, 65, 81, 1) 100%);
    border-color: rgba(75, 85, 99, 0.6);
}

#reportPin {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.8) 0%, rgba(220, 38, 38, 0.8) 100%);
    border-color: rgba(239, 68, 68, 0.3);
}

#reportPin:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 1) 0%, rgba(220, 38, 38, 1) 100%);
    border-color: rgba(239, 68, 68, 0.6);
}

/* Enhanced Labels in Modals - Matching Sidebar */
#pinModal label, #pinInfoModal label, #actionModal label {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 8px;
    display: block;
}

/* Enhanced Modal Headers - Matching Sidebar */
#pinModal h2, #pinInfoModal h2, #actionModal h2 {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 24px;
    margin-bottom: 24px;
    text-align: center;
}

/* Modal title styling to match Exhibimap branding */
#pinModal h2 {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    position: relative;
}

#pinModal h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
    border-radius: 1px;
}

/* Report Reason Modal Styling */
#reportReasonModal {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

#reportReasonModal .bg-gray-800 {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-tertiary) 100%);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-radius: 24px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: modalPopIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#reportReasonModal input[type="radio"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    background: var(--bg-input);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

#reportReasonModal input[type="radio"]:checked {
    border-color: var(--accent-primary);
    background: var(--accent-primary);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

#reportReasonModal input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
}

#reportReasonModal button {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    border: 1px solid var(--accent-primary);
    border-radius: 16px;
    padding: 12px 24px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#reportReasonModal button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), var(--shadow-glow);
    border-color: var(--accent-secondary);
}

#reportReasonModal #cancelReport {
    background: linear-gradient(135deg, rgba(75, 85, 99, 0.8) 0%, rgba(55, 65, 81, 0.8) 100%);
    border-color: rgba(75, 85, 99, 0.3);
}

#reportReasonModal #cancelReport:hover {
    background: linear-gradient(135deg, rgba(75, 85, 99, 1) 0%, rgba(55, 65, 81, 1) 100%);
    border-color: rgba(75, 85, 99, 0.6);
}

#reportReasonModal #submitReport {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.8) 0%, rgba(220, 38, 38, 0.8) 100%);
    border-color: rgba(239, 68, 68, 0.3);
}

#reportReasonModal #submitReport:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 1) 0%, rgba(220, 38, 38, 1) 100%);
    border-color: rgba(239, 68, 68, 0.6);
}

/* Responsive Design */
@media (max-width: 768px) {
    button {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    #pinModal .bg-gray-800, #pinInfoModal .bg-gray-800, #actionModal .bg-gray-800 {
        margin: 20px;
        border-radius: 20px;
    }
    

}

/* Responsive Design for Sidebar */
@media (max-width: 1024px) {
    .left-sidebar {
        width: 280px;
    }
}

@media (max-width: 768px) {
    .left-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    main {
        flex-direction: column;
    }
}

/* Dark Mode Enhancements */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #000000;
        --bg-secondary: #0a0a0a;
        --bg-tertiary: #111111;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --border-color: #666666;
        --text-secondary: #cccccc;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Additional Mobile Optimizations */
@media (max-width: 1023px) {
    /* Ensure mobile menu button is always visible */
    #mobileMenuBtn {
        z-index: 9999 !important;
        position: fixed !important;
        top: 1rem !important;
        right: 1rem !important;
        background: linear-gradient(135deg, rgba(139, 92, 246, 0.9) 0%, rgba(59, 130, 246, 0.9) 100%) !important;
        backdrop-filter: blur(20px) !important;
        border: 2px solid rgba(255, 255, 255, 0.6) !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6) !important;
        color: white !important;
        padding: 0.75rem !important;
        border-radius: 0.75rem !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }
    
    /* Hide mobile menu button when sidebar is open */
    #leftSidebar.translate-x-0 ~ main #mobileMenuBtn {
        opacity: 0;
        pointer-events: none;
        transform: scale(0.8);
        transition: all 0.3s ease;
    }
    
    /* Ensure sidebar overlay covers full screen on mobile */
    #leftSidebar {
        height: 100vh;
        width: 100vw;
        top: 0;
        left: 0;
        z-index: 1000;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(20px);
    }
    
    /* Add backdrop when sidebar is open on mobile */
    #leftSidebar.translate-x-0::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.8);
        z-index: -1;
    }
    
    /* Ensure mobile close button is visible */
    #mobileCloseBtn {
        z-index: 1001;
        position: absolute !important;
        top: 1rem !important;
        right: 1rem !important;
        background: rgba(0, 0, 0, 0.8) !important;
        backdrop-filter: blur(20px) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        padding: 0.5rem !important;
        border-radius: 0.5rem !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
    }
}

/* Base mobile menu button styles */
#mobileMenuBtn {
    display: none; /* Hidden by default */
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

/* Show mobile menu button only on mobile */
@media (max-width: 1023px) {
    #mobileMenuBtn {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        position: fixed !important;
        z-index: 10000 !important;
        background: rgba(0, 0, 0, 0.9) !important;
        backdrop-filter: blur(20px) !important;
        border: 2px solid rgba(255, 255, 255, 0.6) !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6) !important;
        color: white !important;
        padding: 0.75rem !important;
        border-radius: 0.75rem !important;
        top: 1rem !important;
        right: 1rem !important;
    }
}



/* Ensure proper touch behavior on mobile */
@media (max-width: 1023px) {
    /* Prevent text selection on mobile */
    body {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    
    /* Allow text selection in inputs and textareas */
    input, textarea {
        -webkit-user-select: text;
        -khtml-user-select: text;
        -moz-user-select: text;
        -ms-user-select: text;
        user-select: text;
    }
    
    /* Ensure proper touch scrolling */
    .left-sidebar {
        overscroll-behavior: contain;
    }
    
    /* Prevent horizontal scrolling on mobile */
    body {
        overflow-x: hidden;
    }
}

/* High DPI display optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Ensure crisp rendering on high DPI displays */
    .left-sidebar, #mobileMenuBtn, #mobileCloseBtn {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}
