* { box-sizing: border-box; }
:root {
  --bg: #080c11;
  --bg-soft: #0f1620;
  --panel: #111b26;
  --panel-2: #152333;
  --text: #e8eef5;
  --muted: #8fa3b8;
  --line: #223344;
  --ct: #5aa9ff;
  --t: #f0b35c;
  --danger: #e05555;
  --ok: #47c28a;
  --accent: #ff8a3d;
  --radius: 12px;
}
html, body { margin: 0; padding: 0; }
body {
  background: radial-gradient(circle at 20% -10%, #16324a 0, transparent 40%), var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--ct); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: #0a121a; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; color: #c7e2ff; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(1.8rem, 3vw, 2.8rem); }
h2 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.grow { flex: 1; }

.site-header {
  display: flex; align-items: center; gap: 24px;
  padding: 14px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(8, 12, 17, .86);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; letter-spacing: .5px; }
.brand:hover { text-decoration: none; }
.brand-mark {
  background: linear-gradient(135deg, var(--accent), #ffcf6e);
  color: #1a1208; border-radius: 8px; padding: 2px 8px; font-weight: 900; font-size: .85rem;
}
.nav { display: flex; gap: 18px; flex-wrap: wrap; }
.nav a { color: var(--muted); font-size: .95rem; }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav-user { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: .92rem; }
.inline-form { display: inline-flex; align-items: center; gap: 8px; margin: 4px 0; flex-wrap: wrap; }
.link-button { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0; font: inherit; }
.link-button:hover { color: var(--text); }

.page { width: min(1180px, 100% - 32px); margin: 0 auto; padding: 32px 0 64px; flex: 1; }
.site-footer {
  display: flex; gap: 18px; align-items: center;
  padding: 20px clamp(16px, 4vw, 48px);
  border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem;
}
.site-footer a { color: var(--muted); }

section { margin-bottom: 32px; }
.section-head { display: flex; align-items: flex-end; gap: 16px; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; }
.section-head.tight { margin-bottom: 8px; }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; color: var(--accent); font-size: .75rem; margin: 0 0 6px; }
.hero { display: grid; grid-template-columns: 1.4fr .9fr; gap: 32px; align-items: center; padding: 32px 0 40px; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 4rem); letter-spacing: -.03em; }
.lead { color: var(--muted); font-size: 1.1rem; max-width: 48ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-panel, .panel {
  background: linear-gradient(180deg, rgba(21,35,51,.9), rgba(15,22,32,.92));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
}
.hero-panel { text-align: center; }
.scoreline { display: flex; align-items: center; justify-content: center; gap: 18px; font-size: 1.6rem; font-weight: 800; padding: 18px; background: #0a121a; border-radius: 10px; }
.scoreline.large { font-size: 2rem; margin: 16px 0; }
.scoreline .ct { color: var(--ct); }
.scoreline .t { color: var(--t); }
.scoreline .timer { color: var(--text); font-variant-numeric: tabular-nums; font-size: .8em; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: linear-gradient(135deg, var(--accent), #ffb15c); color: #1b1208;
  border: 0; border-radius: 8px; padding: 9px 16px; font-weight: 700; cursor: pointer; font-size: .95rem;
}
.button:hover { filter: brightness(1.08); text-decoration: none; }
.button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.button.danger { background: var(--danger); color: white; }
.button.small { padding: 5px 10px; font-size: .82rem; }
button:disabled { opacity: .5; cursor: not-allowed; }

.grid { display: grid; gap: 16px; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: 1.3fr .8fr; gap: 24px; }
.callout { border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius); padding: 20px 24px; background: rgba(255,138,61,.05); }
.server-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.server-head { display: flex; justify-content: space-between; gap: 12px; }
.server-head h3 { margin: 0; }
.server-head p { margin: 2px 0 0; font-size: .82rem; }
.server-stats { display: flex; gap: 14px; color: var(--muted); font-size: .9rem; flex-wrap: wrap; }
.server-stats strong { color: var(--text); }
.server-actions { display: flex; gap: 8px; margin-top: auto; }
.progress { height: 7px; background: #0a121a; border-radius: 99px; overflow: hidden; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--ct), var(--ok)); }

.badge { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; font-size: .75rem; color: var(--muted); white-space: nowrap; }
.badge.online { color: var(--ok); border-color: rgba(71,194,138,.45); }
.badge.offline { color: #d98080; border-color: rgba(217,128,128,.4); }
.badge.severity-high { color: #ff9b9b; border-color: rgba(255,155,155,.5); }
.badge.severity-medium { color: #ffd08a; border-color: rgba(255,208,138,.5); }
.badge.severity-low { color: var(--muted); }

.list { display: flex; flex-direction: column; gap: 8px; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; color: var(--text); }
.list-row:hover { text-decoration: none; border-color: #35506a; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.table.compact th, .table.compact td { padding: 7px 6px; }
.table tr:last-child td { border-bottom: 0; }
.kv { display: grid; grid-template-columns: 100px 1fr; gap: 8px 14px; margin: 0 0 18px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.plain-list { margin: 0 0 1em; padding-left: 1.2em; color: var(--muted); }
.plain-list li { margin-bottom: .35em; }
.prose h2 { margin-top: 1.4em; }
.prose h2:first-child { margin-top: 0; }
.prose ul { color: var(--muted); }

.auth-wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; max-width: 900px; margin: 24px auto; }
.auth-panel form, .panel form { display: flex; flex-direction: column; gap: 12px; }
label { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: .88rem; }
input, select, textarea {
  width: 100%; background: #0a121a; color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 9px 11px; font: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(90,169,255,.35); border-color: var(--ct); }
textarea { resize: vertical; }
.code-large { font-size: 1.9rem; letter-spacing: .3em; font-weight: 800; color: var(--accent); font-family: ui-monospace, Consolas, monospace; }
.notice { border-radius: 8px; padding: 10px 14px; margin: 0 0 16px; border: 1px solid var(--line); }
.notice.ok { color: var(--ok); border-color: rgba(71,194,138,.4); background: rgba(71,194,138,.06); }
.notice.error { color: #ff9b9b; border-color: rgba(255,155,155,.4); background: rgba(255,80,80,.06); }

.loadout-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.loadout-card { display: flex; flex-direction: column; gap: 14px; }
.skin-list { display: flex; gap: 8px; flex-wrap: wrap; }
.skin-option { width: 118px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; color: var(--muted); font-size: .8rem; align-items: stretch; }
.skin-option.selected { border-color: var(--accent); color: var(--text); }
.skin-option img { width: 100%; height: 64px; object-fit: cover; border-radius: 6px; background: #0a121a; }
.skin-select select { max-width: 100%; }
.sticker-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.vote-form { display: flex; gap: 8px; flex-wrap: wrap; }
.evidence-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.evidence-grid img { width: 100%; border-radius: 8px; border: 1px solid var(--line); background: #0a121a; }
.evidence-file { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 10px; font-size: .82rem; overflow-wrap: anywhere; }
.stats-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 28px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.stat span { display: block; color: var(--muted); font-size: .78rem; }
.stat strong { font-size: 1.6rem; }
.error-panel { text-align: center; max-width: 560px; margin: 60px auto; }
.native-bar { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: #0b131c; border-bottom: 1px solid var(--line); font-size: .82rem; color: var(--muted); position: sticky; top: 0; z-index: 30; }
body.embed .page { padding-top: 20px; }

@media (max-width: 900px) {
  .hero, .split, .grid.two, .grid.three, .auth-wrap, .loadout-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav { display: none; }
  .site-header { gap: 12px; }
  .section-head { align-items: flex-start; }
}
