/* HUSTIX Network website
   Colours for roles, bug statuses and games are generated into /css/theme.css */

:root {
  color-scheme: dark;

  --bg: #0a0c12;
  --bg-2: #0e121c;
  --panel: #131928;
  --panel-2: #19213a;
  --line: #242d47;
  --line-2: #33405f;

  --text: #e9ecf5;
  --muted: #98a2ba;
  --dim: #6b7590;

  --gold: #ffb81f;
  --gold-2: #ff9020;
  --gold-ink: #1b1305;
  --blue: #4da3ff;
  --green: #3ecf8e;
  --red: #ff5d5d;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 12px 34px rgba(0, 0, 0, 0.38);

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
img, svg { max-width: 100%; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 800; }
h2 { font-size: 1.5rem; font-weight: 750; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
code { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
::selection { background: rgba(255, 184, 31, 0.35); }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 560px; }
.narrow-wide { max-width: 820px; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.mt { margin-top: 2.5rem; }
.mt-sm { margin-top: 0.9rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--gold-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; font-weight: 700; }
.skip-link:focus { left: 8px; text-decoration: none; }
.icon { flex: none; vertical-align: -0.2em; }
[hidden] { display: none !important; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 700; line-height: 1.2; cursor: pointer; text-decoration: none !important;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn-primary { background: linear-gradient(180deg, #ffc93d, var(--gold-2)); color: var(--gold-ink); box-shadow: 0 6px 20px rgba(255, 150, 30, 0.25); }
.btn-primary:hover { box-shadow: 0 8px 26px rgba(255, 150, 30, 0.4); filter: brightness(1.05); }
.btn-ghost { background: rgba(255, 255, 255, 0.04); border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.09); border-color: #46557c; }
.btn-store { background: linear-gradient(180deg, #8f6bff, #6c4be0); color: #fff; box-shadow: 0 6px 20px rgba(108, 75, 224, 0.3); }
.btn-store:hover { filter: brightness(1.1); box-shadow: 0 8px 26px rgba(108, 75, 224, 0.45); }
.btn-sm { padding: 7px 14px; font-size: 0.9rem; border-radius: 9px; }
.btn-xs { padding: 4px 10px; font-size: 0.82rem; border-radius: 8px; font-weight: 650; }
.btn-lg { padding: 14px 24px; font-size: 1.05rem; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-danger-text { color: #ff8a8a; }
.btn-danger-text:hover { background: rgba(255, 93, 93, 0.12); border-color: rgba(255, 93, 93, 0.4); }
.btn.is-copied { background: linear-gradient(180deg, #4fe0a0, #29b676); color: #04150d; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 12, 18, 0.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none !important; }
.brand img { display: block; }
.brand-text { display: flex; flex-direction: column; font-weight: 900; font-size: 1.25rem; letter-spacing: 0.06em; line-height: 1; }
.brand-text small { font-size: 0.55rem; letter-spacing: 0.42em; color: var(--gold); font-weight: 800; margin-top: 4px; }
.header-collapse { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex: 1; }
.site-nav { display: flex; align-items: center; gap: 4px; margin-left: 28px; }
.site-nav > a, .nav-dropdown > a {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 9px;
  color: var(--muted); font-weight: 650; text-decoration: none !important;
}
.site-nav > a:hover, .nav-dropdown > a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.site-nav a.is-active { color: var(--text); background: rgba(255, 255, 255, 0.07); }
.site-nav .nav-store { color: #c9b6ff; }
.site-nav .nav-store:hover { color: #fff; background: rgba(140, 107, 255, 0.2); }
.nav-dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: 100%; left: 0; min-width: 220px; padding: 8px;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: 0.15s ease;
}
.nav-dropdown:hover .dropdown-menu, .nav-dropdown:focus-within .dropdown-menu { opacity: 1; visibility: visible; transform: none; }
.dropdown-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--text); font-weight: 600; text-decoration: none !important; }
.dropdown-menu a:hover { background: rgba(255, 255, 255, 0.07); }
.dd-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: color-mix(in srgb, var(--accent, var(--gold)) 22%, transparent); color: var(--accent, var(--gold)); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-2); color: var(--text); border-radius: 10px; width: 44px; height: 44px; cursor: pointer; align-items: center; justify-content: center; }

.user-menu { position: relative; }
.user-menu summary { list-style: none; display: flex; align-items: center; gap: 9px; padding: 5px 12px 5px 5px; border: 1px solid var(--line-2); border-radius: 999px; cursor: pointer; background: rgba(255, 255, 255, 0.04); }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { background: rgba(255, 255, 255, 0.09); }
.user-menu-name { font-weight: 700; color: var(--role, var(--text)); }
.user-menu-panel { position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; padding: 8px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow); z-index: 60; }
.user-menu-panel a, .user-menu-panel button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--text); font: inherit; font-weight: 600; background: none; border: 0; cursor: pointer; text-align: left; text-decoration: none !important; }
.user-menu-panel a:hover, .user-menu-panel button:hover { background: rgba(255, 255, 255, 0.07); }

.avatar { border-radius: 8px; background: var(--panel-2); image-rendering: pixelated; flex: none; display: block; }
.user-menu .avatar { border-radius: 999px; }

/* ---------- Alerts ---------- */
.flashes { padding-top: 16px; display: grid; gap: 10px; }
.alert { padding: 12px 16px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); }
.alert-success { border-color: rgba(62, 207, 142, 0.5); background: rgba(62, 207, 142, 0.1); }
.alert-error { border-color: rgba(255, 93, 93, 0.5); background: rgba(255, 93, 93, 0.1); }
.alert-info { border-color: rgba(77, 163, 255, 0.5); background: rgba(77, 163, 255, 0.1); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; text-align: center; padding: 92px 0 84px;
  background:
    radial-gradient(900px 420px at 50% -60px, rgba(255, 184, 31, 0.22), transparent 70%),
    radial-gradient(600px 300px at 90% 30%, rgba(140, 107, 255, 0.14), transparent 70%),
    url("/img/hex-pattern.svg"),
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 120px; background: linear-gradient(180deg, transparent, var(--bg)); pointer-events: none; }
.hero-inner { position: relative; z-index: 1; }
.eyebrow { display: inline-block; padding: 5px 14px; border: 1px solid rgba(255, 184, 31, 0.4); border-radius: 999px; color: var(--gold); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; background: rgba(255, 184, 31, 0.08); margin-bottom: 20px; }
.hero-title {
  margin: 0; font-size: clamp(3rem, 10vw, 6.2rem); font-weight: 900; letter-spacing: 0.04em; line-height: 0.95;
  background: linear-gradient(180deg, #fff1bd 0%, #ffc02e 48%, #ff8f1f 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 28px rgba(255, 150, 30, 0.35));
}
.hero-title span { display: block; margin-top: 14px; font-size: 0.26em; letter-spacing: 0.7em; padding-left: 0.7em; background: none; color: var(--muted); -webkit-text-fill-color: var(--muted); filter: none; font-weight: 800; }
.hero-sub { max-width: 620px; margin: 22px auto 30px; color: var(--muted); font-size: 1.15rem; }
.hero-join { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; margin-bottom: 30px; }
.ip-card {
  display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 18px; text-align: left;
  border: 1px solid rgba(255, 184, 31, 0.45); border-radius: 14px; background: rgba(19, 25, 40, 0.85); color: var(--text); cursor: pointer; font: inherit;
  transition: 0.15s ease; box-shadow: 0 0 0 1px rgba(255, 184, 31, 0.05), 0 10px 30px rgba(0, 0, 0, 0.35);
}
.ip-card:hover { border-color: var(--gold); transform: translateY(-1px); box-shadow: 0 0 34px rgba(255, 184, 31, 0.18); }
.ip-card.is-copied { border-color: var(--green); }
.ip-label { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); }
.ip-value { display: flex; align-items: center; gap: 16px; }
.ip-value code { font-size: 1.35rem; font-weight: 700; color: #fff; }
.ip-copy { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 700; color: var(--gold); }
.status-pill { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border: 1px solid var(--line-2); border-radius: 14px; background: rgba(19, 25, 40, 0.85); color: var(--muted); }
.status-pill b { color: var(--text); font-size: 1.1rem; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--dim); flex: none; }
.status-dot.is-online { background: var(--green); box-shadow: 0 0 0 0 rgba(62, 207, 142, 0.6); animation: pulse 2s infinite; }
.status-dot.is-offline { background: var(--red); }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(62, 207, 142, 0); } 100% { box-shadow: 0 0 0 0 rgba(62, 207, 142, 0); } }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-start; }
.hero .hero-actions, .hero-actions.center { justify-content: center; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 4px 0 0; }
.link-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; white-space: nowrap; }
.page-head { padding: 44px 0 30px; border-bottom: 1px solid var(--line); background: radial-gradient(700px 240px at 10% -40px, rgba(255, 184, 31, 0.1), transparent 70%), var(--bg-2); }
.page-head h1 { margin-bottom: 6px; }
.page-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.lead { color: var(--muted); font-size: 1.1rem; max-width: 680px; margin: 0; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; color: var(--dim); font-size: 0.88rem; }
.breadcrumb a { color: var(--muted); }
.breadcrumb span:not(:last-child) { color: var(--dim); }

/* ---------- Cards, badges ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h2, .card h3 { margin-top: 0; }
.card-note { border-color: rgba(255, 184, 31, 0.35); background: linear-gradient(180deg, rgba(255, 184, 31, 0.07), var(--panel)); }
.list-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.two-col-form { grid-template-columns: minmax(0, 1fr) 340px; }
.side-stack { display: grid; gap: 18px; align-content: start; }
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.02em; white-space: nowrap;
  background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line-2); color: var(--muted); vertical-align: middle;
}
.role-badge { --badge: var(--role, var(--muted)); color: var(--badge); background: color-mix(in srgb, var(--badge) 14%, transparent); border-color: color-mix(in srgb, var(--badge) 45%, transparent); }
.verified { display: inline-flex; color: var(--green); vertical-align: middle; }
.status-badge, .sev-badge, .gs-badge { color: var(--tone); background: color-mix(in srgb, var(--tone) 14%, transparent); border-color: color-mix(in srgb, var(--tone) 45%, transparent); }
.badge-gold { color: var(--gold); background: rgba(255, 184, 31, 0.12); border-color: rgba(255, 184, 31, 0.4); }
.badge-danger { color: #ff8a8a; background: rgba(255, 93, 93, 0.12); border-color: rgba(255, 93, 93, 0.4); }
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.user-link { color: var(--role, var(--text)); font-weight: 700; }
.inline-code { padding: 2px 8px; background: rgba(255, 255, 255, 0.08); border-radius: 6px; color: #fff; }

/* ---------- Games ---------- */
.game-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.game-card {
  --accent: var(--gold);
  display: flex; flex-direction: column; overflow: hidden; color: var(--text); text-decoration: none !important;
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px; transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.game-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), 0 0 40px color-mix(in srgb, var(--accent) 18%, transparent); }
.game-card-art {
  position: relative; display: flex; align-items: flex-start; justify-content: space-between; padding: 18px; height: 150px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 45%, #0a0c12) 0%, color-mix(in srgb, var(--accent) 12%, #0a0c12) 100%),
    url("/img/hex-pattern.svg");
  border-bottom: 1px solid var(--line);
}
.game-card-icon { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 18px; background: rgba(0, 0, 0, 0.35); color: #fff; border: 1px solid rgba(255, 255, 255, 0.18); align-self: flex-end; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); }
.game-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.game-card-body h3 { font-size: 1.35rem; margin-bottom: 2px; }
.game-card-tagline { color: var(--accent); font-weight: 700; margin-bottom: 8px; }
.game-card-summary { color: var(--muted); flex: 1; }
.game-card-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--accent); }

