/* ======================================================
   GTA 6 Interactive Map - Full Screen
   Matching gtadb.net/gta-6-map/interactive/ exactly
   ====================================================== */

:root {
    --primary: #ff6b00;
    --accent: #c43ad6;
    --accent-blue: #00d4ff;
    --dark: #0a0a0a;
    --sidebar-width: 400px;
}

/* ========== Base Layout ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    width: 100%;
    height: 100%;
    color: #fff;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 85%, rgba(255,150,70,0.45), transparent 45%),
        radial-gradient(circle at 80% 20%, rgba(120,80,255,0.25), transparent 45%),
        linear-gradient(180deg, #3e74b4 0%, #4a6bb0 35%, #7b4e9f 60%, #b24c69 80%, #f27a3e 100%) !important;
}
button, input { font-family: inherit; }

/* ========== Map Wrapper ========== */
#map-wrapper {
    display: flex;
    height: 100%;
    width: 100%;
    overflow: hidden;
    position: relative;
}

/* ========== Map Container ========== */
#map {
    flex-grow: 1;
    height: 100%;
    background: transparent;
    transition: opacity 0.22s ease;
}
#map.is-fading { opacity: 0.55; }

/* ========== Mouse Coordinates ========== */
#mouse-coords {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 13px;
    padding: 6px 10px;
    background: rgba(20, 20, 20, 0.75);
    color: #00ffcc;
    font-family: monospace;
    border-radius: 5px;
    pointer-events: none;
    z-index: 1000;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* ========== Marker Tooltip ========== */
.marker-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 4px 8px;
    font-size: 16px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 2000;
    display: none;
}

/* ========== Mobile Header ========== */
.mobile-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 12px;
    background: #1c1c1c;
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.mobile-header-left {
    display: flex;
    align-items: center;
}
.mobile-logo-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 2px;
}
.mobile-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.icon-button {
    background: none;
    border: none;
    font-size: 22px;
    color: white;
    cursor: pointer;
    padding: 8px;
}
.logo-gta { color: #ff6b00; }
.logo-vi {
    color: #00d4ff;
    text-shadow: 0 0 10px #00d4ff;
}

/* ========== Sidebar ========== */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    height: 100vh;
    position: relative;
    overflow: visible;
    z-index: 2000;
    transition: transform .28s ease;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(9, 15, 27, 0.96), rgba(5, 10, 20, 0.97));
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 20px 50px rgba(0,0,0,0.38);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.sidebar::before {
    content: "";
    position: absolute;
    top: -120px;
    left: -140px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(circle, rgba(255, 106, 127, 0.16) 0%, rgba(123, 92, 255, 0.10) 38%, rgba(0, 0, 0, 0) 72%);
}
.sidebar::after {
    content: "";
    position: absolute;
    right: -140px;
    bottom: -120px;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(circle, rgba(0, 198, 255, 0.10) 0%, rgba(0, 0, 0, 0) 72%);
}
.sidebar > *:not(.sidebar-toggle-btn) {
    position: relative;
    z-index: 1;
}
.sidebar.collapsed {
    transform: translateX(-360px);
}
.sidebar.collapsed .sidebar-inner {
    display: none !important;
}

/* Sidebar Toggle Handle */
.sidebar-toggle-btn {
    position: absolute;
    top: 132px;
    right: -30px;
    width: 26px;
    height: 44px;
    padding: 0;
    border-radius: 999px;
    background: linear-gradient(180deg, #c43ad6, #7a2cff);
    border: 1px solid rgba(255,255,255,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0,0,0,0.38), 0 0 18px rgba(163, 76, 255, 0.28), inset 0 1px 0 rgba(255,255,255,0.22);
    transition: transform .25s ease, box-shadow .25s ease;
    z-index: 10000;
}
.sidebar-toggle-btn:hover {
    transform: translateX(2px) scale(1.04);
    box-shadow: 0 14px 28px rgba(0,0,0,0.42), 0 0 22px rgba(196, 58, 214, 0.34), inset 0 1px 0 rgba(255,255,255,0.28);
}
.sidebar-toggle-btn i {
    transition: transform .25s ease;
    pointer-events: none;
}
.sidebar.collapsed .sidebar-toggle-btn i {
    transform: rotate(180deg);
}

/* Sidebar Inner */
.sidebar-inner {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.18) transparent;
    display: flex;
    flex-direction: column;
}
.sidebar-inner::-webkit-scrollbar { width: 5px; }
.sidebar-inner::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.10); border-radius: 999px; }
.sidebar-inner::-webkit-scrollbar-track { background: transparent; }

