/* ===== NETBULB Arcade SEO - estilo arcade retro ===== */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

:root {
  --brand: #1984c6;
  --brand-dark: #0d5a8a;
  --brand-darker: #083d5e;
  --brand-light: #4aa8e0;
  --gold: #ffd24a;
  --pink: #ff3ea5;
  --cyan: #00e5ff;
  --bg-deep: #050a1a;
  --bg-mid: #0a1530;
  --text: #ffffff;
  --text-dim: #b8c5dc;
  --danger: #ff4860;
  --green: #4ade80;
  --shadow-color: rgba(0, 0, 0, 0.6);
}

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

html {
  background: var(--bg-deep);
}

html, body {
  height: 100%;
  font-family: 'VT323', 'Courier New', monospace;
  font-size: 18px;
  color: var(--text);
  background: var(--bg-deep);
  overflow-x: hidden;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: 0.02em;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0) 0px,
      rgba(0, 0, 0, 0) 2px,
      rgba(0, 0, 0, 0.15) 3px,
      rgba(0, 0, 0, 0.15) 4px
    );
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,0.35) 100%);
}

h1, h2, h3, .arcade-title, .arcade-btn {
  font-family: 'Press Start 2P', 'Courier New', monospace;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; }

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  flex-grow: 0;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  line-height: 0;
}
.icon svg {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display: block;
  overflow: visible;
}

/* ===== Space background canvas ===== */
#space-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 0;
  pointer-events: none;
  image-rendering: pixelated;
}

/* ===== Landing layout ===== */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 28px 28px 50px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.brand-link {
  text-decoration: none;
  display: inline-block;
}

.brand-text {
  font-family: 'Press Start 2P', monospace;
  font-size: 26px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: #fff;
  text-shadow: 3px 3px 0 var(--brand-dark);
  padding: 12px 22px;
  background: var(--bg-mid);
  border: 4px solid var(--brand);
  outline: 3px solid #000;
  box-shadow: 6px 6px 0 var(--brand-dark);
  display: inline-block;
  transition: transform 0.08s ease;
}
.brand-link:hover .brand-text {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--brand-dark);
}

.arcade-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--brand);
  color: #fff;
  border: 4px solid #fff;
  outline: 3px solid var(--brand-dark);
  outline-offset: -3px;
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.08s ease, background 0.08s ease;
  position: relative;
  text-shadow: 2px 2px 0 var(--brand-dark);
  box-shadow: 4px 4px 0 #000;
}
.arcade-btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 #000; }
.arcade-btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 #000; }
.arcade-btn.gold { background: var(--gold); color: #000; outline-color: #b8941f; text-shadow: 2px 2px 0 #b8941f; }
.arcade-btn.pink { background: var(--pink); outline-color: #b3246f; text-shadow: 2px 2px 0 #b3246f; }
.arcade-btn.ghost { background: transparent; color: var(--brand); outline-color: var(--brand); }
.arcade-btn.ghost:hover { background: var(--brand); color: #fff; }
.arcade-btn .icon { font-size: 14px; }

/* ===== Hero ===== */
.hero {
  margin: 50px auto 50px;
  text-align: center;
  max-width: 920px;
  padding: 0 20px;
}

.hero h1 {
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.15;
  color: var(--brand);
  text-shadow:
    4px 4px 0 #fff,
    8px 8px 0 var(--brand-dark);
  margin-bottom: 24px;
  word-break: keep-all;
  overflow-wrap: normal;
}

/* ===== SEO content section ===== */
.seo-content {
  max-width: 900px;
  margin: 60px auto 30px;
  padding: 30px 24px;
  background: var(--bg-mid);
  border: 4px solid var(--brand);
  outline: 3px solid #000;
  box-shadow: 8px 8px 0 #000;
  position: relative;
  z-index: 1;
}

.seo-content h2 {
  font-family: 'VT323', 'Courier New', monospace;
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 700;
  color: var(--brand);
  line-height: 1.2;
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--brand-dark);
  word-break: keep-all;
  overflow-wrap: normal;
  text-shadow: 2px 2px 0 #000;
  letter-spacing: 0.02em;
}

.seo-content h2:first-child {
  margin-top: 0;
}

.seo-content h3 {
  font-family: 'VT323', 'Courier New', monospace;
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 700;
  color: var(--gold);
  line-height: 1.2;
  margin: 26px 0 12px;
  word-break: keep-all;
  overflow-wrap: normal;
  text-shadow: 2px 2px 0 #000;
  letter-spacing: 0.02em;
}

.seo-content h3::before {
  content: '> ';
  color: var(--brand);
}

.seo-content p {
  font-family: 'VT323', 'Courier New', monospace;
  font-size: clamp(16px, 1.8vw, 20px);
  line-height: 1.55;
  color: var(--text);
  margin: 0 0 14px;
}

.seo-content p strong {
  color: var(--gold);
  font-weight: 700;
}

.hero .subtitle {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(11px, 1.4vw, 14px);
  letter-spacing: 0.18em;
  color: var(--gold);
  margin-bottom: 20px;
  text-transform: uppercase;
}

.hero p {
  margin-top: 8px;
  font-size: clamp(16px, 1.8vw, 22px);
  color: var(--text);
  line-height: 1.5;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero .accent { color: var(--gold); }

/* ===== Game grid ===== */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 10px;
}

.game-card {
  position: relative;
  display: block;
  background: var(--bg-mid);
  border: 4px solid var(--brand);
  outline: 3px solid #000;
  outline-offset: 0;
  transition: transform 0.1s ease;
  box-shadow: 8px 8px 0 #000;
  overflow: hidden;
}
.game-card:hover {
  transform: translate(-4px, -4px);
  box-shadow: 12px 12px 0 #000;
}
.game-card:active {
  transform: translate(4px, 4px);
  box-shadow: 4px 4px 0 #000;
}
.game-card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(25,132,198,0.1) 0%, transparent 50%, rgba(25,132,198,0.05) 100%);
}

