/* CONTA NO AR · V2 VISUAL · ETAPA 1
   Ambientes vetoriais em camadas, paraquedas redesenhado e vento.
   Nenhuma regra do motor de contas é alterada. */

.game-screen{
  --canopy-one:#f5fcfa;
  --canopy-two:#18c7ac;
  --canopy-three:#e8ffef;
  --cord-color:rgba(249,255,251,.85);
  background:#315f7b;
}
.game-subtraction{--canopy-one:#e4efff;--canopy-two:#5590ff;--canopy-three:#f9f4ff;--cord-color:rgba(235,240,255,.85)}
.game-multiplication{--canopy-one:#fff0b9;--canopy-two:#f09c46;--canopy-three:#fff8da;--cord-color:rgba(255,246,220,.83)}
.game-division{--canopy-one:#e8f7ff;--canopy-two:#8c7ef0;--canopy-three:#72e4ef;--cord-color:rgba(213,245,255,.9)}

.game-addition .sky{
  background:radial-gradient(circle at 77% 21%,rgba(255,247,201,.56),transparent 32%),
    linear-gradient(180deg,#4b95c8 0%,#8ecfd7 55%,#b1dec0 100%);
}
.game-subtraction .sky{
  background:radial-gradient(circle at 82% 20%,rgba(116,159,248,.18),transparent 34%),
    linear-gradient(180deg,#071631 0%,#17345a 60%,#335476 100%);
}
.game-multiplication .sky{
  background:radial-gradient(circle at 77% 21%,rgba(255,236,167,.39),transparent 38%),
    linear-gradient(180deg,#576d91 0%,#c68b87 48%,#f2bb70 100%);
}
.game-division .sky{
  background:radial-gradient(ellipse at 55% 0%,rgba(162,240,251,.22),transparent 49%),
    linear-gradient(180deg,#246b9b 0%,#155077 43%,#082c4c 100%);
}
/* Desativa raios antigos do tema Oceano: o novo céu já contém seus raios. */
.game-division .sky::before{display:none}

.scene-layers{position:absolute;inset:0;overflow:hidden;z-index:0;pointer-events:none;isolation:isolate}
.scene-layer{position:absolute;inset:-1.5% -5%;pointer-events:none;transform:translate3d(0,0,0);backface-visibility:hidden}
.scene-layer img{display:block;width:100%;height:100%;object-fit:fill;user-select:none;-webkit-user-drag:none}
.scene-far{opacity:.97;animation:scene-drift-far 32s ease-in-out infinite alternate}
.scene-mid{opacity:.96;animation:scene-drift-mid 20s ease-in-out infinite alternate}
.scene-near{opacity:1;animation:scene-drift-near 12s ease-in-out infinite alternate}
@keyframes scene-drift-far{from{transform:translate3d(-1.7%,0,0)}to{transform:translate3d(1.5%,.35%,0)}}
@keyframes scene-drift-mid{from{transform:translate3d(1.7%,.4%,0)}to{transform:translate3d(-2%,0,0)}}
@keyframes scene-drift-near{from{transform:translate3d(-2.8%,0,0)}to{transform:translate3d(2.5%,.25%,0)}}

/* A posição vertical vem da engine via --fall-y em pixels, calculada em função da altura real do cenário. */
.game-screen .falling{
  --fall-y:0px;
  --gust-from:-8px;
  --gust-to:8px;
  --tilt-from:-3.5deg;
  --tilt-to:4.8deg;
  --gust-duration:3.8s;
  left:50%;top:4px;width:max-content;
  z-index:7;
  transform:translate3d(-50%,var(--fall-y),0);
  transition:filter .18s;
  will-change:transform;
  filter:drop-shadow(0 13px 16px rgba(5,27,35,.14));
}
.flight-rig{display:flex;flex-direction:column;align-items:center;transform-origin:50% 13%;animation:wind-sway var(--gust-duration) ease-in-out infinite alternate;will-change:transform}
@keyframes wind-sway{
  from{transform:translate3d(var(--gust-from),0,0) rotate(var(--tilt-from))}
  to{transform:translate3d(var(--gust-to),2px,0) rotate(var(--tilt-to))}
}
.game-screen .parachute{
  width:clamp(158px,50vw,223px);
  height:auto;
  aspect-ratio:240/175;
  display:block;
  overflow:visible;
  position:relative;
  border-radius:0;
  background:none;
  box-shadow:none;
  filter:drop-shadow(0 9px 7px rgba(9,25,39,.14));
}
.game-screen .problem{
  margin-top:-7px;
  position:relative;
  z-index:2;
}
/* Outros temas podem trocar apenas as cores; mantendo as dobras da cobertura. */
.game-subtraction .parachute,.game-multiplication .parachute,.game-division .parachute{
  background:none;box-shadow:none;
}
.game-screen .falling.danger-chance .parachute{
  animation:none;
}
.game-screen .falling.danger-chance .flight-rig{
  animation-duration:1s;
}
.game-screen .falling.correct{animation:v2-canopy-win .4s ease-in forwards}
.game-screen .falling.crash{animation:v2-canopy-crash .65s ease-in forwards}
@keyframes v2-canopy-win{
  0%{transform:translate3d(-50%,var(--fall-y),0) scale(1);opacity:1}
  45%{transform:translate3d(-50%,var(--fall-y),0) scale(1.12);opacity:1}
  100%{transform:translate3d(-50%,var(--fall-y),0) scale(.18);opacity:0}
}
@keyframes v2-canopy-crash{
  0%{transform:translate3d(-50%,var(--fall-y),0) scale(1);opacity:1}
  55%{transform:translate3d(-50%,var(--fall-y),0) scale(1.08);filter:brightness(1.65)}
  100%{transform:translate3d(-50%,var(--fall-y),0) scale(.36);opacity:0}
}
/* Plataforma de colisão discreta, integrada ao horizonte e em todas as operações. */
.game-screen .ground{height:48px;z-index:5;box-shadow:0 -8px 30px rgba(7,23,29,.09)}
.game-screen .ground span{border-top:2px solid rgba(238,250,247,.47)}
.game-addition .ground{background:linear-gradient(#347963,#1e554c)}
.game-subtraction .ground{background:linear-gradient(#0c2444,#07172b)}
.game-multiplication .ground{background:linear-gradient(#25493a,#142e2b)}
.game-division .ground{background:linear-gradient(#0f435c,#072a44)}

@media (min-width:760px){
  .game-screen .falling{transform:translate3d(-50%,var(--fall-y),0)}
  .game-screen .parachute{width:222px}
}
@media (max-height:690px) and (max-width:759px){
  .game-screen .parachute{width:clamp(146px,43vw,184px)}
  .game-screen .problem{font-size:clamp(23px,6vw,34px);padding:12px 20px}
}
@media (prefers-reduced-motion:reduce){
  .scene-layer,.flight-rig{animation:none!important;transform:none!important}
}
