/* ============================================================
   HOW MANY DUDES? GUIDE — Dark Cartoon Comic Wiki Theme
   Palette: #1C1C1C bg · #6D3CCF purple · #E83B5B red · #E8B93F gold · #52C7C7 cyan
   ============================================================ */

:root {
  --bg: #1C1C1C;
  --bg-panel: #242424;
  --bg-card: #181818;
  --bg-deep: #121212;
  --border: #080808;
  --border-light: #3a3a3a;
  --text: #D5D5D5;
  --text-muted: #9a9a9a;
  --purple: #6D3CCF;
  --purple-bright: #8b5cf6;
  --red: #E83B5B;
  --gold: #E8B93F;
  --cyan: #52C7C7;
  --font-display: 'Anton', 'Impact', 'Arial Narrow Bold', sans-serif;
  --font-body: 'Comic Neue', 'Trebuchet MS', system-ui, sans-serif;
  --radius: 8px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 20% 30%, rgba(109, 60, 207, 0.06) 0, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(232, 59, 91, 0.05) 0, transparent 40%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--purple-bright); text-decoration: underline; }

img { max-width: 100%; height: auto; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 1.25rem; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.15;
  color: #fff;
}

h1 { font-size: 2.4rem; margin: 1.2rem 0 0.8rem; }
h2 { font-size: 1.7rem; margin: 2.2rem 0 0.9rem; color: var(--gold); }
h3 { font-size: 1.25rem; margin: 1.6rem 0 0.6rem; color: var(--purple-bright); }
h4 { font-size: 1.05rem; margin: 1.2rem 0 0.5rem; }

p { margin: 0 0 1rem; }