.game-hero { --accent: var(--gold); padding: 44px 0 46px; border-bottom: 1px solid var(--line); background: radial-gradient(800px 320px at 15% -40px, color-mix(in srgb, var(--accent) 34%, transparent), transparent 70%), url("/img/hex-pattern.svg"), var(--bg-2); }
.game-hero-row { display: flex; align-items: center; gap: 24px; margin-bottom: 26px; }
.game-hero-icon { display: grid; place-items: center; width: 104px; height: 104px; flex: none; border-radius: 26px; color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 70%, #000), color-mix(in srgb, var(--accent) 25%, #000)); border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 14px 40px color-mix(in srgb, var(--accent) 28%, transparent); }
.game-hero h1 { margin: 0 0 4px; font-size: clamp(2.2rem, 5vw, 3.4rem); }
.game-hero .hero-actions { justify-content: flex-start; }
.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
.prose p { font-size: 1.08rem; color: #cdd3e3; }
.feature-grid { --accent: var(--gold); display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.feature { padding: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.feature h3 { margin: 12px 0 6px; }
.feature p { margin: 0; color: var(--muted); }
.feature-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); }
.mode-list { --accent: var(--gold); display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.mode { padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius-sm); }
.mode h3 { margin-bottom: 4px; }
.mode p { margin: 0; color: var(--muted); }
.link-list, .plain-list, .mini-list { list-style: none; margin: 0; padding: 0; }
.link-list li { padding: 7px 0; }
.link-list a { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; }
.plain-list li { padding: 5px 0 5px 18px; position: relative; }
.plain-list li::before { content: ""; position: absolute; left: 2px; top: 0.95em; width: 6px; height: 6px; border-radius: 2px; background: var(--gold); }
.ip-inline { display: flex; align-items: center; gap: 10px; margin: 14px 0 0; padding: 10px 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }

/* ---------- Home ---------- */
.home-columns { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; }
.news-list { display: grid; gap: 14px; }
.news-card { display: block; padding: 18px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none !important; transition: 0.15s ease; }
.news-card:hover { border-color: rgba(255, 184, 31, 0.5); transform: translateX(3px); }
.news-card h3 { margin: 6px 0; }
.news-card p { margin: 0; color: var(--muted); }
.news-meta { color: var(--gold); font-size: 0.82rem; font-weight: 700; }
.mini-list li { display: flex; flex-direction: column; padding: 12px 0; border-bottom: 1px solid var(--line); }
.mini-list li:last-child { border-bottom: 0; }
.mini-list a { font-weight: 650; color: var(--text); }
.mini-list a:hover { color: var(--gold); }
.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 38px 20px; color: var(--muted); background: var(--panel); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.empty p { margin: 0; }
.empty-row { padding: 22px; text-align: center; }
.band { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 34px 38px; border-radius: 20px; border: 1px solid var(--line-2); overflow: hidden; }
.band h2 { margin-top: 0; }
.band p { color: var(--muted); max-width: 560px; }
.band-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.band-bugs { background: radial-gradient(500px 220px at 0 0, rgba(255, 184, 31, 0.16), transparent 70%), var(--panel); }
.band-store { background: radial-gradient(500px 240px at 100% 0, rgba(140, 107, 255, 0.25), transparent 70%), var(--panel); border-color: rgba(140, 107, 255, 0.35); }
.band-art { color: rgba(190, 165, 255, 0.85); filter: drop-shadow(0 0 30px rgba(140, 107, 255, 0.5)); flex: none; }
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(110px, 1fr)); gap: 12px; margin: 0; flex: none; }
.stat-grid > div { padding: 14px 18px; background: rgba(0, 0, 0, 0.25); border: 1px solid var(--line); border-radius: 12px; }
.stat-grid dt { font-size: 0.74rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; color: var(--dim); }
.stat-grid dd { margin: 2px 0 0; font-size: 1.8rem; font-weight: 850; color: var(--gold); }
.stat-grid-wide { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.bug-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.bug-strip a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; color: var(--text); font-size: 0.9rem; }
.bug-strip a:hover { border-color: var(--gold); text-decoration: none; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 18px; }
.form-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); align-items: end; }
.form-grid .field-wide, .form-grid .form-actions { grid-column: 1 / -1; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; }
.field > span { font-weight: 700; font-size: 0.92rem; }
.field small { color: var(--dim); }
input[type="text"], input[type="password"], input[type="search"], input[type="number"], select, textarea {
  width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line-2); background: #0d1220; color: var(--text); font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 184, 31, 0.18); }
textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
select { appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.input-sm { padding: 5px 10px; font-size: 0.85rem; width: 150px; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.check input { margin-top: 5px; accent-color: var(--gold); width: 16px; height: 16px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.inline-form { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inline-form select { width: auto; padding: 5px 30px 5px 10px; font-size: 0.88rem; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.auth-section { padding-top: 56px; }
.auth-card h1 { font-size: 2rem; }
.auth-alt { text-align: center; margin: 22px 0 0; color: var(--muted); }
.link-card { border-color: rgba(62, 207, 142, 0.35); background: linear-gradient(180deg, rgba(62, 207, 142, 0.06), var(--panel)); scroll-margin-top: 90px; }
.link-state { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 1.15rem; margin-bottom: 8px; }
.link-form { grid-template-columns: minmax(180px, 320px) auto; align-items: end; }
.steps { margin: 0 0 18px; padding-left: 1.3em; color: var(--muted); }
.steps li { padding: 3px 0; }
.profile-linked { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; }
.settings-avatar { display: flex; align-items: center; gap: 16px; }
.settings-avatar p { margin: 0; }

.editor { border: 1px solid var(--line-2); border-radius: 12px; background: #0d1220; overflow: hidden; }
.editor:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 184, 31, 0.18); }
.editor-bar { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); }
.editor-bar button { min-width: 34px; height: 32px; padding: 0 9px; border: 0; border-radius: 7px; background: none; color: var(--muted); font: inherit; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.editor-bar button:hover { background: rgba(255, 255, 255, 0.09); color: var(--text); }
.editor-bar .spacer { flex: 1; }
.editor-bar .editor-preview-btn { color: var(--gold); }
.editor textarea { border: 0; border-radius: 0; background: transparent; box-shadow: none !important; }
.editor-preview { padding: 14px 16px; min-height: 140px; }
.editor-help { margin: 0; padding: 8px 14px; font-size: 0.8rem; color: var(--dim); border-top: 1px solid var(--line); }

/* ---------- Forum ---------- */
.search-form { display: flex; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; background: #0d1220; color: var(--muted); min-width: 260px; }
.search-form input { border: 0; background: transparent; box-shadow: none !important; padding: 10px 0; }
.forum-section + .forum-section { margin-top: 34px; }
.forum-section-title { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); margin-bottom: 12px; }
.cat-row { display: grid; grid-template-columns: 52px minmax(0, 1.6fr) 150px minmax(0, 1.2fr); gap: 18px; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.cat-row:last-child { border-bottom: 0; }
.cat-row:hover { background: rgba(255, 255, 255, 0.025); }
.cat-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: rgba(255, 184, 31, 0.1); color: var(--gold); flex: none; }
.cat-name { font-size: 1.1rem; font-weight: 750; color: var(--text); }
.cat-name:hover { color: var(--gold); }
.cat-main p { margin: 2px 0 0; font-size: 0.92rem; }
.cat-stats { display: grid; gap: 2px; color: var(--muted); font-size: 0.88rem; }
.cat-stats b { color: var(--text); }
.cat-last { display: flex; flex-direction: column; min-width: 0; }
.cat-last a { font-weight: 650; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.thread-head, .thread-row, .bug-head, .bug-row { display: grid; align-items: center; gap: 16px; padding: 14px 22px; }
.thread-head, .thread-row { grid-template-columns: minmax(0, 1fr) 80px 80px 170px; }
.thread-head, .bug-head { padding-block: 10px; font-size: 0.74rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--dim); background: rgba(255, 255, 255, 0.03); border-bottom: 1px solid var(--line); }
.thread-row, .bug-row { border-bottom: 1px solid var(--line); }
.thread-row:last-child, .bug-row:last-child { border-bottom: 0; }
.thread-row:hover, .bug-row:hover { background: rgba(255, 255, 255, 0.025); }
.thread-row.is-pinned { background: linear-gradient(90deg, rgba(255, 184, 31, 0.06), transparent 60%); }
.thread-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.thread-main > div { display: flex; flex-direction: column; min-width: 0; }
.thread-title { font-weight: 700; color: var(--text); overflow-wrap: anywhere; }
.thread-title:hover { color: var(--gold); text-decoration: none; }
.ti { display: inline-flex; margin-right: 4px; color: var(--gold); }
.ti-lock { color: var(--muted); }
.c-num { text-align: center; color: var(--muted); }
.c-last { font-size: 0.9rem; }
.c-area { color: var(--muted); font-size: 0.9rem; }
.result-row { display: flex; flex-direction: column; gap: 2px; padding: 14px 22px; border-bottom: 1px solid var(--line); }
.result-row:last-child { border-bottom: 0; }

.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 26px 0 0; }
.page-link { padding: 7px 13px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); font-weight: 650; }
a.page-link:hover { border-color: var(--gold); text-decoration: none; }
.page-link.is-current { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }
.page-gap { padding: 7px 4px; color: var(--dim); }

.thread-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; overflow-wrap: anywhere; }
.mod-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; padding: 8px 12px; border: 1px dashed var(--line-2); border-radius: 12px; width: fit-content; max-width: 100%; }
.mod-label { display: inline-flex; align-items: center; gap: 6px; color: var(--gold); font-weight: 800; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; }
.posts { display: grid; gap: 18px; }
.post { display: grid; grid-template-columns: 190px minmax(0, 1fr); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; scroll-margin-top: 90px; }
.post:target { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 184, 31, 0.18); }
.post-author { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 14px; text-align: center; background: rgba(0, 0, 0, 0.22); border-right: 1px solid var(--line); }
.post-author .avatar { border-radius: 12px; }
.post-author-name { font-weight: 800; font-size: 1.02rem; color: var(--role, var(--text)); overflow-wrap: anywhere; }
.post-author-stats { margin: 8px 0 0; display: grid; gap: 4px; width: 100%; font-size: 0.8rem; }
.post-author-stats div { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); }
.post-author-stats dt, .post-author-stats dd { margin: 0; }
.post-author-stats dd { color: var(--text); font-weight: 650; }
.post-main { padding: 18px 24px 16px; display: flex; flex-direction: column; min-width: 0; }
.post-meta { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; }
.post-anchor { color: var(--muted); }
.post-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 14px; }
.reply-box { margin-top: 34px; }
.notice { display: flex; align-items: center; gap: 12px; padding: 16px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); }

