:root {
  --neon-cyan: #00f0ff;
  --neon-magenta: #ff00e5;
  --neon-purple: #a855f7;
  --neon-yellow: #ffe600;
  --bg: #05030f;
}

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

html, body {
  min-height: 100%;
}

body {
  font-family: "Rajdhani", "Segoe UI", sans-serif;
  background: var(--bg);
  color: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  cursor: default;
}

/* ===================== CAMADAS DE FUNDO ===================== */
#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.grid-floor {
  position: fixed;
  bottom: 0;
  left: 50%;
  width: 200%;
  height: 60vh;
  transform: translateX(-50%) perspective(400px) rotateX(70deg);
  transform-origin: bottom center;
  background-image:
    linear-gradient(var(--neon-cyan) 1px, transparent 1px),
    linear-gradient(90deg, var(--neon-magenta) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0.18;
  z-index: 0;
  pointer-events: none;
  animation: gridMove 4s linear infinite;
  mask-image: linear-gradient(to top, #000 30%, transparent 90%);
  -webkit-mask-image: linear-gradient(to top, #000 30%, transparent 90%);
}

@keyframes gridMove {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 0 50px, 50px 0; }
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(
    transparent 0px, transparent 2px,
    rgba(0, 0, 0, 0.18) 3px, rgba(0, 0, 0, 0.18) 4px);
  mix-blend-mode: multiply;
}

.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.12), transparent 60%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.3s;
}

/* ===================== GABINETE DE ARCADE ===================== */
.arcade-cabinet {
  position: relative;
  z-index: 3;
  width: min(960px, 94vw);
  margin: 40px auto 20px;
  padding: 0 26px 26px;
  background:
    linear-gradient(180deg, #2a1147 0%, #1a0b2e 40%, #0d0518 100%);
  border-radius: 40px 40px 18px 18px / 80px 80px 18px 18px;
  border: 2px solid rgba(168, 85, 247, 0.5);
  box-shadow:
    0 0 30px rgba(168, 85, 247, 0.4),
    0 0 70px rgba(255, 0, 229, 0.18),
    inset 0 0 60px rgba(0, 0, 0, 0.6);
}

/* "orelhas" laterais no topo */
.cabinet-ears {
  position: absolute;
  top: -2px; left: -2px; right: -2px;
  height: 60px;
  border-radius: 40px 40px 0 0 / 80px 80px 0 0;
  background: linear-gradient(180deg, #3a1a5e, transparent);
  pointer-events: none;
}

/* ---- Marquee (letreiro iluminado) ---- */
.marquee {
  position: relative;
  margin: 26px 0 22px;
  padding: 22px 20px;
  text-align: center;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(0, 240, 255, 0.12), rgba(255, 0, 229, 0.12)),
    #0a0618;
  border: 2px solid rgba(0, 240, 255, 0.45);
  box-shadow:
    0 0 22px rgba(0, 240, 255, 0.35),
    inset 0 0 30px rgba(255, 0, 229, 0.15);
  overflow: hidden;
}

.marquee::after {
  /* brilho que cruza o letreiro */
  content: "";
  position: absolute;
  top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  animation: shine 5s linear infinite;
}

@keyframes shine {
  0% { left: -60%; }
  60%, 100% { left: 120%; }
}

.marquee h1 {
  font-family: "Orbitron", sans-serif;
  font-weight: 900;
  font-size: clamp(28px, 6vw, 60px);
  letter-spacing: 5px;
  color: #fff;
  text-shadow:
    0 0 8px var(--neon-cyan),
    0 0 20px var(--neon-cyan),
    0 0 40px var(--neon-magenta);
  position: relative;
  display: inline-block;
}

/* Efeito glitch no título */
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  overflow: hidden;
}

.glitch::before {
  color: var(--neon-magenta);
  animation: glitchTop 2.5s infinite linear alternate-reverse;
  clip-path: inset(0 0 55% 0);
}

