/* ============================================
   NuvemX Games — Estilo principal
   ============================================ */
:root {
  --bg: #0d0f1a;
  --bg-soft: #141827;
  --surface: #1a1f33;
  --surface-2: #222842;
  --border: #2c3352;
  --text: #e8eaf2;
  --muted: #9aa1bd;
  --accent: #8b5cf6;
  --accent-2: #22d3ee;
  --green: #22c55e;
  --red: #ef4444;
  --amber: #f59e0b;
  --gradient: linear-gradient(135deg, #8b5cf6 0%, #22d3ee 100%);
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --max: 1680px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 15, 26, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo:hover { text-decoration: none; }
.logo .jogar { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

.main-nav { display: flex; gap: 26px; align-items: center; }
.main-nav a {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.15s;
}
.main-nav a:hover, .main-nav a.active { color: var(--text); text-decoration: none; }

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

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 56px 0 36px;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1px;
}
.hero h1 span { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 640px;
  margin: 16px auto 28px;
}
.btn {
  display: inline-block;
  background: var(--gradient);
  color: #0b0d16;
  font-weight: 700;
  padding: 13px 30px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4); text-decoration: none; }
.btn.secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn.secondary:hover { border-color: var(--accent); box-shadow: none; }

/* ---------- Sections ---------- */
.section { padding: 34px 0; }
.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ---------- Barra de Pesquisa & Filtros ---------- */
.search-wrapper {
  position: relative;
  max-width: 680px;
  margin: 0 auto 24px;
  width: 100%;
}
.search-input-box {
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 18px;
  font-size: 1.2rem;
  color: var(--muted);
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 16px 50px 16px 52px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 50px;
  color: var(--text);
  font-size: 1.05rem;
  font-family: inherit;
  transition: all 0.2s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}
.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.25), 0 8px 30px rgba(0, 0, 0, 0.4);
  background: var(--surface-2);
}
.search-clear {
  position: absolute;
  right: 18px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.2rem;
  cursor: pointer;
  display: none;
  padding: 4px;
}
.search-clear:hover { color: var(--text); }
.search-clear.show { display: block; }

/* Filtros por Categoria */
.category-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 28px;
}
.category-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.category-btn:hover {
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-1px);
}
.category-btn.active {
  background: var(--gradient);
  color: #0b0d16;
  border-color: transparent;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.35);
}

.search-count {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 18px;
  font-weight: 600;
}
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px dashed var(--border);
}
.no-results h3 { font-size: 1.3rem; margin-bottom: 8px; }
.no-results p { color: var(--muted); }

