:root {
    --bg-main: #0B0F19;
    /* Very dark blue */
    --bg-panel: rgba(19, 26, 42, 0.7);
    /* Deep panel blue with transparency for glassmorphism */
    --bg-card: #182235;
    /* Dark background for Ads cards */
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --accent-blue: #3B82F6;
    --accent-pink: #EC4899;
    --accent-pink-hover: #F43F5E;
    --border-color: rgba(59, 130, 246, 0.15);
    /* A subtle blue border */
    --hover-card: #202D45;
    --glass-border: rgba(255, 255, 255, 0.05);

    --shadow-glow: 0 0 20px rgba(236, 72, 153, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    /* Modern, clean font */
}

body {
    background-color: var(--bg-main);
    background-image:
        radial-gradient(circle at 15% 50%, rgba(236, 72, 153, 0.04), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(59, 130, 246, 0.04), transparent 25%);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.6;
}

.layout {
    display: flex;
    height: 100vh;
    max-height: 100vh;
    width: 100%;
    overflow: hidden;
}

.sidebar-left {
    width: 280px;
    height: 100%;
    min-height: 0;
    background-color: var(--bg-panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 20;
    transition: transform 0.3s ease;
}

/* Sidebar Brand */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 20px 0;
    margin-bottom: 8px;
}

.mobile-brand {
    display: none;
    align-items: center;
    gap: 10px;
}

.mobile-brand .brand-heart img {
    height: 38px;
}

.mobile-brand .brand-logo {
    max-height: 20px;
}

.mobile-brand .brand-city {
    font-size: 0.75rem;
}

.brand-heart img {
    height: 48px;
    /* Matching the height of logo + city */
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
    margin-top: -4px;
}

.brand-logo {
    height: auto;
    max-height: 26px;
    /* slightly smaller to leave space for city */
    width: auto;
    max-width: 100%;
    /* Prevents logo from exceeding the sidebar boundaries */
    object-fit: contain;
    object-position: left;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.brand-city {
    color: #94a3b8;
    /* gray as requested */
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1;
}

/* Sidebar Divider */
.sidebar-divider {
    border: none;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.15);
    margin: 16px 0 8px 0;
    /* Full width as requested */
}

.search-container {
    padding: 8px 20px 16px;
    /* Tighter padding around the search bar */
    position: relative;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.search-input {
    width: 100%;
    padding: 8px 16px 8px 38px;
    /* Thinner vertical padding */
    height: 36px;
    /* Explicit thinner height */
    border-radius: 8px;
    /* Tighter radius for a thinner box */
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.2);
    color: var(--text-main);
    outline: none;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    /* Slightly smaller text for the thinner box */
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    border-color: var(--accent-pink);
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.15);
    background-color: rgba(0, 0, 0, 0.4);
}

.search-icon {
    position: absolute;
    left: 32px;
    /* Pulled slightly left to match tighter input */
    top: 26px;
    /* Calculated center: (padding-top 8px + half input height 18px) */
    transform: translateY(-50%);
    width: 14px;
    /* Scaled down proportionally */
    height: 14px;
    opacity: 0.6;
}

.city-list {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    /* Removing padding to allow accordion full-width edges */
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.region-accordion {
    list-style: none;
}

.region-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    /* very faint separation */
}

.region-toggle {
    display: flex;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    color: var(--text-main);
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s;
}

.region-toggle:hover {
    background: rgba(236, 72, 153, 0.05);
}

.chevron-icon {
    width: 16px;
    height: 16px;
    margin-right: 12px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-muted);
}

.region-item.active .chevron-icon {
    transform: rotate(90deg);
    color: var(--accent-pink);
}

.region-item.active .region-toggle {
    color: var(--accent-pink);
}

.province-list {
    display: none;
    list-style: none;
    background: rgba(0, 0, 0, 0.2);
    /* Deeper shade behind open provinces */
}

.region-item.active .province-list {
    display: block;
}

.province-list li a {
    display: flex;
    align-items: center;
    padding: 8px 24px 8px 52px;
    /* Indented deeper */
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.25s ease;
    border-left: 3px solid transparent;
}

.province-list li a:hover {
    background-color: rgba(236, 72, 153, 0.05);
    color: var(--accent-pink);
    padding-left: 56px;
    /* slight hover movement */
    border-left-color: var(--accent-pink);
}

