/* Portal do Órbita. Mesmas cores do jogo. */
:root {
  --bg: #050b1d;
  --bg2: #0b0f1a;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-2: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.11);
  --text: #e8ecf4;
  --muted: #9aa6bd;
  --cyan: #4dd8ff;
  --blue: #3a7bff;
  --gold: #ffd166;
  --pink: #ff5ca8;
  --orange: #ffa94d;
  --green: #7fe7d4;
  --bronze: #cd7f32;
  --silver: #c0c8d0;
  --radius: 20px;
  --max: 1160px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 8px; }

/* Fundo estrelado em todas as seções */
#stars {
  position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%;
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(58, 123, 255, 0.18), transparent 60%),
    radial-gradient(900px 600px at 0% 30%, rgba(255, 92, 168, 0.08), transparent 60%),
    var(--bg);
}

.wrap { width: min(var(--max), 100% - 32px); margin: 0 auto; }
section { padding: 88px 0; position: relative; }
.eyebrow {
  color: var(--cyan); font-weight: 800; letter-spacing: 3px; font-size: 12px;
  text-transform: uppercase; margin: 0 0 10px;
}
h1, h2, h3 { line-height: 1.15; margin: 0 0 14px; }
h2 { font-size: clamp(28px, 4vw, 42px); font-weight: 900; letter-spacing: -0.5px; }
.lead { color: var(--muted); font-size: 18px; max-width: 640px; margin: 0 0 28px; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

/* Navegação */
header.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(5, 11, 29, 0.72);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 900; letter-spacing: 4px; }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.nav nav { display: flex; gap: 22px; margin-left: auto; }
.nav nav a { color: var(--muted); font-weight: 600; font-size: 15px; }
.nav nav a:hover { color: var(--text); text-decoration: none; }
.lang { display: flex; gap: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: 99px; padding: 3px; }
.lang a {
  border: 0; background: transparent; padding: 4px 9px; border-radius: 99px;
  font-size: 12px; font-weight: 800; color: var(--muted); cursor: pointer;
}
.lang a:hover { text-decoration: none; color: var(--text); }
.lang a[aria-current="page"] { background: var(--cyan); color: #07122a; }
@media (max-width: 880px) { .nav nav { display: none; } .lang { margin-left: auto; } }

/* Botões */
.btn {
  display: inline-flex; align-items: center; gap: 10px; justify-content: center;
  padding: 13px 22px; border-radius: 99px; font-weight: 800; border: 1px solid transparent;
  cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: linear-gradient(90deg, var(--cyan), var(--blue)); color: #07122a; box-shadow: 0 8px 30px rgba(77, 216, 255, 0.3); }
.btn-ghost { background: var(--panel); border-color: var(--line); color: var(--text); }

/* Botões das lojas */
.stores { display: flex; gap: 12px; flex-wrap: wrap; }
.store {
  display: inline-flex; align-items: center; gap: 12px; min-width: 200px;
  padding: 10px 18px; border-radius: 14px; background: #000; color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28); transition: transform .15s, border-color .2s;
}
.store:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--cyan); }
.store svg { width: 26px; height: 26px; flex: none; }
.store small { display: block; font-size: 11px; opacity: .8; line-height: 1.2; }
.store b { display: block; font-size: 18px; line-height: 1.15; }
.store.soon { opacity: .55; pointer-events: none; }

/* Hero */
.hero { padding: 56px 0 72px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(40px, 6.4vw, 76px); font-weight: 900; letter-spacing: -1.5px; }
.hero h1 .glow { color: var(--cyan); text-shadow: 0 0 28px rgba(77, 216, 255, .55); }
.hero .lead { font-size: 19px; }
.badges { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700;
  padding: 6px 12px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); color: var(--muted);
}
.chip b { color: var(--text); }
.phone-stage { position: relative; display: grid; place-items: center; min-height: 560px; }
#orbits { position: absolute; inset: -60px; width: calc(100% + 120px); height: calc(100% + 120px); }
.phone {
  position: relative; width: min(290px, 70vw); aspect-ratio: 1320 / 2868; border-radius: 42px;
  padding: 10px; background: linear-gradient(160deg, #2a3350, #0d1226);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .12), 0 0 60px rgba(77, 216, 255, .18);
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 33px; }
@media (max-width: 880px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero .lead { margin-inline: auto; }
  .stores, .badges { justify-content: center; }
  .phone-stage { min-height: 480px; }
}

/* Faixa de números ao vivo */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: -20px; }
.stat {
  padding: 20px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line);
}
.stat b { display: block; font-size: 32px; font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 14px; }
.stat .live::before {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #3ddc84; margin-right: 6px; box-shadow: 0 0 10px #3ddc84; animation: pulse 2s infinite;
}
@keyframes pulse { 50% { opacity: .35; } }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } .stat b { font-size: 26px; } }

