/* =============================================================================
   THYNK LAB — estilos globais (mobile-first, PWA, landing + play)
   ============================================================================= */

:root {
  --bg-deep: #06060a;
  --bg-elev: #0e0e16;
  --glass: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.12);
  --text: #f2f2f8;
  --text-muted: rgba(242, 242, 248, 0.62);
  --accent: #e50914;
  --accent-2: #8b5cf6;
  --accent-3: #00d4aa;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --font: "Segoe UI", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "Consolas", monospace;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html.theme-light {
  --bg-deep: #e8e8f0;
  --bg-elev: #f4f4fa;
  --glass: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(20, 20, 40, 0.12);
  --text: #12121a;
  --text-muted: rgba(18, 18, 26, 0.62);
  --shadow: 0 12px 40px rgba(20, 20, 40, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-deep);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

/* Fundo: imagem opcional + gradiente (fallback se JPG em falta) */
body.page-landing {
  background-color: var(--bg-deep);
  background-image:
    linear-gradient(165deg, rgba(229, 9, 20, 0.12) 0%, transparent 42%),
    linear-gradient(320deg, rgba(139, 92, 246, 0.1) 0%, transparent 45%),
    url("background.jpg");
  background-size: cover;
  background-position: center top;
  background-attachment: scroll;
}

body.page-landing::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(139, 92, 246, 0.25), transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 80%, rgba(229, 9, 20, 0.12), transparent 50%);
  z-index: 0;
}

html:has(body.page-play),
html.play-immersive {
  height: 100%;
  min-height: 100dvh;
  overflow: hidden;
}

body.page-play {
  background: radial-gradient(ellipse 120% 80% at 50% 0%, #1a1025 0%, var(--bg-deep) 55%);
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  overflow: hidden;
  -webkit-overflow-scrolling: touch;
}

/* Glass */
.glass-panel {
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font: inherit;
  font-weight: 600;
  border: none;
  border-radius: 999px;
  padding: 0.65rem 1.25rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.15s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(120deg, var(--accent), #b20710);
  box-shadow: 0 8px 28px rgba(229, 9, 20, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 10px 36px rgba(229, 9, 20, 0.45);
}

.btn-ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
}

.btn-small {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* CRT overlay retrô com linhas de varredura (scanlines) e vinheta de tubo */
.crt-overlay {
  display: none;
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
}

body.crt-on .crt-overlay,
.crt-overlay.is-active {
  display: block !important;
  background: 
    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
    linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 255, 0, 0.03));
  background-size: 100% 3px, 6px 100%;
}

body.crt-on::after,
body:has(.crt-overlay.is-active)::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9997;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, 0.5) 100%);
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.6);
}

/* Destaque do Botão CRT ativo */
#btn-crt-toggle.active,
#btn-crt-toggle[aria-pressed="true"] {
  background: rgba(0, 212, 170, 0.25) !important;
  border-color: #00d4aa !important;
  color: #00d4aa !important;
  box-shadow: 0 0 10px rgba(0, 212, 170, 0.4);
}

/* ========== Modal de Controle Externo (Gamepad) ========== */
.gamepad-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.gamepad-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.gamepad-modal-card {
  background: #0d0d16;
  border: 1px solid rgba(0, 212, 170, 0.35);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 30px rgba(0, 212, 170, 0.15);
  border-radius: 16px;
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-sizing: border-box;
  color: #f2f2f8;
  color-scheme: dark;
}
.gamepad-status-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}
.gamepad-status-indicator {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
  background: #ffcc00;
  box-shadow: 0 0 10px #ffcc00;
}
.gamepad-status-indicator.connected {
  background: #00d4aa;
  box-shadow: 0 0 12px #00d4aa;
}
.gamepad-tester-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.gamepad-btn-badge {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 8px 4px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #aaa;
  transition: all 0.1s ease;
  user-select: none;
}
.gamepad-btn-badge.pressed {
  background: #00d4aa !important;
  color: #06060a !important;
  border-color: #00d4aa !important;
  box-shadow: 0 0 14px rgba(0, 212, 170, 0.8);
  transform: scale(1.08);
}
.gamepad-map-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 10px;
}
.gamepad-map-table th, .gamepad-map-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.gamepad-map-table th {
  color: var(--brand-primary);
  font-weight: 700;
}