/* ========== Sidebar Header ========== */
.sidebar-header {
    position: relative;
    margin: 0 0 18px;
    padding: 22px 18px 18px;
    text-align: center;
    overflow: hidden;
}
.sidebar-header::before {
    content: "";
    position: absolute;
    top: -90px;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(196, 58, 214, 0.18) 0%, rgba(122, 44, 255, 0.10) 40%, rgba(0, 0, 0, 0) 75%);
    pointer-events: none;
    z-index: 0;
}
.sidebar-header > * {
    position: relative;
    z-index: 1;
}
.sidebar-logo-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    gap: 2px;
    margin-bottom: 8px;
}
.sidebar-header-subtitle {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.58);
    margin-bottom: 12px;
}
.sidebar-header-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}
.sidebar-header-chip {
    position: relative;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .02em;
    color: rgba(255,255,255,0.92);
    background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.10);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.30), inset 0 1px 0 rgba(255,255,255,0.18);
    transition: transform .25s ease, box-shadow .25s ease;
    overflow: hidden;
}
.sidebar-header-chip::before {
    content: "";
    position: absolute;
    inset: -10px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(196,58,214,0.35) 0%, rgba(122,44,255,0.22) 40%, rgba(0,0,0,0) 70%);
    opacity: .55;
    filter: blur(12px);
    z-index: -1;
}
.sidebar-header-chip:hover {
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.25);
    box-shadow: 0 10px 22px rgba(0,0,0,0.40), 0 0 18px rgba(196,58,214,0.35), inset 0 1px 0 rgba(255,255,255,0.25);
}

/* ========== Map Layer Panel ========== */
.map-layer-panel {
    padding: 0 18px 14px;
}
.map-layer-card {
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    padding: 12px 14px;
    border: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 10px;
}
.map-layer-card-primary {
    border-color: rgba(196,58,214,0.25);
}
.map-layer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.map-layer-kicker {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.35);
    margin-bottom: 2px;
}
.map-layer-title {
    font-size: 0.95rem;
    font-weight: 600;
}
.map-layer-style-block { margin-top: 4px; }
.map-layer-style-block.is-disabled,
.map-layer-opacity input:disabled {
    opacity: 0.45;
}
.map-layer-subtitle {
    display: block;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.4);
    margin-bottom: 6px;
}
.map-style-segment {
    display: flex;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
}
.map-style-option {
    flex: 1;
    padding: 7px 0;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.map-style-option.active {
    background: linear-gradient(135deg, #c43ad6, #7a2cff);
    color: white;
    font-weight: 600;
}
.map-style-option:hover:not(.active) {
    color: rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.05);
}
.map-toggle {
    width: 42px;
    height: 24px;
}
.map-layer-opacity {
    margin-top: 10px;
}
.opacity-control {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
}
.opacity-control input[type="range"] {
    width: 100%;
    accent-color: #c43ad6;
}
#gta5-opacity-value {
    min-width: 40px;
    font-size: 12px;
    color: rgba(255,255,255,0.72);
    text-align: right;
}
.lang-switch-desktop {
    display: flex;
    justify-content: flex-end;
}
.lang-btn {
    min-width: 38px;
    height: 28px;
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 7px;
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.86);
    font-weight: 700;
    cursor: default;
}

/* ========== Sidebar Filter Panel ========== */
.sidebar-filter-panel {
    padding: 0;
}
.global-search {
    position: relative;
    margin: 0 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.06);
    z-index: 3000;
}
#search-input {
    width: 100%;
    height: 48px;
    padding: 0 14px 0 42px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    outline: none;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
}
#search-input::placeholder { color: rgba(255, 255, 255, 0.48); }
#search-input:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(181, 56, 183, 0.30);
}
#search-input:focus {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(181, 56, 183, 0.65);
    box-shadow: 0 0 0 3px rgba(181, 56, 183, 0.14);
}
.global-search::before {
    content: "\f002";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 14px;
    top: 38px;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.55);
    font-size: 14px;
    pointer-events: none;
    z-index: 2;
}
.search-help-text {
    margin-top: 8px;
    padding-left: 2px;
    font-size: 11px;
    line-height: 1.4;
    color: rgba(255,255,255,0.52);
}
.search-results-list {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: none;
    margin: 0;
    padding: 8px 0;
    list-style: none;
    background: rgba(14, 18, 28, 0.98);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 14px;
    max-height: 320px;
    overflow-y: auto;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}