/* ---------- Markdown output ---------- */
.md { overflow-wrap: anywhere; color: #d6dbea; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md h1, .md h2, .md h3, .md h4 { margin: 1.4em 0 0.5em; color: var(--text); }
.md h1 { font-size: 1.5rem; } .md h2 { font-size: 1.3rem; } .md h3 { font-size: 1.12rem; } .md h4 { font-size: 1rem; }
.md a { text-decoration: underline; text-underline-offset: 2px; }
.md code { padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.09); font-size: 0.9em; }
.md pre { padding: 14px 16px; overflow: auto; background: #080b12; border: 1px solid var(--line); border-radius: 10px; }
.md pre code { padding: 0; background: none; }
.md blockquote { margin: 1em 0; padding: 4px 16px; border-left: 4px solid var(--gold); background: rgba(255, 184, 31, 0.05); color: var(--muted); border-radius: 0 8px 8px 0; }
.md ul, .md ol { padding-left: 1.4em; }
.md img, .md-img { max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); }
.md table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.md th, .md td { border: 1px solid var(--line-2); padding: 7px 11px; text-align: left; }
.md hr { border: 0; border-top: 1px solid var(--line-2); margin: 1.6em 0; }
.md-page h2 { border-bottom: 1px solid var(--line); padding-bottom: 6px; }