/* ---------- Header / Nav (game menu feel) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(20, 20, 20, 0.96);
  border-bottom: 3px solid var(--purple);
  box-shadow: 0 4px 0 rgba(0,0,0,0.6), inset 0 -2px 0 rgba(109,60,207,0.35);
}

.header-inner {
  max-width: 1080px; margin: 0 auto; padding: 0.6rem 1.25rem;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}

.header-logo {
  font-family: var(--font-display);
  font-size: 1.35rem; letter-spacing: 1px; color: #fff;
  text-decoration: none !important;
  text-shadow: 2px 2px 0 var(--purple), 4px 4px 0 rgba(0,0,0,0.5);
}
.header-logo span { color: var(--gold); }

.menu-toggle {
  display: none; background: none; border: 2px solid var(--border-light);
  color: #fff; font-size: 1.2rem; padding: 0.25rem 0.6rem; cursor: pointer;
}

.header-nav { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }

.nav-item { position: relative; }

.header-nav a {
  font-family: var(--font-display); font-size: 0.95rem; letter-spacing: 1px;
  color: #e8e8e8; padding: 0.45rem 0.85rem; text-decoration: none !important;
  border: 2px solid var(--border);
  background: #222;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,0.5), 0 2px 0 rgba(0,0,0,0.6);
  display: inline-block;
  transition: all 0.15s ease;
}
.header-nav a:hover {
  color: var(--gold);
  border-color: var(--purple);
  box-shadow: 0 0 12px rgba(109,60,207,0.55), inset 0 -3px 0 rgba(0,0,0,0.5);
  transform: translateY(-1px);
}
.header-nav a.active { background: var(--purple); color: #fff; border-color: #000; }

.dropdown-menu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 220px;
  background: #1a1a1a; border: 2px solid var(--purple); border-top: none;
  box-shadow: 0 8px 20px rgba(0,0,0,0.7); z-index: 200; padding: 0.25rem;
}
.dropdown-menu a { display: block; width: 100%; border: 1px solid var(--border); margin: 2px 0; }
.dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a:hover { background: var(--purple); color: #fff; }

.play-now-btn {
  margin-left: auto;
  font-family: var(--font-display); letter-spacing: 1px;
  background: var(--red); color: #fff !important;
  padding: 0.5rem 1rem; border: 2px solid #000;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,0.35), 0 3px 0 rgba(0,0,0,0.6);
  text-decoration: none !important;
}
.play-now-btn:hover { background: #ff4d6d; }
.play-now-btn:active, .hero-btn:active { transform: scale(0.95); }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-size: 0.8rem; color: var(--text-muted);
  padding: 0.8rem 0 0; margin-bottom: 0.5rem;
}
.breadcrumb a { color: var(--cyan); }

/* ---------- Hero (homepage) ---------- */
.hero {
  position: relative; text-align: center;
  padding: 2.6rem 1rem 2.2rem; margin: 0 0 1.8rem;
  border: 3px solid var(--border);
  background:
    linear-gradient(rgba(12,12,12,0.82), rgba(12,12,12,0.85)),
    url('/assets/hero-wall.jpg') center/cover no-repeat;
  box-shadow: 0 0 0 2px var(--purple), inset 0 0 60px rgba(109,60,207,0.25);
  overflow: hidden;
}
.hero::before, .hero::after {
  content: ''; position: absolute; width: 90px; height: 90px; z-index: 1;
}
.hero::before {
  top: 12px; left: 14px;
  background: radial-gradient(circle, var(--gold) 4px, transparent 5px) 0 0/18px 18px;
  opacity: 0.5;
}
.hero::after {
  bottom: 12px; right: 14px; width: 120px; height: 16px;
  background: repeating-linear-gradient(135deg, var(--red) 0 10px, transparent 10px 20px);
  opacity: 0.5;
}
.hero h1 {
  font-size: 3rem; margin: 0.4rem 0;
  color: #fff;
  text-shadow: 3px 3px 0 var(--purple), 6px 6px 0 rgba(0,0,0,0.6);
}
.hero .hero-sub {
  font-family: var(--font-display); letter-spacing: 2px;
  color: var(--gold); font-size: 1.15rem; text-transform: uppercase;
}
.hero p.lead { max-width: 720px; margin: 0.8rem auto 1.4rem; color: #e2e2e2; }
.hero .hero-badges { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; margin-top: 1rem; }
.hero .badge {
  font-family: var(--font-display); font-size: 0.75rem; letter-spacing: 1px;
  border: 2px solid var(--border); padding: 0.3rem 0.7rem;
  background: #222; color: #ddd;
}
.hero .badge.gold { background: var(--gold); color: #111; }
.hero .badge.purple { background: var(--purple); color: #fff; }
.hero .badge.red { background: var(--red); color: #fff; }
.hero .badge.cyan { background: var(--cyan); color: #111; }

.hero-btn {
  display: inline-block; margin-top: 0.6rem;
  font-family: var(--font-display); letter-spacing: 1.5px;
  background: var(--red); color: #fff !important;
  padding: 0.85rem 1.8rem; border: 3px solid #000; border-radius: 6px;
  box-shadow: inset 0 -5px 0 rgba(0,0,0,0.35), 0 4px 0 rgba(0,0,0,0.6), 0 0 18px rgba(232,59,91,0.4);
  text-decoration: none !important;
}
.hero-btn:hover { background: #ff4d6d; transform: translateY(-1px); }

/* ---------- Game info bar ---------- */
.game-info-bar {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem;
  background: var(--bg-panel); border: 2px solid var(--border);
  padding: 0.7rem 1.1rem; margin: 0 0 1.8rem; font-size: 0.85rem; color: var(--text-muted);
}
.game-info-bar .info-item b { color: var(--gold); font-family: var(--font-display); letter-spacing: 0.5px; }

/* ---------- Card grids ---------- */
.card-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.2rem; margin: 1.2rem 0 1.8rem;
}
.card-grid.tight { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.card-grid.tables { grid-template-columns: 1fr; }

.card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  box-shadow: 0 3px 0 rgba(0,0,0,0.6);
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--purple);
  box-shadow: 0 6px 18px rgba(109,60,207,0.4), 0 3px 0 rgba(0,0,0,0.6);
}
.card .card-icon { width: 80px; height: 80px; object-fit: contain; margin-bottom: 0.6rem; }
.card h3 {
  font-size: 1.2rem; margin: 0 0 0.4rem; color: #fff;
  text-decoration: underline; text-decoration-color: var(--purple); text-underline-offset: 4px;
}
.card p { font-size: 0.95rem; color: var(--text); margin-bottom: 0.5rem; }
.card .card-link {
  font-family: var(--font-display); letter-spacing: 1px; font-size: 0.85rem;
  color: var(--gold); text-decoration: none !important;
}
.card .card-link:hover { color: var(--purple-bright); }
.card .tier-chip, .chip {
  display: inline-block; font-family: var(--font-display); font-size: 0.75rem;
  padding: 0.15rem 0.55rem; border: 2px solid var(--border); margin-right: 0.4rem;
  background: #222; color: #ddd;
}
.chip.gold { background: var(--gold); color: #111; }
.chip.purple { background: var(--purple); color: #fff; }
.chip.cyan { background: var(--cyan); color: #111; }
.chip.red { background: var(--red); color: #fff; }

/* ---------- Dude cards (collection style) ---------- */
.dude-card { text-align: center; padding: 1rem; }
.dude-card img { width: 96px; height: 96px; object-fit: contain; image-rendering: pixelated; }
.dude-card h3 { text-decoration: none; font-size: 1.05rem; margin: 0.5rem 0 0.2rem; }
.dude-card .dude-meta { font-size: 0.78rem; color: var(--text-muted); }
.tier-s { color: var(--gold); }
.tier-a { color: var(--purple-bright); }
.tier-b { color: var(--cyan); }
.tier-c { color: #b8b8b8; }
.tier-d { color: var(--red); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 1rem 0 1.6rem; border: 2px solid var(--border); background: var(--bg-card); }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 640px; }
th {
  font-family: var(--font-display); font-weight: 400; letter-spacing: 1px; font-size: 0.82rem;
  background: var(--purple); color: #fff; text-align: left;
  padding: 0.6rem 0.8rem; border: 1px solid var(--border);
}
td { padding: 0.55rem 0.8rem; border: 1px solid #2c2c2c; vertical-align: middle; }
tr:nth-child(even) td { background: #1e1e1e; }
tr:hover td { background: #262038; }
td img { width: 40px; height: 40px; object-fit: contain; vertical-align: middle; margin-right: 0.5rem; image-rendering: pixelated; }

/* ---------- RPG stat bars ---------- */
.stat-list { list-style: none; padding: 0; margin: 0.8rem 0; }
.stat-list li { margin-bottom: 0.5rem; font-size: 0.9rem; color: var(--text); }
.stat-bar {
  display: inline-block; height: 12px; border-radius: 2px;
  background: repeating-linear-gradient(90deg, var(--purple-bright) 0 10px, #2a2a2a 10px 12px);
  margin-left: 0.4rem; vertical-align: middle;
}
.stat-bar.hp { background: repeating-linear-gradient(90deg, var(--red) 0 10px, #2a2a2a 10px 12px); }
.stat-bar.gold { background: repeating-linear-gradient(90deg, var(--gold) 0 10px, #2a2a2a 10px 12px); }
.stat-bar.cyan { background: repeating-linear-gradient(90deg, var(--cyan) 0 10px, #2a2a2a 10px 12px); }

/* ---------- Dude detail page ---------- */
.dude-hero {
  display: flex; gap: 1.6rem; align-items: flex-start; flex-wrap: wrap;
  background: var(--bg-panel); border: 3px solid var(--border);
  padding: 1.4rem; margin: 0.4rem 0 1.6rem;
  box-shadow: 4px 4px 0 rgba(109,60,207,0.35);
}
.dude-hero img { width: 160px; height: 160px; object-fit: contain; image-rendering: pixelated; }
.dude-hero h1 { margin: 0 0 0.4rem; }
.dude-hero .dude-tags { margin: 0.5rem 0 0; }
.dude-hero .dude-tags .chip { font-size: 0.85rem; }

.ability-box {
  background: #1e1e2a; border-left: 5px solid var(--purple);
  border-radius: 4px; padding: 0.9rem 1.1rem; margin: 1rem 0;
  font-size: 1rem;
}
.ability-box b { color: var(--gold); font-family: var(--font-display); letter-spacing: 1px; }

.callout {
  background: var(--bg-panel); border: 2px dashed var(--gold);
  padding: 0.9rem 1.1rem; margin: 1.2rem 0; border-radius: 6px; font-size: 0.95rem;
}
.callout.purple { border-color: var(--purple); }

.source-line {
  font-size: 0.78rem; color: var(--text-muted); margin: 0.8rem 0 0;
}
.source-line a { color: var(--cyan); }

/* ---------- FAQ ---------- */
details.faq {
  background: var(--bg-card); border: 2px solid var(--border-light);
  border-radius: 6px; padding: 0.8rem 1rem; margin: 0.6rem 0;
}
details.faq summary {
  cursor: pointer; font-family: var(--font-display); letter-spacing: 0.5px;
  color: #fff; font-size: 0.95rem; list-style: none;
}
details.faq summary::before { content: '▸ '; color: var(--gold); }
details.faq[open] summary::before { content: '▾ '; }
details.faq p { margin: 0.6rem 0 0; font-size: 0.95rem; }

/* ---------- Prose / article ---------- */
.prose { max-width: 820px; }
.prose ul, .prose ol { padding-left: 1.4rem; margin: 0 0 1rem; }
.prose li { margin-bottom: 0.5rem; }
.prose blockquote {
  margin: 1rem 0; padding: 0.7rem 1.1rem;
  border-left: 5px solid var(--gold); background: var(--bg-panel);
  font-style: italic; color: #e8e8e8;
}
.prose .kicker {
  font-family: var(--font-display); color: var(--gold); letter-spacing: 2px;
  font-size: 0.85rem; text-transform: uppercase; margin: 0.5rem 0;
}

/* ---------- Search / filters (dudes page) ---------- */
.controls {
  display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center;
  background: var(--bg-panel); border: 2px solid var(--border);
  padding: 0.8rem 1rem; margin: 1rem 0;
}
.controls input, .controls select {
  background: #121212; color: var(--text); border: 2px solid var(--border-light);
  font-family: var(--font-body); font-size: 0.95rem; padding: 0.45rem 0.7rem; border-radius: 4px;
}
.controls input { flex: 1; min-width: 200px; }
.controls label { font-size: 0.85rem; color: var(--text-muted); }

/* ---------- Steam CTA / footer ---------- */
.cta-wrap { padding-top: 0.4rem; }
.steam-cta {
  text-align: center; margin: 1.6rem 0 2.2rem; padding: 1.5rem 1.2rem;
  border: 3px solid var(--border); border-radius: 10px;
  background: linear-gradient(180deg, #202030 0%, var(--bg-panel) 100%);
  box-shadow: 0 0 0 2px var(--red), inset 0 0 40px rgba(232,59,91,0.08);
}
.steam-cta p { margin: 0 0 0.8rem; }
.cta-kicker {
  font-family: var(--font-display); font-size: 0.75rem; letter-spacing: 3px;
  color: var(--red); margin: 0 0 0.5rem !important;
}
.cta-note { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.8rem !important; }

footer {
  margin-top: 2.5rem; padding: 1.8rem 1.25rem 2.2rem;
  background: var(--bg-deep); border-top: 3px solid var(--purple);
}
.footer-links {
  max-width: 1080px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1.2rem;
}
.footer-col strong { font-family: var(--font-display); color: var(--gold); letter-spacing: 1px; display: block; margin-bottom: 0.5rem; }
.footer-col a { display: block; font-size: 0.88rem; color: var(--text-muted); margin-bottom: 0.3rem; }
.footer-col a:hover { color: var(--cyan); }
footer > p { text-align: center; font-size: 0.8rem; color: var(--text-muted); margin: 1.2rem auto 0; max-width: 1080px; }
.footer-disclaimer { font-size: 0.7rem !important; }

/* ---------- Dude strip (illustration row) ---------- */
.dude-strip { display: flex; gap: 0.9rem; flex-wrap: wrap; margin: 1.1rem 0 1.4rem; }
.dude-strip img {
  width: 76px; height: 76px; object-fit: contain; image-rendering: pixelated;
  border: 2px solid var(--border); background: var(--bg-card); padding: 6px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.dude-strip img:hover { transform: translateY(-3px); border-color: var(--purple); }

/* ---------- Comic decorations ---------- */
.speedlines {
  position: relative; display: inline-block;
}
.speedlines::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -14px; height: 10px;
  background: repeating-linear-gradient(90deg, var(--gold) 0 6px, transparent 6px 12px);
  opacity: 0.35;
}

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  body { font-size: 16.5px; }
  h1 { font-size: 1.9rem; }
  .hero h1 { font-size: 2.2rem; }
  .menu-toggle { display: block; }
  .header-nav {
    display: none; width: 100%; flex-direction: column; align-items: stretch;
    padding: 0.4rem 0 0.6rem;
  }
  .header-nav.open { display: flex; }
  .nav-item .dropdown-menu { position: static; display: none; min-width: 0; }
  .dropdown:hover .dropdown-menu { display: none; }
  .header-nav.open .dropdown:hover .dropdown-menu { display: block; }
  .play-now-btn { margin-left: 0; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
  .card-grid, .card-grid.tight { grid-template-columns: minmax(0, 1fr); }
  .dude-hero { flex-direction: column; align-items: center; text-align: center; }
  .dude-hero img { width: 120px; height: 120px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
