/* --- 3. Unified Interactive Scaling Layer --- */
#temple-and-offerings-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 15;
    transform-origin: center bottom;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

/* --- 4. Interactive Items Coordinates & Sizing --- */
.interactive-item {
    position: absolute;
    cursor: default;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.5s ease, filter 0.5s ease;
}

.interactive-item.hidden {
    opacity: 0;
    pointer-events: none;
}

.item-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 2;
    transition: opacity 0.4s ease;
}

.static-item {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease;
    pointer-events: none;
}

.static-item.hidden {
    opacity: 0;
}

#static-left-vase {
    left: 24.5%;
    top: 63%;
    width: 8%;
    height: 30%;
}

#static-right-vase {
    left: 67.5%;
    top: 63%;
    width: 8%;
    height: 30%;
}

#interactive-ganesha {
    left: 32.7%;
    top: 34.0%;
    width: 33.4%;
    height: 33.4%;
}

#interactive-bhog {
    left: 46.0%;
    top: 67.5%;
    width: 8%;
    height: 15%;
}

/* Diyas Sizing */

#diya-l2 {
    left: 35.5%;
    top: 73.7%;
    width: 4.7%;
    height: 4.8%;
}

#diya-l3 {
    left: 39.5%;
    top: 73.7%;
    width: 4.7%;
    height: 4.8%;
}


#diya-r2 {
    left: 55.8%;
    top: 73.7%;
    width: 4.7%;
    height: 4.8%;
}

#diya-r3 {
    left: 59.8%;
    top: 73.7%;
    width: 4.7%;
    height: 4.8%;
}

/* --- 5. Glow & Pulse System --- */
.glow-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.45) 0%, rgba(255, 140, 0, 0.08) 50%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    mix-blend-mode: screen;
    transition: opacity 0.5s ease;
}



#interactive-ganesha .glow-effect {
    width: 60%;
    height: 60%;
    transform: translate(-50%, -50%) scale(0.7);
}

/* Active Glowing Items */
.glowing {
    cursor: pointer;
    pointer-events: auto;
    /* Enable interaction only when glowing */
    animation: pulse-glow-scale 2.2s ease-in-out infinite alternate;
}

.glowing .glow-effect {
    opacity: 1;
}

.glowing .item-img {
    filter: var(--gold-glow);
}

.interactive-item.glowing:hover {
    transform: scale(1.08);
}

.interactive-item.glowing:active {
    transform: scale(0.96);
}

/* --- 6. Diya Flame and Lights Overlay --- */
.diya-flame {
    position: absolute;
    bottom: 50%;
    left: 67%;
    transform: translate(-50%, -10%);
    width: 36%;
    height: 77%;
    pointer-events: none;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.flame-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: flame-flicker 0.15s infinite alternate ease-in-out;
}

.diya-glow {
    position: absolute;
    width: 160%;
    height: 160%;
    background: radial-gradient(circle, rgba(255, 145, 0, 0.5) 0%, rgba(255, 69, 0, 0.12) 50%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 3;
    mix-blend-mode: screen;
    opacity: 0;
    transition: opacity 0.8s ease;
    animation: glow-flicker 2.5s infinite alternate ease-in-out;
}

.diya-glow.visible,
.diya-flame.visible {
    opacity: 1;
}

/* Ambient glow overlay (lit up temple atmosphere) */
#ambient-glow-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 60%, rgba(255, 140, 0, 0.16) 0%, rgba(0, 0, 0, 0) 65%);
    pointer-events: none;
    z-index: 12;
    opacity: 0;
    mix-blend-mode: color-dodge;
    transition: opacity 1.5s ease-in-out;
}

#ambient-glow-overlay.visible {
    opacity: 1;
}