/* Screensaver Overlay */
#screensaver-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    background: #020617;
    overflow: hidden;
    user-select: none;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}
#screensaver-overlay.active {
    display: block;
    opacity: 1;
}

#forestCanvas {
    position: absolute;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 0;
}
#hint {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    pointer-events: none;
    z-index: 10;
    color: rgba(134,239,172,0.7);
    text-shadow: 0 0 20px rgba(52,211,153,0.8);
    animation: hintPulse 3s ease-in-out infinite;
    white-space: nowrap;
    font-family: 'Outfit', sans-serif;
}
@keyframes hintPulse { 0%,100%{opacity:0.3;} 50%{opacity:1;} }

#lightBurst {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0; height: 0;
    background: radial-gradient(ellipse, rgba(134,239,172,0.9) 0%, rgba(16,185,129,0.4) 40%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 6;
    opacity: 0;
}
#dragIndicator {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    background: linear-gradient(to top, rgba(52,211,153,0.9), transparent);
    height: 0;
    z-index: 8;
    pointer-events: none;
}
#loadingScreen {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at bottom, #064e3b 0%, #020617 70%);
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s;
    overflow: hidden;
}
#loadingScreen.active { opacity: 1; pointer-events: all; }
.loading-logo {
    font-size: 2.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #34d399, #6ee7b7, #a7f3d0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    animation: logoFloat 1.5s ease-in-out infinite alternate;
    font-family: 'Outfit', sans-serif;
}
@keyframes logoFloat { from{transform:translateY(0);} to{transform:translateY(-8px);} }
.loading-sub {
    color: rgba(167,243,208,0.6);
    font-size: 0.85rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 36px;
    font-family: 'Outfit', sans-serif;
}
.loading-bar-wrap {
    width: 240px; height: 3px;
    background: rgba(255,255,255,0.08);
    border-radius: 10px; overflow: hidden;
}
.loading-bar {
    height: 100%;
    background: linear-gradient(90deg, #34d399, #6ee7b7);
    border-radius: 10px;
    width: 0%;
    animation: fillBar 2s ease forwards;
    box-shadow: 0 0 14px rgba(52,211,153,0.9);
}
@keyframes fillBar { 0%{width:0%;} 60%{width:75%;} 100%{width:100%;} }
.leaf-container { position:absolute; inset:0; pointer-events:none; overflow:hidden; }
.leaf {
    position:absolute; pointer-events:none; opacity:0;
    animation: leafFall linear forwards;
}
@keyframes leafFall {
    0%  { opacity:1; transform:translateY(-20px) rotate(0deg); }
    100%{ opacity:0; transform:translateY(100vh) rotate(720deg); }
}