/* Sidebar Footer Fixed */
.sidebar-footer {
    padding: 16px 24px;
    background-color: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--border-color);
    font-size: 0.70rem;
    color: var(--text-muted);
    line-height: 1.4;
    flex-shrink: 0;
}

.sidebar-footer p {
    margin-bottom: 3px;
    color: #cbd5e1;
}

.sidebar-footer strong {
    color: #f8fafc;
    font-size: 0.75rem;
    font-weight: 600;
}

.sidebar-footer a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.2s;
}

.sidebar-footer a:hover {
    color: var(--accent-pink);
    text-decoration: underline;
}

.footer-links {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-links a {
    color: #94a3b8;
}

/* Main Wrapper */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    position: relative;
}

/* Header */
.header {
    min-height: 76px;
    height: auto;
    background-color: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 2px solid var(--accent-pink);
    /* Neopink border as requested */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 32px;
    position: sticky;
    top: 0;
    z-index: 15;
    flex-wrap: nowrap;
    /* Strict horizontal line on desktop to force filters to shrink */
    gap: 16px;
}

.header-left {
    display: none;
    /* On desktop, mobile-brand is its only child and is disabled */
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--text-main);
    transition: color 0.3s;
}

.mobile-menu-toggle:hover {
    color: var(--accent-pink);
}

/* Header Filters */
.header-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    /* Never wrap on any desktop size */
    flex: 1;
    /* pushes header-actions to the right */
}

.filter-group {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    max-width: 250px;
}

.filter-icon {
    position: absolute;
    left: 16px;
    color: var(--accent-pink);
    font-size: 0.95rem;
    pointer-events: none;
}

.filter-select {
    appearance: none;
    background-color: rgba(0, 0, 0, 0.3);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 36px 10px 42px;
    border-radius: 10px;
    outline: none;
    cursor: pointer;
    font-size: 0.90rem;
    font-weight: 500;
    width: 100%;
    min-width: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: all 0.3s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394A3B8' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 12px) center;
}

.filter-select:hover,
.filter-select:focus {
    border-color: var(--accent-pink);
    background-color: rgba(0, 0, 0, 0.5);
}

.filter-select option {
    background-color: #182235;
    color: var(--text-main);
}

/* 3 State View Switch */
.view-switch {
    display: flex;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.view-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-view-btn {
    display: none;
}

.mobile-compact-btn {
    display: none !important;
}

.view-btn:last-child {
    border-right: none;
}

.view-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    font-weight: 600;
}

.view-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.view-btn i {
    color: var(--text-muted);
}

.view-btn.active i {
    color: var(--accent-pink);
}

.view-btn:hover:not(.active) i {
    color: var(--text-main);
}


.btn-favorites-filter {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.90rem;
    transition: all 0.3s;
}

.btn-favorites-filter img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* ========================================================================== */
/* LEAFLET MAP CUSTOM PIN & TOOLTIP STYLES (SHARED) */
/* ========================================================================== */

/* Base transparent container for leaflet divIcon */
.custom-leaflet-marker {
    background: transparent;
    border: none;
}

/* The actual teardrop pin */
.drop-pin {
    width: 46px;
    height: 46px;
    background: var(--accent-pink);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    border: 2px solid white;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.drop-pin:hover {
    box-shadow: 4px 4px 12px rgba(236, 72, 153, 0.6);
    z-index: 1000;
}

/* Inner profile photo inside the rotated teardrop */
.drop-pin img {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    border-radius: 50%;
    object-fit: cover;
}

/* Custom dark tooltip matching the app theme */
.leaflet-tooltip.mami-tooltip {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--accent-pink);
    color: white;
    font-size: 0.85rem;
    font-family: 'Outfit', sans-serif;
    border-radius: 8px;
    padding: 8px 12px;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
    white-space: nowrap;
}

.leaflet-tooltip.mami-tooltip::before {
    border-top-color: var(--accent-pink);
}

.leaflet-tooltip-top.mami-tooltip::before {
    border-top-color: var(--accent-pink);
}

.btn-favorites-filter:hover {
    border-color: var(--accent-pink);
    background: rgba(236, 72, 153, 0.15);
}

.btn-gradient {
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-pink-hover));
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.4);
    background: linear-gradient(135deg, var(--accent-pink-hover), var(--accent-pink));
}

