:root {
    --hotspot-color: rgba(255, 255, 255, 0.3);
    --hotspot-hover: rgba(255, 165, 0, 0.6);
    --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;
    pointer-events: none;
    z-index: 2;
}

/* Interactive Hotspots */
.hotspot {
    position: absolute;
    width: 3%;
    height: 4%;
    background-color: var(--hotspot-color);
    border: 2px solid transparent;
    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%);
}

.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 */
.tooltip {
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--tooltip-bg);
    color: var(--tooltip-text);
    padding: 6px 16px 6px 6px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 800;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
    pointer-events: auto;
    cursor: pointer;
    border: 2px solid #e2d2ba;
}

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

.tooltip .text {
    text-transform: uppercase;
    line-height: 1.1;
    text-align: left;
    white-space: nowrap;
    font-size: 14px;
    font-weight: bold;
    color: #4e342e;
}

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

/* Khusus untuk museum, tooltip muncul di bawah hotspot */
#spot-museum .tooltip {
    bottom: auto;
    top: 130%;
}

.hotspot:hover {
    z-index: 10;
}

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

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

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

/* Cluster Specific Colors */
/* Alam - Green */
.hotspot[data-cluster="alam"] .tooltip .icon {
    background-color: #5a9e33;
}

/* Budaya - Purple */
.hotspot[data-cluster="budaya"] .tooltip .icon {
    background-color: #8e44ad;
}

/* Sejarah - Orange */
.hotspot[data-cluster="sejarah"] .tooltip .icon {
    background-color: #d35400;
}

/* Religi - Blue */
.hotspot[data-cluster="religi"] .tooltip .icon {
    background-color: #2980b9;
}

/* Buatan - Pink */
.hotspot[data-cluster="buatan"] .tooltip .icon {
    background-color: #e84393;
}

/* Transportasi - Dark Cyan */
.hotspot[data-cluster="transportasi"] .tooltip .icon {
    background-color: #00838f;
}

/* Kuliner - Deep Orange */
.hotspot[data-cluster="kuliner"] .tooltip .icon {
    background-color: #e65100;
}

/* Souvenir - Purple */
.hotspot[data-cluster="souvenir"] .tooltip .icon {
    background-color: #7b1fa2;
}

/* Edukasi - Teal */
.hotspot[data-cluster="edukasi"] .tooltip .icon {
    background-color: #00796b;
}

/* Penginapan - Brown */
.hotspot[data-cluster="penginapan"] .tooltip .icon {
    background-color: #5d4037;
}

/* Estimated hotspot positions based on the image */
#spot-merbabu {
    top: 13.5%;
    left: 51%;
}

#spot-borobudur {
    top: 28%;
    left: 51%;
}

#spot-mendut {
    top: 40%;
    left: 55.5%;
}

#spot-kahyangan {
    top: 36%;
    left: 38%;
}

#spot-silancur {
    top: 57%;
    left: 32%;
}

#spot-ketep {
    top: 50%;
    left: 66.5%;
}

#spot-svargabumi {
    top: 45.5%;
    left: 79.5%;
}

#spot-arya-sojatin {
    top: 57%;
    left: 53%;
}

#spot-museum {
    top: 76%;
    left: 49.5%;
}

#spot-grojogan {
    top: 62%;
    left: 83%;
}

#spot-kedung-kayang {
    top: 21%;
    left: 64%;
}

#spot-punthuk {
    top: 28%;
    left: 81%;
}

#spot-elo {
    top: 39%;
    left: 72%;
}