/* TopNoHuGame.com - Retro Arcade Deep Indigo, Gold & Neon Cyan Theme */
:root {
  --bg: #08091a;
  --panel: #10132b;
  --panel-alt: #181d40;
  --ink: #f8fafc;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --gold: #facc15;
  --danger: #fb7185;
  --emerald: #34d399;
  --border: rgba(56, 189, 248, 0.24);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at top, #171d4b 0%, var(--bg) 62%);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1060px; margin: 0 auto; padding: 0 14px; }

.site-header {
  background: rgba(8, 9, 26, 0.92);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
}
.header-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.15rem; color: #fff; }
.brand-badge {
  background: linear-gradient(135deg, var(--gold), var(--accent));
  color: #08091a;
  padding: 2px 8px;
  border-radius: 7px;
  font-size: 0.9rem;
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.35);
}
.nav-links { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nav-link { color: var(--muted); padding: 6px 11px; border-radius: 7px; font-size: 0.9rem; font-weight: 600; }
.nav-link:hover, .nav-link.active { background: rgba(56, 189, 248, 0.14); color: #fff; text-decoration: none; }
.nav-link.active { border: 1px solid rgba(250, 204, 21, 0.6); color: var(--gold); }

.ad-slot { margin: 12px auto; display: flex; align-items: center; justify-content: center; width: 100%; overflow: hidden; }
.ad-leaderboard { min-height: 90px; max-width: 970px; }
.ad-rectangle { min-height: 250px; max-width: 728px; }
.ad-placeholder {
  width: 100%;
  min-height: inherit;
  border: 1px dashed rgba(148, 163, 184, 0.25);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(148, 163, 184, 0.52);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.game-shell {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  margin-top: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.58), 0 0 32px rgba(56, 189, 248, 0.08);
}
.game-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 12px;
}
.game-title-wrap h1 { margin: 0; font-size: 1.38rem; color: #fff; }
.game-subtitle { margin: 2px 0 0; font-size: 0.84rem; color: var(--muted); }
.hud-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.stat-pill {
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.84rem;
  color: var(--muted);
}
.stat-pill strong { color: var(--gold); margin-left: 4px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.btn {
  appearance: none;
  border: 1px solid rgba(56, 189, 248, 0.28);
  background: var(--panel-alt);
  color: #fff;
  padding: 7px 13px;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
}
.btn:hover:not(:disabled) { background: #222959; border-color: var(--accent); }
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-accent {
  background: linear-gradient(135deg, #0284c7, var(--accent));
  border-color: #7dd3fc;
  color: #061124;
  font-weight: 800;
}
.btn-accent:hover:not(:disabled) { background: linear-gradient(135deg, var(--accent), #7dd3fc); }
.btn-gold {
  background: linear-gradient(135deg, #eab308, var(--gold));
  border-color: #fde047;
  color: #08091a;
  font-weight: 800;
}
.btn-danger { background: rgba(251, 113, 133, 0.2); border-color: var(--danger); color: #ffe4e6; }
.btn-active { background: rgba(250, 204, 21, 0.2); border-color: var(--gold); color: var(--gold); }

.select-ctrl {
  background: var(--panel-alt);
  color: #fff;
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 0.86rem;
  font-weight: 600;
}
.toast {
  min-height: 24px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 10px;
  text-align: center;
}

/* Quick-Start Bar */
.quickstart-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
  background: rgba(56, 189, 248, 0.07);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
}
.qs-item { font-size: 0.8rem; color: var(--muted); display: flex; gap: 6px; align-items: flex-start; }
.qs-num {
  background: var(--gold);
  color: #08091a;
  font-weight: 800;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  min-width: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  margin-top: 2px;
}
.qs-item strong { color: #fff; }

/* Tutorial Modal */
.tut-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 16, 0.8);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 14px;
}
.tut-backdrop.open { display: flex; }
.tut-modal {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid rgba(56, 189, 248, 0.55);
  border-radius: 16px;
  max-width: 560px;
  width: 100%;
  padding: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75), 0 0 36px rgba(56, 189, 248, 0.18);
  max-height: 90vh;
  overflow-y: auto;
}
.tut-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.tut-head h2 { margin: 4px 0 2px; font-size: 1.3rem; color: var(--gold); }
.tut-sub { margin: 0; font-size: 0.84rem; color: var(--muted); }
.tut-badge { background: rgba(56, 189, 248, 0.18); color: var(--accent); padding: 2px 8px; border-radius: 999px; font-size: 0.74rem; font-weight: 700; text-transform: uppercase; }
.tut-close { background: transparent; border: none; color: var(--muted); font-size: 1.6rem; cursor: pointer; line-height: 1; }
.tut-goal { background: var(--panel-alt); border-left: 3px solid var(--gold); padding: 8px 12px; border-radius: 6px; font-size: 0.88rem; margin-bottom: 12px; }
.tut-steps { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.tut-step { display: flex; gap: 10px; align-items: flex-start; background: rgba(255, 255, 255, 0.04); padding: 9px 11px; border-radius: 9px; }
.tut-num { background: var(--accent); color: #08091a; font-weight: 800; width: 22px; height: 22px; min-width: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; }
.tut-step p { margin: 2px 0 0; font-size: 0.82rem; color: var(--muted); }
.tut-box { font-size: 0.84rem; margin-bottom: 10px; }
.tut-box ul { margin: 4px 0 0 18px; padding: 0; color: var(--muted); }
.tut-tip { background: rgba(250, 204, 21, 0.12); border: 1px solid rgba(250, 204, 21, 0.4); padding: 8px 11px; border-radius: 8px; font-size: 0.84rem; margin-bottom: 14px; }
.tut-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 12px; }
.tut-check { font-size: 0.82rem; color: var(--muted); display: flex; gap: 6px; align-items: center; cursor: pointer; }
.tut-start { background: linear-gradient(135deg, var(--gold), #fde047); color: #08091a; border: none; padding: 9px 18px; border-radius: 8px; font-weight: 800; cursor: pointer; font-size: 0.9rem; }

/* Sections & Catalog */
.section-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin: 18px 0;
}
.section-card h2 { margin-top: 0; font-size: 1.28rem; color: var(--accent); }
.section-card h3 { color: var(--gold); }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 10px; }
.catalog-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  color: #fff;
  transition: border-color 0.15s ease, transform 0.12s ease;
}
.catalog-card:hover { border-color: var(--gold); text-decoration: none; transform: translateY(-2px); }
.catalog-card.current { border-color: var(--gold); background: rgba(250, 204, 21, 0.11); box-shadow: 0 0 18px rgba(250, 204, 21, 0.16); }
.catalog-card p { margin: 0; font-size: 0.8rem; color: var(--muted); }
.badge-pill { display: inline-block; align-self: flex-start; font-size: 0.7rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: rgba(56, 189, 248, 0.18); color: var(--accent); }

.faq-item { border-bottom: 1px solid var(--border); padding: 10px 0; }
.faq-item:last-child { border-bottom: none; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 14px 36px;
  margin-top: 24px;
  text-align: center;
  font-size: 0.84rem;
  color: var(--muted);
}
.footer-links { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }

/* Retro Arcade Cabinet & Arena Canvas */
.arcade-cabinet {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0 auto;
  padding: 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(24, 29, 64, 0.92), rgba(8, 9, 26, 0.98));
  border: 2px solid rgba(250, 204, 21, 0.34);
  box-shadow: inset 0 0 28px rgba(56, 189, 248, 0.1), 0 12px 32px rgba(0, 0, 0, 0.55);
}
.arena-canvas {
  width: 100%;
  max-width: 720px;
  height: auto;
  display: block;
  border-radius: 12px;
  border: 2px solid rgba(56, 189, 248, 0.52);
  background: #050612;
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.18);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: crosshair;
}
.arena-canvas.portrait { max-width: 480px; }
.arena-canvas.pinball { max-width: 420px; }
.arena-canvas.sketch { background: #fefce8; border-color: var(--gold); cursor: crosshair; }

/* Tower Defense Shop Sidebar Layout */
.td-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 236px;
  gap: 14px;
  align-items: start;
  width: 100%;
}
.td-canvas-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.td-canvas { max-width: 100%; cursor: pointer; }
.td-sidebar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(8, 9, 26, 0.72);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
}
.td-shop-title {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 2px;
}
.td-shop-card {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  background: var(--panel-alt);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease, transform 0.08s ease;
}
.td-shop-card:hover { border-color: var(--accent); background: #202755; }
.td-shop-card.selected {
  border-color: var(--gold);
  background: rgba(250, 204, 21, 0.14);
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.22);
}
.td-card-info { display: flex; flex-direction: column; }
.td-card-name { font-size: 0.85rem; font-weight: 800; color: #fff; }
.td-card-desc { font-size: 0.72rem; color: var(--muted); }
.td-card-cost {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--gold);
  white-space: nowrap;
}
.td-inspector {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.td-inspector-meta { font-size: 0.78rem; color: var(--muted); }
.td-inspector-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }

/* Stick War Unit Deployment Bar */
.unit-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  margin-bottom: 10px;
}
.unit-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 6px;
  border-radius: 10px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: var(--panel-alt);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  transition: border-color 0.12s ease, transform 0.08s ease;
}
.unit-btn:hover:not(:disabled) { border-color: var(--gold); background: #232a5c; }
.unit-btn:active:not(:disabled) { transform: scale(0.97); }
.unit-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.unit-btn .unit-title { font-size: 0.84rem; }
.unit-btn .unit-cost { font-size: 0.76rem; color: var(--gold); font-weight: 800; }

/* Quick Draw Prompt & AI Guess Ticker */
.qd-banner {
  width: 100%;
  max-width: 640px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 14px;
}
.qd-target { font-size: 0.96rem; font-weight: 800; color: var(--gold); }
.qd-guess { font-size: 0.88rem; font-weight: 700; color: var(--accent); }

/* Touch D-Pad & Action Controls */
.touch-dpad {
  display: grid;
  grid-template-columns: repeat(3, 56px);
  grid-template-rows: repeat(2, 46px);
  gap: 6px;
  justify-content: center;
  margin-top: 4px;
}
.dpad-btn {
  border-radius: 10px;
  border: 1px solid rgba(56, 189, 248, 0.5);
  background: rgba(24, 29, 64, 0.92);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
.dpad-btn:active, .dpad-btn.pressed {
  background: rgba(56, 189, 248, 0.36);
  border-color: var(--gold);
  transform: scale(0.95);
}
.dpad-up { grid-column: 2; grid-row: 1; }
.dpad-left { grid-column: 1; grid-row: 2; }
.dpad-down { grid-column: 2; grid-row: 2; }
.dpad-right { grid-column: 3; grid-row: 2; }

.touch-controls {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  margin-top: 4px;
}
.touch-btn {
  min-width: 108px;
  padding: 11px 16px;
  border-radius: 11px;
  border: 1px solid rgba(56, 189, 248, 0.52);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(24, 29, 64, 0.9));
  color: #fff;
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
.touch-btn:active, .touch-btn.pressed {
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.38), rgba(56, 189, 248, 0.35));
  border-color: var(--gold);
  transform: scale(0.97);
}
.touch-btn.fire-btn {
  border-color: rgba(250, 204, 21, 0.65);
  color: var(--gold);
}

@media (max-width: 860px) {
  .td-layout { grid-template-columns: 1fr; }
  .td-sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .td-shop-title, .td-inspector { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .quickstart-bar { grid-template-columns: 1fr; }
  .unit-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .touch-btn { min-width: 88px; padding: 10px 12px; font-size: 0.85rem; }
}

/* Extra Arcade Controls & CRT Styling (Games 16-25) */
.arena-canvas.retro-crt {
  border-color: rgba(74, 222, 128, 0.6);
  box-shadow: 0 0 26px rgba(74, 222, 128, 0.22);
}
.touch-dpad-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  width: 100%;
  margin-top: 4px;
}
.siege-ammo-bar {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Extra Arcade Controls & Layouts (Games 26-35) */
.touch-btn.bomb-btn {
  border-color: rgba(251, 113, 133, 0.7);
  color: #ffe4e6;
  background: linear-gradient(135deg, rgba(251, 113, 133, 0.22), rgba(24, 29, 64, 0.92));
}
.ammo-mode-bar {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.dpad-compact {
  display: grid;
  grid-template-columns: repeat(3, 48px);
  grid-template-rows: repeat(2, 42px);
  gap: 5px;
  justify-content: center;
}


/* Extra Arcade Controls & Layouts (Games 36-45) */
.arena-canvas.square-arena {
  max-width: 540px;
}
.mode-toggle-bar {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.mode-btn.active {
  border-color: var(--gold);
  background: rgba(250, 204, 21, 0.18);
  color: #fef08a;
}
.touch-btn.gadget-btn {
  border-color: rgba(167, 139, 250, 0.7);
  color: #ede9fe;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.22), rgba(24, 29, 64, 0.92));
}

/* Extra Arcade Controls & Layouts (Games 46-55) */
.dpad-diag {
  display: grid;
  grid-template-columns: repeat(2, 62px);
  grid-template-rows: repeat(2, 46px);
  gap: 8px;
  justify-content: center;
}
.twin-pad-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 640px;
  margin-top: 4px;
}