/* Content Wrapper */
.content-wrapper {
    flex: 1;
    display: flex;
    overflow-y: auto;
    padding: 32px;
    gap: 32px;
    scroll-behavior: smooth;
    background-color: #334155;
    background-image: linear-gradient(to bottom, #1e293b 0%, #64748b 100%);
    background-attachment: fixed;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 32px;
    min-width: 0;
    /* Prevents flex blowout on inner structures */
}

/* Right Sidebar (Banners Parallax layout) */
.sidebar-right {
    width: 300px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: calc(100vh - 140px);
    /* Fill the screen correctly minus header and wrappers padding */
    display: flex;
    flex-direction: column;
}

.banner-scroll-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    /* Softened due to light background */
    background: rgba(255, 255, 255, 0.8);
    /* Light fallback instead of dark */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    /* Lighter shadow */
}

.banner-img {
    width: 100%;
    height: auto;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    will-change: transform;
    min-height: 100%;
    /* Ensure it at least covers the box in case the image is very short */
    object-fit: cover;
}


/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 14;
    /* Reduced to sit under header which is 15 */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Fix Resize Bug: Force hide overlay when dragging window from mobile to desktop */
@media (min-width: 1025px) {
    .sidebar-overlay {
        display: none !important;
    }
}


/* Responsive Design */
@media (max-width: 1388px) {
    .sidebar-right {
        display: none;
    }
}

@media (max-width: 1024px) {
    .content-wrapper {
        padding: 24px;
        gap: 24px;
    }

    .ads-grid {
        /* Prevents dropping to 1 massive column before 850px by allowing narrower 240px tiles */
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }

    .header-filters {
        /* Allow horizontal scroll or wrapping on smaller tables */
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .view-switch {
        gap: 4px;
    }

    .view-btn span,
    .btn-favorites-filter span {
        display: none;
        /* Disable text for buttons to save horizontal space ahead of mobile */
    }

    .view-btn,
    .btn-favorites-filter {
        width: 36px;
        height: 36px;
        padding: 0;
        justify-content: center;
    }

    .view-btn i {
        margin-right: 0;
    }
}

@media (max-width: 850px) {
    .sidebar-left {
        position: fixed;
        left: auto;
        right: -100%;
        width: 100%;
        top: 64px;
        /* Restored to 64px, which perfectly clears the logo row */
        height: calc(100vh - 64px);
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.5);
        z-index: 100;
    }

    .sidebar-left.active {
        transform: translateX(-100%);
    }

    .sidebar-brand {
        display: none;
        /* Hide from menu on mobile */
    }

    .mobile-brand {
        display: flex;
        /* Show in header on mobile */
        margin-top: -4px;
    }

    .mobile-menu-toggle {
        display: flex;
        margin-left: 0;
    }

    .header {
        padding: 12px 0 0 0;
        /* Let children handle horiz padding to span full width correctly */
        justify-content: space-between;
        border-bottom: none;
        /* Removed bottom border from container */
        min-height: 64px;
        /* Default height */
        align-items: flex-start;
        align-content: flex-start;
        /* CRITICAL: Prevents flexbox from adding vertical space between rows */
        flex-wrap: wrap;
        /* Restore wrapping exclusively for mobile to drop the filters bar down */
        row-gap: 0;
    }

    .header-left {
        height: 52px;
        /* 12px top padding + 52px height = 64px exactly for the first row */
        display: flex;
        align-items: center;
        gap: 16px;
        padding-left: 16px;
    }

    .header-filters {
        flex: 0 0 100%;
        /* Overrides desktop flex: 1 and forces breaking to new line */
        order: 3;
        /* Pushes to a new line on mobile securely */
        margin-top: 0;
        /* No margin needed since first row forces 64px */
        justify-content: space-between;
        flex-wrap: nowrap;
        /* Single line requirement */
        padding: 12px 16px;
        /* Inner padding for the bar */
        background-color: rgba(30, 41, 59, 0.95);
        /* A bit lighter background */
        border-top: 2px solid var(--accent-pink);
        /* Pink separator on top */
        overflow-x: auto;
    }


    .header-actions {
        height: 52px;
        /* Force same height as header-left for strict baseline */
        display: flex;
        align-items: center;
        padding-right: 16px;
        margin-top: -7px;
    }

    /* Stretch content-wrapper so Mosaico and Map bleed edge-to-edge globally on mobile */
    .content-wrapper,
    .main-content {
        padding: 0 !important;
        gap: 0 !important;
        margin: 0 !important;
    }

    .btn-gradient {
        display: none !important;
        /* Hide login btn */
    }

    .desktop-view-btn {
        display: none !important;
    }

    .mobile-view-btn {
        display: flex !important;
    }

}
/* LEGAL DOCUMENTS MODAL STYLES */
/* ========================================================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 15, 25, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    /* Render above everything including Leaflet popups */
    display: none;
    /* Hidden by default */
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--accent-pink);
    border-radius: 16px;
    width: 100%;
    max-width: 700px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.4rem;
    color: white;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s;
    padding: 0;
}