.glitch::after {
  color: var(--neon-cyan);
  animation: glitchBottom 3s infinite linear alternate-reverse;
  clip-path: inset(55% 0 0 0);
}

@keyframes glitchTop {
  0%, 90%, 100% { transform: translate(0); }
  92% { transform: translate(-4px, -2px); }
  94% { transform: translate(4px, 1px); }
  96% { transform: translate(-2px, 1px); }
}

@keyframes glitchBottom {
  0%, 88%, 100% { transform: translate(0); }
  90% { transform: translate(4px, 2px); }
  93% { transform: translate(-4px, -1px); }
  97% { transform: translate(2px, -1px); }
}

/* ---- Moldura da tela ---- */
.screen-bezel {
  position: relative;
  padding: 26px;
  background: linear-gradient(180deg, #15151f, #0a0a12);
  border-radius: 18px;
  box-shadow:
    inset 0 0 0 3px #000,
    inset 0 0 24px rgba(0, 0, 0, 0.9);
}

/* alto-falantes laterais */
.speaker {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 120px;
  background-image: radial-gradient(circle, #000 1.4px, transparent 1.6px);
  background-size: 8px 8px;
  opacity: 0.6;
}
.speaker--left { left: 6px; }
.speaker--right { right: 6px; }

/* ---- A "tela" (onde ficam os jogos) ---- */
.screen {
  position: relative;
  background:
    radial-gradient(ellipse at center, #0a0820 0%, #05030f 100%);
  border-radius: 10px;
  padding: 26px 22px 30px;
  overflow: hidden;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.8);
}

/* leve curvatura/vinheta de CRT na tela */
.screen-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    transparent 0, transparent 2px,
    rgba(0, 0, 0, 0.22) 3px, rgba(0, 0, 0, 0.22) 4px);
  border-radius: 10px;
  z-index: 5;
}

.subtitle {
  text-align: center;
  margin-bottom: 22px;
  font-size: clamp(14px, 2.4vw, 18px);
  letter-spacing: 3px;
  color: var(--neon-cyan);
  text-shadow: 0 0 8px var(--neon-cyan);
  animation: flicker 3.5s infinite;
}

@keyframes flicker {
  0%, 19%, 21%, 23%, 80%, 100% { opacity: 1; }
  20%, 22% { opacity: 0.4; }
  82% { opacity: 0.6; }
}

/* ===================== GRADE DE JOGOS ===================== */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 22px;
}

/* ============== CARD = MINI MÁQUINA DE ARCADE ============== */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 10px 10px 12px;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(180deg, #281355 0%, #160a2e 45%, #0c0520 100%);
  border: 2px solid rgba(168, 85, 247, 0.45);
  border-radius: 26px 26px 10px 10px / 40px 40px 10px 10px;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.06),
    0 6px 18px rgba(0, 0, 0, 0.5);
  transform-style: preserve-3d;
  transition: border-color 0.25s, box-shadow 0.25s;
  opacity: 0;
  animation: cardIn 0.6s ease forwards;
  animation-delay: var(--delay);
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card:hover {
  border-color: var(--neon-cyan);
  box-shadow:
    0 0 20px rgba(0, 240, 255, 0.45),
    0 0 45px rgba(255, 0, 229, 0.22);
}

.card-glow {
  position: absolute;
  inset: -2px;
  border-radius: 26px 26px 10px 10px / 40px 40px 10px 10px;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-magenta));
  opacity: 0;
  z-index: -1;
  filter: blur(16px);
  transition: opacity 0.3s;
}

.card:hover .card-glow { opacity: 0.45; }

.card--soon {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: rgba(168, 85, 247, 0.3);
}

.card--soon:hover {
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.06), 0 6px 18px rgba(0,0,0,0.5);
  border-color: rgba(168, 85, 247, 0.3);
}