/* Ocultar botões virtuais da tela ao jogar com controle físico no celular */
body.hide-touch-controls #game [class*="virtual"],
body.hide-touch-controls #game [class*="nipple"],
body.hide-touch-controls #game [class*="touch"],
body.hide-touch-controls #game .ejs_virtual_gamepad {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Guias do modal gamepad */
.gamepad-guide-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 14px;
  font-size: 0.85rem;
  color: #ccc;
  line-height: 1.5;
}
.gamepad-guide-box b {
  color: #fff;
}

/* ========== Landing ========== */
.page-landing > * {
  position: relative;
  z-index: 1;
}

.logo-link {
  color: inherit;
  text-decoration: none;
}

.shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.1rem 3rem;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--safe-top) + 0.85rem) 0 1rem;
  gap: 1rem;
}

.logo-img {
  height: 40px;
  width: auto;
  display: block;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero {
  padding: 2.5rem 0 2rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 0.75rem;
}

.hero-gradient {
  background: linear-gradient(120deg, #fff 0%, #f0a8ff 40%, #7cdbff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

html.theme-light .hero-gradient {
  background: linear-gradient(120deg, #1a0a12 0%, #6b1a50 35%, #0a3d5c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-tagline {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 36ch;
  margin: 0 auto 1.5rem;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.section {
  margin-top: 3rem;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
}

.section-lead {
  color: var(--text-muted);
  margin: 0 0 1.25rem;
  max-width: 60ch;
}

.nfc-banner {
  margin-top: 2rem;
  padding: 1.5rem 1.25rem;
  text-align: center;
}

.nfc-icon {
  font-size: 2rem;
  margin-bottom: 0.35rem;
}

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

.console-card {
  padding: 1.25rem 1rem;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.console-card:hover {
  transform: translateY(-4px);
  border-color: rgba(229, 9, 20, 0.35);
}

.console-card h3 {
  margin: 0.5rem 0 0.25rem;
  font-size: 1.1rem;
}

.console-card p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.console-chip {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: rgba(229, 9, 20, 0.15);
  color: #ff8a93;
}

.split-section {
  display: grid;
  gap: 1.25rem;
  margin-top: 2.5rem;
}

@media (min-width: 768px) {
  .split-section {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.info-card {
  padding: 1.35rem 1.25rem;
}

.info-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}

.info-card p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.55;
  font-size: 0.95rem;
}

.footer {
  margin-top: 3.5rem;
  padding: 1.5rem 0 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ========== Landing — página de vendas SNES ========== */
.site-header--sticky {
  position: sticky;
  top: 0;
  z-index: 100;
  margin: 0 -1.1rem;
  padding-left: 1.1rem;
  padding-right: 1.1rem;
  background: rgba(6, 6, 10, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
}

html.theme-light .site-header--sticky {
  background: rgba(232, 232, 240, 0.85);
}

.header-nav {
  display: none;
  gap: 1.25rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.header-nav a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.header-nav a:hover {
  color: var(--text);
}

.header-cta {
  display: none;
}

@media (min-width: 720px) {
  .header-nav {
    display: flex;
  }

  .header-cta {
    display: inline-flex;
  }
}

.btn-lg {
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
}

.hero--sales {
  padding: 2rem 0 1.5rem;
  text-align: left;
}

.hero-sales-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-sales-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3rem;
  }

  .hero--sales {
    padding: 3rem 0 2rem;
  }
}

.hero-eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
}

.badge--snes {
  background: linear-gradient(120deg, rgba(124, 58, 237, 0.35), rgba(139, 92, 246, 0.15));
  color: #d4b8ff;
  border-color: rgba(139, 92, 246, 0.45);
}

.badge--nfc {
  background: rgba(0, 212, 170, 0.12);
  color: var(--accent-3);
  border-color: rgba(0, 212, 170, 0.35);
}

.hero--sales h1 {
  text-align: left;
  font-size: clamp(2rem, 6vw, 3.15rem);
  margin-bottom: 1rem;
}

.hero-tagline--wide {
  max-width: 42ch;
  margin-left: 0;
  margin-right: 0;
  text-align: left;
  font-size: 1.08rem;
  line-height: 1.55;
}

.hero--sales .hero-cta-row {
  justify-content: flex-start;
  margin-bottom: 1.75rem;
}

.hero-stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
}

.hero-stats li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.hero-stats strong {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.hero-stats span {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-family: var(--mono);
}

.hero-product {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}

.product-glow {
  position: absolute;
  width: min(100%, 320px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.35) 0%, rgba(229, 9, 20, 0.12) 45%, transparent 70%);
  filter: blur(8px);
  animation: product-glow-pulse 4s ease-in-out infinite;
}

@keyframes product-glow-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.06);
    opacity: 1;
  }
}

.keychain-visual {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.keychain-ring {
  width: 52px;
  height: 52px;
  border: 5px solid #9ca3af;
  border-radius: 50%;
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.25), 0 4px 12px rgba(0, 0, 0, 0.4);
  margin-bottom: -8px;
  z-index: 2;
}

.keychain-body {
  position: relative;
  width: 168px;
  padding: 1rem 1rem 1.1rem;
  border-radius: 16px;
  background: linear-gradient(165deg, #3d3d4a 0%, #1e1e28 55%, #12121a 100%);
  border: 2px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  text-align: center;
}

.keychain-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: #e8e8f0;
  margin-bottom: 0.65rem;
}

.keychain-cart {
  position: relative;
  height: 56px;
  margin: 0 auto 0.75rem;
  border-radius: 8px 8px 12px 12px;
  background: linear-gradient(180deg, #6b4c9a 0%, #4a3270 40%, #2a1f42 100%);
  border: 2px solid #1a1028;
  overflow: hidden;
  max-width: 120px;
}

.keychain-cart-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.2) 50%, transparent 60%);
  animation: cart-shine 3s ease-in-out infinite;
}

