/* ===== URFUBAR — shared styles ===== */
:root {
  --bg: #0b0d14;
  --bg-2: #121624;
  --card: #171c2e;
  --line: #262d47;
  --text: #e8ebf5;
  --muted: #9aa3c0;
  --accent: #39ff88;      /* neon green */
  --accent-2: #ff3df2;    /* neon magenta */
  --warn: #ffb020;
  --radius: 14px;
  --maxw: 1160px;
  --font-display: "Orbitron", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(1000px 500px at 85% -10%, rgba(255, 61, 242, .12), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(57, 255, 136, .10), transparent 60%);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ----- Header / nav ----- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 13, 20, .85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo {
  font-family: var(--font-display);
  font-weight: 900; font-size: 1.5rem; letter-spacing: .08em;
  color: var(--text);
}
.logo span { color: var(--accent); text-shadow: 0 0 14px rgba(57, 255, 136, .6); }
.logo:hover { text-decoration: none; }
.logo .logo-squad { font-size: .62em; letter-spacing: .14em; color: var(--text); text-shadow: none; text-transform: uppercase; margin-left: .2em; }
.hero h1 .hero-squad { display: block; font-size: .38em; letter-spacing: .5em; margin: 10px 0 0 .5em; color: var(--text); text-transform: uppercase; }

.nav-links { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 8px 14px; border-radius: 999px;
  color: var(--muted); font-weight: 600; font-size: .95rem;
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--text); background: var(--card); text-decoration: none; }
.nav-links a.active { color: var(--bg); background: var(--accent); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 8px 12px; font-size: 1.1rem; cursor: pointer;
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; background: var(--bg-2); padding: 12px 20px 20px;
    border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .nav-links a { border-radius: 10px; }
}

/* ----- Hero ----- */
.hero { padding: 96px 0 72px; text-align: center; }
.hero h1 {
  font-family: var(--font-display); font-size: clamp(2.4rem, 7vw, 5rem);
  margin: 0 0 12px; letter-spacing: .06em; line-height: 1.05;
}
.hero h1 .glow { color: var(--accent); text-shadow: 0 0 30px rgba(57, 255, 136, .55); }
.hero p { color: var(--muted); font-size: 1.2rem; max-width: 640px; margin: 0 auto 32px; }
.page-hero { padding: 64px 0 32px; }
.page-hero h1 { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 8px; }
.page-hero p { color: var(--muted); margin: 0; max-width: 680px; }

/* ----- Buttons ----- */
.btn {
  display: inline-block; padding: 12px 24px; border-radius: 999px;
  font-weight: 700; border: 2px solid var(--accent); color: var(--bg);
  background: var(--accent); transition: transform .15s, box-shadow .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 8px 30px rgba(57, 255, 136, .35); }
.btn.ghost { background: transparent; color: var(--accent); }
.btn-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ----- Sections & cards ----- */
section { padding: 40px 0; }
.section-title { font-family: var(--font-display); font-size: 1.6rem; margin: 0 0 6px; }
.section-sub { color: var(--muted); margin: 0 0 28px; }

