:root {
    --hotspot-color: rgba(255, 255, 255, 0.35);
    --hotspot-hover: rgba(255, 165, 0, 0.7);
    --tooltip-bg: #f3e5d0;
    --tooltip-text: #4e342e;
    --tooltip-icon-bg: #5a9e33;
}

.hotspot-layer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95vw;
    height: 92vh;
    max-width: 1920px;
    max-height: 1080px;
    margin-top: 80px;
    pointer-events: none;
    z-index: 5;
}

/* Interactive Hotspots */
.hotspot {
    position: absolute;
    width: 3.2%;
    height: 4.2%;
    background-color: var(--hotspot-color);
    border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translate(-50%, -50%);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.hotspot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background-color: transparent;
    border: 2px solid var(--hotspot-hover);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 2s infinite;
}

/* Tooltip styling - Anti-Collision Limits */
.tooltip {
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--tooltip-bg);
    color: var(--tooltip-text);
    padding: 5px 12px 5px 5px;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 800;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.35);
    pointer-events: auto;
    cursor: pointer;
    border: 2px solid #e2d2ba;
    max-width: 220px;
    white-space: nowrap;
    z-index: 10;
}

.tooltip .icon {
    width: 28px;
    height: 28px;
    background-color: var(--tooltip-icon-bg);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 14px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.tooltip .text {
    text-transform: uppercase;
    line-height: 1.1;
    text-align: left;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 700;
    color: #4e342e;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tooltip .dist-info {
    font-size: 9px;
    color: #c92a2a;
    font-weight: 700;
    margin-top: 2px;
    white-space: nowrap;
    display: block;
    text-align: left;
}

.tooltip .tooltip-jarak {
    display: block;
    font-size: 9px;
    color: #c92a2a;
    font-weight: 700;
    margin-top: 2px;
    white-space: nowrap;
    text-align: left;
}

/* Fallback: sembunyikan jarak hardcode jika jarak live sudah ada */
.hotspot.has-live-distance .tooltip-jarak {
    display: none !important;
}

/* Orientasi Tooltip di Bawah (Zigzag Stagger Anti-Overlap) */
#spot-museum .tooltip,
.hotspot.tooltip-bottom .tooltip {
    bottom: auto;
    top: 130%;
}

.hotspot:hover {
    z-index: 100;
    transform: translate(-50%, -50%) scale(1.15);
}

.hotspot.hidden {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translate(-50%, -50%) scale(0) !important;
}

.map-container.search-filtering .hotspot:not(.search-active) {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translate(-50%, -50%) scale(0) !important;
}

/* Search Active Highlight State */
.hotspot.search-active {
    z-index: 999 !important;
    transform: translate(-50%, -50%) scale(1.3) !important;
}

.hotspot.search-active .tooltip {
    border-color: #ff9800 !important;
    box-shadow: 0 0 24px rgba(255, 152, 0, 0.95), 0 6px 15px rgba(0,0,0,0.4) !important;
    animation: searchPulse 0.8s infinite alternate ease-in-out !important;
}

@keyframes searchPulse {
    0% { transform: translateX(-50%) translateY(0); filter: brightness(1); }
    100% { transform: translateX(-50%) translateY(-8px); filter: brightness(1.25); }
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.8); opacity: 0; }
}

/* Cluster Specific Colors */
.hotspot[data-cluster="alam"] .tooltip .icon { background-color: #5a9e33; }
.hotspot[data-cluster="budaya"] .tooltip .icon { background-color: #8e44ad; }
.hotspot[data-cluster="sejarah"] .tooltip .icon { background-color: #d35400; }
.hotspot[data-cluster="religi"] .tooltip .icon { background-color: #2980b9; }
.hotspot[data-cluster="buatan"] .tooltip .icon { background-color: #e84393; }
.hotspot[data-cluster="penginapan"] .tooltip .icon { background-color: #0288d1; }
.hotspot[data-cluster="kuliner"] .tooltip .icon { background-color: #e67e22; }
.hotspot[data-cluster="souvenir"] .tooltip .icon { background-color: #f1c40f; }
.hotspot[data-cluster="rental"] .tooltip .icon { background-color: #16a085; }
.hotspot[data-cluster="transportasi"] .tooltip .icon { background-color: #27ae60; }
.hotspot[data-cluster="edukasi"] .tooltip .icon { background-color: #8e44ad; }

/* Fixed Positions for Landmark Hotspots */
#spot-borobudur { top: 28%; left: 51%; }
#spot-kahyangan { top: 36%; left: 38%; }
#spot-silancur { top: 40%; left: 21%; }
#spot-ketep { top: 50%; left: 66.5%; }
#spot-kedung-kayang { top: 18%; left: 64%; }
#spot-punthuk { top: 28%; left: 81%; }
#spot-elo { top: 39%; left: 72%; }
#spot-nepal-van-java { top: 19%; left: 38%; }
#spot-telomoyo { top: 29%; left: 31%; }
#spot-rhema { top: 42%; left: 49%; }