@keyframes cart-shine {
  0%,
  100% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(100%);
  }
}

.keychain-nfc {
  position: relative;
  width: 36px;
  height: 36px;
  margin: 0 auto;
  border-radius: 50%;
  background: rgba(0, 212, 170, 0.15);
  border: 1px solid rgba(0, 212, 170, 0.5);
}

.nfc-pulse {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 2px solid var(--accent-3);
  animation: nfc-ring 2s ease-out infinite;
}

.nfc-pulse--2 {
  animation-delay: 1s;
}

@keyframes nfc-ring {
  0% {
    transform: scale(0.6);
    opacity: 1;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

.hero-product-caption {
  margin: 1rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  z-index: 1;
}

.trust-bar {
  margin: 0 0 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
}

.trust-bar ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.section-kicker {
  margin: 0 0 0.4rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-3);
}

.section-head--center {
  text-align: center;
}

.section-title--xl {
  font-size: clamp(1.5rem, 4vw, 2.1rem);
}

.section-lead--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section--aaa {
  margin-top: 2.5rem;
}

.aaa-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .aaa-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .aaa-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .aaa-card--featured {
    grid-column: span 1;
  }
}

@media (min-width: 1024px) {
  .aaa-card--featured {
    grid-row: span 1;
  }

  .aaa-card--featured .aaa-card-media {
    aspect-ratio: 4 / 3;
  }
}

