/* Shared styles for /jogos pages — extends style.css tokens */

.jogos-main {
  padding: 48px 0 80px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 28px;
  transition: color 0.15s ease;
}
.back-link:hover { color: var(--ink); }

/* Hub grid */
.jogos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 32px;
}

.jogo-card {
  display: block;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.jogo-card:hover { transform: translateY(-4px); border-color: var(--violet-soft); }

.jogo-card .icon {
  font-size: 2.4rem;
  margin-bottom: 16px;
  display: block;
}

.jogo-card h3 {
  font-family: var(--serif);
  font-size: 1.35rem;
  color: #fff;
  margin: 0 0 10px;
}

.jogo-card p {
  color: var(--ink-dim);
  font-size: 0.92rem;
  margin: 0 0 18px;
}

.jogo-card .play {
  color: var(--teal);
  font-weight: 700;
  font-size: 0.85rem;
}

/* Game shell */
.game-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.game-hud {
  display: flex;
  gap: 24px;
  font-size: 0.95rem;
  color: var(--ink-dim);
}
.game-hud strong { color: var(--teal); font-variant-numeric: tabular-nums; }

.game-canvas-wrap {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: #05040a;
  touch-action: none;
}

canvas { display: block; max-width: 100%; height: auto; }

.game-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(5, 4, 10, 0.88);
  text-align: center;
  padding: 24px;
}

.game-overlay.hidden { display: none; }

.game-overlay h2 {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: #fff;
  margin: 0;
}

.game-overlay p {
  color: var(--ink-dim);
  margin: 0;
  font-size: 0.95rem;
}

.game-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.85rem;
}

.game-hint {
  color: var(--ink-dim);
  font-size: 0.82rem;
  text-align: center;
  max-width: 40ch;
}

.dpad {
  display: grid;
  grid-template-columns: repeat(3, 52px);
  grid-template-rows: repeat(3, 52px);
  gap: 6px;
  margin-top: 4px;
}
.dpad button {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--ink);
  font-size: 1.2rem;
  cursor: pointer;
}
.dpad button:active { background: var(--violet-soft); }
.dpad-up { grid-column: 2; grid-row: 1; }
.dpad-left { grid-column: 1; grid-row: 2; }
.dpad-right { grid-column: 3; grid-row: 2; }
.dpad-down { grid-column: 2; grid-row: 3; }

@media (max-width: 640px) {
  .jogos-grid { grid-template-columns: 1fr; }
}