.game-card .preview {
  height: 130px;
  background: var(--bg-deep);
  border-bottom: 4px solid var(--brand);
  position: relative;
  display: block;
}
.game-card .preview canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; }

.game-card .card-body {
  padding: 20px 22px 22px;
  position: relative;
}

.game-card .badge {
  display: inline-block;
  padding: 6px 10px;
  background: var(--gold);
  color: #000;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
  border: 2px solid #000;
}

.game-card h2 {
  font-family: 'Press Start 2P', monospace;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
  color: #fff;
  text-shadow: 2px 2px 0 var(--brand-dark);
}

.game-card .desc {
  font-size: 17px;
  color: var(--text-dim);
  line-height: 1.4;
  margin-bottom: 16px;
  min-height: 48px;
}

.game-card .play-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--brand);
  text-transform: uppercase;
  text-shadow: 2px 2px 0 #000;
}
.game-card:hover .play-btn { color: var(--gold); }
.game-card .play-btn .icon { font-size: 14px; }

/* ===== Footer ===== */
.footer {
  margin-top: auto;
  padding-top: 50px;
  text-align: center;
  font-size: 16px;
  color: var(--text-dim);
}
.footer-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}
.footer-logo a {
  display: inline-block;
  line-height: 0;
}
.footer-logo img {
  display: block;
  height: 64px;
  width: auto;
  filter: brightness(0) invert(1) drop-shadow(3px 3px 0 #000);
  -webkit-filter: brightness(0) invert(1) drop-shadow(3px 3px 0 #000);
  transition: filter 0.15s ease;
}
.footer-logo img:hover {
  filter: brightness(0) invert(1) drop-shadow(3px 3px 0 var(--brand)) brightness(1.2);
  -webkit-filter: brightness(0) invert(1) drop-shadow(3px 3px 0 var(--brand)) brightness(1.2);
}
.footer .legal {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
}
.footer .legal a {
  color: var(--text);
  padding: 4px 0;
  transition: color 0.08s ease;
}
.footer .legal a:hover { color: var(--brand); }
.footer .copy {
  font-size: 14px;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}

/* ===== Game page chrome ===== */
.game-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  background: var(--bg-mid);
  border-bottom: 4px solid var(--brand);
  flex-wrap: wrap;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 5;
}

.game-header .left { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.game-header .right { display: flex; align-items: center; gap: 12px; }

.game-header h1 {
  font-family: 'Press Start 2P', monospace;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--brand);
  text-shadow: 2px 2px 0 #000;
}
.game-header .game-sub {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--brand);
  color: #fff;
  border: 3px solid #fff;
  outline: 2px solid #000;
  outline-offset: -3px;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  text-shadow: 2px 2px 0 var(--brand-dark);
  transition: transform 0.08s ease;
  box-shadow: 3px 3px 0 #000;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 #000; }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #000; }
.btn.primary { background: var(--gold); color: #000; outline-color: #000; text-shadow: 2px 2px 0 #b8941f; }
.btn.ghost { background: transparent; color: var(--brand); outline-color: var(--brand); }
.btn.ghost:hover { background: var(--brand); color: #fff; }
.btn .icon { font-size: 14px; }

.game-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  position: relative;
}

.game-canvas-wrap {
  position: relative;
  width: 100%;
  max-width: 1100px;
  aspect-ratio: 16 / 9;
  border: 4px solid var(--brand);
  outline: 3px solid #000;
  box-shadow: 8px 8px 0 #000;
  overflow: hidden;
  background: var(--bg-deep);
}
.game-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: rgba(5, 10, 26, 0.92);
  text-align: center;
  padding: 30px;
  z-index: 4;
}
.overlay h2 {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(18px, 3vw, 28px);
  font-weight: 400;
  margin-bottom: 18px;
  color: var(--brand);
  text-shadow: 3px 3px 0 #000, 6px 6px 0 var(--brand-dark);
}
.overlay p {
  font-size: clamp(16px, 1.8vw, 22px);
  color: var(--text);
  max-width: 540px;
  line-height: 1.5;
  margin-bottom: 24px;
}
.overlay .actions {
  display: flex !important;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 0 12px;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}
.overlay .actions > * {
  display: inline-flex !important;
  flex: 0 0 auto;
  width: auto;
  min-width: 240px;
  max-width: 100%;
  white-space: nowrap;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
  margin: 0 !important;
}
.overlay .score-final {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(28px, 5vw, 44px);
  color: var(--gold);
  margin: 16px 0 6px;
  text-shadow: 3px 3px 0 #000;
}

.hud {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  pointer-events: none;
  z-index: 3;
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  letter-spacing: 0.05em;
}
.hud .panel {
  background: var(--bg-deep);
  border: 3px solid var(--brand);
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 400;
  color: #fff;
  text-shadow: 2px 2px 0 #000;
  box-shadow: 3px 3px 0 #000;
}
.hud .panel .icon { font-size: 14px; color: var(--brand); }
.hud .panel.gold { border-color: var(--gold); }
.hud .panel.gold .icon { color: var(--gold); }
.hud .panel.danger { border-color: var(--danger); }
.hud .panel.danger .icon { color: var(--danger); }
.hud .panel.pink { border-color: var(--pink); }
.hud .panel.pink .icon { color: var(--pink); }

.key-hint {
  position: absolute;
  bottom: 14px;
  left: 14px;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: #fff;
  background: var(--bg-deep);
  border: 3px solid var(--brand);
  padding: 7px 12px;
  letter-spacing: 0.06em;
  z-index: 3;
  pointer-events: none;
  text-shadow: 1px 1px 0 #000;
  box-shadow: 3px 3px 0 #000;
}

.toast {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-deep);
  border: 4px solid var(--gold);
  padding: 18px 28px;
  font-family: 'Press Start 2P', monospace;
  font-weight: 400;
  font-size: 16px;
  color: var(--gold);
  letter-spacing: 0.05em;
  pointer-events: none;
  z-index: 4;
  opacity: 0;
  transition: opacity 0.2s ease;
  text-shadow: 2px 2px 0 #000;
  box-shadow: 6px 6px 0 #000;
}
.toast.show { opacity: 1; }

/* ===== Responsive ===== */
@media (max-width: 700px) {
  .page { padding: 18px 14px 36px; }
  .game-header { padding: 10px 12px; }
  .game-header h1 { font-size: 13px; }
  .game-stage { padding: 10px; }
  .footer .legal { gap: 10px; font-size: 8px; }
  .hero h1 { font-size: 26px; text-shadow: 2px 2px 0 #fff, 4px 4px 0 var(--brand-dark); }
  .brand-text { font-size: 16px; }
  .logo-wrap .logo-img { height: 32px; }
  .overlay .actions { flex-direction: column; gap: 12px; align-items: center; }
  .overlay .actions .btn { width: auto; min-width: 220px; justify-content: center; }
  .overlay h2 { font-size: 18px; }
  .overlay p { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
}