/* ---- marquee da mini-máquina ---- */
.cab-marquee {
  position: relative;
  text-align: center;
  padding: 9px 8px;
  border-radius: 14px 14px 6px 6px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: inset 0 0 14px rgba(255, 255, 255, 0.25);
  overflow: hidden;
}

.cab-marquee span {
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: 0.5px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  display: block;
}

.cab-marquee::after {
  content: "";
  position: absolute;
  top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shine 5s linear infinite;
  animation-delay: var(--delay);
}

/* ---- tela da mini-máquina ---- */
.cab-screen {
  position: relative;
  flex: 1;
  margin: 8px 4px;
  padding: 16px 12px 14px;
  text-align: center;
  background: radial-gradient(ellipse at center, #0a0820, #05030f);
  border: 3px solid #000;
  border-radius: 8px;
  box-shadow: inset 0 0 26px rgba(0, 0, 0, 0.85);
  overflow: hidden;
}

.cab-scan {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(
    transparent 0, transparent 2px,
    rgba(0, 0, 0, 0.22) 3px, rgba(0, 0, 0, 0.22) 4px);
  border-radius: 6px;
}

.cab-emoji {
  display: block;
  font-size: 54px;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.6));
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

.cab-desc {
  color: #b9b9d6;
  font-size: 13px;
  line-height: 1.5;
  margin: 12px 0;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.tag {
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.3);
  color: var(--neon-cyan);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  letter-spacing: 0.5px;
}

/* ---- painel de controle da mini-máquina ---- */
.cab-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 4px;
  padding: 8px;
  background: linear-gradient(180deg, #2b2b3a, #15151f);
  border-radius: 8px;
  border-top: 2px solid rgba(0, 240, 255, 0.22);
}

.mini-joy {
  position: relative;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #444, #111);
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.8);
}

.mini-ball {
  position: absolute;
  top: -9px; left: 4px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff7b7b, #d00000);
  box-shadow: 0 0 8px rgba(255, 0, 0, 0.7);
  transition: transform 0.15s ease;
}

.card:hover .mini-ball { transform: translate(-4px, 1px); }

.mini-btns { display: flex; gap: 7px; }

.mini-btn {
  width: 15px; height: 15px;
  border-radius: 50%;
  box-shadow:
    inset 0 -2px 3px rgba(0, 0, 0, 0.5),
    inset 0 2px 3px rgba(255, 255, 255, 0.5),
    0 0 8px currentColor;
}

.mini-btn--cyan    { background: var(--neon-cyan);    color: var(--neon-cyan); }
.mini-btn--magenta { background: var(--neon-magenta); color: var(--neon-magenta); }
.mini-btn--yellow  { background: var(--neon-yellow);  color: var(--neon-yellow); }