.aaa-card {
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.aaa-card:hover {
  transform: translateY(-6px);
  border-color: rgba(229, 9, 20, 0.4);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.aaa-card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(180deg, #1a1025 0%, #06060a 100%);
}

.aaa-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.4s ease;
}

.aaa-card:hover .aaa-card-media img {
  transform: scale(1.04);
}

.aaa-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.28rem 0.55rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.65);
  color: #ffd4d8;
  border: 1px solid rgba(229, 9, 20, 0.5);
  backdrop-filter: blur(6px);
}

.aaa-card-body {
  padding: 1.15rem 1.2rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.aaa-card-body h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.aaa-card-body p {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}

.aaa-tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.aaa-tags li {
  font-size: 0.72rem;
  font-family: var(--mono);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.aaa-marquee {
  margin-top: 1.5rem;
  padding: 1rem 1.1rem;
  overflow: hidden;
}

.aaa-marquee-label {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.aaa-marquee-track {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.65rem;
}

.aaa-marquee-track span {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.15);
  color: #d8c4ff;
  border: 1px solid rgba(139, 92, 246, 0.25);
  white-space: nowrap;
}

.aaa-disclaimer {
  margin: 1rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 52ch;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

.product-split {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 860px) {
  .product-split {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
    gap: 2rem;
  }
}

.feature-list {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.feature-list li {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.feature-icon {
  flex-shrink: 0;
  color: var(--accent);
  font-size: 0.65rem;
  margin-top: 0.35rem;
}

.feature-list strong {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.95rem;
}

.feature-list p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.product-specs {
  padding: 1.35rem 1.25rem;
}

.product-specs h3 {
  margin: 0 0 1rem;
  font-size: 1rem;
}

.product-specs dl {
  margin: 0;
}

.product-specs dl > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--glass-border);
  font-size: 0.88rem;
}

.product-specs dl > div:last-child {
  border-bottom: none;
}

.product-specs dt {
  color: var(--text-muted);
  font-weight: 500;
}

.product-specs dd {
  margin: 0;
  text-align: right;
  font-weight: 600;
}

.steps-row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .steps-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step-card {
  padding: 1.35rem 1.2rem;
  margin: 0;
}

.step-num {
  display: block;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.12em;
  margin-bottom: 0.5rem;
}

.step-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.step-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.section--cta {
  margin-top: 3.5rem;
}

.cta-panel {
  text-align: center;
  padding: 2rem 1.5rem;
  background: linear-gradient(145deg, rgba(229, 9, 20, 0.12) 0%, var(--glass) 40%, rgba(139, 92, 246, 0.1) 100%);
  border-color: rgba(229, 9, 20, 0.25);
}

.cta-title {
  margin: 0 0 0.65rem;
  font-size: clamp(1.4rem, 4vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.cta-lead {
  margin: 0 auto 1.5rem;
  max-width: 46ch;
  color: var(--text-muted);
  line-height: 1.55;
  font-size: 1rem;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.cta-note {
  margin: 1.25rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.cta-note code {
  color: var(--accent-3);
  font-size: 0.72rem;
}

.faq-grid {
  display: grid;
  gap: 0.75rem;
}

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

.faq-item {
  padding: 0;
  overflow: hidden;
}

.faq-item summary {
  padding: 1rem 1.15rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item p {
  margin: 0;
  padding: 0 1.15rem 1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.footer--sales {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--glass-border);
}

.footer-logo {
  display: block;
  margin: 0 auto 0.75rem;
  height: 32px;
  width: auto;
  opacity: 0.9;
}

.footer-fine {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  opacity: 0.75;
}

/* ========== Boot + loading (play) ========== */
.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #020204;
  font-family: var(--mono);
}

.boot-inner {
  text-align: left;
  min-width: min(90vw, 320px);
}

.boot-brand {
  font-size: 0.75rem;
  letter-spacing: 0.35em;
  color: #e50914;
  margin: 0 0 0.25rem;
  animation: boot-fade 0.6s ease forwards;
}

.boot-sub {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.45);
  margin: 0 0 1.5rem;
  animation: boot-fade 0.8s ease forwards;
}

.boot-line {
  margin: 0.35rem 0;
  font-size: 0.8rem;
  color: #7cff9e;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.boot-line--visible {
  opacity: 1;
  transform: translateY(0);
}

.boot-cursor {
  animation: boot-blink 0.9s step-end infinite;
}

.boot-dots {
  letter-spacing: 0.1em;
}

@keyframes boot-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes boot-blink {
  50% {
    opacity: 0;
  }
}

.console-loading {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 4, 8, 0.92);
}

.loading-inner {
  padding: 1.5rem 1.25rem;
  max-width: 90vw;
}

.loading-ascii {
  margin: 0 0 1rem;
  font-family: var(--mono);
  font-size: clamp(0.55rem, 2.8vw, 0.75rem);
  color: #9ae6ff;
  line-height: 1.35;
}

.loading-blink {
  animation: boot-blink 0.8s step-end infinite;
}

.loading-msg {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: #c4ffd4;
  margin: 0 0 1rem;
  min-height: 1.25em;
}

.loading-bar {
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.loading-bar-fill {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent-3), var(--accent-2));
  animation: load-fill 1.8s ease-out forwards;
}

@keyframes load-fill {
  to {
    width: 100%;
  }
}

/* ========== Pré-jogo (capa + START) ========== */
.pre-play {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(5, 5, 10, 0.88);
  backdrop-filter: blur(8px);
}

.pre-play-card {
  width: min(420px, 100%);
  padding: 1.5rem 1.25rem 1.75rem;
  text-align: center;
  animation: card-in 0.45s ease forwards;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.cover-wrap {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  background: #090a12;
  max-width: 360px;
  aspect-ratio: 4 / 3;
  margin-left: auto;
  margin-right: auto;
  display: block;
  padding: 0;
}

.cover-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.pre-play-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 0.5rem;
  line-height: 1.25;
}

.pre-play-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
  line-height: 1.4;
}

.btn-start {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1rem;
}

/* ========== Play layout ========== */
.play-top {
  position: fixed;
  top: calc(var(--safe-top) + 0.5rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 8000;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
}

/* Durante o jogo a barra fica por cima do canvas WebGL: backdrop-filter (blur)
   obriga o navegador a re-desfocar a área a cada frame — no telemóvel isso
   rouba GPU ao emulador e o vídeo/áudio engasgam. Fundo sólido em vez de vidro. */
body.page-play.ejs-running .play-top {
  top: calc(var(--safe-top) + 0.25rem);
  padding: 0.25rem 0.5rem;
  background: rgba(10, 10, 16, 0.85);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}

.play-badge {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent-3);
}

.play-stage {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  padding: calc(var(--safe-top) + 3.25rem) max(0.5rem, env(safe-area-inset-right, 0px)) calc(var(--safe-bottom) + 0.25rem) max(0.5rem, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
}

body.page-play.ejs-running .play-stage {
  padding-top: calc(var(--safe-top) + 2.75rem);
  padding-bottom: var(--safe-bottom);
}

/* iPhone/iPad: pseudo fullscreen (Safari não expõe Fullscreen API no telefone). */
body.page-play.play-immersive {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}

body.page-play.play-immersive .play-stage {
  padding-left: max(0.25rem, env(safe-area-inset-left, 0px));
  padding-right: max(0.25rem, env(safe-area-inset-right, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

body.page-play.play-immersive.ejs-running .play-stage {
  padding-top: calc(var(--safe-top) + 2rem);
  padding-left: 0;
  padding-right: 0;
  padding-bottom: 0;
}

body.page-play.play-immersive.ejs-running .play-top {
  top: env(safe-area-inset-top, 0px);
}

@supports (-webkit-touch-callout: none) {
  body.page-play.play-immersive.ejs-running .play-stage {
    padding-top: calc(var(--safe-top) + 1.65rem);
  }
}

/* Botão interno do EmulatorJS ("Jogar") — escondido; usamos START GAME da capa. */
body.page-play #game .ejs_start_button {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
  height: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  left: -9999px !important;
}

/* iPhone/iPad: único arranque — overlay cobre controlos até o 2.º toque */
.ios-tap-to-play {
  position: fixed;
  inset: 0;
  z-index: 15000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  background: rgba(6, 6, 10, 0.82);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.ios-tap-to-play[hidden] {
  display: none !important;
}

.ios-tap-inner {
  text-align: center;
  padding: 1.5rem 1.75rem;
  max-width: 20rem;
  border-radius: var(--radius);
}

.ios-tap-title {
  margin: 0 0 0.5rem;
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--accent-3);
}

.ios-tap-sub {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text-muted);
}

/* "ATIVAR SOM" aparece com o jogo já a correr por baixo: sem blur. */
.ios-audio-unlock .ios-tap-inner {
  background: rgba(14, 14, 22, 0.96);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.ios-audio-unlock .ios-audio-title {
  color: var(--accent);
  animation: ios-audio-pulse-title 1.4s ease-in-out infinite;
}

.ios-audio-hint {
  display: block;
  margin-top: 0.85rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

@keyframes ios-audio-pulse-title {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.65;
  }
}

.game-host {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  border-radius: 0;
  overflow: hidden;
  touch-action: manipulation;
  background: #000;
}

.game-host:empty {
  min-height: 36dvh;
}

[hidden] {
  display: none !important;
}

/*
 * EmulatorJS coloca a classe .ejs_parent NO próprio #game (não é filho).
 * O vídeo fica em .ejs_canvas_parent → canvas.ejs_canvas.
 * Forçamos coluna flex para a área do jogo crescer até junto dos controlos (gamepad em position:absolute).
 */
#game.game-host {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  align-self: stretch;
  position: relative;
}

#game.ejs_parent {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-width: none !important;
  overflow: hidden !important;
}

#game .ejs_canvas_parent {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  position: relative !important;
}

#game .ejs_canvas {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  margin: 0 auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: transform;
}

/* ========== Aviso único: atualização + acúmulo de abas ========== */
/* Aparece no pré-jogo (antes do emulador correr), por cima do .pre-play. */
.tabs-notice {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  background: rgba(4, 4, 8, 0.78);
}

.tabs-notice-card {
  width: min(380px, 100%);
  padding: 1.4rem 1.25rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: #0e0e16;
  color: #f2f2f8;
  text-align: left;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
  animation: card-in 0.35s ease forwards;
}

.tabs-notice-tag {
  margin: 0 0 0.4rem;
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #00d4aa;
}

.tabs-notice-title {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
  line-height: 1.25;
}

.tabs-notice-text {
  margin: 0 0 0.7rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(242, 242, 248, 0.78);
}

.tabs-notice-text strong {
  color: #f2f2f8;
}

.tabs-notice-btn {
  width: 100%;
  margin-top: 0.5rem;
}

/* ========== "Meus jogos": botão no canto + lista ========== */
/* Acima do pré-jogo (9000) e abaixo do aviso único (12000) e dos toques do iOS (15000).
   Fundo sólido, sem backdrop-filter: o botão fica por cima do canvas durante o jogo. */
.btn-my-games {
  position: fixed;
  top: calc(var(--safe-top) + 0.5rem);
  left: calc(env(safe-area-inset-left, 0px) + 0.6rem);
  z-index: 9500;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(10, 10, 16, 0.88);
  color: #f2f2f8;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn-my-games:focus-visible {
  outline: 2px solid #00d4aa;
  outline-offset: 2px;
}

.btn-my-games-count {
  min-width: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #00d4aa;
  color: #06060a;
  font-size: 0.72rem;
  line-height: 1.25rem;
  text-align: center;
}

html[data-theme="gb"] .btn-my-games {
  border-color: rgba(155, 188, 15, 0.35);
  background: rgba(15, 56, 15, 0.92);
  color: #e0f8d0;
  border-radius: 8px;
}

html[data-theme="gb"] .btn-my-games-count {
  background: #9bbc0f;
  color: #0f380f;
}

.my-games {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  /* Topo livre para os botões "Meus jogos" / "Está travando?" (que ficam por baixo). */
  padding: calc(var(--safe-top) + 3.25rem) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom))
    max(1rem, env(safe-area-inset-left));
  background: rgba(4, 4, 8, 0.8);
  overflow-y: auto;
}