.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--accent); transform: translateY(-3px); }
.card h3 { margin: 0 0 6px; font-size: 1.2rem; }
.card p { margin: 0; color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.stat { text-align: center; padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.stat b { display: block; font-family: var(--font-display); font-size: 2rem; color: var(--accent); }
.stat span { color: var(--muted); font-size: .9rem; }

/* ----- Game cards ----- */
.game-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.game-art {
  height: 150px; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 2.6rem; font-weight: 900; color: rgba(255,255,255,.9);
  text-shadow: 0 4px 20px rgba(0,0,0,.4);
}
.game-art img { width: 100%; height: 100%; object-fit: cover; }
.game-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.game-body h3 { margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: .75rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); color: var(--muted);
}
.tag.sample { border-color: var(--warn); color: var(--warn); }

.tag.live { border-color: var(--accent); color: var(--accent); }
.tag.old { border-color: var(--muted); }
.game-card { cursor: pointer; }
.game-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.game-art { height: auto; aspect-ratio: 460 / 215; }
.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Game detail pop-up */
.modal {
  position: fixed; inset: 0; z-index: 100; display: none;
  background: rgba(5, 6, 10, .8); backdrop-filter: blur(6px);
  padding: 24px 16px; overflow-y: auto;
}
.modal.open { display: grid; place-items: start center; }
.modal-box {
  position: relative; width: 100%; max-width: 820px; margin: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.modal-close {
  position: absolute; top: 12px; right: 12px; z-index: 2; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(11,13,20,.8); color: var(--text); font-size: 1.1rem; cursor: pointer;
}
.modal-close:hover { border-color: var(--accent); color: var(--accent); }
.modal-hero { width: 100%; aspect-ratio: 1920 / 620; min-height: 180px; object-fit: cover; display: grid; place-items: center; font-size: 3rem; }
.modal-body { padding: 24px 28px 30px; }
.modal-body h2 { font-family: var(--font-display); margin: 12px 0 8px; font-size: clamp(1.4rem, 4vw, 2rem); }
.modal-body p { color: var(--muted); margin: 0 0 20px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 0 0 24px; }
.facts div { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.facts dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 600; }

/* Member cards + profile pop-up */
.member { cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.member:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.member .game-meta { margin-top: 8px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.quote { font-style: italic; color: var(--text) !important; opacity: .85; margin: 8px 0 !important; }
.quote.big { font-size: 1.15rem; }
.member-tags { justify-content: center; }
.tag.flex { border-style: dashed; text-transform: none; letter-spacing: 0; }
.member-hero { height: 150px; display: grid; place-items: center; position: relative; }
.avatar.big {
  width: 120px; height: 120px; font-size: 2.6rem; margin: 0; position: absolute; bottom: -50px;
  border: 4px solid var(--card); box-shadow: 0 10px 30px rgba(0,0,0,.4);
}
.member-hero + .modal-body { padding-top: 64px; }
.mains-title { margin: 0 0 12px; font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.mains { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 12px; }
.main-game {
  display: flex; flex-direction: column; gap: 8px; padding: 0; overflow: hidden; text-align: left;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; color: var(--text);
  font: inherit; font-weight: 600; cursor: pointer;
}
.main-game:hover { border-color: var(--accent); }
.main-game img, .main-game .mini-art { width: 100%; aspect-ratio: 460 / 215; object-fit: cover; display: grid; place-items: center; font-family: var(--font-display); font-weight: 900; }
.main-game span { padding: 0 12px 10px; }
.flex-note { color: var(--muted); font-style: italic; margin: 14px 0 0 !important; }

/* ----- Chuck Norris tribute ----- */
.eyebrow { font-weight: 800; text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; color: var(--accent-2); margin: 0 0 10px; }
.chuck-hero { padding: 64px 0 24px; }
.chuck-hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .chuck-hero-grid { grid-template-columns: 1fr; } }
.chuck-hero h1 { font-family: var(--font-display); font-size: clamp(3rem, 9vw, 6rem); line-height: .95; margin: 0 0 24px; letter-spacing: .04em; }
.chuck-hero h1 .glow { color: var(--accent); text-shadow: 0 0 30px rgba(57, 255, 136, .55); }
.wwcd {
  margin: 0 0 20px; padding: 16px 20px; border-left: 4px solid var(--accent);
  background: var(--card); border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 1.5rem; font-style: italic; font-weight: 700;
}
.wwcd cite { display: block; margin-top: 6px; font-size: .9rem; font-style: normal; font-weight: 600; color: var(--muted); }
.chuck-bio { color: var(--muted); margin: 0; }
.chuck-portrait { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0,0,0,.5), 0 0 0 6px rgba(57,255,136,.08); }
.chuck-portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

.chuck-generator { text-align: center; padding: 40px 24px; border-color: var(--accent); }
.chuck-generator:hover { transform: none; }
.chuck-generator .eyebrow { color: var(--accent-2); margin: 0 0 16px; }
.chuck-generator .chuckism-out {
  font-size: clamp(1.3rem, 3.2vw, 2rem); font-weight: 800; line-height: 1.3; color: var(--text);
  max-width: 820px; min-height: 2.6em; margin: 0 auto 28px; text-align: center; text-wrap: balance;
  display: flex; align-items: center; justify-content: center;
}
.chuckism-out.kick { animation: kick .45s ease-out; }
@keyframes kick { 0% { opacity: 0; transform: translateX(-40px) rotate(-3deg); } 100% { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .chuckism-out.kick { animation: none; } }

.meme-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.meme { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #000; aspect-ratio: 1 / 1; }
.meme img { width: 100%; height: 100%; object-fit: cover; }
.meme-text {
  position: absolute; left: 0; right: 0; padding: 0 12px; text-align: center;
  font-family: "Anton", Impact, "Arial Black", sans-serif; text-transform: uppercase;
  font-size: clamp(1.3rem, 2.4vw, 1.8rem); line-height: 1.1; color: #fff; letter-spacing: .02em;
  text-shadow: 2px 2px 0 #000, -2px 2px 0 #000, 2px -2px 0 #000, -2px -2px 0 #000, 0 2px 0 #000, 2px 0 0 #000, 0 -2px 0 #000, -2px 0 0 #000;
}
.meme-text.top { top: 12px; }
.meme-text.bottom { bottom: 12px; }

.chuckism-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.chuckism { font-weight: 600; }
.chuckism .num { display: block; font-family: var(--font-display); color: var(--accent); font-size: .85rem; margin-bottom: 6px; }

/* Chuck & the Squad comic panels */
.comic-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(min(460px, 100%), 1fr)); }
.comic-card { padding: 0; overflow: hidden; }
.comic-card:hover { transform: none; }
.comic { position: relative; margin: 0; container-type: inline-size; border-bottom: 4px solid #000; }
.comic svg { display: block; width: 100%; height: auto; }
.bubble {
  position: absolute; z-index: 1; background: #fff; color: #111; border: 3px solid #111; border-radius: 1.4em;
  padding: .45em .7em; text-align: center; font-family: "Comic Neue", "Comic Sans MS", system-ui, sans-serif; font-weight: 700;
  font-size: 3.4cqw; line-height: 1.15; box-shadow: 3px 3px 0 rgba(0,0,0,.35);
}
.bubble::after {
  content: ""; position: absolute; left: var(--tail, 50%); bottom: -14px; transform: translateX(-50%);
  border: 8px solid transparent; border-top: 12px solid #111; border-bottom: 0;
}
.bubble::before {
  content: ""; position: absolute; left: var(--tail, 50%); bottom: -9px; transform: translateX(-50%); z-index: 1;
  border: 5px solid transparent; border-top: 8px solid #fff; border-bottom: 0;
}
.bubble.think { border-radius: 50%/45%; font-style: italic; }
.bubble.think::before, .bubble.think::after { border: 3px solid #111; background: #fff; border-radius: 50%; transform: none; }
.bubble.think::after { width: 12px; height: 12px; bottom: -20px; left: var(--tail, 50%); }
.bubble.think::before { width: 7px; height: 7px; bottom: -32px; left: calc(var(--tail, 50%) + 10px); }
.comic-caption { padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 2px; }
.comic-caption strong { font-family: var(--font-display); }
.comic-caption span { color: var(--muted); font-style: italic; }

.photo { padding: 0; overflow: hidden; margin: 0; }
.photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.photo figcaption { padding: 14px 16px 16px; font-weight: 600; }
.photo figcaption small { display: block; margin-top: 4px; font-weight: 400; color: var(--muted); font-size: .8rem; }
.fine-print { color: var(--muted); font-size: .8rem; margin-top: 24px; }

/* Archived games: muted until hovered */
.game-card.archived { opacity: .7; }
.game-card.archived .game-art { filter: grayscale(.85); }
.game-card.archived:hover { opacity: 1; }
.game-card.archived:hover .game-art { filter: none; }
.game-meta { font-size: .9rem; color: var(--muted); margin-top: auto; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filter-btn {
  background: var(--card); color: var(--muted); border: 1px solid var(--line);
  padding: 8px 16px; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 600;
}
.filter-btn.active, .filter-btn:hover { color: var(--bg); background: var(--accent); border-color: var(--accent); }

/* ----- Notice ----- */
.notice {
  border: 1px dashed var(--warn); color: var(--warn); background: rgba(255, 176, 32, .06);
  border-radius: var(--radius); padding: 14px 18px; margin-bottom: 24px; font-size: .95rem;
}


/* ----- Members ----- */
.member { text-align: center; }
.avatar {
  width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 12px;
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 900; font-size: 1.6rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--bg);
}
.role { color: var(--accent-2); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }

/* ----- Join / form ----- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { counter-increment: s; position: relative; padding-left: 52px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: var(--bg); font-weight: 900;
}
.rules li { margin-bottom: 8px; color: var(--muted); }
.rules li strong { color: var(--text); }

/* ----- Footer ----- */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; margin-top: 48px; color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
