:root { --silver1: #ffffff; --silver2: #c8ced8; --silver3: #8a93a3; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #02030a; color: #fff; font-family: 'Nunito', system-ui, sans-serif; }
body.idle { cursor: none; }
#sky { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#avatars, #fx { position: fixed; inset: 0; pointer-events: none; }
#fx { z-index: 40; }

/* ---------- Título prateado ---------- */
#title {
  position: fixed; top: 2.2vh; left: 0; right: 0; margin: 0; z-index: 60; text-align: center;
  font-family: 'Orbitron', sans-serif; font-weight: 900; letter-spacing: .08em;
  font-size: clamp(28px, 6.2vmin, 120px); line-height: 1.1;
  background: linear-gradient(100deg, #6f7785 0%, #e9edf3 18%, #ffffff 24%, #9aa3b2 34%, #dfe4ec 48%, #7d8696 60%, #f4f6fa 74%, #ffffff 78%, #a4acba 90%, #6f7785 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 1px rgba(255,255,255,.9)) drop-shadow(0 2px 0 #4b5261) drop-shadow(0 0 18px rgba(170,200,255,.45));
  animation: shine 7s linear infinite;
}
@keyframes shine { from { background-position: 100% 0; } to { background-position: -150% 0; } }

/* ---------- Avatares ---------- */
.av { position: absolute; left: 0; top: 0; width: 200px; height: 264px; transform-origin: 100px 132px; will-change: transform, opacity; z-index: 10; }
.av.small { z-index: 5; }
.av.small .av-inner { filter: brightness(.82) saturate(.85); }
.av.leaving { z-index: 2; }
.av.hold { z-index: 50; }
.av-inner { width: 200px; height: 264px; filter: drop-shadow(0 10px 14px rgba(0,0,0,.6)) drop-shadow(0 0 6px rgba(150,190,255,.25)); }
.av-inner svg { width: 100%; height: 100%; overflow: visible; }
.av.arrive .av-inner { animation: arrive 2.4s ease-out; }
@keyframes arrive {
  0% { filter: drop-shadow(0 0 0 rgba(255,255,255,0)) brightness(2.2); }
  30% { filter: drop-shadow(0 0 40px rgba(170,220,255,1)) brightness(1.4); }
  100% { filter: drop-shadow(0 10px 14px rgba(0,0,0,.6)) drop-shadow(0 0 6px rgba(150,190,255,.25)) brightness(1); }
}
.av-name {
  position: absolute; left: 50%; top: 262px; transform: translateX(-50%); white-space: nowrap;
  font: 800 22px 'Nunito', sans-serif; padding: 3px 14px; border-radius: 999px;
  background: rgba(8,12,30,.65); border: 1px solid rgba(200,215,255,.35); color: #eef3ff;
  text-shadow: 0 1px 2px #000;
}
.av-name:empty { display: none; }
.blink { animation: blink 1.1s steps(2) infinite; }
.blink2 { animation: blink 1.7s steps(2) infinite .5s; }
.glow { animation: glow 1.6s ease-in-out infinite alternate; }
@keyframes blink { 50% { opacity: .25; } }
@keyframes glow { to { opacity: .45; } }

/* ---------- Boas-vindas ---------- */
#welcome {
  position: fixed; left: 50%; top: 12.5vh; transform: translate(-50%, 0) scale(.8); z-index: 80; opacity: 0;
  font: 900 clamp(18px, 3.6vmin, 64px) 'Orbitron', sans-serif; text-align: center; width: max-content; max-width: 92vw;
  color: #fff; text-shadow: 0 0 18px rgba(140,200,255,.9), 0 2px 4px #000; transition: opacity .6s, transform .6s;
  pointer-events: none;
}
#welcome.show { opacity: 1; transform: translate(-50%, 0) scale(1); }

#counter {
  position: fixed; left: 1.6vmin; bottom: 1.6vmin; z-index: 70; font: 800 clamp(12px, 1.8vmin, 30px) 'Nunito', sans-serif;
  padding: .8vmin 1.6vmin; border-radius: 999px; background: rgba(10,16,40,.6); border: 1px solid rgba(190,205,240,.3); color: #dfe7fb;
}
#counter:empty { display: none; }

/* ---------- Elementos que cruzam o universo ---------- */
.fly { position: absolute; left: 0; top: 0; will-change: transform; }
.fly svg { width: 100%; height: auto; overflow: visible; display: block; }
.flame { transform-origin: 50px 196px; animation: flame .12s ease-in-out infinite alternate; }
@keyframes flame { from { transform: scaleY(.85) scaleX(1.05); } to { transform: scaleY(1.15) scaleX(.92); } }
.wave { animation: wave 1.4s ease-in-out infinite alternate; transform-origin: 236px 120px; }
@keyframes wave { from { transform: skewY(-3deg); } to { transform: skewY(3deg); } }
.beam { animation: beam 2.2s ease-in-out infinite alternate; }
@keyframes beam { from { opacity: .15; } to { opacity: .55; } }
.spin { animation: spin 30s linear infinite; transform-box: fill-box; transform-origin: center; }
@keyframes spin { to { transform: rotate(360deg); } }