.search-results-list.visible { display: block; }
.search-results-list li {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.15s;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
.search-results-list li:hover {
    background: rgba(196, 58, 214, 0.15);
}
.search-results-list li:last-child { border-bottom: none; }

/* ========== Filter Panel ========== */
.filter-quick-section {
    padding: 14px 18px;
}
.filter-box {
    background: rgba(255,255,255,0.02);
    border-radius: 10px;
    padding: 14px;
    border: 1px solid rgba(255,255,255,0.06);
}
.filter-box-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.4);
    margin-bottom: 12px;
}
.category-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.category-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}
.category-toggle:hover {
    background: rgba(255,255,255,0.04);
}
.category-master-toggle {
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 4px;
    padding-bottom: 12px;
}
.category-toggle-left {
    display: flex;
    align-items: center;
}
.category-toggle-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}
.filter-count {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.35);
    background: rgba(255,255,255,0.06);
    padding: 1px 6px;
    border-radius: 8px;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.1);
    border-radius: 22px;
    transition: 0.3s;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}
.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, #c43ad6, #7a2cff);
}
.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(18px);
}

/* ========== Sidebar Footer ========== */
.sidebar-footer {
    font-size: 11px;
    color: rgba(255,255,255,0.56);
    padding: 12px 20px 8px;
    line-height: 1.4;
    text-align: center;
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-top: auto;
    backdrop-filter: blur(10px);
}
.sidebar-legal p { margin-bottom: 4px; }

/* ========== Map Control Panel ========== */
.map-control-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 52px;
    padding: 8px;
    background: rgba(20, 20, 20, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.map-control-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.map-control-btn {
    width: 100%;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(17, 23, 34, 0.78);
    color: rgba(255,255,255,0.8);
    transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    position: relative;
}
.map-control-btn:hover {
    transform: translateY(-1px);
}
.map-control-btn i { font-size: 15px; line-height: 1; }
.zoom-section {
    padding-bottom: 6px;
    margin-bottom: 6px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.zoom-btn {
    background: rgba(255, 255, 255, 0.06);
    color: white;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}
.zoom-btn:hover {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.14);
}
#credits-btn {
    background: rgba(17, 23, 34, 0.78);
    color: rgba(255,255,255,0.8);
}
#credits-btn:hover {
    color: #ff6a7f;
    text-shadow: 0 0 6px rgba(255,106,127,0.6);
}
#credits-btn::after {
    content: "Credits";
    position: absolute;
    right: 60px;
    background: rgba(17,23,34,0.95);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease;
    white-space: nowrap;
}
#credits-btn:hover::after { opacity: 1; }
#share-btn {
    background: none;
    color: rgba(255,255,255,0.8);
}
#share-btn:hover {
    color: #6ad1ff;
    text-shadow: 0 0 6px rgba(106,209,255,0.6);
}
#share-btn::after {
    content: "Copy map link";
    position: absolute;
    right: 60px;
    background: rgba(17,23,34,0.95);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease;
}
#share-btn:hover::after { opacity: 1; }
.map-x-btn {
    text-decoration: none;
    background: none;
}
.map-x-btn:hover {
    color: #ffffff;
    text-shadow: 0 0 6px rgba(255,255,255,0.55);
}
.map-x-btn::after {
    content: "Follow map updates on X";
    position: absolute;
    right: 60px;
    background: rgba(17,23,34,0.95);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease;
}
.map-x-btn:hover::after { opacity: 1; }