/* ---------- Bugs ---------- */
.tabs { display: flex; gap: 6px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.tab { padding: 10px 16px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 700; }
.tab:hover { color: var(--text); text-decoration: none; }
.tab.is-active { color: var(--gold); border-color: var(--gold); }
.tab .count { margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); font-size: 0.8rem; color: var(--muted); }
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.filter-bar select { width: auto; min-width: 150px; }
.filter-search { flex: 1 1 240px; display: flex; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 10px; background: #0d1220; color: var(--muted); }
.filter-search input { border: 0; background: transparent; box-shadow: none !important; padding: 10px 0; }
.bug-head, .bug-row { grid-template-columns: minmax(0, 1fr) 150px 84px 96px 110px; }
.bug-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bug-title { font-weight: 700; color: var(--text); overflow-wrap: anywhere; }
.bug-title:hover { color: var(--gold); text-decoration: none; }
.bug-badges { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bug-row .c-num { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.bug-heading { overflow-wrap: anywhere; }
.bug-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
.bug-report-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin: 22px 0 8px; }
.bug-report .h3:first-of-type { margin-top: 0; }
.timeline { display: grid; gap: 14px; }
.tl-comment { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); scroll-margin-top: 90px; }
.tl-comment.is-internal { border-color: rgba(255, 184, 31, 0.45); background: linear-gradient(180deg, rgba(255, 184, 31, 0.07), var(--panel)); }
.tl-body header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.tl-body form { margin-top: 10px; }
.tl-event { display: flex; gap: 12px; align-items: flex-start; padding: 2px 6px 2px 18px; color: var(--muted); font-size: 0.92rem; }
.tl-dot { width: 10px; height: 10px; margin-top: 8px; border-radius: 50%; background: var(--gold); flex: none; box-shadow: 0 0 0 4px rgba(255, 184, 31, 0.15); }
.tl-note { margin-top: 6px; padding: 8px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.affected-card { text-align: center; }
.affected-count { font-size: 3rem; font-weight: 900; line-height: 1; color: var(--gold); }
.affected-card form { margin-top: 14px; }
.detail-list { margin: 0; display: grid; gap: 10px; }
.detail-list > div { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; text-align: right; font-weight: 650; }
.staff-card { border-color: rgba(255, 184, 31, 0.35); }
.staff-card h3 { display: flex; align-items: center; gap: 8px; color: var(--gold); }

/* ---------- Profile, team ---------- */
.profile-row { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.profile-row .avatar { width: 96px; height: 96px; border-radius: 16px; border: 2px solid var(--line-2); }
.profile-row h1 { color: var(--role, var(--text)); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.profile-bio { max-width: 560px; color: #cdd3e3; overflow-wrap: anywhere; }
.profile-edit { margin-left: auto; }
.team-heading { color: var(--role, var(--text)); margin: 30px 0 14px; font-size: 1.15rem; text-transform: uppercase; letter-spacing: 0.12em; }
.team-heading:first-child { margin-top: 0; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.team-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); text-align: center; color: var(--text); transition: 0.15s ease; }
.team-card:hover { text-decoration: none; transform: translateY(-3px); border-color: color-mix(in srgb, var(--role) 55%, transparent); box-shadow: 0 10px 28px color-mix(in srgb, var(--role) 14%, transparent); }
.team-card .avatar { border-radius: 14px; }
.team-name { font-weight: 800; color: var(--role); overflow-wrap: anywhere; }

/* ---------- Admin ---------- */
.admin-nav { display: flex; flex-wrap: wrap; gap: 10px; }
.user-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 22px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.user-row:last-child { border-bottom: 0; }
.user-row-name { display: flex; align-items: center; gap: 12px; }
.user-row-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.cat-edit { display: grid; grid-template-columns: 48px repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; align-items: end; padding: 18px 22px 8px; }
.cat-edit .cat-icon { align-self: center; }
.cat-edit .field-wide { grid-column: span 2; }
.cat-edit .field-narrow { max-width: 110px; }
.cat-edit-actions { display: flex; align-items: center; gap: 12px; }
.cat-delete { padding: 0 22px 14px; border-bottom: 1px solid var(--line); }
.cat-edit + .cat-edit { border-top: 1px solid var(--line); }

/* ---------- Error page ---------- */
.error-page { text-align: center; padding: 60px 20px; }
.error-code { font-size: 6rem; font-weight: 900; line-height: 1; margin: 0 0 6px; background: linear-gradient(180deg, #fff1bd, #ff8f1f); -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-page .lead { margin: 0 auto 24px; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 40px; background: #070910; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; padding-block: 44px 28px; }
.footer-brand p { color: var(--muted); max-width: 300px; margin: 14px 0; }
.footer-grid h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--dim); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid a { color: var(--muted); }
.footer-grid a:hover { color: var(--gold); }
.ip-mini { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--line-2); border-radius: 9px; background: rgba(255, 255, 255, 0.04); color: var(--text); cursor: pointer; font: inherit; }
.ip-mini:hover { border-color: var(--gold); }
.ip-mini.is-copied { border-color: var(--green); }
.footer-legal { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 18px 30px; border-top: 1px solid var(--line); color: var(--dim); font-size: 0.82rem; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .game-layout, .bug-layout, .two-col-form { grid-template-columns: 1fr; }
  .home-columns, .two-col { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .band { flex-direction: column; align-items: flex-start; }
  .band-art { display: none; }
  .stat-grid { width: 100%; }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .header-inner { flex-wrap: wrap; padding-block: 10px; }
  .header-collapse { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; padding: 8px 0 16px; gap: 14px; }
  .header-collapse.is-open { display: flex; }
  .site-nav { flex-direction: column; align-items: stretch; margin: 0; }
  .site-nav > a, .nav-dropdown > a { padding: 12px 14px; }
  .dropdown-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; background: none; border: 0; padding: 0 0 0 14px; }
  .header-actions { justify-content: flex-start; }
  .user-menu-panel { position: static; margin-top: 8px; }

  .cat-row { grid-template-columns: 44px 1fr; }
  .cat-stats, .cat-last { grid-column: 2; }
  .cat-stats { display: flex; gap: 14px; }
  .thread-head { display: none; }
  .thread-row, .bug-row { display: flex; flex-wrap: wrap; gap: 6px 16px; }
  .thread-main, .bug-main { flex: 1 0 100%; }
  .thread-row .c-num, .thread-row .c-last, .bug-row .c-num, .bug-row .c-last, .bug-row .c-area { text-align: left; font-size: 0.85rem; }
  .thread-row .c-last { display: flex; gap: 6px; align-items: baseline; }
  .thread-row .c-last br { display: none; }
  .thread-row .c-num:nth-of-type(1)::after { content: " replies"; }
  .thread-row .c-num:nth-of-type(2)::after { content: " views"; }
  .bug-head { display: none; }
  .post { grid-template-columns: 1fr; }
  .post-author { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; text-align: left; border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 16px; }
  .post-author .avatar { width: 40px; height: 40px; }
  .post-author-stats { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .link-form { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .hero { padding: 60px 0 56px; }
  .hero-title span { letter-spacing: 0.4em; padding-left: 0.4em; }
  .hero-actions .btn { width: 100%; }
  .section { padding: 44px 0; }
  .game-hero-row { flex-direction: column; align-items: flex-start; }
  .game-hero-icon { width: 80px; height: 80px; }
  .footer-grid { grid-template-columns: 1fr; }
  .search-form { min-width: 0; width: 100%; }
  .card { padding: 18px; }
  .band { padding: 24px 20px; }
  .profile-edit { margin-left: 0; }
  .ip-value { flex-wrap: wrap; gap: 6px 14px; }
  .cat-edit .field-wide { grid-column: auto; }
}

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