/* ==========================================================
   FLOFLICKS GAMES — estilo principal
   Cores tiradas do banner do canal: roxo-noite, verde Floflicks,
   amarelo da coroa.
   ========================================================== */

@font-face { font-family: "Press Start 2P"; src: url("../fonts/press-start-2p.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("../fonts/nunito-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("../fonts/nunito-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("../fonts/nunito-900.woff2") format("woff2"); font-weight: 900; font-display: swap; }

:root {
  --noite: #12062b;
  --noite-2: #1c0a40;
  --roxo: #2e1066;
  --roxo-2: #4b1fa0;
  --roxo-claro: #a77bff;
  --verde: #7cd62c;
  --verde-escuro: #3d8a10;
  --amarelo: #ffd60a;
  --amarelo-escuro: #b58a00;
  --vermelho: #e0344d;
  --texto: #f6f1ff;
  --texto-suave: #cbbfe8;
  --borda: rgba(167, 123, 255, .28);
  --raio: 18px;
  --pixel: "Press Start 2P", ui-monospace, monospace;
  --corpo: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --largura: 1120px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--corpo);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.55;
  color: var(--texto);
  background-color: var(--noite);
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff8 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 72% 9%, #fff8 50%, transparent 51%),
    radial-gradient(2px 2px at 88% 42%, #ffd60a99 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 33% 63%, #fff6 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 55% 85%, #fff6 50%, transparent 51%),
    radial-gradient(2px 2px at 6% 92%, #ffd60a88 50%, transparent 51%),
    radial-gradient(ellipse 90% 60% at 50% 0%, #3a128055 0%, transparent 70%);
  background-size: 420px 420px, 420px 420px, 420px 420px, 420px 420px, 420px 420px, 420px 420px, 100% 100%;
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--amarelo); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--amarelo); outline-offset: 3px; border-radius: 8px; }

.container { width: min(100% - 32px, var(--largura)); margin-inline: auto; }
.so-leitor { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Títulos ---------- */
h1, h2, h3 { margin: 0 0 .6em; line-height: 1.35; }
.titulo-pixel {
  font-family: var(--pixel);
  font-weight: 400;
  letter-spacing: .02em;
  color: var(--verde);
  text-shadow: 3px 3px 0 #000, 0 0 18px #7cd62c44;
}
h1.titulo-pixel { font-size: clamp(20px, 5vw, 34px); }
h2.titulo-pixel { font-size: clamp(16px, 3.6vw, 24px); }
h3 { font-size: 20px; font-weight: 900; }
.amarelo { color: var(--amarelo); }
.subtitulo { color: var(--texto-suave); font-size: 18px; max-width: 60ch; margin: 0 0 1.5em; }

/* ---------- Cabeçalho ---------- */
.topo {
  position: sticky; top: 0; z-index: 20;
  background: rgba(18, 6, 43, .88);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--borda);
}
.topo .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo img { width: 42px; height: 42px; border-radius: 12px; border: 2px solid var(--verde); background: var(--roxo); }
.logo-texto { font-family: var(--pixel); font-size: 13px; line-height: 1.5; color: var(--verde); text-shadow: 2px 2px 0 #000; }
.logo-texto small { display: block; font-size: 9px; color: var(--amarelo); letter-spacing: .25em; }
.menu { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.menu a {
  display: block; padding: 8px 14px; border-radius: 12px;
  color: var(--texto); text-decoration: none; font-weight: 900; font-size: 16px;
}
.menu a:hover { background: var(--roxo); }
.menu a[aria-current="page"] { background: var(--verde); color: #10230a; }

@media (max-width: 620px) {
  .topo .container { padding: 8px 0 6px; }
  .topo nav { width: 100%; }
  .menu { width: 100%; justify-content: space-between; }
  .menu li { flex: 1; }
  .menu a { text-align: center; padding: 8px 4px; font-size: 15px; }
}

/* ---------- Botões ---------- */
.botoes { display: flex; flex-wrap: wrap; gap: 14px; }
.botao {
  --cor: var(--verde); --sombra: var(--verde-escuro); --tinta: #10230a;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 12px 24px;
  font-family: var(--corpo); font-weight: 900; font-size: 18px;
  color: var(--tinta); background: var(--cor);
  border: 3px solid #000; border-radius: 16px;
  box-shadow: 0 6px 0 var(--sombra), 0 6px 0 3px #000;
  text-decoration: none; cursor: pointer;
  transition: transform .08s, box-shadow .08s;
}
.botao:hover { filter: brightness(1.08); }
.botao:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--sombra), 0 1px 0 3px #000; }
.botao.amarelo-btn { --cor: var(--amarelo); --sombra: var(--amarelo-escuro); --tinta: #2a1d00; }
.botao.roxo-btn { --cor: var(--roxo-2); --sombra: #24095a; --tinta: #fff; }
.botao.vermelho-btn { --cor: #ff3b3b; --sombra: #9c1010; --tinta: #fff; }
.botao[aria-disabled="true"] { --cor: #5b4a80; --sombra: #33265a; --tinta: #d9cff5; cursor: default; pointer-events: none; }
.botao .icone { font-size: 1.2em; line-height: 1; }

/* ---------- Seções ---------- */
.secao { padding: 48px 0; }
.secao + .secao { padding-top: 8px; }
.secao-cabecalho { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.secao-cabecalho h2 { margin: 0; }
.link-ver-tudo { font-weight: 900; text-decoration: none; }
.link-ver-tudo::after { content: " →"; }

/* ---------- Herói (home) ---------- */
.heroi { padding: 26px 0 12px; }
.heroi-banner {
  border-radius: 24px; overflow: hidden;
  border: 3px solid #000;
  box-shadow: 0 0 0 3px var(--roxo-2), 0 18px 50px #000a;
  aspect-ratio: 5 / 2; background: var(--roxo);
}
.heroi-banner img { width: 100%; height: 100%; object-fit: cover; }
.heroi-texto { text-align: center; padding: 26px 0 0; }
.heroi-texto p { font-size: 20px; color: var(--texto-suave); margin: 0 auto 22px; max-width: 34ch; }
.heroi .botoes { justify-content: center; }

@media (max-width: 620px) {
  .heroi { padding-top: 14px; }
  .heroi-banner { border-radius: 16px; }
  .heroi-texto p { font-size: 18px; }
  .heroi .botao { flex: 1 1 100%; }
}

/* ---------- História em quadrinhos ---------- */
.quadrinhos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: q; }
.quadrinho {
  position: relative;
  background: linear-gradient(160deg, var(--roxo) 0%, var(--noite-2) 100%);
  border: 3px solid #000; border-radius: var(--raio);
  box-shadow: 0 0 0 2px var(--borda);
  padding: 22px 20px 20px;
}
.quadrinho::before {
  counter-increment: q; content: counter(q);
  position: absolute; top: -14px; left: 16px;
  font-family: var(--pixel); font-size: 12px;
  background: var(--amarelo); color: #2a1d00; border: 3px solid #000;
  padding: 6px 9px; border-radius: 10px;
}
.quadrinho .emoji { font-size: 40px; line-height: 1; margin-bottom: 10px; }
.quadrinho h3 { color: var(--verde); margin-bottom: .3em; }
.quadrinho p { margin: 0; color: var(--texto-suave); }
@media (max-width: 820px) { .quadrinhos { grid-template-columns: 1fr; gap: 26px; } }

/* ---------- Cartões (jogos e vídeos) ---------- */
.grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.cartao {
  display: flex; flex-direction: column;
  background: var(--noite-2);
  border: 3px solid #000; border-radius: var(--raio);
  box-shadow: 0 0 0 2px var(--borda);
  overflow: hidden; color: inherit; text-decoration: none;
  transition: transform .15s, box-shadow .15s;
}
a.cartao:hover, button.cartao:hover { transform: translateY(-4px); box-shadow: 0 0 0 3px var(--verde), 0 14px 30px #0008; }
.cartao-imagem { position: relative; aspect-ratio: 16 / 9; background: var(--roxo); overflow: hidden; }
.cartao-imagem img { width: 100%; height: 100%; object-fit: cover; image-rendering: auto; }
.cartao-corpo { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.cartao-corpo h3 { margin: 0; font-size: 20px; }
.cartao-corpo p { margin: 0; color: var(--texto-suave); font-size: 16px; }
.credito { font-size: 14px; color: var(--roxo-claro); font-weight: 800; }
.credito::before { content: "✏️ "; }
.selo {
  position: absolute; top: 12px; left: 12px;
  font-family: var(--pixel); font-size: 10px; line-height: 1;
  padding: 7px 9px; border: 2px solid #000; border-radius: 8px;
  background: var(--amarelo); color: #2a1d00;
}
.selo.jogar { background: var(--verde); color: #10230a; }
.selo.numero { font-size: 11px; }
.selo.etiqueta { left: auto; right: 12px; background: var(--verde); color: #10230a; }

/* ---------- Mundos (página Jogos) ---------- */
.mundo { margin-bottom: 46px; scroll-margin-top: 110px; }
.mundo-cabecalho { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; border-bottom: 3px solid var(--borda); padding-bottom: 12px; margin-bottom: 20px; }
.mundo-cabecalho h2 { margin: 0; }
.mundo-cabecalho p { flex-basis: 100%; margin: 0; color: var(--texto-suave); max-width: 70ch; }
.selo-mundo { font-family: var(--pixel); font-size: 11px; background: var(--amarelo); color: #2a1d00; border: 3px solid #000; border-radius: 10px; padding: 7px 10px; }
.cartao .botao { margin-top: auto; align-self: flex-start; min-height: 46px; font-size: 16px; padding: 8px 18px; }
.cartao-acao { margin-top: auto; padding-top: 6px; }

/* Vídeos */
.cartao-video { cursor: pointer; font: inherit; text-align: left; padding: 0; }
.play {
  position: absolute; inset: 0; margin: auto; width: 68px; height: 48px;
  background: #ff0033; border-radius: 14px; border: 3px solid #000;
  display: grid; place-items: center; box-shadow: 0 4px 0 #000;
}
.play::after { content: ""; border-left: 18px solid #fff; border-top: 11px solid transparent; border-bottom: 11px solid transparent; margin-left: 4px; }
.cartao-video:hover .play { transform: scale(1.08); }
.video-vazio .cartao-imagem { display: grid; place-items: center; background: radial-gradient(circle, var(--roxo-2), var(--noite)); }
.video-vazio:nth-child(n+2) { display: none; }
@media (min-width: 900px) { .video-vazio:nth-child(n+2) { display: flex; } }
.video-vazio .cartao-imagem img { width: 46%; height: auto; object-fit: contain; opacity: .9; }

/* ---------- Faixa de inscrição ---------- */
.faixa {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px;
  background: linear-gradient(110deg, var(--roxo-2), var(--roxo) 60%, var(--noite-2));
  border: 3px solid #000; border-radius: 22px; box-shadow: 0 0 0 2px var(--borda);
  padding: 22px 26px;
}
.faixa img { width: 92px; height: 92px; border-radius: 20px; border: 3px solid #000; }
.faixa h2 { margin: 0 0 4px; }
.faixa p { margin: 0; color: var(--texto-suave); }
@media (max-width: 720px) {
  .faixa { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .faixa .botao { width: 100%; }
}

/* ---------- Páginas de texto (Sobre) ---------- */
.pagina-topo { padding: 34px 0 6px; }
.texto { max-width: 68ch; }
.texto p { margin: 0 0 1em; }
.caixa {
  background: var(--noite-2); border: 3px solid #000; border-radius: var(--raio);
  box-shadow: 0 0 0 2px var(--borda); padding: 24px 24px 10px; margin-bottom: 24px;
}
.caixa h2 { margin-bottom: .7em; }
.lista-check { list-style: none; padding: 0; margin: 0 0 1em; }
.lista-check li { padding-left: 34px; position: relative; margin-bottom: .7em; }
.lista-check li::before { content: "✔"; position: absolute; left: 0; top: 0; color: var(--verde); font-size: 20px; line-height: 1.3; }
.nota-credito {
  border-left: 5px solid var(--amarelo); padding: 10px 16px; margin: 1.2em 0;
  background: #ffd60a14; border-radius: 0 12px 12px 0; font-style: italic; color: var(--texto);
}
.sobre-grade { display: grid; grid-template-columns: 1fr 280px; gap: 28px; align-items: start; }
.sobre-grade .rei-figura { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 24px; border: 3px solid #000; box-shadow: 0 0 0 3px var(--roxo-2); }
@media (max-width: 820px) { .sobre-grade { grid-template-columns: 1fr; } .sobre-grade .rei-figura { max-width: 220px; margin: 0 auto; order: -1; } }

/* ---------- Página de jogo ---------- */
.jogo-topo { padding: 22px 0 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.jogo-topo h1 { margin: 0; }
.voltar { font-weight: 900; text-decoration: none; display: inline-block; margin-top: 18px; }
.voltar::before { content: "← "; }
.palco {
  position: relative; margin: 8px auto 0;
  width: min(100%, 480px);
  aspect-ratio: 2 / 3;
  border: 4px solid #000; border-radius: 20px; overflow: hidden;
  box-shadow: 0 0 0 3px var(--verde), 0 20px 60px #000b;
  background: #070214;
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.palco canvas { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.palco:fullscreen { width: auto; height: 100vh; border-radius: 0; border: 0; margin: 0 auto; }
.controles-toque {
  display: none; width: min(100%, 480px); margin: 14px auto 0;
  grid-template-columns: 1fr 1fr 1.4fr; gap: 12px;
  user-select: none; -webkit-user-select: none; touch-action: none;
}
.controles-toque button {
  min-height: 64px; font-size: 26px; font-weight: 900;
  background: var(--roxo-2); color: #fff;
  border: 3px solid #000; border-radius: 16px; box-shadow: 0 5px 0 #000;
}
.controles-toque button.ativo { transform: translateY(4px); box-shadow: 0 1px 0 #000; filter: brightness(1.2); }
.controles-toque [data-tecla="acao"] { background: #ff3b3b; font-size: 18px; font-family: var(--corpo); }
@media (hover: none) and (pointer: coarse) { .controles-toque { display: grid; } }
.toque .controles-toque { display: grid; }
.jogo-barra { display: flex; justify-content: space-between; align-items: center; width: min(100%, 480px); margin: 12px auto 0; gap: 10px; flex-wrap: wrap; }
.jogo-barra .recorde { font-family: var(--pixel); font-size: 11px; color: var(--amarelo); }
.mini-botao {
  background: var(--roxo); color: var(--texto); border: 2px solid var(--borda);
  padding: 8px 14px; border-radius: 12px; font: 900 15px var(--corpo); cursor: pointer;
}
.jogo-info { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 32px; }
@media (max-width: 720px) { .jogo-info { grid-template-columns: 1fr; } }
.teclas { display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; align-items: center; }
kbd {
  font-family: var(--pixel); font-size: 10px; background: #fff; color: #222;
  border: 2px solid #000; border-bottom-width: 4px; border-radius: 8px; padding: 6px 8px; white-space: nowrap;
}

/* ---------- Modal de vídeo ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; background: #05010fe6; padding: 16px; }
.modal.aberto { display: grid; }
.modal-caixa { width: min(100%, 960px); }
.modal-video { aspect-ratio: 16 / 9; border: 3px solid #000; border-radius: 16px; overflow: hidden; background: #000; box-shadow: 0 0 0 3px var(--roxo-2); }
.modal-video iframe { width: 100%; height: 100%; border: 0; display: block; }
.modal-fechar { display: block; margin: 0 0 12px auto; }
.modal-link { display: block; text-align: center; margin-top: 14px; font-weight: 900; }

/* ---------- Rodapé ---------- */
.rodape { margin-top: 40px; border-top: 2px solid var(--borda); background: #0c0420; padding: 28px 0 34px; color: var(--texto-suave); font-size: 15px; }
.rodape .container { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; align-items: center; }
.rodape nav { display: flex; gap: 18px; flex-wrap: wrap; }
.rodape a { color: var(--texto); text-decoration: none; font-weight: 800; }
.rodape a:hover { color: var(--amarelo); }
.rodape .marca { font-family: var(--pixel); font-size: 10px; color: var(--verde); }

/* ---------- 404 ---------- */
.erro { text-align: center; padding: 50px 0; }
.erro img { width: 220px; margin: 0 auto 20px; border-radius: 30px; border: 3px solid #000; animation: flutua 3s ease-in-out infinite; }
@keyframes flutua { 50% { transform: translateY(-12px) rotate(-3deg); } }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
