/* Base 3D Setup */
.perspective-container {
    perspective: 1200px;
}

.preserve-3d {
    transform-style: preserve-3d;
}

/* Glassmorphism Panel */
.glass-panel {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(34, 211, 238, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.6);
}

/* Scrollbar Customization */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5); 
    border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(34, 211, 238, 0.5); 
    border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(34, 211, 238, 0.8); 
}

/* Interactive Elements & Animations */
.interactive-hotspot {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34,211,238,0.9) 0%, rgba(34,211,238,0) 70%);
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.2s, background 0.3s;
    animation: pulse-hotspot 2s infinite;
    z-index: 50;
}

.interactive-hotspot:hover {
    transform: scale(1.3) translateZ(20px);
    background: radial-gradient(circle, rgba(253,224,71,0.9) 0%, rgba(253,224,71,0) 70%);
}

@keyframes pulse-hotspot {
    0% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(34, 211, 238, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); }
}

/* Diorama Base Layer */
.diorama-layer {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform-style: preserve-3d;
    transition: all 0.5s ease;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(255,255,255,0.1);
}

/* Scene Backgrounds */
.bg-scene-1 { background-image: url('img/scene_1.png'); }
.bg-scene-2 { background-image: url('img/scene_2.png'); }
.bg-scene-3 { background-image: url('img/scene_3.png'); }
.bg-scene-4 { background-image: url('img/scene_4.png'); }
.bg-scene-5 { background-image: url('img/scene_5.png'); }

/* Scanner (Chapter 1) */
.scanner-active {
    cursor: crosshair;
}
#scanner-light {
    position: absolute;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34,211,238,0.4) 0%, rgba(34,211,238,0) 70%);
    pointer-events: none;
    transform: translate(-50%, -50%);
    display: none;
    z-index: 40;
    mix-blend-mode: screen;
}

/* Specific puzzle elements */
.snout-particle {
    position: absolute;
    width: 12px;
    height: 12px;
    background-color: #ef4444; /* PM2.5 red */
    border-radius: 50%;
    box-shadow: 0 0 12px #ef4444;
    transition: all 0.5s linear;
    z-index: 60;
}

.glowing-dust {
    position: absolute;
    width: 25px;
    height: 25px;
    background-color: #a855f7; /* Purple PFAS/PBDE */
    border-radius: 50%;
    box-shadow: 0 0 20px #a855f7, inset 0 0 8px #fff;
    cursor: pointer;
    transition: transform 0.2s;
    z-index: 60;
}
.glowing-dust:hover {
    transform: scale(1.6);
}

.vessel-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawPath 2.5s ease-out forwards;
}
@keyframes drawPath {
    to { stroke-dashoffset: 0; }
}

/* UI Animations */
.fade-in {
    animation: fadeIn 0.5s forwards;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.overlay-text {
    position: absolute;
    color: white;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    pointer-events: none;
    transform: translateZ(40px);
    background: rgba(0,0,0,0.6);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.1);
}