.modal-close:hover {
    color: var(--accent-pink);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Custom Scrollbar for Modal Body to match theme */
.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--accent-pink);
}

/* Legal text formatting */
.modal-body h3 {
    color: white;
    margin-top: 24px;
    margin-bottom: 12px;
    font-size: 1.15rem;
}

.modal-body h3:first-child {
    margin-top: 0;
}

.modal-body h4 {
    color: #e2e8f0;
    margin-top: 16px;
    margin-bottom: 8px;
    font-size: 1rem;
}

.modal-body p {
    margin-bottom: 16px;
}

.modal-body p:last-child {
    margin-bottom: 0;
}

.modal-body ul {
    margin-top: 8px;
    margin-bottom: 16px;
    padding-left: 20px;
}

.modal-body li {
    margin-bottom: 8px;
}

.modal-body strong {
    color: white;
}

/* ========================================================================== */
/* MOBILE OVERRIDES FOR MODALS */
/* ========================================================================== */

@media (max-width: 850px) {
    .modal-overlay {
        top: 64px;
        /* Perfectly aligned to the bottom of the mobile brand row */
        height: calc(100% - 64px);
        /* Fill the remaining screen exclusively */
        padding: 0;
        /* Remove padding entirely */
        background: rgba(11, 15, 25, 0.95);
        /* Enhance opacity slightly on mobile */
    }

    .modal-content {
        border-radius: 0;
        border-top: 2px solid var(--accent-pink);
        /* Single elegant 2px native line */
        border-left: none;
        border-right: none;
        border-bottom: none;
        width: 100%;
        height: 100%;
        max-height: 100%;
        margin: 0;
    }
}



/* OVERLAY */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 14;
    /* Reduced to sit under header which is 15 */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

/* Custom Contextual Menu Overlay */
.mami-context-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: transparent;
    z-index: 9999;
    display: none;
}
.mami-context-overlay.show {
    display: block;
}

/* Custom Contextual Menu */
.mami-context-menu {
    position: absolute;
    z-index: 10000;
    width: 240px;
    background: rgba(15, 20, 35, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(236, 72, 153, 0.1);
    border-radius: 12px;
    padding: 8px 0;
    color: var(--text-main);
    font-size: 0.95rem;
    display: none;
    flex-direction: column;
    animation: menuFadeIn 0.2s ease forwards;
}
@keyframes menuFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
.mami-context-menu.show {
    display: flex;
}
.mami-context-menu-item {
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.2s, color 0.2s;
}
.mami-context-menu-item:hover {
    background: rgba(236, 72, 153, 0.15);
    color: var(--accent-pink);
}
.mami-context-menu-item i {
    width: 16px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}
.mami-context-menu-item:hover i {
    color: var(--accent-pink);
}
.mami-context-menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
    margin: 6px 0;
}

/* Condivisione animazione pulsante cuore (30 BPM = 2s) */
@keyframes pulseHeart {
    0% { transform: scale(1); filter: drop-shadow(0 0 8px rgba(236, 72, 153, 0.4)); }
    50% { transform: scale(1.08); filter: drop-shadow(0 0 22px rgba(236, 72, 153, 0.9)); }
    100% { transform: scale(1); filter: drop-shadow(0 0 8px rgba(236, 72, 153, 0.4)); }
}

.heart-pulse {
    animation: pulseHeart 2s ease-in-out infinite;
}

/* Modale */
.mami-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 15, 26, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mami-modal.active {
    display: flex;
    opacity: 1;
}

.mami-modal-content {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
}

.mami-modal.active .mami-modal-content {
    transform: scale(1);
}

.mami-modal-close {
    color: #94a3b8;
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.mami-modal-close:hover {
    color: white;
}

.mami-modal-content h3 {
    margin-top: 0;
    color: white;
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.mami-modal-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 24px;
}