/* ========== Popup ========== */
#popup, .ol-popup {
    position: absolute;
    bottom: 12px;
    left: -50px;
    min-width: 300px;
    max-width: 380px;
    padding: 0;
    border-radius: 20px;
    overflow: hidden;
    z-index: 100;
    background: linear-gradient(180deg, rgba(18, 24, 38, 0.96) 0%, rgba(12, 17, 28, 0.97) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.42), 0 8px 22px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    color: #f4f7ff;
    display: none;
}
.ol-popup::before, .ol-popup::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 48px;
    width: 0; height: 0;
    pointer-events: none;
    border: solid transparent;
}
.ol-popup::before {
    border-top-color: rgba(255, 255, 255, 0.08);
    border-width: 11px;
    margin-left: -11px;
}
.ol-popup::after {
    border-top-color: rgba(12, 17, 28, 0.97);
    border-width: 10px;
    margin-left: -10px;
}
.popup-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
}
.popup-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 72px;
    pointer-events: none;
    background: radial-gradient(circle at top left, rgba(255, 106, 127, 0.18), transparent 55%), radial-gradient(circle at top right, rgba(181, 56, 183, 0.14), transparent 55%);
    opacity: 0.9;
}
.popup-header {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    z-index: 1;
}
.popup-title-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.popup-title {
    margin: 0;
    font-size: 1.06rem;
    line-height: 1.35;
    font-weight: 800;
    color: #ffffff;
}
.popup-title-text {
    display: block;
    min-width: 0;
    word-break: break-word;
}
.popup-region {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #ff9cb1;
    font-weight: 700;
}
.popup-coords {
    font-size: 12px;
    color: rgba(230, 236, 255, 0.58);
    font-family: monospace;
    line-height: 1.35;
}
.share-button {
    flex-shrink: 0;
    width: 30px; height: 30px;
    margin-top: 1px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.75);
    cursor: pointer;
    transition: all 0.18s ease;
}
.share-button:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.12);
    color: #fff;
    transform: translateY(-1px);
}
.share-button::before {
    content: "\f0c1";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 12px;
    line-height: 1;
}
.popup-tags {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.popup-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #eef2ff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
}
.popup-tag-type-landscape {
    background: rgba(93, 201, 255, 0.14);
    border-color: rgba(93, 201, 255, 0.22);
    color: #8edfff;
}
.popup-tag-type-trailer {
    background: rgba(214, 102, 255, 0.14);
    border-color: rgba(214, 102, 255, 0.22);
    color: #e2a6ff;
}
.popup-tag-type-leak {
    background: rgba(255, 191, 71, 0.16);
    border-color: rgba(255, 191, 71, 0.24);
    color: #ffd978;
}
.popup-tag-type-screenshot {
    background: rgba(255, 214, 87, 0.16);
    border-color: rgba(255, 214, 87, 0.24);
    color: #ffe38a;
}
.popup-image-wrap {
    position: relative;
    z-index: 1;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}
.popup-image-wrap img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: cover;
    margin: 0;
    cursor: zoom-in;
}
.popup-description {
    position: relative;
    z-index: 1;
    white-space: normal;
    font-size: 14px;
    line-height: 1.65;
    color: rgba(242, 246, 255, 0.84);
}
.popup-source {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: rgba(226, 232, 255, 0.62);
}

/* ========== Lightbox ========== */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-close {
    position: absolute;
    top: 20px; right: 20px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    border-radius: 50%;
    width: 48px; height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-overlay img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
}

/* ========== OpenLayers Overrides ========== */
.ol-viewport { border-radius: 0; }
.ol-control { display: none; }
.ol-attribution { display: none !important; }

/* ========== Responsive ========== */
@media (min-width: 769px) {
    .mobile-header { display: none !important; }
}

@media (max-width: 768px) {
    body { padding-top: 56px; }
    #map-wrapper { flex-direction: column; }
    .sidebar {
        position: fixed;
        top: 56px;
        left: 0;
        width: 100%;
        height: calc(100vh - 56px);
        z-index: 3000;
        transform: translateX(-100%);
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .sidebar.collapsed {
        transform: translateX(-100%);
    }
    .sidebar-toggle-btn { display: none; }
    #map {
        flex: 1 1 auto;
        height: calc(100dvh - 56px);
        min-height: 200px;
    }
    .map-control-panel {
        top: 76px;
        right: 10px;
    }
    #mouse-coords {
        position: absolute !important;
        top: 76px !important;
        left: 16px !important;
        right: unset !important;
        bottom: unset !important;
        font-size: 11px;
    }
    #popup, .ol-popup {
        min-width: min(320px, calc(100vw - 24px));
        max-width: calc(100vw - 24px);
        left: 50%;
        bottom: 18px;
        transform: translateX(-50%);
        border-radius: 18px;
    }
    .ol-popup::before, .ol-popup::after { left: 50%; }
}
