/* ============================================================
   XZ游戏工具库 / XZ GAME TOOLS
   暗色战术社区 · 无外部字体 / 无外部图片依赖
   ============================================================ */

:root {
  --ink: #070906;
  --ink-2: #080b0d;
  --panel: #0e1114;
  --panel-2: #121619;
  --panel-3: #161c20;
  --line: rgba(207, 234, 255, 0.11);
  --line-strong: rgba(126, 210, 255, 0.34);
  --text: #e6ecf1;
  --muted: #8f99a2;
  --dim: #626a71;
  --lime: #7ed2ff;
  --lime-2: #2f8ed8;
  --lime-soft: rgba(126, 210, 255, 0.1);
  --amber: #ffb547;
  --cyan: #7fd7ff;
  --red: #ff6259;
  --display: "Bahnschrift Condensed", "Arial Narrow", "Roboto Condensed", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --body: "Segoe UI", "Microsoft YaHei", "Noto Sans SC", "PingFang SC", sans-serif;
  --mono: "Cascadia Mono", "Consolas", "SFMono-Regular", "Menlo", monospace;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
  --cut: polygon(0 0, calc(100% - 13px) 0, 100% 13px, 100% 100%, 0 100%);
  --cut-sm: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(1100px 620px at 82% -8%, rgba(126, 210, 255, 0.07), transparent 62%),
    radial-gradient(900px 600px at -12% 30%, rgba(127, 215, 255, 0.035), transparent 58%),
    var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(126, 210, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 210, 255, 0.025) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.9), transparent 80%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0, rgba(0,0,0,.18) 50%, transparent 100%);
}