/* ---------- Game grid ---------- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 16px;
}

.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1), border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  color: var(--text);
}
.game-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--accent-2);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  text-decoration: none;
}
.game-thumb {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f1220;
  overflow: hidden;
  position: relative;
}
.game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.3s ease;
}
.game-card:hover .game-thumb img { transform: scale(1.08); }

.game-card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.game-card-body h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.game-card-body p {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.2em;
  margin-bottom: 8px;
}
.tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(139, 92, 246, 0.18);
  color: #c4b5fd;
  padding: 2px 8px;
  border-radius: 20px;
  margin-top: auto;
}
.tag.destaque {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}
.tag.novo { background: rgba(34, 197, 94, 0.18); color: #86efac; }
.game-thumb.t-2048 { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.game-thumb.t-velha { background: linear-gradient(135deg, #22d3ee, #3b82f6); }
.game-thumb.t-snake { background: linear-gradient(135deg, #22c55e, #15803d); }
.game-thumb.t-ctr { background: linear-gradient(135deg, #f59e0b 0%, #ec4899 55%, #8b5cf6 100%); }

.game-thumb.t-termo { background: linear-gradient(135deg, #22c55e, #166534); }

.game-thumb.t-memoria { background: linear-gradient(135deg, #a855f7, #ec4899); }

.game-thumb.t-minas { background: linear-gradient(135deg, #6b7280, #ef4444); }
.game-card-body { padding: 14px 16px 16px; }
.game-card-body h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; }
.game-card-body p { color: var(--muted); font-size: 0.85rem; }
.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
  padding: 2px 8px;
  border-radius: 20px;
  margin-top: 8px;
}
.tag.novo { background: rgba(34, 197, 94, 0.18); color: #86efac; }

/* ---------- Features ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.feature .icon { font-size: 2rem; margin-bottom: 10px; }
.feature h3 { font-size: 1.05rem; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: 0.9rem; }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  padding: 18px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--text); }

/* ---------- Game page ---------- */
.game-page { padding: 24px 0 40px; }
.game-banner {
  position: relative;
  width: 100%;
  height: 240px;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: radial-gradient(circle at center, #1e243d 0%, #0d0f1a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.game-banner img {
  max-width: 90%;
  max-height: 200px;
  object-fit: contain;
  object-position: center;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65);
  display: block;
  transition: transform 0.3s ease;
}
.game-banner:hover img {
  transform: scale(1.02);
}
.game-banner.fallback-banner {
  background: linear-gradient(135deg, #1e2544 0%, #0d101e 100%);
}
.game-banner.fallback-banner::after {
  content: '🎮';
  font-size: 4rem;
  opacity: 0.8;
}
.game-thumb.fallback-thumb {
  background: linear-gradient(135deg, #1e2544, #0d101e) !important;
}
.game-thumb.fallback-thumb img {
  display: none !important;
}
.game-thumb.fallback-thumb::after {
  content: '🎮';
  font-size: 2.8rem;
  opacity: 0.8;
}
.game-page h1 { font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 800; margin-bottom: 6px; }
.game-subtitle { color: var(--muted); margin-bottom: 20px; }

.game-stage {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}
.game-hud {
  display: flex;
  gap: 12px;
  width: 100%;
  max-width: 480px;
  justify-content: space-between;
  flex-wrap: wrap;
}
.hud-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 14px;
  text-align: center;
  min-width: 90px;
}
.hud-box .label { display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.hud-box .value { font-size: 1.25rem; font-weight: 800; color: var(--accent-2); }
.hud-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Controles de tela cheia e som */
.game-controls { display: flex; gap: 8px; justify-content: center; margin-bottom: 12px; flex-wrap: wrap; }

/* Botão flutuante para sair de tela cheia */
.btn-exit-fs {
  display: none;
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 99999;
  background: rgba(13, 15, 26, 0.85);
  backdrop-filter: blur(8px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50px;
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  transition: all 0.2s ease;
  opacity: 0.8;
}
.btn-exit-fs:hover {
  opacity: 1;
  background: rgba(239, 68, 68, 0.9);
  border-color: #ef4444;
  transform: translateY(-1px);
}
:fullscreen .btn-exit-fs, :-webkit-full-screen .btn-exit-fs {
  display: inline-flex;
}

/* Tela cheia — jogo embutido (iframe) */
.game-frame:fullscreen, .game-frame:-webkit-full-screen {
  aspect-ratio: auto !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  max-height: none !important;
  border-radius: 0 !important;
  border: none !important;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.game-frame:fullscreen iframe, .game-frame:-webkit-full-screen iframe {
  width: 100% !important;
  height: 100% !important;
  border-radius: 0 !important;
  border: none !important;
}

/* Tela cheia — jogos originais */
.game-stage:fullscreen, .game-stage:-webkit-full-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: var(--bg);
  padding: 24px;
  overflow: auto;
}
.game-stage:fullscreen .game-hud, .game-stage:-webkit-full-screen .game-hud { width: min(100%, 560px); }
.game-stage:fullscreen .termo-kb, .game-stage:-webkit-full-screen .termo-kb { width: min(100%, 480px); }
.game-stage:fullscreen .termo-board, .game-stage:-webkit-full-screen .termo-board { width: min(86vw, 340px); max-width: 340px; }
.game-stage:fullscreen .mem-board, .game-stage:-webkit-full-screen .mem-board { width: min(86vw, 460px); max-width: 460px; }
.game-stage:fullscreen .mines-board, .game-stage:-webkit-full-screen .mines-board { width: min(92vw, 540px); max-width: 540px; }
.game-stage:fullscreen canvas, .game-stage:-webkit-full-screen canvas { max-width: 100%; max-height: 72vh; }
.btn.small { padding: 9px 16px; font-size: 0.85rem; }

/* Game frames (canvas / board) */
.board-2048 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  touch-action: none;
}
.cell {
  background: var(--bg-soft);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: clamp(1.2rem, 5vw, 1.9rem);
  user-select: none;
}
.cell.t2 { background: #2b2f52; }
.cell.t4 { background: #353a63; }
.cell.t8 { background: #f59e0b; color: #1a1206; }
.cell.t16 { background: #f97316; color: #1a1206; }
.cell.t32 { background: #ef4444; }
.cell.t64 { background: #dc2626; }
.cell.t128 { background: #8b5cf6; font-size: clamp(1rem, 4vw, 1.6rem); }
.cell.t256 { background: #7c3aed; font-size: clamp(1rem, 4vw, 1.6rem); }
.cell.t512 { background: #22d3ee; color: #06222a; font-size: clamp(1rem, 4vw, 1.6rem); }
.cell.t1024 { background: #06b6d4; color: #06222a; font-size: clamp(0.85rem, 3.4vw, 1.3rem); }
.cell.t2048 { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #1a1206; font-size: clamp(0.85rem, 3.4vw, 1.3rem); }
.cell.super { background: linear-gradient(135deg, #8b5cf6, #22d3ee); color: #fff; font-size: clamp(0.8rem, 3vw, 1.2rem); }
.cell.pop { animation: pop 0.18s ease; }
@keyframes pop { 0% { transform: scale(0.7); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }

.board-velha {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
  max-width: 330px;
  aspect-ratio: 1;
  touch-action: manipulation;
}
.mark {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: clamp(2.2rem, 10vw, 3.4rem);
  font-weight: 800;
  cursor: pointer;
  color: var(--text);
  transition: background 0.15s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mark:hover:not(:disabled) { background: var(--surface-2); transform: scale(1.03); }
.mark:disabled { cursor: default; }
.mark.x { color: var(--accent-2); }
.mark.o { color: var(--accent); }
.mark.win { background: rgba(34, 197, 94, 0.25); border-color: var(--green); }

#snake-canvas {
  width: 100%;
  max-width: 440px;
  aspect-ratio: 1;
  background: #0a0c15;
  border: 1px solid var(--border);
  border-radius: 14px;
  touch-action: none;
  display: block;
}

.dpad {
  display: none;
  grid-template-columns: repeat(3, 56px);
  grid-template-rows: repeat(2, 56px);
  gap: 6px;
  justify-content: center;
}
.dpad button {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.3rem;
  border-radius: 10px;
  cursor: pointer;
}
.dpad button:active { background: var(--accent); }

.overlay-msg {
  position: absolute;
  inset: 0;
  background: rgba(13, 15, 26, 0.88);
  border-radius: 14px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 20px;
}
.overlay-msg.show { display: flex; }
.overlay-msg h3 { font-size: 1.5rem; }
.overlay-msg p { color: var(--muted); }
.stage-wrap { position: relative; width: 100%; max-width: 440px; display: flex; justify-content: center; }

/* Game embed (iframe) */
.game-frame {
  position: relative;
  width: 100%;
  max-width: 960px;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow);
}
.game-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Content (game info / static pages) ---------- */
.content-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 22px;
}
.content-block h2 { font-size: 1.3rem; margin-bottom: 12px; }
.content-block h3 { font-size: 1.05rem; margin: 16px 0 8px; }
.content-block p, .content-block li { color: var(--muted); font-size: 0.95rem; margin-bottom: 10px; }
.content-block ul, .content-block ol { padding-left: 22px; }
.content-block strong { color: var(--text); }

.faq-item { border-bottom: 1px solid var(--border); padding: 12px 0; }
.faq-item:last-child { border-bottom: none; }
.faq-item summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-item summary::after { content: "+"; color: var(--accent-2); font-size: 1.3rem; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin-top: 8px; }

.related { display: flex; gap: 12px; flex-wrap: wrap; }
.related a {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}
.related a:hover { border-color: var(--accent); text-decoration: none; }

/* ---------- Termo ---------- */
.termo-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  width: 100%;
  max-width: 310px;
  touch-action: none;
}
.termo-cell {
  aspect-ratio: 1;
  background: var(--bg-soft);
  border: 2px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.3rem, 6vw, 1.9rem);
  font-weight: 800;
  text-transform: uppercase;
  user-select: none;
  transition: transform 0.3s;
}
.termo-cell.filled { border-color: var(--muted); }
.termo-cell.flip { animation: flipCell 0.45s ease; }
.termo-cell.pop { animation: pop 0.15s ease; }
.termo-cell.correct { background: #22c55e; border-color: #22c55e; color: #052b12; }
.termo-cell.present { background: #f59e0b; border-color: #f59e0b; color: #2b1a02; }
.termo-cell.absent { background: #374151; border-color: #374151; color: #9ca3af; }
@keyframes flipCell { 0% { transform: rotateX(0); } 50% { transform: rotateX(90deg); } 100% { transform: rotateX(0); } }
.shake { animation: shake 0.4s; }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

.termo-kb { display: flex; flex-direction: column; gap: 6px; width: 100%; max-width: 480px; }
.kb-row { display: flex; gap: 5px; justify-content: center; }
.kb-key {
  flex: 1;
  min-width: 0;
  max-width: 42px;
  height: 52px;
  background: var(--surface-2);
  border: none;
  border-radius: 8px;
  color: var(--text);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s;
  padding: 0;
}
.kb-key:hover { background: var(--border); }
.kb-key.wide { flex: 1.6; max-width: 70px; font-size: 0.68rem; }
.kb-key.correct { background: #22c55e; color: #052b12; }
.kb-key.present { background: #f59e0b; color: #2b1a02; }
.kb-key.absent { background: #374151; color: #9ca3af; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translateX(-50%);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.toast.show { opacity: 1; }

/* ---------- Memória ---------- */
.mem-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 400px;
}
.mem-card {
  aspect-ratio: 1;
  perspective: 600px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.mem-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.35s;
}
.mem-card.flipped .mem-inner, .mem-card.matched .mem-inner { transform: rotateY(180deg); }
.mem-face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.4rem, 7vw, 2.1rem);
  border-radius: 12px;
  backface-visibility: hidden;
  border: 1px solid var(--border);
}
.mem-front { background: var(--surface-2); }
.mem-back { background: var(--surface); transform: rotateY(180deg); }
.mem-card.matched .mem-back { background: rgba(34, 197, 94, 0.22); border-color: var(--green); }
.mem-card.matched { pointer-events: none; }
.mem-card:not(.matched):hover .mem-front { border-color: var(--accent); }

/* ---------- Campo Minado ---------- */
.mines-board {
  display: grid;
  gap: 4px;
  background: var(--surface);
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  width: 100%;
  max-width: 420px;
  touch-action: manipulation;
}
.mine-cell {
  aspect-ratio: 1;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-weight: 800;
  font-size: clamp(0.7rem, 2.6vw, 1rem);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--text);
  user-select: none;
  transition: background 0.1s;
}
.mine-cell:hover:not(.revealed) { background: var(--border); }
.mine-cell.revealed { background: var(--bg-soft); cursor: default; border-color: #232946; }
.mine-cell.mine { background: var(--red); }
.mine-cell.wrong { background: rgba(239, 68, 68, 0.3); }
.mine-cell .n1 { color: #60a5fa; }
.mine-cell .n2 { color: #4ade80; }
.mine-cell .n3 { color: #f87171; }
.mine-cell .n4 { color: #c084fc; }
.mine-cell .n5 { color: #fbbf24; }
.mine-cell .n6 { color: #22d3ee; }
.mine-cell .n7 { color: #e5e7eb; }
.mine-cell .n8 { color: #9ca3af; }
.mine-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.btn.active { background: var(--amber); color: #2b1a02; }

/* ---------- Game thumb — imagens reais ---------- */
.game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
  transition: transform 0.35s ease;
}
.game-card:hover .game-thumb img { transform: scale(1.06); }
.game-thumb { overflow: hidden; }

/* Thumbs CSS fallback (sem imagem) */
.game-thumb.t-subway  { background: linear-gradient(135deg, #ff6b35, #f7c59f, #2196f3); }
.game-thumb.t-fbwg    { background: linear-gradient(135deg, #ef4444 0%, #3b82f6 100%); }
.game-thumb.t-minecraft { background: linear-gradient(135deg, #22c55e, #15803d, #92400e); }
.game-thumb.t-among   { background: linear-gradient(135deg, #ef4444, #6366f1, #22d3ee); }
.game-thumb.t-geodash { background: linear-gradient(135deg, #1e1b4b, #7c3aed, #f59e0b); }
.game-thumb.t-hollow  { background: linear-gradient(135deg, #1e1b4b, #4c1d95, #e0e7ff); }
.game-thumb.t-fnaf    { background: linear-gradient(135deg, #1c1917, #78350f, #dc2626); }
.game-thumb.t-stickman { background: linear-gradient(135deg, #0ea5e9, #8b5cf6, #f59e0b); }

/* ---------- Ad slots ---------- */
.ad-slot {
  background: rgba(139, 92, 246, 0.05);
  border: 1px dashed var(--border);
  border-radius: 12px;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #565d7d;
  font-size: 0.78rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin: 22px 0;
  overflow: hidden;
}
.ad-slot.leaderboard { min-height: 90px; }
.ad-slot.rect { min-height: 250px; max-width: 336px; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.92rem; }
.form-group input, .form-group textarea {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 12px 14px;
  font-size: 0.95rem;
  font-family: inherit;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 36px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 26px;
}
.footer-grid h4 { font-size: 0.95rem; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--muted); font-size: 0.9rem; }
.footer-grid a:hover { color: var(--text); }
.footer-about p { color: var(--muted); font-size: 0.88rem; margin-top: 10px; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 18px;
  color: #565d7d;
  font-size: 0.8rem;
  text-align: center;
}

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  max-width: 560px;
  margin: 0 auto;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
  z-index: 100;
  display: none;
}
.cookie-banner.show { display: block; }
.cookie-banner p { font-size: 0.88rem; color: var(--muted); margin-bottom: 12px; }
.cookie-banner .cookie-actions { display: flex; gap: 10px; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.hidden { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
    padding: 18px 20px;
    gap: 16px;
  }
  .main-nav.open { display: flex; }
  .footer-grid { grid-template-columns: 1fr; }
  .dpad { display: grid; }
  .hero { padding: 40px 0 26px; }
}
