/* ==========================================================================
   Jogos Retrô — Design System
   Tema arcade/retrô: fundo escuro, acentos neon, tipografia pixelada nos
   títulos e tipografia legível no corpo do texto.
   ========================================================================== */

:root {
  --bg: #12081f;
  --bg-alt: #1c0f30;
  --surface: #241640;
  --surface-alt: #2e1c4d;
  --border: #3d2a63;
  --text: #f1ecff;
  --text-muted: #b8a9dd;
  --accent: #00e5c7;
  --accent-dark: #00a691;
  --accent-2: #ff2fa0;
  --accent-3: #ffd23f;
  --success: #4ade80;
  --danger: #ff5470;
  --radius: 10px;
  --radius-lg: 18px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --max-width: 1180px;
  --font-display: "Press Start 2P", "Courier New", monospace;
  --font-body: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #12081f;
    --text: #f1ecff;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(circle at 15% 0%, rgba(0, 229, 199, 0.10), transparent 45%),
    radial-gradient(circle at 85% 20%, rgba(255, 47, 160, 0.10), transparent 45%);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, canvas {
  max-width: 100%;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

h1, h2, h3, .display {
  font-family: var(--font-display);
  line-height: 1.5;
  letter-spacing: 0.5px;
}

h1 {
  font-size: clamp(1.3rem, 3vw, 2rem);
  color: var(--accent);
  text-shadow: 0 0 18px rgba(0, 229, 199, 0.35);
}

h2 {
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  color: var(--accent-3);
  margin-top: 2.5rem;
}

h3 {
  font-size: 1rem;
  color: var(--text);
}

p, li {
  color: var(--text-muted);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Skip link (acessibilidade) */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #05231f;
  padding: 0.6rem 1rem;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(18, 8, 31, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.25rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.logo {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.logo:hover { text-decoration: none; }
.logo-badge {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: var(--shadow);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  font-size: 1.1rem;
  cursor: pointer;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--accent);
  text-decoration: none;
}

@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem;
    gap: 1rem;
    display: none;
  }
  .nav-links.is-open { display: flex; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 3.5rem 0 2.5rem;
  text-align: center;
}
.hero h1 {
  margin-bottom: 0.75rem;
}
.hero p {
  max-width: 680px;
  margin: 0 auto;
  font-size: 1.05rem;
}
.hero .tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1.25rem;
}
.tag {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 1rem 0 0;
}
.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
}
.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 0.35rem;
  color: var(--border);
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }

/* ---------- Cards de jogo (catálogo) ---------- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}

.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: transform 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
}
.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  text-decoration: none;
}
.game-card .icon {
  font-size: 2rem;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--surface-alt);
}
.game-card h3 {
  margin: 0;
  color: var(--text);
}
.game-card p {
  font-size: 0.85rem;
  margin: 0;
}
.game-card .play-btn {
  margin-top: auto;
  align-self: flex-start;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
}

/* ---------- Área de jogo ---------- */
.game-stage {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.game-stage canvas {
  background: #0a0414;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  touch-action: none;
}

.game-hud {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.85rem;
}
.game-hud .stat {
  background: var(--surface-alt);
  border-radius: 8px;
  padding: 0.5rem 0.9rem;
  color: var(--accent-3);
}

.game-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.btn {
  font-family: var(--font-body);
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.9rem;
  touch-action: manipulation;
}
.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #05231f;
  border: none;
}
.btn.primary:hover { color: #05231f; opacity: 0.9; }

.dpad {
  display: grid;
  grid-template-columns: repeat(3, 48px);
  grid-template-rows: repeat(3, 48px);
  gap: 4px;
  justify-content: center;
}
.dpad button {
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
  touch-action: manipulation;
}
.dpad button:active { background: var(--accent); color: #05231f; }
.dpad-up { grid-column: 2; grid-row: 1; }
.dpad-left { grid-column: 1; grid-row: 2; }
.dpad-down { grid-column: 2; grid-row: 3; }
.dpad-right { grid-column: 3; grid-row: 2; }

.game-overlay-msg {
  font-size: 0.9rem;
  color: var(--accent-3);
  text-align: center;
  min-height: 1.4em;
}

/* ---------- Slots de anúncio ---------- */
.ad-slot {
  width: 100%;
  max-width: 728px;
  margin: 2rem auto;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: rgba(255, 255, 255, 0.02);
}

/* ---------- Conteúdo / artigos ---------- */
main article, main .content {
  padding-bottom: 3rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
  background: var(--surface);
}
.faq-item summary {
  cursor: pointer;
  padding: 0.9rem 1.1rem;
  font-weight: 700;
  color: var(--text);
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
  content: "+ ";
  color: var(--accent);
}
.faq-item[open] summary::before {
  content: "– ";
}
.faq-item p {
  padding: 0 1.1rem 1rem;
  margin: 0;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.tips-list {
  padding-left: 1.2rem;
}
.tips-list li {
  margin-bottom: 0.5rem;
}

/* Cards genéricos (blog, institucional) */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}
.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.post-card:hover { border-color: var(--accent); text-decoration: none; }
.post-card time {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}
.post-card h3 { color: var(--text); margin: 0; }
.post-card p { font-size: 0.9rem; margin: 0; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding: 2.5rem 0 2rem;
  background: var(--bg-alt);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.footer-grid h4 {
  color: var(--text);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 0.75rem;
}
.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-grid a {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
}

/* ---------- Cookie banner ---------- */
#cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1rem 1.25rem;
  display: none;
}
#cookie-banner.is-visible { display: block; }
#cookie-banner .inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
}
#cookie-banner p {
  margin: 0;
  font-size: 0.85rem;
  flex: 1 1 380px;
}

/* ---------- Página institucional ---------- */
.legal h2 { margin-top: 2rem; }
.legal ul { padding-left: 1.2rem; }

/* Utilitários */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