::selection { color: var(--ink); background: var(--lime); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #080a07; }
::-webkit-scrollbar-thumb { background: #242c33; border: 2px solid #080a07; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #303e4a; }

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
svg { display: block; }

.container { width: min(1240px, calc(100% - 56px)); margin-inline: auto; }
.narrow { width: min(900px, calc(100% - 56px)); margin-inline: auto; }

.hidden, [hidden] { display: none !important; }
.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;
}
.mono { font-family: var(--mono); }
.text-lime { color: var(--lime); }
.text-muted { color: var(--muted); }

/* ---------- typography ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--lime);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
}
.eyebrow.plain::before { display: none; }

.display {
  font-family: var(--display);
  font-stretch: condensed;
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: .95;
  text-transform: uppercase;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}
.section-head h2 {
  margin-top: 8px;
  font-family: var(--display);
  font-size: clamp(30px, 3.6vw, 48px);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1;
}
.section-head h2 em { color: var(--lime); font-style: normal; }
.section-head .section-note { max-width: 420px; color: var(--muted); font-size: 14px; text-align: right; }
.section-head .section-link {
  display: inline-flex; align-items: center; gap: 8px; color: var(--lime);
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em; white-space: nowrap;
}
.section-head .section-link:hover { gap: 13px; }
.section-head .section-link span { transition: transform .2s ease; }
.section-head .section-link:hover span { transform: translateX(3px); }

.section-pad { padding: 92px 0; }
.section-pad.tight { padding: 62px 0; }

/* ---------- buttons & forms ---------- */

.btn {
  --btn-bg: transparent;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid var(--line-strong);
  border-radius: 1px;
  background: var(--btn-bg);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .05em;
  line-height: 1;
  clip-path: var(--cut-sm);
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.btn:hover { border-color: var(--lime); color: var(--lime); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.btn-primary {
  border-color: var(--lime);
  background: var(--lime);
  color: #070a0c;
  box-shadow: 0 0 0 1px rgba(126, 210, 255, .16), 0 8px 30px rgba(126, 210, 255, .10);
}
.btn-primary:hover { background: #cfeaff; color: #070906; border-color: #cfeaff; }
.btn-ghost { background: rgba(255,255,255,.015); color: var(--text); }
.btn-ghost:hover { background: var(--lime-soft); }
.btn-dark { background: #070a0c; border-color: var(--line); }
.btn-danger { border-color: rgba(255, 98, 89, .4); color: var(--red); }
.btn-danger:hover { background: rgba(255, 98, 89, .1); border-color: var(--red); }
.btn-sm { min-height: 36px; padding: 0 15px; font-size: 12px; }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 14px; }
.btn-block { width: 100%; }
.btn .plus { font-size: 18px; font-weight: 400; margin-top: -2px; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0;
  border: 1px solid var(--line); border-radius: 1px;
  background: rgba(255,255,255,.02); color: var(--muted);
  transition: .2s ease;
}
.icon-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.icon-btn:hover { color: var(--lime); border-color: var(--line-strong); background: var(--lime-soft); }

.text-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0; border: 0; background: none; color: var(--muted);
  font-size: 12px; font-weight: 600; letter-spacing: .03em;
  transition: .2s ease;
}
.text-link span { transition: transform .2s ease; }
.text-link:hover { color: var(--lime); }
.text-link:hover span { transform: translateX(3px); }

.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field > label,
.field-label {
  display: flex; justify-content: space-between; align-items: center;
  color: #bfc9d2; font-size: 12px; font-weight: 700; letter-spacing: .06em;
}
.field .hint { color: var(--dim); font-weight: 400; letter-spacing: 0; font-size: 11px; }
.field input,
.field select,
.field textarea,
.input {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid rgba(207, 234, 255, .14);
  border-radius: 1px;
  outline: none;
  background: rgba(4, 6, 8, .58);
  color: var(--text);
  font-size: 14px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.field textarea { min-height: 96px; resize: vertical; line-height: 1.6; }
.field input::placeholder,
.field textarea::placeholder { color: #575f66; }
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: rgba(207, 234, 255, .26); }
.field input:focus,
.field select:focus,
.field textarea:focus,
.input:focus {
  border-color: var(--lime);
  background: rgba(126, 210, 255, .035);
  box-shadow: 0 0 0 3px rgba(126, 210, 255, .07);
}
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2398a28f' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-note { color: var(--dim); font-size: 12px; line-height: 1.7; }
.form-error {
  display: none; margin: 0 0 16px; padding: 11px 14px;
  border-left: 2px solid var(--red); background: rgba(255, 98, 89, .07);
  color: #ffb4ad; font-size: 13px;
}
.form-error.show { display: block; }
.form-actions { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
.checkbox { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }
.checkbox input { width: 15px; height: 15px; accent-color: var(--lime); }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  transition: background .25s ease, box-shadow .25s ease;
}
.site-header.is-scrolled { background: rgba(7, 9, 6, .88); box-shadow: 0 1px 0 var(--line), 0 18px 40px rgba(0,0,0,.28); backdrop-filter: blur(16px); }

.topline { height: 30px; border-bottom: 1px solid rgba(126,210,255,.09); background: #06080a; overflow: hidden; }
.topline-inner { display: flex; align-items: center; gap: 10px; height: 30px; color: #7f8a93; font-family: var(--mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.live-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 9px var(--lime); }
.topline-sep { width: 1px; height: 11px; margin: 0 4px; background: var(--line); }
.topline-note { color: #646e76; }
.topline-right { margin-left: auto; color: #535b61; }
/* 顶部信息栏始终参与布局，避免吸顶头部在滚动阈值处高度跳变造成闪烁。 */

.header-shell { border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(8, 11, 13, .92), rgba(7, 9, 6, .82)); backdrop-filter: blur(14px); }
.header-inner { display: flex; align-items: center; gap: 38px; height: 76px; }

.brand { display: inline-flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.brand-mark { position: relative; display: grid; grid-template-columns: repeat(3, 4px); gap: 3px; align-items: end; width: 20px; height: 30px; transform: skewX(-12deg); }
.brand-mark i { display: block; background: var(--lime); }
.brand-mark i:nth-child(1) { height: 17px; opacity: .5; }
.brand-mark i:nth-child(2) { height: 27px; }
.brand-mark i:nth-child(3) { height: 11px; opacity: .75; }
.brand-mark::after { content: ""; position: absolute; left: -5px; bottom: -5px; width: 30px; height: 1px; background: var(--lime); opacity: .35; }
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { font-family: var(--display); font-size: 21px; letter-spacing: .06em; line-height: 1; }
.brand-copy small { color: var(--lime); font-family: var(--mono); font-size: 8px; letter-spacing: .24em; }

.main-nav { display: flex; align-items: stretch; gap: 6px; height: 100%; }
.nav-link { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 1px; padding: 0 17px; color: #a0a8ae; font-size: 14px; font-weight: 600; transition: .2s ease; }
.nav-link small { color: #525b62; font-family: var(--mono); font-size: 7px; letter-spacing: .18em; }
.nav-link::after { content: ""; position: absolute; left: 17px; right: 17px; bottom: -1px; height: 2px; background: var(--lime); transform: scaleX(0); transform-origin: left; transition: transform .2s ease; }
.nav-link:hover { color: var(--text); }
.nav-link:hover::after { transform: scaleX(.55); }
.nav-link.active { color: var(--lime); }
.nav-link.active small { color: #6ea9d5; }
.nav-link.active::after { transform: scaleX(1); }
.nav-link.admin-link small { color: var(--amber); }

.header-actions { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.upload-cta { white-space: nowrap; }
.login-link { height: 38px; }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 4px 8px 4px 5px; border: 1px solid transparent; transition: .2s ease; }
.user-chip:hover { border-color: var(--line); background: rgba(255,255,255,.02); }
.user-chip-copy { display: grid; line-height: 1.1; }
.user-chip-copy strong { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.user-chip-copy small { color: var(--dim); font-family: var(--mono); font-size: 7px; letter-spacing: .15em; }

.avatar {
  --avatar-color: var(--lime);
  display: inline-grid; place-items: center; flex: 0 0 auto;
  width: 34px; height: 34px;
  border: 1px solid color-mix(in srgb, var(--avatar-color) 42%, transparent);
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--avatar-color) 35%, transparent), transparent 60%),
    #13181d;
  color: var(--avatar-color);
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
  box-shadow: inset 0 0 16px rgba(0,0,0,.45);
}
.avatar.lg { width: 88px; height: 88px; font-size: 38px; border-width: 2px; }
.avatar.sm { width: 28px; height: 28px; font-size: 12px; }
.avatar.xl { width: 118px; height: 118px; font-size: 48px; border-width: 2px; }

.menu-toggle { display: none; width: 40px; height: 38px; padding: 0 9px; border: 1px solid var(--line); background: transparent; }
.menu-toggle span { display: block; height: 1px; margin: 5px 0; background: var(--text); transition: .2s ease; }

/* ---------- footer ---------- */

.site-footer { margin-top: 40px; border-top: 1px solid var(--line); background: linear-gradient(180deg, rgba(8, 11, 13,.65), #070906 70%); }
.footer-main { display: grid; grid-template-columns: 1.8fr repeat(3, .7fr); gap: 44px; padding: 58px 0 48px; }
.footer-brand p { max-width: 390px; margin-top: 18px; color: var(--dim); font-size: 12px; line-height: 1.9; }
.footer-col { display: flex; flex-direction: column; gap: 10px; padding-top: 3px; }
.footer-title { margin-bottom: 6px; color: #616b74; font-family: var(--mono); font-size: 9px; letter-spacing: .2em; text-transform: uppercase; }
.footer-col a { color: #a5afb7; font-size: 13px; transition: .2s ease; }
.footer-col a:hover { color: var(--lime); transform: translateX(2px); }
.footer-muted { color: #535b61; font-size: 12px; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 0 24px; border-top: 1px solid var(--line); color: #586067; font-family: var(--mono); font-size: 9px; letter-spacing: .05em; }
.footer-status { display: inline-flex; align-items: center; gap: 7px; color: #6c7a86; }
.footer-status i { width: 5px; height: 5px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 8px var(--lime); }

/* ---------- home hero ---------- */

.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero::before {
  content: "XZ TOOLS";
  position: absolute; right: -2vw; top: 34px; z-index: 0;
  color: rgba(126, 210, 255, .022);
  font-family: var(--display); font-size: clamp(130px, 22vw, 330px); font-weight: 800;
  line-height: .8; letter-spacing: -.05em; pointer-events: none; white-space: nowrap;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.04fr .96fr; gap: 56px; align-items: center; min-height: 640px; padding: 70px 0 58px; }
.hero-copy { padding-bottom: 4px; }
.hero h1 { margin: 22px 0 24px; font-family: var(--display); font-size: clamp(52px, 7.1vw, 97px); font-weight: 700; line-height: .9; letter-spacing: -.035em; }
.hero h1 .line { display: block; }
.hero h1 em { position: relative; display: inline-block; color: var(--lime); font-style: normal; }
.hero h1 em::after { content: ""; position: absolute; left: 2px; right: -8px; bottom: 9px; height: 5px; background: var(--lime); opacity: .18; transform: skewX(-24deg); }
.hero-lede { max-width: 510px; color: #a1aab2; font-size: 15px; line-height: 1.9; }
.hero-lede strong { color: var(--text); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 31px; }
.hero-actions .meta { display: inline-flex; align-items: center; gap: 7px; color: var(--dim); font-family: var(--mono); font-size: 9px; letter-spacing: .12em; }
.hero-actions .meta i { width: 5px; height: 5px; border-radius: 50%; background: var(--lime); }
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 44px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hero-stat { padding: 17px 16px 15px 0; border-right: 1px solid var(--line); }
.hero-stat:not(:first-child) { padding-left: 18px; }
.hero-stat:last-child { border-right: 0; }
.hero-stat strong { display: block; color: var(--text); font-family: var(--display); font-size: 31px; font-weight: 700; line-height: 1; }
.hero-stat span { display: block; margin-top: 6px; color: var(--dim); font-family: var(--mono); font-size: 8px; letter-spacing: .14em; text-transform: uppercase; }
.hero-stat strong em { color: var(--lime); font-size: 16px; font-style: normal; margin-left: 2px; }

.hero-visual { position: relative; align-self: stretch; display: flex; align-items: center; }
.blueprint {
  position: relative;
  width: 100%;
  min-height: 470px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(160deg, rgba(126,210,255,.075), transparent 42%),
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(126,210,255,.055) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(126,210,255,.055) 39px 40px),
    #090c0f;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 34px), calc(100% - 34px) 100%, 0 100%);
}
.blueprint::before {
  content: ""; position: absolute; inset: 14px; border: 1px solid rgba(126,210,255,.1); pointer-events: none;
}
.blueprint::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 30%, rgba(126,210,255,.06) 50%, transparent 70%);
  height: 38%; animation: scan 7s linear infinite;
}
@keyframes scan { 0% { transform: translateY(-120%); } 100% { transform: translateY(380%); } }
.blueprint-top { display: flex; justify-content: space-between; padding: 25px 27px 0; color: #707e8a; font-family: var(--mono); font-size: 8px; letter-spacing: .16em; }
.blueprint-top strong { color: var(--lime); font-weight: 500; }
.blueprint-image { position: absolute; inset: 74px 10px 88px; display: flex; align-items: center; justify-content: center; }
.blueprint-image img { width: 112%; max-width: none; filter: drop-shadow(0 28px 35px rgba(0,0,0,.6)); }
.blueprint-caption { position: absolute; left: 28px; right: 28px; bottom: 26px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.blueprint-caption strong { display: block; font-family: var(--display); font-size: 33px; line-height: .9; }
.blueprint-caption span { display: block; margin-top: 5px; color: var(--muted); font-family: var(--mono); font-size: 8px; letter-spacing: .16em; }
.blueprint-caption .coords { color: #5b6770; font-family: var(--mono); font-size: 8px; text-align: right; line-height: 1.8; }
.blueprint-badge { position: absolute; top: 27px; right: 26px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid var(--line-strong); color: var(--lime); font-family: var(--mono); font-size: 8px; letter-spacing: .1em; background: rgba(6, 8, 10,.6); }
.blueprint-badge i { width: 4px; height: 4px; border-radius: 50%; background: var(--lime); }
.hero-float { position: absolute; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid var(--line); background: rgba(9, 12, 15,.9); backdrop-filter: blur(8px); box-shadow: 0 18px 40px rgba(0,0,0,.35); }
.hero-float.one { left: -22px; top: 92px; }
.hero-float.two { right: -18px; bottom: 78px; }
.hero-float .float-icon { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line-strong); color: var(--lime); font-family: var(--mono); font-size: 12px; }
.hero-float strong { display: block; font-size: 12px; line-height: 1.2; }
.hero-float span { display: block; margin-top: 3px; color: var(--dim); font-family: var(--mono); font-size: 8px; letter-spacing: .08em; }

.ticker { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #080b0d; }
.ticker-track { display: flex; width: max-content; animation: ticker 32s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item { display: inline-flex; align-items: center; gap: 12px; padding: 13px 24px; color: #6d7881; font-family: var(--mono); font-size: 9px; letter-spacing: .13em; white-space: nowrap; }
.ticker-item::after { content: "/"; color: #384148; }
.ticker-item strong { color: var(--lime); font-weight: 500; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- gun tiles ---------- */

.gun-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gun-tile {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 214px;
  border: 1px solid var(--line);
  background: linear-gradient(155deg, rgba(255,255,255,.025), transparent 55%), #0a0d10;
  transition: border-color .25s ease, transform .25s ease, background .25s ease;
}
.gun-tile::before { content: ""; position: absolute; left: 0; top: 0; width: 2px; height: 0; background: var(--accent, var(--lime)); transition: height .3s ease; }
.gun-tile:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent, var(--lime)) 46%, transparent); background: linear-gradient(155deg, rgba(255,255,255,.04), transparent 55%), #0b0e11; }
.gun-tile:hover::before { height: 100%; }
.gun-tile-media { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; padding: 18px 14px 4px; min-height: 136px; }
.gun-tile-media::after { content: ""; position: absolute; left: 20%; right: 20%; bottom: 4px; height: 1px; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent, var(--lime)) 24%, transparent), transparent); }
.gun-tile-media img { width: 112%; max-height: 142px; object-fit: contain; filter: drop-shadow(0 16px 14px rgba(0,0,0,.5)); transform: scale(1.28); transition: transform .35s ease; }
.gun-tile:hover img { transform: scale(1.36); }
.gun-tile-body { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 13px 16px 15px; border-top: 1px solid rgba(207, 234, 255,.07); }
.gun-tile-name { display: grid; gap: 3px; }
.gun-tile-name span { color: var(--accent, var(--lime)); font-family: var(--mono); font-size: 8px; letter-spacing: .14em; }
.gun-tile-name strong { font-family: var(--display); font-size: 24px; line-height: 1; letter-spacing: .01em; }
.gun-tile-count { color: var(--dim); font-family: var(--mono); font-size: 9px; white-space: nowrap; }
.gun-tile-count b { color: var(--text); font-weight: 500; }
.gun-tile-arrow { position: absolute; right: 13px; top: 12px; color: #57616a; font-size: 16px; transition: .2s ease; }
.gun-tile:hover .gun-tile-arrow { color: var(--accent, var(--lime)); transform: translate(2px,-2px); }

/* ---------- loadout cards ---------- */

.loadout-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.loadout-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.loadout-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 15px;
  border: 1px solid var(--line);
  background:
    radial-gradient(280px 130px at 100% 0, color-mix(in srgb, var(--accent, var(--lime)) 7%, transparent), transparent 70%),
    linear-gradient(160deg, rgba(255,255,255,.025), transparent 45%),
    #0b0e11;
  transition: border-color .25s ease, transform .25s ease;
}
.loadout-card::before { content: ""; position: absolute; top: 0; left: 0; width: 46px; height: 2px; background: var(--accent, var(--lime)); }
.loadout-card:hover { border-color: color-mix(in srgb, var(--accent, var(--lime)) 38%, transparent); transform: translateY(-3px); }
.card-glow { position: absolute; width: 220px; height: 220px; right: -120px; top: -120px; border-radius: 50%; background: var(--accent, var(--lime)); opacity: .035; filter: blur(30px); pointer-events: none; }
.loadout-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.author { display: flex; align-items: center; gap: 9px; min-width: 0; }
.author .avatar { width: 30px; height: 30px; font-size: 13px; }
.author div { display: grid; min-width: 0; }
.author strong { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 600; }
.author span { color: var(--dim); font-family: var(--mono); font-size: 8px; letter-spacing: .04em; }
.gun-chip { flex: 0 0 auto; padding: 4px 8px; border: 1px solid color-mix(in srgb, var(--accent, var(--lime)) 28%, transparent); color: var(--accent, var(--lime)); background: color-mix(in srgb, var(--accent, var(--lime)) 6%, transparent); font-family: var(--mono); font-size: 8px; letter-spacing: .1em; }
.loadout-title { margin: 16px 0 7px; font-family: var(--display); font-size: 25px; font-weight: 700; line-height: 1.08; letter-spacing: .005em; }
.loadout-title button { padding: 0; border: 0; background: none; color: var(--text); font: inherit; text-align: left; transition: color .2s ease; }
.loadout-title button:hover { color: var(--lime); }
.loadout-desc { min-height: 41px; color: #869098; font-size: 12px; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tag-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.mini-tag { padding: 2px 6px; border: 1px solid rgba(207, 234, 255,.09); color: #75818a; background: rgba(255,255,255,.012); font-size: 9px; }
.code-peek { display: flex; align-items: center; gap: 9px; margin-top: 15px; padding: 9px 9px 9px 11px; border: 1px dashed rgba(126,210,255,.15); background: rgba(3,5,2,.55); }
.code-label { color: var(--accent, var(--lime)); font-family: var(--mono); font-size: 7px; letter-spacing: .14em; opacity: .8; }
.code-peek code { flex: 1; min-width: 0; overflow: hidden; color: #adbbc6; font-family: var(--mono); font-size: 10px; white-space: nowrap; text-overflow: ellipsis; }
.copy-btn { width: 28px; height: 28px; }
.loadout-foot { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding-top: 11px; border-top: 1px solid rgba(207, 234, 255,.07); }
.stat-btn { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: none; color: #757f88; font-family: var(--mono); font-size: 9px; transition: color .2s ease; }
.stat-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.stat-btn:hover, .stat-btn.is-active { color: var(--lime); }
.stat-btn.is-active svg { fill: color-mix(in srgb, var(--lime) 18%, transparent); }
.stat-btn:disabled { opacity: .55; }
.view-count { display: inline-flex; align-items: center; gap: 4px; color: #5a646c; font-family: var(--mono); font-size: 9px; }
.view-count svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.loadout-foot .text-link { margin-left: auto; font-size: 10px; }
.loadout-foot .own-delete { color: #9a6d68; }
.loadout-foot .own-delete:hover { color: var(--red); }
.loadout-foot .own-delete + .text-link { margin-left: 10px; }
.loadout-card.compact .loadout-desc { min-height: 0; }
.loadout-card.compact .code-peek { margin-top: 12px; }

/* ---------- home split / leaderboard ---------- */

.home-split { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; }
.editorial-card { position: relative; overflow: hidden; min-height: 330px; padding: 34px; border: 1px solid var(--line); background: linear-gradient(135deg, rgba(126,210,255,.075), transparent 52%), #0a0d10; }
.editorial-card::after { content: "07"; position: absolute; right: 26px; bottom: -24px; color: rgba(126,210,255,.055); font-family: var(--display); font-size: 190px; font-weight: 800; line-height: 1; }
.editorial-card h3 { max-width: 410px; margin: 15px 0 16px; font-family: var(--display); font-size: clamp(30px, 3.2vw, 44px); line-height: 1.03; }
.editorial-card p { max-width: 470px; color: #949ea7; font-size: 13px; line-height: 1.9; }
.editorial-meta { display: flex; align-items: center; gap: 12px; margin-top: 28px; color: var(--dim); font-family: var(--mono); font-size: 8px; letter-spacing: .1em; }
.editorial-meta span { display: inline-flex; align-items: center; gap: 6px; }
.editorial-meta i { width: 4px; height: 4px; border-radius: 50%; background: var(--lime); }
.editorial-cta { position: absolute; left: 34px; bottom: 30px; z-index: 1; }
.leaderboard { padding: 29px 28px; border: 1px solid var(--line); background: #0a0d10; }
.leaderboard-head { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.leaderboard-head strong { font-family: var(--display); font-size: 22px; }
.leaderboard-head span { color: var(--dim); font-family: var(--mono); font-size: 8px; letter-spacing: .12em; }
.leader-list { display: grid; gap: 0; }
.leader-row { display: flex; align-items: center; gap: 11px; padding: 13px 0; border-bottom: 1px solid rgba(207, 234, 255,.06); }
.leader-row:last-child { border-bottom: 0; }
.leader-rank { width: 22px; color: #4b5760; font-family: var(--display); font-size: 17px; }
.leader-row:nth-child(1) .leader-rank { color: var(--lime); }
.leader-row:nth-child(2) .leader-rank { color: #b8c5d0; }
.leader-row:nth-child(3) .leader-rank { color: var(--amber); }
.leader-main { flex: 1; min-width: 0; }
.leader-main strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.leader-main span { display: block; margin-top: 2px; color: var(--dim); font-family: var(--mono); font-size: 8px; }
.leader-score { color: var(--lime); font-family: var(--mono); font-size: 10px; }
.leader-score small { color: var(--dim); font-size: 7px; margin-left: 2px; }

/* ---------- how it works ---------- */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step-card { position: relative; padding: 28px 26px; border: 1px solid var(--line); background: rgba(255,255,255,.012); }
.step-card::before { content: attr(data-step); position: absolute; right: 20px; top: 15px; color: rgba(126,210,255,.13); font-family: var(--display); font-size: 60px; font-weight: 800; line-height: 1; }
.step-icon { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line-strong); color: var(--lime); font-family: var(--mono); font-size: 13px; }
.step-card h3 { margin: 21px 0 8px; font-family: var(--display); font-size: 24px; }
.step-card p { color: var(--muted); font-size: 12px; line-height: 1.85; }

.cta-band { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 38px 42px; border: 1px solid var(--line-strong); background: linear-gradient(100deg, rgba(126,210,255,.12), rgba(126,210,255,.02) 55%), #090c0f; }
.cta-band::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 23px, rgba(126,210,255,.035) 23px 24px); pointer-events: none; }
.cta-band h2 { position: relative; font-family: var(--display); font-size: clamp(30px, 3.5vw, 46px); line-height: 1; }
.cta-band p { position: relative; margin-top: 8px; color: var(--muted); font-size: 13px; }
.cta-band .btn { position: relative; flex: 0 0 auto; }

/* ---------- page hero / toolbox ---------- */

.page-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.page-hero::before { content: attr(data-watermark); position: absolute; right: -1vw; top: 6px; color: rgba(126,210,255,.03); font-family: var(--display); font-size: clamp(120px, 18vw, 240px); font-weight: 800; line-height: .8; letter-spacing: -.04em; pointer-events: none; }
.page-hero-inner { position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; padding: 64px 0 42px; }
.page-hero h1 { margin: 14px 0 10px; font-family: var(--display); font-size: clamp(47px, 6vw, 74px); line-height: .9; letter-spacing: -.025em; }
.page-hero h1 em { color: var(--lime); font-style: normal; }
.page-hero p { max-width: 600px; color: var(--muted); font-size: 14px; }
.page-actions { display: flex; gap: 10px; flex: 0 0 auto; padding-bottom: 5px; }

.toolbox-wrap { padding: 36px 0 80px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 26px; padding: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.015); }
.search-field { position: relative; flex: 1; min-width: 230px; }
.search-field svg { position: absolute; left: 13px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); fill: none; stroke: #707d87; stroke-width: 1.7; }
.search-field input { width: 100%; height: 42px; padding: 0 14px 0 39px; border: 1px solid var(--line); outline: none; background: #06090b; color: var(--text); font-size: 13px; }
.search-field input:focus { border-color: var(--line-strong); }
.toolbar select { height: 42px; padding: 0 35px 0 13px; border: 1px solid var(--line); outline: none; appearance: none; background: #06090b url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2398a28f' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center; color: #a4afb8; font-size: 12px; }
.toolbar-count { margin-left: auto; color: var(--dim); font-family: var(--mono); font-size: 9px; letter-spacing: .1em; }
.toolbar-count b { color: var(--lime); font-weight: 500; }

.toolbox-layout { display: grid; grid-template-columns: 286px minmax(0, 1fr); gap: 26px; align-items: start; min-width: 0; }
.gun-sidebar { position: sticky; top: 98px; min-width: 0; overflow: hidden; border: 1px solid var(--line); background: #080b0d; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 17px; border-bottom: 1px solid var(--line); }
.sidebar-head strong { font-family: var(--display); font-size: 20px; letter-spacing: .03em; }
.sidebar-head span { color: var(--dim); font-family: var(--mono); font-size: 8px; }
.gun-nav { width: 100%; min-width: 0; max-height: calc(100vh - 175px); overflow-y: auto; padding: 7px; }
.gun-nav-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 1px solid transparent; background: transparent; color: #98a3ac; text-align: left; transition: .18s ease; }
.gun-nav-item:hover { background: rgba(255,255,255,.025); color: var(--text); }
.gun-nav-item.active { border-color: rgba(126,210,255,.22); background: var(--lime-soft); color: var(--lime); }
.gun-nav-thumb { display: grid; place-items: center; width: 54px; height: 35px; flex: 0 0 auto; overflow: hidden; background: #06090b; }
.gun-nav-thumb img { width: 112%; height: 112%; object-fit: contain; transform: scale(1.45); }
.gun-nav-copy { flex: 1; min-width: 0; }
.gun-nav-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.gun-nav-copy span { display: block; margin-top: 1px; color: var(--dim); font-family: var(--mono); font-size: 7px; letter-spacing: .06em; }
.gun-nav-count { color: var(--dim); font-family: var(--mono); font-size: 9px; }
.gun-nav-item.active .gun-nav-count { color: var(--lime); }
.sidebar-foot { padding: 12px 15px; border-top: 1px solid var(--line); color: #576169; font-family: var(--mono); font-size: 8px; line-height: 1.7; }
.sidebar-foot a { color: var(--lime); }

.toolbox-main { min-width: 0; }
.gun-banner { --accent: var(--lime); position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 184px; margin-bottom: 18px; padding: 28px 32px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line)); background: linear-gradient(105deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent 58%), #0a0d10; }
.gun-banner .eyebrow { color: var(--accent); }
.gun-banner-meta b { color: var(--accent); }
.gun-banner::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 47px, rgba(126,210,255,.04) 47px 48px); pointer-events: none; }
.gun-banner-copy { position: relative; z-index: 1; }
.gun-banner h2 { margin: 10px 0 7px; font-family: var(--display); font-size: clamp(38px, 4vw, 54px); line-height: .9; }
.gun-banner p { max-width: 390px; color: #8c97a0; font-size: 12px; }
.gun-banner-meta { display: flex; gap: 20px; margin-top: 17px; color: var(--dim); font-family: var(--mono); font-size: 8px; letter-spacing: .08em; }
.gun-banner-meta b { color: var(--lime); font-size: 13px; font-weight: 500; }
.gun-banner-image { position: relative; z-index: 1; width: 42%; max-width: 350px; align-self: stretch; display: flex; align-items: center; }
.gun-banner-image img { width: 100%; max-height: 164px; object-fit: contain; transform: scale(1.08); filter: drop-shadow(0 18px 22px rgba(0,0,0,.55)); }
.gun-banner-badge { position: absolute; top: 15px; right: 18px; z-index: 2; color: rgba(126,210,255,.55); font-family: var(--mono); font-size: 7px; letter-spacing: .15em; }

.loadout-list-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.loadout-list-head span { color: var(--dim); font-family: var(--mono); font-size: 9px; letter-spacing: .1em; }
.loadout-list-head strong { color: var(--text); font-weight: 500; }
.load-more-row { display: flex; justify-content: center; margin-top: 28px; }

/* ---------- dialogs ---------- */

dialog { color: var(--text); }
dialog::backdrop { background: rgba(2, 4, 1, .78); backdrop-filter: blur(7px); }
.modal { width: min(760px, calc(100vw - 36px)); max-width: none; max-height: calc(100vh - 40px); margin: auto; padding: 0; border: 0; background: transparent; overflow: visible; }
.modal:not([open]) { display: none; }
.modal-panel { position: relative; max-height: calc(100vh - 40px); overflow-y: auto; padding: 34px; border: 1px solid var(--line-strong); background: linear-gradient(150deg, rgba(126,210,255,.045), transparent 45%), #0a0d10; box-shadow: var(--shadow); clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 0 100%); animation: modalIn .22s ease both; }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.99); } to { opacity: 1; transform: none; } }
.modal-close { position: absolute; z-index: 3; right: 16px; top: 13px; width: 32px; height: 32px; border: 1px solid var(--line); background: #080b0d; color: var(--muted); font-size: 21px; line-height: 1; }
.modal-close:hover { color: var(--lime); border-color: var(--line-strong); }
.modal-title { margin: 5px 0 8px; font-family: var(--display); font-size: 38px; line-height: 1; }
.modal-sub { margin-bottom: 24px; color: var(--muted); font-size: 12px; }
.modal-loading { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 260px; border: 1px solid var(--line); background: #0a0d10; color: var(--muted); font-family: var(--mono); font-size: 11px; }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(126,210,255,.18); border-top-color: var(--lime); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.loadout-modal { width: min(820px, calc(100vw - 36px)); }
.detail-head { display: flex; gap: 22px; align-items: flex-end; padding-right: 30px; }
.detail-gun { flex: 0 0 210px; height: 122px; display: grid; place-items: center; border: 1px solid var(--line); background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--accent, var(--lime)) 10%, transparent), transparent 65%), #06090b; }
.detail-gun img { max-height: 104px; object-fit: contain; transform: scale(1.16); }
.detail-head h2 { margin: 8px 0 12px; font-family: var(--display); font-size: clamp(29px, 4vw, 43px); line-height: .98; }
.detail-author { display: flex; align-items: center; gap: 8px; color: var(--dim); font-size: 10px; }
.detail-author strong { color: #bbc5ce; font-weight: 500; }
.detail-desc { margin: 20px 0; color: #9ca7b0; font-size: 13px; line-height: 1.9; white-space: pre-line; }
.code-block { margin-top: 18px; border: 1px solid rgba(126,210,255,.18); background: #06080a; }
.code-block-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 14px; border-bottom: 1px solid rgba(126,210,255,.12); color: var(--lime); font-family: var(--mono); font-size: 8px; letter-spacing: .12em; }
.code-block pre { margin: 0; padding: 18px; overflow-x: auto; color: #c9d7e2; font-family: var(--mono); font-size: 13px; line-height: 1.8; white-space: pre-wrap; word-break: break-all; }
.detail-foot { display: flex; align-items: center; gap: 18px; margin-top: 18px; }
.detail-foot .stat-btn { font-size: 11px; }
.detail-foot .stat-btn svg { width: 17px; height: 17px; }
.detail-foot .view-count { margin-left: auto; }

/* ---------- auth / account ---------- */

.auth-section { position: relative; overflow: hidden; padding: 64px 0 86px; }
.auth-section::before { content: "IDENTITY"; position: absolute; left: -3vw; bottom: -2vw; color: rgba(126,210,255,.025); font-family: var(--display); font-size: 190px; font-weight: 800; line-height: .8; pointer-events: none; }
.auth-layout { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr .92fr; gap: 70px; align-items: center; max-width: 1080px; margin: 0 auto; }
.auth-copy h1 { margin: 18px 0 20px; font-family: var(--display); font-size: clamp(48px, 5.8vw, 76px); line-height: .9; }
.auth-copy h1 em { color: var(--lime); font-style: normal; }
.auth-copy p { max-width: 440px; color: var(--muted); font-size: 14px; line-height: 1.9; }
.auth-benefits { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 34px; }
.auth-benefit { display: flex; align-items: flex-start; gap: 11px; padding: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.015); }
.auth-benefit .benefit-icon { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 auto; border: 1px solid var(--line-strong); color: var(--lime); font-family: var(--mono); font-size: 10px; }
.auth-benefit strong { display: block; font-size: 12px; }
.auth-benefit span { display: block; margin-top: 2px; color: var(--dim); font-size: 10px; line-height: 1.5; }
.auth-panel { border: 1px solid var(--line-strong); background: linear-gradient(155deg, rgba(126,210,255,.05), transparent 30%), #0a0d10; box-shadow: var(--shadow); padding: 27px; clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 0 100%); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 25px; border-bottom: 1px solid var(--line); }
.auth-tab { position: relative; padding: 12px 6px; border: 0; background: none; color: #69757e; font-family: var(--display); font-size: 22px; letter-spacing: .04em; }
.auth-tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--lime); transform: scaleX(0); transition: .2s ease; }
.auth-tab.active { color: var(--text); }
.auth-tab.active::after { transform: scaleX(1); }
.auth-form { display: none; }
.auth-form.active { display: block; animation: fadeUp .24s ease both; }
.auth-panel .form-actions { justify-content: space-between; }
.auth-panel .form-actions .btn { flex: 1; }
.auth-switch { color: var(--dim); font-size: 11px; white-space: nowrap; }
.auth-switch button { padding: 0; border: 0; background: none; color: var(--lime); font-size: inherit; }
.auth-foot { margin-top: 14px; color: #576169; font-size: 10px; line-height: 1.7; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

.profile-wrap { padding: 34px 0 76px; }
.profile-cover { position: relative; overflow: hidden; border: 1px solid var(--line); background: linear-gradient(115deg, rgba(126,210,255,.11), transparent 55%), #0a0d10; }
.profile-cover::after { content: "OPERATOR"; position: absolute; right: 22px; top: 9px; color: rgba(126,210,255,.05); font-family: var(--display); font-size: 88px; font-weight: 800; line-height: 1; pointer-events: none; }
.profile-main { position: relative; z-index: 1; display: flex; align-items: center; gap: 24px; padding: 30px 34px 27px; }
.profile-identity { min-width: 0; flex: 1; }
.profile-name-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.profile-name-row h1 { font-family: var(--display); font-size: clamp(34px, 4vw, 47px); line-height: .95; }
.role-badge { display: inline-flex; align-items: center; padding: 3px 7px; border: 1px solid rgba(126,210,255,.3); color: var(--lime); background: var(--lime-soft); font-family: var(--mono); font-size: 7px; letter-spacing: .14em; }
.role-badge.admin { border-color: rgba(255,181,71,.35); color: var(--amber); background: rgba(255,181,71,.08); }
.profile-handle { margin-top: 5px; color: var(--dim); font-family: var(--mono); font-size: 10px; }
.profile-bio { max-width: 620px; margin-top: 10px; color: var(--muted); font-size: 12px; }
.profile-since { margin-top: 7px; color: #545e66; font-family: var(--mono); font-size: 8px; letter-spacing: .04em; }
.profile-actions { display: flex; gap: 9px; flex: 0 0 auto; }
.profile-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.profile-stat { padding: 17px 24px; border-right: 1px solid var(--line); }
.profile-stat:last-child { border-right: 0; }
.profile-stat strong { display: block; font-family: var(--display); font-size: 29px; line-height: 1; }
.profile-stat span { display: block; margin-top: 4px; color: var(--dim); font-family: var(--mono); font-size: 8px; letter-spacing: .12em; }
.profile-stat strong em { color: var(--lime); font-size: 14px; font-style: normal; }

.account-tabs { display: flex; gap: 0; margin: 26px 0 22px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.account-tab { position: relative; padding: 13px 20px; border: 0; background: none; color: #75818a; font-size: 13px; font-weight: 600; white-space: nowrap; }
.account-tab::after { content: ""; position: absolute; left: 20px; right: 20px; bottom: -1px; height: 2px; background: var(--lime); transform: scaleX(0); transition: .2s ease; }
.account-tab.active { color: var(--text); }
.account-tab.active::after { transform: scaleX(1); }
.account-tab .tab-count { margin-left: 5px; color: var(--dim); font-family: var(--mono); font-size: 9px; }
.account-panel { display: none; }
.account-panel.active { display: block; animation: fadeUp .22s ease both; }
.account-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.account-section-head h2 { font-family: var(--display); font-size: 30px; line-height: 1; }
.account-section-head p { margin-top: 5px; color: var(--dim); font-size: 11px; }
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.settings-card { padding: 28px; border: 1px solid var(--line); background: #0a0d10; }
.settings-card h3 { margin: 8px 0 6px; font-family: var(--display); font-size: 27px; }
.settings-card > p { margin-bottom: 21px; color: var(--dim); font-size: 11px; }
.color-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.color-swatch { position: relative; width: 30px; height: 30px; border: 2px solid transparent; background: var(--swatch); }
.color-swatch::after { content: ""; position: absolute; inset: 4px; border: 1px solid rgba(0,0,0,.28); }
.color-swatch.active { border-color: var(--text); outline: 1px solid var(--swatch); outline-offset: 2px; }
.security-list { display: grid; gap: 0; border: 1px solid var(--line); }
.security-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.security-row:last-child { border-bottom: 0; }
.security-row strong { display: block; font-size: 13px; }
.security-row span { display: block; margin-top: 3px; color: var(--dim); font-size: 11px; }
.danger-zone { margin-top: 18px; padding: 20px; border: 1px solid rgba(255,98,89,.25); background: rgba(255,98,89,.035); }
.danger-zone h3 { margin: 0 0 5px; color: #ffb4ad; font-family: var(--display); font-size: 22px; }
.danger-zone p { color: #9c7c77; font-size: 11px; }

/* ---------- admin ---------- */

.admin-wrap { padding: 36px 0 80px; }
.admin-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.admin-bar .eyebrow { color: var(--amber); }
.admin-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.summary-card { position: relative; overflow: hidden; padding: 19px 20px; border: 1px solid var(--line); background: #0a0d10; }
.summary-card::after { content: ""; position: absolute; right: 0; bottom: 0; width: 34px; height: 34px; border-right: 1px solid rgba(126,210,255,.22); border-bottom: 1px solid rgba(126,210,255,.22); }
.summary-card strong { display: block; font-family: var(--display); font-size: 34px; line-height: 1; }
.summary-card span { display: block; margin-top: 6px; color: var(--dim); font-family: var(--mono); font-size: 8px; letter-spacing: .13em; }
.admin-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.admin-tab { padding: 12px 22px; border: 0; border-bottom: 2px solid transparent; background: none; color: #75818a; font-size: 13px; font-weight: 600; }
.admin-tab.active { color: var(--lime); border-bottom-color: var(--lime); }
.admin-panel { display: none; }
.admin-panel.active { display: block; animation: fadeUp .2s ease both; }
.admin-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.admin-toolbar .search-field { max-width: 330px; }
.admin-toolbar .spacer { flex: 1; }
.data-table-wrap { overflow-x: auto; border: 1px solid var(--line); background: #080b0d; }
.data-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.data-table th { padding: 11px 14px; border-bottom: 1px solid var(--line); color: #616b73; font-family: var(--mono); font-size: 8px; font-weight: 500; letter-spacing: .12em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 12px 14px; border-bottom: 1px solid rgba(207, 234, 255,.06); color: #a4afb8; font-size: 12px; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: rgba(255,255,255,.018); }
.table-gun { display: flex; align-items: center; gap: 10px; }
.table-gun img { width: 66px; height: 40px; object-fit: contain; background: #06080a; border: 1px solid var(--line); transform: scale(1.12); }
.table-gun strong { display: block; color: var(--text); font-size: 12px; }
.table-gun span { display: block; color: var(--dim); font-family: var(--mono); font-size: 8px; }
.table-actions { display: flex; gap: 6px; justify-content: flex-end; }
.table-actions .btn { min-height: 30px; padding: 0 10px; font-size: 10px; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border: 1px solid var(--line); color: var(--muted); font-family: var(--mono); font-size: 8px; }
.status-pill.on { border-color: rgba(126,210,255,.24); color: var(--lime); background: var(--lime-soft); }
.status-pill.off { border-color: rgba(255,98,89,.25); color: #ff8e86; background: rgba(255,98,89,.05); }
.status-pill.admin { border-color: rgba(255,181,71,.3); color: var(--amber); background: rgba(255,181,71,.06); }
.admin-row-select { height: 32px; min-height: 32px; padding: 0 25px 0 9px; border: 1px solid var(--line); background-color: #06090b; color: var(--text); font-size: 11px; }
.admin-pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 14px; color: var(--dim); font-family: var(--mono); font-size: 9px; }
.image-upload-box { display: flex; align-items: center; gap: 16px; padding: 14px; border: 1px dashed rgba(126,210,255,.22); background: rgba(126,210,255,.025); }
.image-preview { display: grid; place-items: center; width: 136px; height: 82px; flex: 0 0 auto; border: 1px solid var(--line); background: #06080a; overflow: hidden; }
.image-preview img { width: 100%; height: 100%; object-fit: contain; }
.image-upload-copy { flex: 1; }
.image-upload-copy strong { display: block; font-size: 12px; }
.image-upload-copy span { display: block; margin: 4px 0 9px; color: var(--dim); font-size: 10px; }
.image-upload-copy input[type=file] { width: 100%; color: var(--muted); font-size: 10px; }
.image-upload-copy input[type=file]::file-selector-button { margin-right: 10px; padding: 6px 10px; border: 1px solid var(--line); background: #080b0d; color: var(--lime); font-size: 10px; cursor: pointer; }

.access-denied { display: grid; place-items: center; min-height: 60vh; text-align: center; }
.access-denied .denied-mark { display: grid; place-items: center; width: 74px; height: 74px; margin: 0 auto 20px; border: 1px solid rgba(255,98,89,.3); color: var(--red); font-family: var(--mono); font-size: 22px; }
.access-denied h1 { font-family: var(--display); font-size: 48px; line-height: 1; }
.access-denied p { margin: 10px 0 22px; color: var(--muted); }

/* ---------- states, toast, misc ---------- */

.empty-state { display: grid; place-items: center; padding: 68px 24px; border: 1px dashed var(--line); text-align: center; background: rgba(255,255,255,.008); }
.empty-crosshair { position: relative; width: 44px; height: 44px; margin-bottom: 16px; border: 1px solid var(--line-strong); border-radius: 50%; }
.empty-crosshair::before, .empty-crosshair::after { content: ""; position: absolute; background: var(--line-strong); }
.empty-crosshair::before { width: 58px; height: 1px; left: -8px; top: 21px; }
.empty-crosshair::after { width: 1px; height: 58px; left: 21px; top: -8px; }
.empty-state h3 { font-family: var(--display); font-size: 25px; }
.empty-state p { max-width: 380px; margin: 5px 0 17px; color: var(--dim); font-size: 12px; }
.error-state { padding: 54px 24px; border: 1px solid rgba(255,98,89,.22); background: rgba(255,98,89,.035); text-align: center; }
.error-code { color: var(--red); font-family: var(--mono); font-size: 8px; letter-spacing: .15em; }
.error-state h3 { margin: 8px 0 5px; font-family: var(--display); font-size: 25px; }
.error-state p { margin-bottom: 15px; color: #a88a84; font-size: 12px; }
.skeleton-card { display: grid; gap: 11px; padding: 18px; min-height: 260px; border: 1px solid var(--line); background: #090c0e; }
.skeleton-card span { display: block; height: 11px; background: linear-gradient(90deg, #11161a 20%, #181f25 40%, #11161a 60%); background-size: 200% 100%; animation: shimmer 1.5s infinite linear; }
.skeleton-card span:nth-child(1) { width: 34%; }
.skeleton-card span:nth-child(2) { width: 74%; height: 22px; margin-top: 17px; }
.skeleton-card span:nth-child(3) { width: 100%; }
.skeleton-card span:nth-child(4) { width: 57%; }
@keyframes shimmer { to { background-position: -200% 0; } }

.toast-host { position: fixed; right: 22px; bottom: 22px; z-index: 200; display: grid; gap: 9px; width: min(380px, calc(100vw - 40px)); }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 15px; border: 1px solid var(--line-strong); background: rgba(10, 13, 16,.96); color: #ccd6df; font-size: 12px; box-shadow: 0 18px 40px rgba(0,0,0,.4); transform: translateY(10px); opacity: 0; transition: .24s ease; backdrop-filter: blur(10px); }
.toast.show { transform: none; opacity: 1; }
.toast-mark { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: var(--lime); box-shadow: 0 0 8px var(--lime); }
.toast.error { border-color: rgba(255,98,89,.35); color: #ffc0ba; }
.toast.error .toast-mark { background: var(--red); box-shadow: 0 0 8px var(--red); }

.page-loading { display: grid; place-items: center; min-height: 52vh; gap: 14px; color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .08em; }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in-view { opacity: 1; transform: none; }
.reveal.delay-1 { transition-delay: .07s; }
.reveal.delay-2 { transition-delay: .14s; }
.reveal.delay-3 { transition-delay: .21s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 1120px) {
  .hero-grid { gap: 36px; min-height: 580px; }
  .hero-float.one { left: -8px; }
  .hero-float.two { right: -4px; }
  .gun-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-main { grid-template-columns: 1.5fr repeat(3, .7fr); gap: 28px; }
  .loadout-grid.three { grid-template-columns: repeat(2, 1fr); }
  .toolbox-layout { grid-template-columns: 250px minmax(0, 1fr); }
  .auth-layout { gap: 44px; }
}

@media (max-width: 920px) {
  .container, .narrow { width: min(100% - 36px, 760px); }
  .header-inner { gap: 20px; height: 68px; }
  .main-nav {
    position: fixed; inset: 98px 0 auto 0; z-index: 70;
    display: none; flex-direction: column; gap: 0; height: auto;
    padding: 8px 18px 18px; border-bottom: 1px solid var(--line);
    background: rgba(7, 9, 6, .98); backdrop-filter: blur(18px);
  }
  .main-nav.open { display: flex; }
  .nav-link { padding: 13px 7px; border-bottom: 1px solid rgba(207, 234, 255,.06); }
  .nav-link::after { left: 7px; right: auto; width: 40px; bottom: 0; }
  .menu-toggle { display: block; }
  .upload-cta { display: none; }
  .user-chip-copy { display: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 42px; padding: 54px 0 46px; min-height: 0; }
  .hero h1 { font-size: clamp(50px, 10vw, 80px); }
  .hero-visual { max-width: 680px; }
  .blueprint { min-height: 390px; }
  .hero-float.one { left: 12px; top: 74px; }
  .hero-float.two { right: 10px; bottom: 58px; }
  .hero-stats { max-width: 620px; }
  .home-split { grid-template-columns: 1fr; }
  .editorial-card { min-height: 300px; }
  .editorial-cta { position: static; margin-top: 24px; }
  .steps { grid-template-columns: 1fr; }
  .gun-grid { grid-template-columns: repeat(2, 1fr); }
  .loadout-grid, .loadout-grid.three { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 12px; }
  .section-head .section-note { text-align: left; }
  .toolbox-layout { grid-template-columns: 1fr; }
  .gun-sidebar { position: static; }
  .gun-nav { display: flex; gap: 6px; max-height: none; overflow-x: auto; overflow-y: hidden; padding: 8px; }
  .gun-nav-item { flex: 0 0 auto; width: auto; min-width: 135px; }
  .gun-nav-thumb { width: 43px; }
  .sidebar-head { padding: 12px 14px; }
  .gun-banner { min-height: 158px; padding: 22px; }
  .gun-banner-image { width: 38%; }
  .auth-layout { grid-template-columns: 1fr; gap: 34px; }
  .auth-copy { max-width: 620px; }
  .auth-panel { max-width: 560px; }
  .account-grid { grid-template-columns: 1fr; }
  .admin-summary { grid-template-columns: repeat(2, 1fr); }
  .page-hero-inner { flex-direction: column; align-items: flex-start; padding: 44px 0 30px; }
  .page-actions { padding-bottom: 0; }
  .detail-head { flex-direction: column; align-items: flex-start; }
  .detail-gun { width: 100%; flex-basis: 112px; }
  .profile-main { align-items: flex-start; flex-wrap: wrap; }
  .profile-actions { width: 100%; padding-left: 112px; }
}

@media (max-width: 640px) {
  body { font-size: 14px; }
  .container, .narrow { width: calc(100% - 28px); }
  .topline-right, .topline-note, .topline-sep { display: none; }
  .topline-inner { font-size: 8px; }
  .header-inner { height: 62px; }
  .brand-copy strong { font-size: 18px; }
  .brand-copy small { font-size: 7px; }
  .main-nav { top: 92px; }
  .header-actions { gap: 7px; }
  .login-link { padding: 0 11px; }
  .site-header.is-scrolled .header-shell { border-color: transparent; }
  .hero-grid { padding: 40px 0 36px; }
  .hero h1 { margin: 18px 0 18px; font-size: clamp(42px, 12.5vw, 64px); }
  .hero-lede { font-size: 13px; }
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .hero-actions .btn { padding: 0 10px; }
  .hero-actions .meta { grid-column: 1 / -1; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); margin-top: 30px; }
  .hero-stat:nth-child(2) { border-right: 0; }
  .hero-stat:nth-child(3), .hero-stat:nth-child(4) { border-top: 1px solid var(--line); }
  .hero-stat:nth-child(3) { padding-left: 0; }
  .hero-stat { padding: 13px 12px 12px 0; }
  .hero-stat:not(:first-child) { padding-left: 12px; }
  .hero-stat strong { font-size: 25px; }
  .blueprint { min-height: 300px; }
  .blueprint-image { inset: 57px 4px 68px; }
  .blueprint-caption { left: 18px; right: 18px; bottom: 18px; }
  .blueprint-caption strong { font-size: 25px; }
  .blueprint-caption .coords { display: none; }
  .blueprint-top { padding: 16px 18px 0; }
  .blueprint-badge { top: 17px; right: 17px; }
  .hero-float { display: none; }
  .section-pad { padding: 60px 0; }
  .section-head h2 { font-size: 33px; }
  .gun-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .gun-tile { min-height: 168px; }
  .gun-tile-media { min-height: 104px; padding: 11px 6px 2px; }
  .gun-tile-media img { max-height: 94px; width: 100%; }
  .gun-tile-body { padding: 10px 11px 11px; }
  .gun-tile-name strong { font-size: 19px; }
  .gun-tile-count { font-size: 7px; }
  .loadout-card { padding: 13px; }
  .loadout-title { font-size: 23px; }
  .loadout-desc { min-height: 39px; }
  .home-split { gap: 12px; }
  .editorial-card { padding: 25px 22px; }
  .editorial-card h3 { font-size: 32px; }
  .leaderboard { padding: 22px 19px; }
  .cta-band { flex-direction: column; align-items: flex-start; padding: 28px 22px; }
  .cta-band .btn { width: 100%; }
  .toolbar { padding: 9px; gap: 8px; }
  .search-field { min-width: 100%; flex-basis: 100%; }
  .toolbar select { flex: 1; }
  .toolbar-count { margin-left: 0; }
  .gun-banner { min-height: 148px; padding: 18px; }
  .gun-banner h2 { font-size: 32px; }
  .gun-banner p { max-width: 230px; font-size: 10px; }
  .gun-banner-image { width: 36%; }
  .gun-banner-meta { gap: 10px; margin-top: 12px; font-size: 7px; }
  .gun-banner-meta b { font-size: 11px; }
  .code-peek code { font-size: 9px; }
  .modal-panel { padding: 24px 18px; }
  .modal-title { font-size: 31px; }
  .detail-head { gap: 13px; }
  .detail-gun { height: 96px; }
  .detail-foot { flex-wrap: wrap; gap: 12px; }
  .detail-foot .view-count { margin-left: 0; width: 100%; }
  .auth-section { padding: 40px 0 60px; }
  .auth-copy h1 { font-size: 45px; }
  .auth-benefits { grid-template-columns: 1fr; }
  .auth-panel { padding: 21px 17px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .profile-main { padding: 22px 18px 20px; gap: 16px; }
  .avatar.xl { width: 76px; height: 76px; font-size: 31px; }
  .profile-name-row h1 { font-size: 34px; }
  .profile-actions { padding-left: 0; }
  .profile-stats { grid-template-columns: repeat(2, 1fr); }
  .profile-stat:nth-child(2) { border-right: 0; }
  .profile-stat:nth-child(3), .profile-stat:nth-child(4) { border-top: 1px solid var(--line); }
  .profile-stat { padding: 13px 18px; }
  .profile-stat strong { font-size: 25px; }
  .account-tabs { margin: 20px 0 17px; }
  .account-tab { padding: 12px 13px; font-size: 12px; }
  .account-tab::after { left: 13px; right: 13px; }
  .settings-card { padding: 20px 17px; }
  .security-row { flex-direction: column; align-items: flex-start; }
  .admin-summary { gap: 8px; }
  .summary-card { padding: 15px; }
  .summary-card strong { font-size: 27px; }
  .admin-toolbar { flex-wrap: wrap; }
  .admin-toolbar .search-field { max-width: none; flex-basis: 100%; }
  .admin-bar { align-items: flex-start; flex-direction: column; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 24px; padding: 38px 0 30px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
}