.my-games-panel {
  width: min(480px, 100%);
  padding: 1.1rem 1rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: #0e0e16;
  color: #f2f2f8;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
  animation: card-in 0.3s ease forwards;
}

.my-games-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.my-games-title {
  margin: 0;
  font-size: 1.2rem;
}

.my-games-sub {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  color: rgba(242, 242, 248, 0.65);
}

.my-games-close {
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #f2f2f8;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.my-games-list {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.my-games-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  text-decoration: none;
}

a.my-games-link:hover,
a.my-games-link:focus-visible {
  border-color: rgba(0, 212, 170, 0.55);
  background: rgba(0, 212, 170, 0.06);
  outline: none;
}

.my-games-item.is-current .my-games-link {
  border-color: rgba(0, 212, 170, 0.45);
}

.my-games-cover {
  flex: none;
  width: 3rem;
  height: 4.2rem;
  border-radius: 6px;
  overflow: hidden;
  background: linear-gradient(160deg, #1c1c28, #0a0a10);
}

.my-games-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.my-games-info {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
}

.my-games-name {
  font-weight: 650;
  font-size: 0.95rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.my-games-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  color: rgba(242, 242, 248, 0.62);
}

.my-games-console {
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #f2f2f8;
}

.my-games-item.is-current .my-games-when {
  color: #00d4aa;
  font-weight: 650;
}

.my-games-foot {
  margin: 0.85rem 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: rgba(242, 242, 248, 0.5);
}

/* ========== "Está travando?": relato do cliente durante o jogo ========== */
/* Só aparece com o jogo a correr; mesma regra do "Meus jogos": fundo sólido, sem blur. */
.btn-report {
  display: none;
  position: fixed;
  top: calc(var(--safe-top) + 0.5rem);
  right: calc(env(safe-area-inset-right, 0px) + 0.6rem);
  z-index: 9500;
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(10, 10, 16, 0.88);
  color: #f2f2f8;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

body.ejs-running .btn-report {
  display: inline-flex;
}

.btn-report:disabled {
  opacity: 0.7;
  cursor: default;
}

html[data-theme="gb"] .btn-report {
  border-color: rgba(155, 188, 15, 0.35);
  background: rgba(15, 56, 15, 0.92);
  color: #e0f8d0;
  border-radius: 8px;
}

.report-options {
  display: grid;
  gap: 0.45rem;
  margin: 0.25rem 0 0.75rem;
}

.report-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.92rem;
  cursor: pointer;
}

.report-option:has(input:checked) {
  border-color: rgba(0, 212, 170, 0.6);
  background: rgba(0, 212, 170, 0.08);
}

.report-option input {
  accent-color: #00d4aa;
  width: 1.05rem;
  height: 1.05rem;
}

.report-text {
  width: 100%;
  box-sizing: border-box;
  padding: 0.6rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: #f2f2f8;
  font: inherit;
  font-size: 0.9rem;
  resize: vertical;
}

.report-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

/* O painel é sempre escuro: não herdar a cor de texto do tema claro. */
.report-actions .btn-ghost {
  color: #f2f2f8;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
}
