:root {
    --bg: #050816;
    --panel: rgba(12, 18, 30, 0.88);
    --border: rgba(255,255,255,0.08);
    --text: #eef4ff;
    --muted: #93a4c3;
    --neon-blue: #00d9ff;
    --neon-pink: #ff2fd1;
    --neon-green: #00ffa3;
    --neon-orange: #ff9f43;
    --shadow: 0 0 25px rgba(0,217,255,0.2);
}

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

body {
    overflow: hidden;
    background: var(--bg);
    font-family: Inter, Arial, sans-serif;
    color: var(--text);
}

#map {
    width: 100vw;
    height: 100vh;
    position: absolute;
    top: 0;
    bottom: 0;
}

.hud {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 50;
    width: 340px;
    background: var(--panel);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 18px;
    box-shadow: var(--shadow);
    pointer-events: none;
}

.hud * { pointer-events: auto; }

.hud h1 {
    font-size: 24px;
    color: var(--neon-blue);
    margin-bottom: 6px;
}

.hud p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.legend {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 999px;
}

.popup {
    position: fixed;
    top: 50%;
    right: 40px;
    transform: translateY(-50%) scale(0.95);
    width: 430px;
    max-height: 90vh;
    overflow-y: auto;
    background: rgba(15, 20, 32, 0.92);
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
    border-radius: 22px;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: 0.25s ease;
    z-index: 100;
    box-shadow: 0 0 50px rgba(0,0,0,0.6), 0 0 25px rgba(0,217,255,0.15);
}

.popup.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) scale(1);
}

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

.popup-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--neon-blue);
}

.popup-category {
    margin-top: 6px;
    display: inline-block;
    background: rgba(255,255,255,0.08);
    padding: 4px 10px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 12px;
    text-transform: capitalize;
}

.close-btn {
    border: none;
    background: transparent;
    color: white;
    font-size: 28px;
    cursor: pointer;
}

.popup-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

.section {
    margin-bottom: 20px;
}

.section h3 {
    margin-bottom: 10px;
    color: var(--neon-pink);
    font-size: 15px;
    letter-spacing: 1px;
}

.section .cost-header {
    color: var(--neon-orange);
}

.section p,
.section li {
    color: var(--muted);
    line-height: 1.7;
    font-size: 14px;
}

.ratings {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.rating-card {
    flex: 1;
    min-width: 90px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    padding: 10px;
    border-radius: 14px;
    text-align: center;
}

.rating-card span {
    display: block;
    color: var(--neon-green);
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 4px;
}

.cost-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.map-link {
    display: inline-block;
    padding: 12px 16px;
    border-radius: 14px;
    text-decoration: none;
    color: var(--text);
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    transition: 0.2s ease;
    font-size: 14px;
    white-space: nowrap;
}

.map-link:hover {
    border-color: var(--neon-blue);
    box-shadow: 0 0 15px rgba(0,217,255,0.25);
    color: var(--neon-blue);
}

/* Mobile full-screen fix */
@media (max-width: 500px) {
    .popup {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        transform: translateY(0) scale(1);
        border-radius: 0;
    }

    .popup.active {
        transform: translateY(0) scale(1);
    }
    
    .hud {
        width: calc(100% - 40px);
    }
}
