:root { --ease: cubic-bezier(.2,.7,.2,1); }
* { box-sizing: border-box; }
html, body { margin:0; height:100%; background:#0d1f14; overflow:hidden; font-family: Arial, Helvetica, sans-serif; user-select:none; -webkit-user-select:none; }

/* stage: fits the landscape artwork (16:9) inside any window */
.stage { position:fixed; inset:0; display:flex; align-items:center; justify-content:center; }
.frame { position:relative; width:min(100vw, 177.7vh); height:min(56.25vw, 100vh); aspect-ratio:1672/941; overflow:hidden; background:#0d1f14; }

.screen { position:absolute; inset:0; opacity:0; visibility:hidden; transform: scale(1.015); transition: opacity .7s var(--ease), transform .9s var(--ease), visibility .7s; }
.screen.active { opacity:1; visibility:visible; transform: scale(1); }
.base { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; pointer-events:none; }
.screen.active > .base { animation: drift 30s ease-in-out infinite alternate; }
@keyframes drift { from { transform: scale(1); } to { transform: scale(1.02); } }

/* light and water effects (overlays only, they never duplicate artwork) */
.ambient { position:absolute; pointer-events:none; }
.sunbeam { inset:-20% -40%; background: linear-gradient(105deg, transparent 40%, rgba(255,250,220,.22) 50%, transparent 60%); mix-blend-mode: screen; animation: beam 14s ease-in-out infinite; }
@keyframes beam { 0%,100% { transform: translateX(-12%); opacity:.55; } 50% { transform: translateX(12%); opacity:.9; } }
.water { background: repeating-linear-gradient(95deg, rgba(255,255,255,0) 0 18px, rgba(255,255,255,.35) 22px, rgba(255,255,255,0) 30px); mix-blend-mode: soft-light; opacity:.55; animation: shimmer 6s linear infinite; background-size: 160px 100%; }
@keyframes shimmer { from { background-position: 0 0; } to { background-position: 160px 0; } }
.campfire { background: radial-gradient(circle, rgba(255,170,60,.55) 0%, rgba(255,120,30,.18) 45%, rgba(255,120,30,0) 70%); mix-blend-mode: screen; animation: fire 2.6s ease-in-out infinite; }
@keyframes fire { 0%,100% { opacity:.6; transform: scale(1); } 50% { opacity:1; transform: scale(1.08); } }

/* interactive hotspots */
.hot { position:absolute; background:transparent; border:0; padding:0; margin:0; cursor:pointer; border-radius:18px; overflow:hidden; -webkit-tap-highlight-color: transparent; transition: background .3s ease, box-shadow .3s ease; }
.hot.round { border-radius:50%; }
.hot:hover { background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 2px rgba(255,240,170,.55); }
.hot.locked:hover { box-shadow: none; background: rgba(40,20,0,.12); }
.hot::after { content:""; position:absolute; top:0; bottom:0; left:-60%; width:40%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent); transform: skewX(-20deg); pointer-events:none; opacity:0; }
.hot:hover::after { opacity:1; animation: sheen 1.1s var(--ease) forwards; }
@keyframes sheen { from { left:-60%; } to { left:130%; } }
.hot.shake { animation: shake .45s ease; }
@keyframes shake { 0%,100% { transform:translateX(0); } 20% { transform:translateX(-6px); } 40% { transform:translateX(6px); } 60% { transform:translateX(-4px); } 80% { transform:translateX(3px); } }
.ripple { position:absolute; width:20px; height:20px; border-radius:50%; background: rgba(255,250,200,.6); transform: translate(-50%,-50%) scale(0); animation: ripple .6s ease-out forwards; pointer-events:none; }
@keyframes ripple { to { transform: translate(-50%,-50%) scale(14); opacity:0; } }

.ring { position:absolute; border:3px solid rgba(255,220,90,.9); border-radius:18px; pointer-events:none; opacity:0; }
.screen#levels.active .ring { animation: ringpulse 2.4s ease-in-out infinite; }
@keyframes ringpulse { 0%,100% { opacity:.25; } 50% { opacity:1; } }

.hint { position:fixed; left:50%; bottom:5vh; transform: translate(-50%, 20px); background: rgba(40,28,10,.85); color:#fff6d8; padding:10px 18px; border-radius:999px; font-size:clamp(13px,2vh,18px); opacity:0; transition: opacity .3s, transform .3s var(--ease); pointer-events:none; }
.hint.show { opacity:1; transform: translate(-50%,0); }