/* ---- moeda + botão jogar ---- */
.cab-coin {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.mini-slot {
  width: 26px;
  height: 8px;
  border-radius: 2px;
  background: #000;
  border: 1px solid #555;
}

.play-badge,
.soon-badge {
  font-family: "Orbitron", sans-serif;
  padding: 5px 14px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
}

.play-badge {
  background: var(--neon-cyan);
  color: #03121a;
  box-shadow: 0 0 14px var(--neon-cyan);
}

.soon-badge {
  background: transparent;
  color: var(--neon-purple);
  border: 1px solid var(--neon-purple);
}

/* ===================== PAINEL DE CONTROLE ===================== */
.control-panel {
  position: relative;
  margin-top: 22px;
  padding: 24px 30px;
  display: flex;
  align-items: center;
  gap: 40px;
  background: linear-gradient(180deg, #2b2b3a 0%, #15151f 100%);
  border-radius: 12px;
  border-top: 3px solid rgba(0, 240, 255, 0.25);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.08), 0 6px 20px rgba(0, 0, 0, 0.5);
}

.player-tag {
  font-family: "Orbitron", sans-serif;
  color: var(--neon-yellow);
  text-shadow: 0 0 10px var(--neon-yellow);
  font-size: 14px;
  letter-spacing: 2px;
}

/* ---- Joystick ---- */
.joystick {
  position: relative;
  width: 70px;
  height: 70px;
}

.joystick-base {
  position: absolute;
  bottom: 0; left: 5px;
  width: 60px; height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, #444, #111);
  box-shadow: inset 0 -3px 6px rgba(0, 0, 0, 0.8);
}

.joystick-stick {
  position: absolute;
  bottom: 14px; left: 30px;
  width: 10px; height: 36px;
  border-radius: 6px;
  background: linear-gradient(90deg, #222, #555, #222);
  transform-origin: bottom center;
  transition: transform 0.15s ease;
}

.joystick-ball {
  position: absolute;
  top: 0; left: 18px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff7b7b, #d00000);
  box-shadow: 0 0 14px rgba(255, 0, 0, 0.7), inset -3px -4px 8px rgba(0, 0, 0, 0.5);
  transform-origin: center bottom;
  transition: transform 0.15s ease;
}

.joystick:hover .joystick-stick { transform: rotate(-12deg); }
.joystick:hover .joystick-ball { transform: translate(-8px, 2px); }

/* ---- Botões de arcade ---- */
.buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.abtn {
  width: 38px; height: 38px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  box-shadow:
    inset 0 -4px 6px rgba(0, 0, 0, 0.5),
    inset 0 3px 5px rgba(255, 255, 255, 0.4),
    0 0 14px currentColor;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.abtn:active {
  transform: translateY(3px);
  box-shadow: inset 0 -1px 3px rgba(0, 0, 0, 0.6), 0 0 8px currentColor;
}

.abtn--cyan    { background: var(--neon-cyan);    color: var(--neon-cyan); }
.abtn--magenta { background: var(--neon-magenta); color: var(--neon-magenta); }
.abtn--yellow  { background: var(--neon-yellow);  color: var(--neon-yellow); }
.abtn--purple  { background: var(--neon-purple);  color: var(--neon-purple); }

/* ===================== MOEDA ===================== */
.coin-area {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.coin-slot {
  width: 46px;
  height: 12px;
  border-radius: 3px;
  background: #000;
  border: 2px solid #555;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.9);
}

.coin-text {
  font-family: "Orbitron", sans-serif;
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--neon-magenta);
  text-shadow: 0 0 10px var(--neon-magenta);
  animation: blink 1.2s steps(2, start) infinite;
}

@keyframes blink {
  50% { opacity: 0.2; }
}

/* base do gabinete */
.cabinet-base {
  margin: 22px -26px -26px;
  height: 26px;
  background: linear-gradient(180deg, #0d0518, #000);
  border-radius: 0 0 18px 18px;
}

/* ===================== RODAPÉ ===================== */
.site-footer {
  text-align: center;
  padding: 20px 30px 40px;
  color: #5a5a80;
  font-size: 14px;
  letter-spacing: 1px;
  position: relative;
  z-index: 3;
}

/* ===================== AJUSTES PARA CELULAR ===================== */
@media (max-width: 600px) {
  .arcade-cabinet {
    width: 96vw;
    padding: 0 12px 16px;
    border-radius: 28px 28px 14px 14px / 50px 50px 14px 14px;
  }

  .marquee { margin: 18px 0 16px; padding: 16px 12px; }

  .screen-bezel { padding: 14px; }
  .speaker { display: none; } /* sem espaço pros alto-falantes em tela pequena */

  .screen { padding: 18px 12px 22px; }

  .game-grid {
    grid-template-columns: 1fr; /* uma mini-máquina por linha */
    gap: 18px;
  }

  /* painel de controle do gabinete grande: mais compacto */
  .control-panel {
    flex-wrap: wrap;
    gap: 20px;
    padding: 18px;
    justify-content: center;
  }

  .cabinet-base { margin: 18px -12px -16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
}