/* Rankings */
.boards { display: grid; grid-template-columns: 1.4fr .6fr; gap: 20px; align-items: start; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.tabs { display: flex; gap: 6px; padding: 8px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs button {
  border: 0; background: transparent; color: var(--muted); padding: 9px 16px; border-radius: 12px;
  font-weight: 800; cursor: pointer;
}
.tabs button[aria-selected="true"] { background: var(--panel-2); color: var(--text); box-shadow: inset 0 -2px 0 var(--cyan); }
.board-head { display: flex; justify-content: space-between; gap: 10px; padding: 14px 18px 4px; color: var(--muted); font-size: 14px; flex-wrap: wrap; }
.board-head b { color: var(--text); font-variant-numeric: tabular-nums; }
ol.rank { list-style: none; margin: 0; padding: 10px; }
/* Cartão do jogador, igual ao do ranking do app (altura 84). */
ol.rank { display: grid; gap: 8px; }
ol.rank li.banner {
  position: relative; height: 84px; border-radius: 18px; overflow: hidden;
  display: grid; grid-template-columns: 34px 60px 1fr auto auto; align-items: center; gap: 8px;
  padding: 0 16px 0 12px; background-color: #0b0f1a; background-size: cover, cover, cover; background-position: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
ol.rank .pos { font-weight: 900; text-align: center; font-size: 24px; font-variant-numeric: tabular-nums; }
ol.rank .pos.num { font-size: 15px; color: #fff; }
ol.rank .ship { width: 60px; height: 60px; animation: bob 2.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-3px); } }
ol.rank .who { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
ol.rank .name { font-weight: 800; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 6px #000; }
ol.rank .crown { color: var(--gold); margin-left: 6px; font-size: 15px; }
ol.rank .ttl { color: var(--gold); font-weight: 800; font-size: 12px; letter-spacing: .3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 6px #000; }
ol.rank .ttl.unique { color: var(--pink); }
ol.rank .meta { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #dfe6f2; text-shadow: 0 1px 6px #000; }
ol.rank .planet { width: 40px; height: 40px; opacity: .95; }
ol.rank .pts { font-weight: 900; font-size: 24px; font-variant-numeric: tabular-nums; text-shadow: 0 0 8px #000; min-width: 88px; text-align: right; }
/* Moldura desenhada pelo jogo, esticada só no meio (cantos intactos). */
ol.rank .frame {
  position: absolute; inset: 0; pointer-events: none; border-style: solid;
  border-width: 42px 45px; border-image-slice: 84 90 fill; border-image-repeat: stretch;
}
@media (max-width: 480px) {
  ol.rank li.banner { grid-template-columns: 26px 48px 1fr auto; padding: 0 12px 0 8px; gap: 6px; }
  ol.rank .ship { width: 48px; height: 48px; }
  ol.rank .planet { display: none; }
  ol.rank .pts { font-size: 20px; min-width: 0; }
  ol.rank .pos { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) { ol.rank .ship { animation: none; } }
.tier { font-weight: 800; }
.empty, .loading, .error { padding: 40px 20px; text-align: center; color: var(--muted); }
.skeleton { height: 84px; margin: 6px 8px; border-radius: 14px; background: linear-gradient(90deg, var(--panel), var(--panel-2), var(--panel)); background-size: 200% 100%; animation: sk 1.4s infinite; }
@keyframes sk { to { background-position: -200% 0; } }
.side { display: grid; gap: 20px; }
.side .card { padding: 20px; }
.countdown { font-size: 34px; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: 1px; }
.pioneer { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.pioneer:first-of-type { border-top: 0; }
.pioneer .medal { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; flex: none; }
.pioneer b { display: block; }
.pioneer span { color: var(--muted); font-size: 14px; }
@media (max-width: 920px) { .boards { grid-template-columns: 1fr; } }

/* Recursos */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { padding: 24px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.feature .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; margin-bottom: 12px; }
.feature h3 { font-size: 19px; margin-bottom: 6px; }
.feature p { color: var(--muted); margin: 0; }
@media (max-width: 880px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

/* Galeria */
.gallery {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(240px, 62vw); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 4px 18px; scrollbar-width: thin;
}
.gallery img { width: 100%; height: auto; border-radius: 22px; scroll-snap-align: center; border: 1px solid var(--line); aspect-ratio: 1320 / 2868; object-fit: cover; background: var(--panel); }

/* Conquistas */
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.ach { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.ach .m { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; flex: none; }
.ach b { display: block; font-size: 15px; }
.ach span { display: block; font-size: 13px; color: var(--muted); }
.ach.secret span { font-style: italic; }
.ach.secret .m { background: rgba(255, 255, 255, .06); color: var(--muted); }
.uniq { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 18px; }
.uniq div { padding: 16px; border-radius: 16px; border: 1px solid rgba(255, 92, 168, .45); background: rgba(255, 92, 168, .07); }
.uniq b { color: var(--pink); display: block; }
.uniq span { color: var(--muted); font-size: 14px; }
.more { margin-top: 16px; }

/* Coleção */
.collection { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.skin { border-radius: 18px; background: var(--panel); border: 1px solid var(--line); overflow: hidden; aspect-ratio: 1; display: grid; place-items: center; position: relative; }
.skin img { width: 78%; height: 78%; object-fit: contain; transition: transform .3s; }
.skin.space img { width: 100%; height: 100%; object-fit: cover; }
.skin:hover img { transform: scale(1.06); }

/* Trailer */
.trailer { position: relative; aspect-ratio: 16 / 9; border-radius: 24px; overflow: hidden; border: 1px solid var(--line); background: #000 center / cover; max-width: 900px; margin: 0 auto; }
.trailer button { position: absolute; inset: 0; border: 0; background: rgba(0, 0, 0, .25); cursor: pointer; display: grid; place-items: center; }
.trailer .play { width: 84px; height: 84px; border-radius: 50%; background: linear-gradient(90deg, var(--cyan), var(--blue)); display: grid; place-items: center; box-shadow: 0 10px 40px rgba(77, 216, 255, .45); }
.trailer iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.trailer small { position: absolute; bottom: 12px; left: 0; right: 0; text-align: center; color: #fff; opacity: .8; font-size: 12px; }

/* Perguntas */
.faq { max-width: 820px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; font-weight: 800; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--cyan); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq p { color: var(--muted); margin: 0 0 14px; }

/* Chamada final e rodapé */
.cta { text-align: center; padding: 64px 24px; border-radius: 28px; background: linear-gradient(135deg, rgba(77, 216, 255, .14), rgba(255, 92, 168, .10)); border: 1px solid var(--line); }
.cta .stores { justify-content: center; margin-top: 18px; }
footer { padding: 40px 0 60px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); margin-top: 40px; }
footer .wrap { display: flex; gap: 20px; justify-content: space-between; flex-wrap: wrap; }
footer a { color: var(--muted); }

/* Faixa de desafio (quando alguém chega pelo link compartilhado) */
.challenge-bar {
  display: none; background: linear-gradient(90deg, rgba(255, 209, 102, .18), rgba(255, 92, 168, .14));
  border-bottom: 1px solid var(--line); text-align: center; padding: 10px 16px; font-weight: 700;
}
.challenge-bar.show { display: block; }
.challenge-bar a { color: inherit; font-weight: 800; }

.consent {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; max-width: 720px; margin: 0 auto;
  display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 14px 18px; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .5); font-size: 14px;
}
.consent[hidden], #consent-open[hidden] { display: none; }
#consent-open::after { content: "·"; display: inline-block; margin-left: .3em; }
.consent p { margin: 0; flex: 1 1 280px; }
.consent-actions { display: flex; gap: 8px; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .stat .live::before, .skeleton { animation: none; }
}
