/* General body styling */
body {
    margin: 0;
    padding: 0;
    overflow: hidden;  /* Prevent scrolling */
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle, #111 0%, #000 100%);
    height: 100vh;
    font-family: Arial, sans-serif;
    color: white;
}

/* Poster container styling */
#poster-container {
    position: fixed;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    z-index: 3;
    /* GPU acceleration */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Poster styling */
#poster {
    max-width: 100vw;
    max-height: 100vh;
    width: auto;
    height: auto;
    position: relative;
    object-fit: contain;
    /* GPU acceleration for smooth transitions */
    will-change: transform, opacity;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Clone poster for transitions */
.poster-clone {
    will-change: transform, opacity;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Animated overlay effects */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    mix-blend-mode: overlay;
    opacity: 0.1;
    animation: flicker 3s infinite alternate;
    z-index: 1;  /* Ensure overlay is above the canvas but below the poster */
}

@keyframes flicker {
    0% { opacity: 0.05; }
    100% { opacity: 0.15; }
}

/* Canvas styling for WebGL effects */
canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;  /* Ensure canvas stays below the poster and overlay */
}

/* Particle container for each particle type */
.particle-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
}

.particle {
    position: absolute;
    width: 5px;
    height: 5px;
    background-color: white;
    border-radius: 50%;
}

.snowflake {
    background-color: #fff;
}

.stars {
    width: 3px;
    height: 3px;
    background-color: #ff0;
    box-shadow: 0 0 5px #ff0, 0 0 10px #ff0;
}

.raindrop {
    width: 2px;
    height: 8px;
    background-color: #00f;
}

.leaf {
    width: 10px;
    height: 10px;
    background-color: #228B22;
    border-radius: 50%;
}
