:root {
  --bg: #0b0c0f;
  --bg-glow: #1e0b0d;
  --surface: #15171c;
  --surface-2: #1e2128;
  --line: #2a2e37;
  --text: #f5f6f8;
  --muted: #9aa1ad;
  --text-soft: #c3cad8;
  --accent: #f5333f;
  --accent-hover: #ff5b64;
  --accent-ink: #2a0406;
  --accent-rgb: 245, 51, 63;
  --grad: linear-gradient(135deg, #ff5f66, #e0141f);
  --danger: #c81e2a;
  --online: #46d888;
  --online-rgb: 70, 216, 136;
  --offline: #f6c451;
  --radius: 16px;
  --radius-sm: 11px;
  --page-max: 1120px;
  --page-gutter: 24px;
  --topbar-bg: rgba(11, 12, 15, 0.82);
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.42);
}

:root[data-theme="light"] {
  --bg: #f5f6f8;
  --bg-glow: #ffe0e2;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --line: #e2e6ec;
  --text: #14171d;
  --muted: #5c6572;
  --text-soft: #313944;
  --accent: #e11d27;
  --accent-hover: #c8121c;
  --accent-ink: #ffffff;
  --accent-rgb: 225, 29, 39;
  --grad: linear-gradient(135deg, #ff5a61, #d40f1a);
  --danger: #b3161d;
  --online: #16b866;
  --online-rgb: 22, 184, 102;
  --offline: #d99a1a;
  --topbar-bg: rgba(255, 255, 255, 0.82);
  --shadow: 0 12px 30px rgba(60, 30, 10, 0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: "Onest", "Manrope", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px max(var(--page-gutter), calc((100% - var(--page-max)) / 2));
  background: var(--topbar-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 20px; font-family: "Unbounded", "Onest", system-ui, sans-serif; letter-spacing: -0.01em; }
.brand-mark {
  width: 38px; height: 38px;
  object-fit: contain; display: block; background: transparent;
  filter: drop-shadow(0 3px 9px rgba(var(--accent-rgb), 0.5));
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.28s ease;
}
.brand span { transition: color 0.22s ease, text-shadow 0.22s ease; }
.brand:hover .brand-mark {
  transform: translateY(-2px) rotate(-6deg) scale(1.08);
  filter: drop-shadow(0 6px 18px rgba(var(--accent-rgb), 0.85));
}
.brand:hover span {
  color: var(--accent);
  text-shadow: 0 0 18px rgba(var(--accent-rgb), 0.55);
}

.nav { display: flex; align-items: center; gap: 8px; }
.nav a {
  color: var(--muted);
  font-weight: 600;
  font-size: 15px;
  padding: 8px 12px;
  border-radius: 9px;
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.active { color: var(--text); }

.account { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.btn-solid, .btn-ghost {
  font: inherit;
  font-weight: 700;
  font-size: 14.5px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease,
              color 0.18s ease, filter 0.18s ease, box-shadow 0.22s ease;
}
.btn-solid { background: var(--grad); color: #fff; box-shadow: 0 8px 22px rgba(var(--accent-rgb), 0.3); }
.btn-solid:hover { filter: brightness(1.06); box-shadow: 0 10px 26px rgba(var(--accent-rgb), 0.42); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-solid:active, .btn-ghost:active { transform: translateY(1px); }

.skin-head {
  width: 40px; height: 40px; border-radius: 9px;
  background-color: var(--surface-2);
  background-image: var(--skin), var(--skin);
  background-repeat: no-repeat, no-repeat;
  background-size: 800% 800%, 800% 800%;
  background-position: 71.4286% 14.2857%, 14.2857% 14.2857%;
  image-rendering: pixelated;
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px var(--line);
}
.skin-head.empty { background-image: none; }
.skin-head--lg {
  width: 80px; height: 80px; border-radius: 14px;
  background-size: 800% 800%, 800% 800%;
  background-position: 71.4286% 14.2857%, 14.2857% 14.2857%;
}

.account-card {
  display: flex; align-items: center; gap: 11px;
  padding: 6px 12px 6px 6px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}
.account-card:hover { border-color: var(--muted); }
.account-meta { display: flex; flex-direction: column; line-height: 1.25; }
.account-name { font-weight: 700; font-size: 14.5px; color: var(--text); }
.account-status { color: var(--accent); font-size: 12.5px; font-weight: 600; }

main { width: 100%; padding-inline: max(var(--page-gutter), calc((100% - var(--page-max)) / 2)); flex: 1 0 auto; }

.hero { position: relative; text-align: center; padding: 84px 0 52px; }
.hero::before {
  content: "";
  position: absolute; inset: -40px 0 auto 50%;
  transform: translateX(-50%);
  width: 680px; height: 420px;
  background: radial-gradient(closest-side, rgba(var(--accent-rgb), 0.16), transparent 70%),
              radial-gradient(closest-side, rgba(139, 123, 255, 0.14), transparent 70%);
  background-position: 30% 40%, 70% 30%;
  background-repeat: no-repeat;
  filter: blur(8px);
  z-index: -1;
  pointer-events: none;
}
.eyebrow {
  display: inline-block;
  font-weight: 700; font-size: 12.5px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  padding: 6px 12px; border-radius: 999px;
  margin-bottom: 20px;
}
.hero h1 { font-size: clamp(40px, 7vw, 68px); font-weight: 800; margin: 0 0 16px; }
.lede { color: var(--muted); font-size: 18px; max-width: 560px; margin: 0 auto 34px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-actions .btn-solid, .hero-actions .btn-ghost { padding: 13px 22px; font-size: 15.5px; }

.status-card {
  margin: 44px auto 0;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  text-align: left;
}
.status-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.status-badge { display: flex; align-items: center; gap: 9px; font-weight: 700; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.status-dot.online { background: var(--online); box-shadow: 0 0 0 4px rgba(var(--online-rgb), 0.18); }
.status-dot.offline { background: var(--offline); box-shadow: 0 0 0 4px rgba(246, 196, 81, 0.16); }
.status-players { font-weight: 800; font-size: 18px; }
.status-players span { color: var(--muted); font-weight: 600; font-size: 14px; }
.status-meta { display: grid; gap: 7px; margin: 0 0 16px; font-size: 14px; }
.status-meta div { display: flex; justify-content: space-between; gap: 14px; }
.status-meta dt { color: var(--muted); }
.status-meta dd { margin: 0; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-address {
  display: flex; align-items: center; gap: 10px;
  border-top: 1px solid var(--line); padding-top: 16px;
}
.status-address code { flex: 1; font-size: 16px; font-weight: 600; letter-spacing: 0.2px; }
.copy {
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 9px;
  padding: 8px 15px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.copy:hover { border-color: var(--accent); }
.copy.copied { color: var(--accent); border-color: var(--accent); }

.section { padding: 30px 0 20px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 22px; }
.section-head h2 { font-size: 26px; font-weight: 800; margin: 0; }
.section-head a { color: var(--accent); font-weight: 700; font-size: 14.5px; }

.news-grid { display: grid; gap: 16px; }
@media (min-width: 720px) { .news-grid.teaser { grid-template-columns: repeat(3, 1fr); } }
.news-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.news-item .news-date { color: var(--muted); font-size: 13px; font-weight: 600; }
.news-item h3 { font-size: 19px; font-weight: 800; margin: 8px 0 10px; }
.news-item p { margin: 0; color: var(--text-soft); white-space: pre-wrap; }
.news-item.clamp p {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.steps { padding: 34px 0 70px; }
.steps h2 { font-size: 26px; font-weight: 800; margin: 0 0 24px; }
.step-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
@media (min-width: 720px) { .step-list { grid-template-columns: repeat(3, 1fr); } }
.step-list li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.step-num {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(var(--accent-rgb), 0.12); color: var(--accent);
  font-weight: 800; font-size: 15px; margin-bottom: 14px;
}
.step-list h3 { font-size: 18px; font-weight: 700; margin: 0 0 8px; }
.step-list p { margin: 0; color: var(--muted); font-size: 15px; }

.page-head { padding: 56px 0 8px; }
.offer-card { padding: 28px 30px; }
.page-head + .section { padding-top: 8px; }
.page-head h1 { font-size: clamp(30px, 5vw, 44px); font-weight: 800; margin: 0 0 8px; }
.page-head p { color: var(--muted); margin: 0; }

.auth, .profile { display: flex; justify-content: center; align-items: flex-start; padding: 60px 0; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px;
  width: 100%;
}
.auth .card { max-width: 430px; padding: 34px; }
.card h1 { font-size: 26px; font-weight: 800; margin: 8px 0 22px; }

.form { display: grid; gap: 17px; }
.form label { display: grid; gap: 7px; font-size: 14px; font-weight: 600; }
.optional { color: var(--muted); font-weight: 500; }
.form input, .form select, .form textarea {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font: inherit;
}
.form textarea { resize: vertical; min-height: 120px; }
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18);
}
.form small { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.form input:disabled, .form textarea:disabled,
.admin-field input:disabled, .u-edit input:disabled {
  opacity: 0.5; cursor: not-allowed; background: var(--surface-2);
}
.btn {
  background: var(--grad); color: #fff;
  border: none; border-radius: var(--radius-sm);
  padding: 13px; font: inherit; font-weight: 800; font-size: 15px;
  cursor: pointer; margin-top: 2px;
  box-shadow: 0 8px 22px rgba(var(--accent-rgb), 0.32);
  transition: filter 0.18s ease, box-shadow 0.2s ease, transform 0.18s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.btn:hover:not(:disabled) { filter: brightness(1.06); box-shadow: 0 10px 26px rgba(var(--accent-rgb), 0.42); transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: default; box-shadow: none; }
.form-message { margin: 0; font-size: 14px; min-height: 1px; font-weight: 600; }
.form-message.error { color: var(--danger); }
.form-message.success { color: var(--accent); }
.card-foot { margin: 22px 0 0; color: var(--muted); font-size: 14px; }
.card-foot a { color: var(--accent); font-weight: 700; }
.card-foot + .card-foot { margin-top: 6px; }

.profile-card { max-width: 480px; }
.profile-top { display: flex; flex-direction: column; gap: 1px; line-height: 1.25; margin-bottom: 18px; transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.2s ease; }
.profile-top h1 { margin: 0; font-size: 26px; }
.profile-top .account-status { font-size: 14px; margin: 0; }
.profile-top p, .profile-top .muted { margin: 1px 0; line-height: 1.25; }
.game-stats { line-height: 1.25; }
.game-stats p, .game-stats li, .game-stats .muted { margin: 1px 0; }
.profile-uuid { color: var(--muted); font-size: 13px; margin: 0 0 26px; word-break: break-all; }
.skin-block { display: grid; gap: 24px; }
@media (min-width: 560px) { .skin-block { grid-template-columns: 150px 1fr; align-items: start; } }
.skin-preview {
  background: var(--bg); border: 1px solid var(--line); border-radius: 14px;
  min-height: 150px; display: flex; align-items: center; justify-content: center; padding: 16px;
}
.skin-preview img { width: 100%; max-width: 120px; image-rendering: pixelated; }
.skin-empty { color: var(--muted); font-size: 14px; }

.admin-toggle {
  margin-top: 30px; color: var(--muted); font-weight: 600; font-size: 13px;
  background: none; border: none; cursor: pointer; padding: 0;
}
.admin-toggle:hover { color: var(--text); }
.admin-panel { margin-top: 0; }
.admin-panel[hidden] { display: none; }

.footer {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding: 26px max(var(--page-gutter), calc((100% - var(--page-max)) / 2));
  display: flex; flex-wrap: wrap; gap: 8px 20px;
  justify-content: space-between; font-size: 14px;
  flex-shrink: 0;
}
.footer-muted { color: var(--muted); }

.empty-state { color: var(--muted); padding: 40px 0; text-align: center; }

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

@media (max-width: 640px) {
  :root { --page-gutter: 16px; }
  .topbar { gap: 14px; padding-block: 12px; }
  .nav a { padding: 8px 9px; }
}

.admin-card { max-width: 100%; margin-bottom: 22px; }
.admin-list { display: grid; gap: 12px; }

.admin-post {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px;
}
.admin-post .news-date { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.admin-post h4 { margin: 4px 0 0; font-size: 16px; font-weight: 700; }
.admin-post p { margin: 8px 0 0; color: var(--text-soft); white-space: pre-wrap; }

.icon-btn {
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted);
  border-radius: 9px; padding: 7px 12px; font: inherit; font-size: 13px; font-weight: 700;
  cursor: pointer; flex: 0 0 auto;
}
.icon-btn:hover { color: var(--danger); border-color: var(--danger); }

.admin-user {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 16px;
}
.admin-user .u-main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 180px; }
.admin-user .u-name { font-weight: 700; }
.admin-user .u-created { color: var(--muted); font-size: 12px; }
.admin-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin-controls input, .admin-controls select {
  background: var(--bg); border: 1px solid var(--line); border-radius: 9px;
  padding: 8px 10px; color: var(--text); font: inherit; font-size: 14px;
}
.admin-controls input { width: 130px; }
.admin-controls input:focus, .admin-controls select:focus {
  outline: none; border-color: var(--accent);
}
.save-btn {
  background: var(--accent); color: var(--accent-ink); border: none; border-radius: 9px;
  padding: 8px 14px; font: inherit; font-weight: 700; font-size: 13px; cursor: pointer;
}
.save-btn:hover { background: var(--accent-hover); }
.u-saved { color: var(--accent); font-size: 12.5px; font-weight: 700; }

.servers-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .servers-grid { grid-template-columns: repeat(2, 1fr); } }
.server-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px;
}
.server-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.server-name { font-weight: 800; font-size: 18px; }
.server-players { font-weight: 800; font-size: 22px; margin-bottom: 14px; }
.server-players span { color: var(--muted); font-weight: 600; font-size: 14px; }

.field-row { display: flex; gap: 14px; flex-wrap: wrap; }
.field-row > label { flex: 1 1 160px; margin: 0; min-width: 0; }
.field-row > label:has(input[type="number"]) { flex: 1 1 140px; }
.field-row > label.field-wide { flex: 3 1 260px; }
.field-row > label.field-sm { flex: 0 1 140px; }
.field-row-top { align-items: flex-start; }
.form .field-row { margin-bottom: 0; }

.admin-server {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 16px; display: grid; gap: 10px;
}
.admin-server .srv-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.admin-server input {
  background: var(--bg); border: 1px solid var(--line); border-radius: 9px;
  padding: 8px 10px; color: var(--text); font: inherit; font-size: 14px;
}
.admin-server input:focus { outline: none; border-color: var(--accent); }
.admin-server .srv-name { flex: 1 1 160px; }
.admin-server .srv-addr { flex: 1 1 180px; }
.admin-server .srv-host { flex: 1 1 140px; }
.admin-server .srv-port, .admin-server .srv-order { width: 90px; }

.form input.valid { border-color: var(--online); }
.form input.invalid { border-color: var(--danger); }
.form input.valid:focus { box-shadow: 0 0 0 3px rgba(var(--online-rgb), 0.2); }
.form input.invalid:focus { box-shadow: 0 0 0 3px rgba(255, 92, 104, 0.18); }
.form small.field-error { color: var(--danger); font-weight: 600; }
.form small.field-error:empty { display: none; }
.form small.field-ok { color: var(--online); font-weight: 600; }
.form small.field-ok:empty { display: none; }

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--text) !important;
  -webkit-box-shadow: 0 0 0 1000px var(--bg) inset !important;
  caret-color: var(--text);
  transition: background-color 600000s 0s, color 600000s 0s;
}

.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.topbar-actions .account { margin-left: 0; }

.theme-toggle {
  width: 38px; height: 38px; flex-shrink: 0;
  border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text);
  display: grid; place-items: center; cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.theme-toggle:hover { border-color: var(--accent); transform: translateY(-1px); }
.theme-toggle:active { transform: translateY(0); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .i-moon { display: none; }
:root[data-theme="light"] .theme-toggle .i-sun { display: none; }
:root[data-theme="light"] .theme-toggle .i-moon { display: block; }

.card, .server-card, .news-item, .step-list li, .upload-card, .model-panel,
.admin-post, .admin-user, .admin-server, .account-card, .game-stats {
  transition: background-color 0.3s ease, border-color 0.2s ease,
    transform 0.18s ease, box-shadow 0.2s ease;
}
.server-card:hover, .server-show:hover, .news-item:hover, .step-list li:hover, .upload-card:hover, .profile-top:hover, .game-stats:hover, .play-step:hover {
  transform: translateY(-3px);
  border-color: rgba(var(--accent-rgb), 0.45);
  box-shadow: var(--shadow);
}
.btn, .btn-solid, .btn-ghost, .save-btn, .copy, .icon-btn {
  transition: transform 0.12s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:active, .btn-solid:active, .save-btn:active { transform: translateY(1px) scale(0.995); }
.account-card:hover { border-color: rgba(var(--accent-rgb), 0.4); }

@keyframes reveal {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
.hero, .section, .steps, .page-head, .card, .dash-grid {
  animation: reveal 0.5s ease both;
}
.section:nth-of-type(2) { animation-delay: 0.06s; }
.section:nth-of-type(3) { animation-delay: 0.12s; }
.steps { animation-delay: 0.16s; }
.admin-panel:not([hidden]) { animation: reveal 0.5s ease both; }
.admin-panel .card { animation: none; }

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}
.status-dot.online { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(var(--online-rgb), 0.18); }
  50% { box-shadow: 0 0 0 7px rgba(var(--online-rgb), 0.08); }
}

.dash { padding-top: 40px; padding-bottom: 64px; }
.dash-grid { display: grid; grid-template-columns: 320px 1fr; gap: 28px; align-items: start; }
@media (max-width: 820px) { .dash-grid { grid-template-columns: 1fr; } }

.model-panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(var(--accent-rgb), 0.16), transparent 60%),
    var(--surface);
  min-height: 440px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 18px; overflow: hidden;
}
#skin-canvas { display: block; max-width: 100%; flex: 1 1 auto; cursor: grab; }
#skin-canvas:active { cursor: grabbing; }
.model-hint {
  text-align: center; color: var(--muted); font-size: 12px; margin: 10px 0 4px;
}

.dash-side { display: flex; flex-direction: column; gap: 18px; }
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dash-head h1 { margin: 0; font-size: 30px; }
.dash-user { display: flex; align-items: center; gap: 12px; }
.dash-name { font-size: 24px; font-weight: 800; }
.badge {
  padding: 4px 12px; border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.14); color: var(--accent);
  font-weight: 700; font-size: 13px;
}
.dash-uuid {
  color: var(--muted); font-size: 12.5px;
  font-family: ui-monospace, "SF Mono", monospace; word-break: break-all;
}
.upload-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .upload-cards { grid-template-columns: 1fr; } }
.upload-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px;
  display: flex; flex-direction: column; gap: 12px;
}
.upload-card h3 { margin: 0; font-size: 16px; }
.upload-card .form { gap: 12px; }
.upload-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.upload-actions .btn { flex: 1 1 auto; }
.upload-actions .btn-ghost { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; text-align: center; }

.info-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
@media (max-width: 560px) { .info-cards { grid-template-columns: 1fr; } }

.info-list { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.info-list > div { display: flex; justify-content: flex-start; gap: 8px; align-items: baseline; }
.info-list dt::after { content: ":"; }
.info-list dt { color: var(--muted); font-size: 13.5px; }
.info-list dd { margin: 0; font-weight: 600; text-align: right; word-break: break-word; }

.status-label {
  font-size: 12px; font-weight: 700; vertical-align: middle; margin-left: 6px;
  background: transparent; padding: 0;
}
.status-label.on { background: rgba(var(--accent-rgb), 0.14); color: var(--accent); }
.upload-card h3 { display: flex; align-items: center; gap: 4px; }

.hero {
  text-align: left;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
  padding: 64px 0 48px;
}
.hero::before {
  background: radial-gradient(closest-side, rgba(var(--accent-rgb), 0.22), transparent 70%),
              radial-gradient(closest-side, rgba(255, 90, 60, 0.16), transparent 70%);
}
.hero-copy { max-width: 640px; }
.hero .lede { margin: 0 0 28px; }
.hero-actions { justify-content: flex-start; }
.hero-figure { position: relative; display: grid; place-items: center; min-height: 380px; }
.hero-figure::before {
  content: ""; position: absolute; inset: 12% 14%;
  background: var(--grad); filter: blur(64px); opacity: 0.3; border-radius: 44%;
}
#hero-canvas { position: relative; display: block; max-width: 100%; cursor: grab; }
#hero-canvas:active { cursor: grabbing; }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 52px; }
  .hero .lede { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .stats { justify-content: center; }
  .hero-figure { display: none; }
}

.stats { display: flex; gap: 30px; margin-top: 30px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat b {
  font-size: 30px; font-weight: 800; line-height: 1.1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat span { color: var(--muted); font-size: 13px; margin-top: 3px; }

.servers-show { display: grid; gap: 18px; }
.server-show {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 30px;
  transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.server-show::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--grad);
}
.server-show-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.server-show-name {
  margin: 0; line-height: 1; font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; letter-spacing: -0.02em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.server-show-players {
  margin: 8px 0 12px; color: var(--muted); font-size: 13.5px;
  text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700;
}
.server-show-players b { color: var(--accent); font-size: 15px; }
.server-show-desc { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.65; max-width: 780px; }

.admin-tabs {
  display: inline-flex; gap: 6px; padding: 5px; margin-bottom: 14px; flex-wrap: wrap;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px;
}
.admin-tab {
  padding: 9px 20px; border: none; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--muted); font: inherit; font-weight: 700; font-size: 14px;
  transition: background 0.15s ease, color 0.15s ease;
}
.admin-tab.active { background: var(--grad); color: #fff; box-shadow: 0 6px 16px rgba(var(--accent-rgb), 0.3); }
.admin-tab:not(.active):hover { color: var(--text); }
.admin-panel[hidden] { display: none; }
.admin-count { color: var(--muted); font-weight: 600; font-size: 15px; }

.group-tag { font-weight: 700; font-size: 13px; display: inline-block; color: var(--muted); }
.dash-user .group-tag { font-size: 14px; }

.chk-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form label.chk, .chk { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; color: var(--text); font-weight: 600; }
.chk input, .form label.chk input { width: auto; margin: 0; accent-color: var(--accent); width: 17px; height: 17px; }
.form input[type="color"] {
  width: 44px; height: 34px; padding: 2px; border-radius: 8px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--line);
}
.group-preview-wrap {
  display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px;
  padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.group-preview-wrap .group-tag { font-size: 16px; }

.srv-desc {
  width: 100%; margin-top: 10px; min-height: 60px; resize: vertical;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--text); font: inherit; font-size: 14px; padding: 10px 12px;
}

.admin-group-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px;
}
.ag-info { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ag-info .group-tag { font-size: 17px; }
.ag-meta { color: var(--muted); font-size: 13px; }
.ag-actions { display: flex; gap: 8px; }
.u-group { margin: 2px 0; }

h1, .hero h1, .server-show-name, #admin-root h1, .modal-title {
  font-family: "Unbounded", "Onest", system-ui, sans-serif;
  letter-spacing: -0.02em;
}

.toast-wrap {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  z-index: 200; display: flex; flex-direction: column; gap: 10px;
  width: min(420px, calc(100vw - 32px)); pointer-events: none;
}
.toast {
  pointer-events: auto; cursor: pointer; position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  opacity: 0; transform: translateY(14px); transition: opacity 0.22s ease, transform 0.22s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.hide { opacity: 0; transform: translateY(14px); }
.toast-icon {
  width: 26px; height: 26px; flex: none; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
}
.toast-success .toast-icon { background: var(--online); }
.toast-error .toast-icon { background: var(--danger); }
.toast-icon svg { width: 15px; height: 15px; }
.toast-msg { font-size: 14.5px; font-weight: 600; color: var(--text); }
.toast-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; transform-origin: left; }
.toast-success .toast-bar { background: var(--online); }
.toast-error .toast-bar { background: var(--danger); }
.toast.run .toast-bar { animation: toast-bar linear forwards; }
@keyframes toast-bar { from { transform: scaleX(1); } to { transform: scaleX(0); } }

.info-block {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; margin: 4px 0 18px;
}
.info-block .ib-name { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.info-block .dash-name { font-size: 26px; font-weight: 800; }
.info-block .group-tag { font-size: 15px; }
.info-block .ib-uuid {
  margin-top: 10px; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 12.5px; color: var(--muted); letter-spacing: 0.02em; word-break: break-all;
}
.info-block .ib-role {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 4px;
  font-size: 12px; font-weight: 700; color: var(--accent);
}

.btn-danger { transition: filter 0.18s ease, box-shadow 0.2s ease, transform 0.18s ease, background-color 0.2s ease, border-color 0.2s ease;
  background: var(--danger); color: #fff; border: none; border-radius: var(--radius-sm);
  padding: 13px; font: inherit; font-weight: 800; font-size: 15px; cursor: pointer;
  box-shadow: 0 8px 22px rgba(226, 59, 70, 0.28);
}
.btn-danger:hover:not(:disabled) { filter: brightness(1.08); box-shadow: 0 10px 26px rgba(226, 59, 70, 0.4); transform: translateY(-1px); }
.btn-danger:active:not(:disabled) { transform: translateY(1px); }
.btn-danger:disabled { opacity: 0.55; cursor: default; box-shadow: none; }
.upload-actions .btn, .upload-actions .btn-danger { flex: 1; }
.dash-logout { margin-top: 18px; }
.dash-logout .btn-danger { width: 100%; }

.srv-icon {
  width: 56px; height: 56px; flex: none; border-radius: 12px; object-fit: contain;
}
.server-show { display: flex; gap: 18px; align-items: flex-start; }
.server-show-body { flex: 1; min-width: 0; }
.server-show-actions { margin-top: 14px; }
.srv-tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 0; }
.srv-tag {
  font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.14); color: var(--accent);
}
.srv-tag.plain { background: var(--surface-2); color: var(--muted); }

.modal-overlay {
  position: fixed; inset: 0; z-index: 210; display: grid; place-items: center; padding: 20px;
  background: rgba(6, 7, 10, 0.62); opacity: 0; transition: opacity 0.2s ease;
}
.modal-overlay.show { opacity: 1; }
.modal {
  width: min(640px, 100%); max-height: 88vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 26px 28px;
  transform: translateY(12px); transition: transform 0.2s ease;
}
.modal-overlay.show .modal { transform: translateY(0); }
.modal-head { display: flex; align-items: center; gap: 14px; }
.modal-head:has(.modal-title:empty) { margin-bottom: 0; padding-bottom: 0; border: 0; }
.modal-title:empty { display: none; }
.modal-head .srv-icon { width: 48px; height: 48px; }
.modal-title { margin: 0; font-size: 26px; font-weight: 800; }
.modal-close {
  margin-left: auto; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text); cursor: pointer; font-size: 18px; line-height: 1;
}
.modal-meta { display: flex; gap: 22px; flex-wrap: wrap; margin: 18px 0; }
.modal-meta div { display: flex; flex-direction: column; }
.modal-meta b { font-size: 18px; font-weight: 800; }
.modal-meta span { font-size: 12px; color: var(--muted); margin-top: 2px; }
.modal-desc { color: var(--muted); font-size: 15px; line-height: 1.65; margin: 0 0 18px; }
.modal-players h4 { margin: 0 0 12px; font-size: 18px; font-weight: 800; }
.player-search { margin-bottom: 12px; }
.player-search .admin-search-input { width: 100%; }
.player-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 720px) { .player-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .player-grid { grid-template-columns: 1fr; } }
.player-card {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; min-width: 0;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px;
}
.player-card-head { width: 38px; height: 38px; border-radius: 10px; flex: none; }
.player-card-info { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.player-card-name-row { display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: wrap; }
.player-card-name { font-weight: 700; font-size: 14px; color: var(--text); }
.player-card-status { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; }
.player-pager:empty { display: none; }

.hero-visual {
  display: flex; gap: 6px; align-items: flex-end; justify-content: center;
}
.hero-art {
  display: block; width: auto; height: auto;
  filter: drop-shadow(0 16px 26px rgba(0, 0, 0, 0.4));
}
.hero-art-1 { height: 330px; }
.hero-art-2 { height: 150px; }
.hero-art-3 { height: 175px; margin-right: -55px; }
@media (max-width: 720px) {
  .hero-art-1 { height: 240px; }
  .hero-art-2 { height: 112px; }
  .hero-art-3 { height: 130px; }
}
@media (max-width: 480px) {
  .hero-art-1 { height: 180px; }
  .hero-art-2 { height: 86px; }
  .hero-art-3 { height: 98px; }
}

.admin-card-title { margin: 0 0 16px; font-size: 18px; font-weight: 800; }
.pack-resync-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 14px; }
.pack-resync-status { opacity: 0; transition: opacity 0.5s ease; }
.pack-resync-status.is-visible { opacity: 1; }
.admin-section-title { margin: 26px 0 12px; font-size: 15px; font-weight: 800; color: var(--muted); }
.admin-panel > .admin-section-title:first-child { margin-top: 0; }
.admin-panel[data-panel="users"] > .admin-section-title,
.admin-panel[data-panel="logs"] > .admin-section-title { color: var(--text); font-size: 18px; }
.admin-hint { margin: 0 0 16px; font-size: 13px; color: var(--muted); line-height: 1.55; }

.chk-inline { flex-direction: row; align-items: center; gap: 8px; }

.color-editor { display: flex; gap: 22px; flex-wrap: wrap; }
.color-field { display: flex; flex-direction: column; gap: 8px; }
.color-pick { display: flex; align-items: center; gap: 8px; }
.color-pick input[type="color"] {
  width: 44px; height: 34px; padding: 0; border: 1px solid var(--line);
  border-radius: 9px; background: var(--surface-2); cursor: pointer;
}
.hex-input {
  width: 92px; text-transform: uppercase;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 13px;
}

.admin-row-title {
  font-size: 12px; font-weight: 800; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px;
}
.admin-field { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 120px; }
.admin-field-label { font-size: 12px; font-weight: 700; color: var(--muted); }
.u-badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 800;
  padding: 3px 9px; border-radius: 999px; background: rgba(var(--accent-rgb), 0.14); color: var(--accent);
}
.u-edit { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.u-edit .field-row { gap: 12px; }
.u-actions { display: flex; gap: 10px; }
.u-actions .btn-danger { padding: 10px 16px; font-size: 14px; }

.admin-field input, .admin-field select, .admin-field textarea,
.admin-server input, .admin-server select, .admin-server textarea,
.u-edit input, .u-edit select, .u-edit textarea {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 13px; color: var(--text); font: inherit; font-size: 14px; width: 100%;
}
.admin-field textarea, .admin-server textarea { min-height: 70px; resize: vertical; }
.admin-field input:focus, .admin-field select:focus, .admin-field textarea:focus,
.admin-server input:focus, .admin-server textarea:focus,
.u-edit input:focus, .u-edit select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.16);
}

input[type="file"] { font: inherit; color: var(--muted); font-size: 13px; }
input[type="file"]::file-selector-button {
  font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; margin-right: 12px;
  padding: 9px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text); transition: background 0.15s ease, border-color 0.15s ease;
}
input[type="file"]::file-selector-button:hover { background: var(--surface); border-color: var(--accent); color: var(--accent); }

.color-editor { display: flex; gap: 28px; flex-wrap: wrap; align-items: flex-start; }
.color-field { display: flex; flex-direction: column; gap: 10px; }
.color-pick { display: flex; align-items: center; gap: 10px; }
.color-pick input[type="color"] {
  width: 46px; height: 36px; padding: 2px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--surface-2); cursor: pointer; flex: none;
}
.hex-input {
  width: 100px; text-transform: uppercase; text-align: center;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 8px; color: var(--text);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 13px;
}
.hex-input:focus { outline: none; border-color: var(--accent); }

.srv-icon-fallback {
  display: grid; place-items: center; color: var(--muted); font-size: 22px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.modal .srv-icon-fallback { font-size: 20px; }

.dash-name { font-family: "Unbounded", "Onest", system-ui, sans-serif; }
.info-block .ib-name { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.info-block .dash-name { font-size: clamp(26px, 4vw, 34px); font-weight: 800; margin: 0; }
.ib-line { margin-top: 5px; color: var(--muted); font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ib-line .group-tag { font-size: 15px; }
.ib-uuid-val { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 12.5px; color: var(--muted); word-break: break-all; }

.tex-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.tex-actions .btn, .tex-actions .btn-ghost, .tex-actions .btn-danger { flex: 1 1 0; min-width: 120px; text-align: center; }
.tex-actions .btn-ghost[hidden], .tex-actions .btn-danger[hidden] { display: none; }

.admin-user.clickable { cursor: pointer; transition: border-color 0.15s ease, transform 0.15s ease; }
.admin-user.clickable:hover { border-color: var(--accent); transform: translateY(-1px); }
.modal .u-edit { margin-top: 0; }
.modal-actions { display: flex; gap: 10px; margin-top: 6px; }
.modal-actions > .btn, .modal-actions > .btn-ghost, .modal-actions > .btn-danger { flex: 1; }
a.btn, a.btn-ghost, a.btn-danger, a.btn-solid {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; box-sizing: border-box; text-align: center;
}

.footer {
  display: flex; flex-direction: row; justify-content: space-between; align-items: flex-end;
  text-align: left; gap: 28px; flex-wrap: wrap;
}
.footer-left { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.footer-social { display: flex; gap: 12px; align-items: center; }
.footer-copy-row { color: var(--text); font-weight: 700; font-size: 14px; }
.footer-copy-row .footer-copy { color: var(--muted); font-weight: 500; margin-left: 4px; }
.footer-right { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.offer-card { width: 100%; }
.offer-note {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; margin-bottom: 26px;
  border-radius: 12px; background: rgba(var(--accent-rgb), 0.09);
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  color: var(--text); font-size: 14px; font-weight: 600; line-height: 1.6;
}
.offer-note i { color: var(--accent); margin-top: 2px; flex: none; }
.offer-h {
  font-size: 17px; font-weight: 800; margin: 28px 0 12px; color: var(--text);
  font-family: "Unbounded", "Onest", system-ui, sans-serif; letter-spacing: -0.01em;
}
.offer-h:first-of-type { margin-top: 0; }
.offer-p { color: var(--muted); font-size: 14.5px; line-height: 1.75; margin: 0 0 10px; }
.offer-p b { color: var(--text); font-weight: 700; }
.offer-list { margin: 4px 0 14px; padding-left: 20px; color: var(--muted); font-size: 14.5px; line-height: 1.75; }
.offer-list li { margin-bottom: 6px; }
.offer-list b { color: var(--text); font-weight: 700; }
.offer-link {
  font-weight: 800; text-decoration: none;
  background-image: linear-gradient(135deg, #8b7bff, #5865f2);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  transition: background-image 0.16s ease;
}
.offer-link:hover { background-image: linear-gradient(135deg, #a99bff, #7c86ff); }
.footer-offer {
  color: var(--muted); font-size: 13px; font-weight: 700; text-decoration: none;
  padding: 4px 2px;
  transition: color 0.16s ease;
}
.footer-offer:hover { color: var(--text); }
.footer-disclaimer {
  color: var(--muted); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase;
  font-weight: 700; max-width: 420px; line-height: 1.6; text-align: right;
}
@media (max-width: 640px) {
  .footer { flex-direction: column; align-items: center; text-align: center; }
  .footer-left { align-items: center; }
  .footer-right { align-items: center; }
  .footer-disclaimer { text-align: center; }
}
.footer-discord {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px;
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text); text-decoration: none;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.footer-discord i { font-size: 16px; }
.footer-discord:hover {
  background: #5865F2; border-color: #5865F2; color: #fff;
  box-shadow: 0 8px 22px rgba(88, 101, 242, 0.4);
}

body { animation: page-in 0.3s ease both; }
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { body { animation: none; } }

.admin-user { display: flex; align-items: center; gap: 14px; }
.u-chevron { margin-left: auto; color: var(--muted); font-size: 14px; }
.admin-user.clickable:hover .u-chevron { color: var(--accent); }
.icon-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.srv-icon-box .srv-icon { width: 48px; height: 48px; }
.icon-controls input[type="file"] { flex: 1 1 200px; }

* { scrollbar-width: thin; scrollbar-color: var(--surface-2) transparent; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-button,
::-webkit-scrollbar-button:vertical:start:decrement,
::-webkit-scrollbar-button:vertical:end:increment,
::-webkit-scrollbar-button:vertical:start:increment,
::-webkit-scrollbar-button:vertical:end:decrement,
::-webkit-scrollbar-button:horizontal:start:decrement,
::-webkit-scrollbar-button:horizontal:end:increment { display: none; width: 0; height: 0; background: transparent; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-track-piece { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--surface-2); border: 3px solid transparent;
  background-clip: padding-box; border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(var(--accent-rgb), 0.75); background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }
.modal { scrollbar-gutter: stable; }
.modal::-webkit-scrollbar-track,
.modal::-webkit-scrollbar-track-piece { margin: 24px 0; }

.dash-side { gap: 14px; }
.info-block { padding: 18px 20px; margin: 0; }
.info-block .ib-line { margin-top: 4px; }
.info-cards { margin-top: 0; }
.upload-card { padding: 16px; gap: 10px; }
.upload-card .form small { min-height: 40px; display: block; }
.dash-logout { margin-top: 6px; }
.chk { white-space: nowrap; }

.server-show { align-items: center; }
.server-show .srv-icon { order: 2; width: clamp(120px, 13vw, 168px); height: clamp(120px, 13vw, 168px); border-radius: 26px; align-self: center; }
.server-show .srv-icon-fallback { font-size: 34px; }
.server-show-body { order: 1; }

#admin-users { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 960px) { #admin-users { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { #admin-users { grid-template-columns: 1fr; } }
#admin-game-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 960px) { #admin-game-groups { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { #admin-game-groups { grid-template-columns: 1fr; } }
.admin-user { gap: 12px; }
.admin-user .u-main { align-items: center; }
.u-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-user .u-chevron { display: none; }
.admin-user.clickable { position: relative; padding-right: 34px; }
.admin-user.clickable::after {
  content: "\f054"; font-family: "Font Awesome 6 Free"; font-weight: 900;
  position: absolute; top: 16px; right: 16px; color: var(--muted); font-size: 12px;
}
.admin-user.clickable:hover::after { color: var(--accent); }

.nav a.nav-active { color: var(--accent); }
.nav a.nav-active {
  position: relative;
  text-shadow: 0 0 18px rgba(var(--accent-rgb), 0.55);
}
.nav a.nav-active::after {
  content: ""; position: absolute; left: 50%; bottom: 3px; transform: translateX(-50%);
  width: 22px; height: 3px; border-radius: 3px; background: var(--grad);
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.7);
}
.info-block.card-glow {
  border-color: rgba(var(--accent-rgb), 0.5);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.35), 0 12px 40px rgba(var(--accent-rgb), 0.18);
}

.server-modal { padding: 0; }
.modal-close-float { position: absolute; top: 14px; right: 14px; z-index: 3; }
.server-banner {
  position: relative; display: flex; align-items: center; gap: 18px; padding: 26px 28px;
  border-radius: 20px 20px 0 0;
  background:
    radial-gradient(130% 150% at 18% 0%, rgba(var(--accent-rgb), 0.32), transparent 62%),
    var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.server-banner .banner-icon { width: 82px; height: 82px; border-radius: 20px; flex: none; }
.server-banner .banner-icon.srv-icon-fallback { font-size: 34px; }
.server-banner .modal-title { margin: 0 0 8px; }
.server-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 20px 24px 6px; }
@media (max-width: 560px) { .server-stats { grid-template-columns: repeat(2, 1fr); } }
.srv-stat {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px 10px;
}
.srv-stat i { font-size: 20px; color: var(--accent); margin-bottom: 3px; }
.srv-stat b { font-size: 15px; font-weight: 800; }
.srv-stat span { font-size: 11.5px; color: var(--muted); }
.server-modal .modal-desc { padding: 12px 24px 0; margin: 0; }
.server-modal .modal-players { padding: 16px 24px 24px; }

.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--muted); font-weight: 700; font-size: 14.5px; text-decoration: none;
  margin: 24px 0 4px; transition: color .15s ease, gap .15s ease;
}
.back-link:hover { color: var(--accent); gap: 11px; }

.server-detail { overflow: hidden; padding: 0; }
.server-detail .server-banner { border-radius: var(--radius) var(--radius) 0 0; }
.server-detail-title { margin: 0 0 8px; font-size: clamp(24px, 4vw, 34px); font-weight: 800; }
.server-detail-desc { padding: 14px 24px 0; margin: 0; color: var(--text-soft); font-size: 15.5px; line-height: 1.65; }
.server-detail-players { padding: 18px 24px 24px; }

.news-article { padding: 32px; max-width: 100%; }
.news-article-title { font-size: clamp(26px, 4.5vw, 40px); font-weight: 800; margin: 0 0 12px; line-height: 1.2; }
.news-article-meta { color: var(--muted); font-size: 14px; font-weight: 600; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.news-article-body { font-size: 16px; line-height: 1.75; color: var(--text-soft); white-space: pre-wrap; }

.news-grid.teaser .news-item { display: flex; flex-direction: column; }
.news-item.clamp h3 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

html { scrollbar-gutter: stable; }
body.page-leaving { opacity: 0; transition: opacity 0.18s ease; }

.forum-cats, .forum-threads, .forum-posts { display: flex; flex-direction: column; gap: 12px; }
.forum-cat, .forum-thread {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  text-decoration: none; color: var(--text); transition: border-color .15s ease, transform .15s ease;
}
.forum-cat:hover, .forum-thread:hover { border-color: var(--accent); transform: translateY(-1px); }
.forum-cat h3 { margin: 0 0 4px; font-size: 18px; }
.forum-cat-desc { margin: 0; color: var(--muted); font-size: 14px; }
.forum-cat-last { margin: 6px 0 0; color: var(--muted); font-size: 12.5px; }
.forum-cat-count { flex: none; text-align: center; color: var(--muted); font-size: 12px; min-width: 70px; }
.forum-cat-count b { display: block; font-size: 20px; color: var(--text); }
.forum-thread-title { font-weight: 700; font-size: 16px; }
.forum-thread-meta { color: var(--muted); font-size: 13px; margin-top: 4px; }
.forum-back { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; font-weight: 600; margin-bottom: 14px; }
.forum-back:hover { color: var(--accent); }
.forum-head { margin-bottom: 16px; }
.forum-head h2 { margin: 0 0 6px; font-size: 26px; }
.forum-head p { margin: 0; color: var(--muted); }
.forum-form { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.forum-note { color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.forum-note a { color: var(--accent); font-weight: 700; }
.forum-post { display: flex; gap: 18px; align-items: flex-start; }
.forum-author { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; flex: none; width: 110px; }
.forum-author .skin-head { width: 56px; height: 56px; }
.forum-author .author-name { font-weight: 800; font-size: 14px; word-break: break-word; }
.forum-post-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.post-body { white-space: pre-wrap; line-height: 1.6; word-wrap: break-word; }
.forum-post-meta { margin-top: 12px; color: var(--muted); font-size: 12px; }
@media (max-width: 560px) { .forum-post { flex-direction: column; } .forum-author { flex-direction: row; width: auto; } }

.admin-forum-cat { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.admin-forum-cat .u-actions { flex: none; }


body.modal-open { overflow: hidden; }
body.modal-open .topbar,
body.modal-open main,
body.modal-open .footer { filter: blur(7px); transition: filter 0.25s ease; pointer-events: none; user-select: none; }
.account-card.card-glow {
  border-color: rgba(var(--accent-rgb), 0.6);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.4), 0 8px 26px rgba(var(--accent-rgb), 0.28);
}
.admin-field .chk input[type="checkbox"] { width: 17px; height: 17px; flex: none; }

.admin-item {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  padding: 14px 16px; padding-right: 34px; position: relative;
  transition: border-color .15s ease, transform .15s ease;
}
.admin-item:hover { border-color: var(--accent); transform: translateY(-1px); }
.admin-item-icon { width: 46px; height: 46px; border-radius: 13px; flex: none; }
.admin-item-main { min-width: 0; flex: 1; }
.admin-item-name { font-weight: 800; font-size: 15px; }
.admin-item-sub {
  color: var(--muted); font-size: 13px; margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.admin-item.clickable::after {
  content: "\f054"; font-family: "Font Awesome 6 Free"; font-weight: 900;
  position: absolute; top: 50%; right: 16px; transform: translateY(-50%);
  color: var(--muted); font-size: 12px;
}
.admin-item.clickable:hover::after { color: var(--accent); }

#admin-servers { display: grid; grid-template-columns: 1fr; gap: 12px; }
#admin-news-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 960px) { #admin-news-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { #admin-news-list { grid-template-columns: 1fr; } }

.forum-board { padding: 0; overflow: hidden; }
.forum-board-head {
  display: flex; align-items: center; min-height: 52px;
  padding: 0 20px; font-weight: 800; font-size: 18px;
  background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.forum-row {
  display: flex; align-items: center; gap: 16px; padding: 16px 20px;
  text-decoration: none; color: var(--text); border-bottom: 1px solid var(--line);
  transition: background .15s ease;
}
.forum-row:last-child { border-bottom: none; }
.forum-row:hover { background: var(--surface-2); }
.forum-row-icon {
  width: 44px; height: 44px; border-radius: 12px; flex: none;
  display: grid; place-items: center; background: var(--surface-2);
  color: var(--accent); font-size: 18px;
}
.forum-row:hover .forum-row-icon { background: var(--bg); }
.forum-row-main { flex: 1; min-width: 0; }
.forum-row-name { font-weight: 800; font-size: 16px; }
.forum-row-desc {
  color: var(--muted); font-size: 13px; margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.forum-row-stat { flex: none; text-align: center; color: var(--muted); font-size: 12px; min-width: 74px; }
.forum-row-stat b { display: block; font-size: 18px; color: var(--text); }
.forum-row-last {
  flex: none; width: 230px; padding: 0 16px; color: var(--muted); font-size: 13px;
  text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.forum-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.forum-new-btn { flex: none; white-space: nowrap; }
.forum-empty { padding: 26px; }
@media (max-width: 620px) {
  .forum-row-last { display: none; }
  .forum-row-stat { min-width: 60px; }
}

.dd { position: relative; display: flex; flex-direction: column; min-width: 0; }
.dd-native { display: none; }
.dd-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; min-width: 0; box-sizing: border-box;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; color: var(--text); font: inherit; text-align: left; cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.admin-field .dd-toggle, .u-edit .dd-toggle { padding: 11px 13px; font-size: 14px; }
.dd-toggle:hover:not(:disabled) { border-color: var(--muted); }
.dd-open .dd-toggle, .dd-toggle:focus-visible {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18);
}
.dd-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.dd-chevron { font-size: 11px; color: var(--muted); flex: none; transition: transform 0.2s ease, color 0.16s ease; }
.dd-open .dd-chevron { transform: rotate(180deg); color: var(--accent); }
.dd-disabled .dd-toggle { opacity: 0.55; cursor: not-allowed; background: var(--surface-2); }
.dd-menu {
  position: fixed; z-index: 260;
  display: flex; flex-direction: column; gap: 2px;
  max-height: 240px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 6px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(-8px) scale(0.97); transform-origin: top center;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}
.dd-menu.dd-menu-open { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0) scale(1); }
.dd-menu.dd-menu-up { transform-origin: bottom center; transform: translateY(8px) scale(0.97); }
.dd-menu.dd-menu-up.dd-menu-open { transform: translateY(0) scale(1); }
.dd-option {
  display: flex; align-items: center; gap: 8px; width: 100%; box-sizing: border-box;
  padding: 10px 12px; border: none; border-radius: 9px; background: transparent;
  color: var(--text); font: inherit; font-weight: 600; font-size: 14px;
  text-align: left; cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}
.dd-option.dd-active { background: var(--surface-2, rgba(255, 255, 255, 0.05)); }
.dd-option.dd-selected { color: var(--accent); }
.admin-search .dd { flex: none; min-width: 150px; }
.admin-search .dd-toggle { background: var(--surface-2); padding: 10px 14px; font-size: 14px; }
.srv-key-controls { display: flex; align-items: center; gap: 8px; }
.srv-key-input {
  flex: 1; min-width: 0; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  letter-spacing: 0.02em;
}
.srv-key-btn {
  flex: none; display: grid; place-items: center; width: 42px; height: 42px;
  padding: 0; border-radius: var(--radius-sm); font-size: 14px;
  transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
}
.srv-key-btn:hover { border-color: var(--accent); color: var(--accent); }
.srv-key-hint { color: var(--muted); font-size: 12.5px; line-height: 1.55; margin-top: 2px; }
.group-scope, .game-group-servers {
  display: flex; width: fit-content; gap: 6px; padding: 5px; margin-bottom: 14px; flex-wrap: wrap;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px;
}
.group-scope-tab, .game-group-servers .game-server-tab {
  padding: 9px 20px; border: none; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--muted); font: inherit; font-weight: 700; font-size: 14px;
  transition: background 0.15s ease, color 0.15s ease;
}
.group-scope-tab.active, .game-group-servers .game-server-tab.active {
  background: var(--grad); color: #fff; box-shadow: 0 6px 16px rgba(var(--accent-rgb), 0.3);
}
.group-scope-tab:not(.active):hover, .game-group-servers .game-server-tab:not(.active):hover { color: var(--text); }
.group-scope-panel[hidden] { display: none; }
.group-scope-panel:not([hidden]) { animation: reveal 0.35s ease both; }
.tag-hint { color: var(--muted); font-size: 12.5px; margin-top: 6px; }

.bb-mention { cursor: pointer; }

.modal-close { transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease; }
.modal-close:hover {
  background: var(--danger); color: #fff; border-color: var(--danger); transform: rotate(90deg) scale(1.05);
}

.forum-posts { gap: 16px; }
.forum-post-actions { display: flex; gap: 8px; margin: 0; flex-wrap: wrap; }
.forum-edit-wrap .forum-post-actions { align-self: stretch; margin-top: 10px; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.forum-edit-wrap { display: flex; flex-direction: column; gap: 10px; }
.forum-edit-area {
  width: 100%; min-height: 90px; resize: vertical; background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 13px;
  color: var(--text); font: inherit; font-size: 14px;
}
.forum-edit-area:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.16); }

.admin-add-btn { margin-bottom: 16px; display: inline-flex; align-items: center; gap: 8px; }
#admin-groups { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 720px) { #admin-groups { grid-template-columns: 1fr; } }
.perm-editor { display: flex; flex-direction: column; gap: 10px; }
.perm-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.perm-tab {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--muted); font-weight: 700; font-size: 13px; cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.perm-tab:hover { color: var(--text); border-color: var(--accent); }
.perm-tab.active { background: var(--grad); color: #fff; border-color: transparent; }
.perm-area {
  width: 100%; min-height: 96px; resize: vertical; background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 13px;
  color: var(--text); font: inherit; font-size: 14px;
}
.perm-area:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.16); }

.u-edit .chk input[type="checkbox"] { width: 17px; height: 17px; flex: none; }
.u-edit .chk { white-space: nowrap; }
.color-pick { flex: 1; }
.color-stops { display: flex; flex-direction: column; gap: 10px; }
.color-stop-list { display: flex; flex-wrap: wrap; gap: 10px; }
.color-stop {
  display: flex; align-items: center; gap: 6px;
  padding: 6px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--line);
  animation: reveal 0.2s ease both;
}
.color-stop input[type="color"] {
  width: 36px; height: 36px; padding: 0; border: none; border-radius: 9px;
  background: none; cursor: pointer;
}
.color-stop input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.color-stop input[type="color"]::-webkit-color-swatch { border: none; border-radius: 9px; }
.color-stop input[type="color"]::-moz-color-swatch { border: none; border-radius: 9px; }
.color-stop .hex-input { width: 96px; flex: none; }
.color-stop-remove {
  display: grid; place-items: center; width: 26px; height: 26px; flex: none;
  border: none; border-radius: 8px; background: transparent; color: var(--muted);
  cursor: pointer; font-size: 12px;
  transition: background 0.14s ease, color 0.14s ease;
}
.color-stop-remove:hover { background: rgba(var(--accent-rgb), 0.15); color: var(--accent); }
.color-stop-empty { color: var(--muted); font-size: 13px; align-self: center; }
.color-stop-bar { height: 10px; border-radius: 999px; border: 1px solid var(--line); }
.color-stop-actions { display: flex; }
.color-stop-add { font-size: 13px; padding: 8px 14px; }
.color-stop-add:disabled { opacity: 0.5; cursor: not-allowed; }
.color-pick input[type="color"] {
  width: 54px; height: 40px; padding: 0; flex: none;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); cursor: pointer;
  overflow: hidden;
}
.color-pick input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.color-pick input[type="color"]::-webkit-color-swatch { border: none; border-radius: 9px; }
.color-pick input[type="color"]::-moz-color-swatch { border: none; border-radius: 9px; }
.color-pick .hex-input { flex: 1; }
.color-field { flex: 1; min-width: 220px; }

.news-grid:not(.teaser) { grid-template-columns: 1fr; }
@media (max-width: 720px) { .news-grid:not(.teaser) { grid-template-columns: 1fr; } }
.news-item { cursor: pointer; }
.news-item h3, .forum-row-name, .admin-item-name, .u-name {
  overflow: hidden; text-overflow: ellipsis;
}

[hidden] { display: none !important; }
.info-block .ib-name { align-items: center; }
.info-block .dash-name { line-height: 1; }
.info-block .u-badge { align-self: center; }
.ib-line { display: flex; align-items: center; gap: 6px; }
.ib-line .ib-label { color: var(--muted); font-weight: 600; flex: none; }

.play-status { display: flex; align-items: center; gap: 14px; padding: 16px 20px; margin-bottom: 18px; }
.play-status i { font-size: 24px; color: var(--muted); }
.play-status.play-status-authed i { color: var(--online); }
.play-status-text { display: flex; flex-direction: column; gap: 2px; }
.play-status-text strong { font-size: 16px; }
.play-status-text span { color: var(--muted); font-size: 14px; }
.play-steps { display: flex; flex-direction: column; gap: 18px; }
.play-step { padding: 22px 24px; transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.2s ease; }
.play-step-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.play-step-head h3 { margin: 0; font-size: 20px; }
.play-step-head .step-num { flex: none; margin: 0; }
.play-step-badge {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 800; color: var(--online);
  background: rgba(var(--online-rgb), 0.14); padding: 4px 10px; border-radius: 999px;
}
.play-step p { margin: 0; color: var(--muted); line-height: 1.6; }
.play-step-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.launcher-downloads { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.btn-download {
  display: inline-flex; align-items: center; gap: 12px; padding: 12px 20px;
  border-radius: 14px; border: none; cursor: pointer; color: #fff; font: inherit; font-weight: 700;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}
.btn-download i { font-size: 22px; }
.btn-download-main { font-size: 15px; font-weight: 800; }
.btn-download-sub { font-size: 12px; opacity: 0.85; font-weight: 700; }
.btn-download-win { background: linear-gradient(135deg, #2b8ff0, #0067c0); box-shadow: 0 8px 22px rgba(0, 103, 192, 0.35); }
.btn-download-jar { background: linear-gradient(135deg, #f0932b, #d1601a); box-shadow: 0 8px 22px rgba(209, 96, 26, 0.35); }
.btn-download:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.12); }
.btn-download:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }

.sessions-hint { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.sessions-list { display: flex; flex-direction: column; gap: 10px; }
.session-item {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2);
}
.session-current { border-color: rgba(var(--online-rgb), 0.5); }
.session-icon {
  flex: none; width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 10px; background: var(--bg); color: var(--muted); font-size: 18px;
}
.session-current .session-icon { color: var(--online); }
.session-main { flex: 1; min-width: 0; }
.session-name { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.session-badge {
  font-size: 11px; font-weight: 800; color: var(--online);
  background: rgba(var(--online-rgb), 0.14); padding: 2px 8px; border-radius: 999px;
}
.session-meta { color: var(--muted); font-size: 12.5px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; }
.session-item .btn-sm { flex: none; }

.confirm-modal { display: flex; flex-direction: column; gap: 20px; }
.confirm-text { font-size: 15px; line-height: 1.6; color: var(--text); margin: 3px 0 0; }
.sessions-card { grid-column: 1 / -1; }

.logs-list { display: flex; flex-direction: column; gap: 8px; }
.log-item {
  display: flex; align-items: center; gap: 14px; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2);
}
.log-icon { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; font-size: 15px; background: var(--bg); }
.log-online { color: var(--online); }
.log-accent { color: var(--accent); }
.log-danger { color: var(--danger); }
.log-muted { color: var(--muted); }
.log-main { flex: 1; min-width: 0; }
.log-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.log-actor { font-weight: 700; font-size: 14px; }
.log-action { font-size: 12px; font-weight: 700; color: var(--muted); }
.log-detail { color: var(--muted); font-size: 13px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-time { flex: none; color: var(--muted); font-size: 12px; white-space: nowrap; }
@media (max-width: 560px) { .log-time { display: none; } }

.admin-search { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.admin-search-input {
  flex: 1; min-width: 180px; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 10px 14px; color: var(--text); font: inherit; font-size: 14px;
}
.admin-search-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.16); }
.admin-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; }
.pager-btn {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text); cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.pager-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.pager-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pager-info { font-weight: 700; font-size: 14px; color: var(--muted); min-width: 54px; text-align: center; }

.play-step-actions .btn, .play-step-actions .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  box-sizing: border-box; padding: 12px 22px; border: 1px solid transparent;
  border-radius: var(--radius-sm); font-weight: 800; font-size: 15px; line-height: 1;
  text-decoration: none; margin-top: 0;
}
.play-step-actions .btn-ghost { border-color: var(--line); }
.play-step-actions .btn:hover { filter: brightness(1.08); }
.play-step-actions .btn-ghost:hover { border-color: var(--muted); color: var(--text); }
.sessions-list { min-height: 250px; }

.forum-locked-wrap { position: relative; margin-top: 16px; }
.forum-form-blur { filter: blur(2.5px); opacity: 0.55; pointer-events: none; user-select: none; }
.forum-locked-overlay { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; }
.forum-locked-note {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 24px; font-weight: 600; color: var(--text); text-align: center;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.4);
}
.forum-locked-note a { color: var(--accent); font-weight: 700; }
.forum-locked-note a:hover { text-decoration: underline; }

.model-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; width: 100%; }
.model-actions .btn-ghost, .model-actions .btn-danger {
  width: 100%; display: inline-flex; align-items: center; justify-content: center;
  padding: 12px; border-radius: var(--radius-sm); font-weight: 800; font-size: 15px; box-sizing: border-box;
}
.model-actions .btn-ghost { border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; }
.model-actions .btn-ghost:hover { border-color: var(--muted); }

.settings-modal { display: flex; flex-direction: column; gap: 14px; }
.settings-row { display: flex; align-items: center; gap: 12px; cursor: pointer; font-size: 15px; }
.settings-row .settings-check { width: 20px; height: 20px; flex: none; cursor: pointer; accent-color: var(--accent); }

.confirm-modal .modal-actions, .twofa-modal .modal-actions { justify-content: center; }
.twofa-modal .modal-actions button { flex: none; min-width: 150px; }
.confirm-modal .modal-actions button { flex: none; min-width: 130px; }

.admin-search { max-width: 380px; }

.settings-modal { min-width: 360px; }
.settings-row { padding: 10px 0; }
.log-item .log-del { margin-left: auto; background: transparent; border: none; color: var(--muted); cursor: pointer; font-size: 15px; padding: 6px 8px; border-radius: 8px; }
.log-item .log-del:hover { color: var(--danger); background: rgba(var(--accent-rgb), 0.1); }
.admin-logs-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.admin-logs-head .admin-search { margin-bottom: 0; }
.admin-logs-head #logs-clear { flex: none; }

.forum-post-edited { margin-top: 6px; font-size: 12px; color: var(--muted); font-style: italic; }

.play-step-locked { position: relative; }
.play-step-locked > *:not(.play-lock-overlay) { filter: blur(3px); opacity: 0.5; pointer-events: none; user-select: none; }
.play-lock-overlay { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; }
.play-lock-note {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 24px; font-weight: 600; color: var(--text); text-align: center;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.4);
}
.play-lock-note a { color: var(--accent); font-weight: 700; }

.forum-author .clickable { cursor: pointer; }
.forum-author .clickable:hover { opacity: 0.85; }
.profile-mini { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.profile-mini .skin-head--lg { width: 96px; height: 96px; }
.profile-mini-name { font-family: "Unbounded", sans-serif; font-weight: 700; font-size: 20px; margin-top: 10px; }
.profile-mini .group-tag { font-size: 16px; }
.profile-mini .modal-actions { width: 100%; margin-top: 16px; }

.profile-top-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 2px; }
.profile-top-actions { display: flex; gap: 8px; flex: none; align-items: center; }
.profile-top-actions .btn-ghost,
.profile-top-actions .btn-danger,
.profile-top-actions .btn-sm {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 34px; padding: 7px 14px; font-size: 13px; font-weight: 700;
  border-radius: 10px; border: 1px solid transparent; line-height: 1.2;
  box-sizing: border-box; text-decoration: none;
}
.profile-top-actions .btn-ghost { border-color: var(--line); }
.ib-name { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.presence-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(63, 185, 80, 0.12); border: 1px solid rgba(63, 185, 80, 0.35);
  font-size: 12.5px; font-weight: 700; color: #3fb950;
}
.presence-badge.presence-in_game {
  background: rgba(46, 134, 171, 0.14); border-color: rgba(46, 134, 171, 0.4); color: #2E86AB;
}
.presence-badge.presence-in_game .presence-dot {
  background: #2E86AB; box-shadow: 0 0 6px rgba(46, 134, 171, 0.6);
}
.presence-badge.presence-offline {
  background: rgba(154, 161, 176, 0.1); border-color: rgba(154, 161, 176, 0.3); color: var(--muted);
}
.presence-badge.presence-offline .presence-dot { background: var(--muted); box-shadow: none; }
.presence-badge--lg { font-size: 14.5px; padding: 6px 14px; margin-top: 2px; }
.presence-badge--lg .presence-dot--inline { width: 10px; height: 10px; }
.profile-top-actions .btn-ghost, .profile-top-actions .btn-danger {
  padding: 8px 16px; font-size: 13px; font-weight: 700; border-radius: 10px; cursor: pointer;
  display: inline-flex; align-items: center; box-sizing: border-box;
}
.profile-top-actions .btn-ghost { border: 1px solid var(--line); background: transparent; color: var(--text); }
.profile-top-actions .btn-ghost:hover { border-color: var(--muted); }

.account-wrap { position: relative; }
.account-card { cursor: pointer; font: inherit; text-align: left; color: var(--text); }
.account-chevron { display: none; }
.account-card.open .account-chevron { transform: rotate(180deg); }
.account-menu {
  position: absolute; top: calc(100% + 8px); left: 50%;
  transform: translateX(-50%) translateY(-8px) scale(0.97);
  min-width: 240px; z-index: 60;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 8px; flex-direction: column; gap: 2px; display: flex;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
  opacity: 0; visibility: hidden; pointer-events: none; transform-origin: top center;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}
.account-wrap::after { content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 12px; }
.account-wrap:hover .account-menu {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}
.account-menu-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px;
  background: transparent; border: none; color: var(--text); font: inherit; font-weight: 600;
  font-size: 14px; text-align: left; cursor: pointer; text-decoration: none; width: 100%;
}
.account-menu-item i { width: 18px; text-align: center; color: var(--muted); }
.account-menu-item:hover { background: var(--surface-2, rgba(255, 255, 255, 0.05)); }
.account-menu-danger { color: var(--danger); }
.account-menu-danger i { color: var(--danger); }
.account-menu-danger:hover { background: rgba(var(--accent-rgb), 0.12); }

.security-card { grid-column: 1 / -1; }
.security-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 720px) { .security-grid { grid-template-columns: 1fr; } }
.security-sub { margin: 0 0 12px; font-size: 15px; font-weight: 700; color: var(--text); }
.security-divider { border-left: 1px solid var(--line); padding-left: 24px; }
@media (max-width: 720px) { .security-divider { border-left: none; padding-left: 0; border-top: 1px solid var(--line); padding-top: 18px; } }

.twofa-block { display: flex; flex-direction: column; gap: 12px; }
.twofa-hint { color: var(--muted); font-size: 13.5px; line-height: 1.5; margin: 0; }
.twofa-status { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; }
.twofa-status.twofa-on { color: var(--online); }
.twofa-qr { display: flex; justify-content: center; padding: 14px; background: #fff; border-radius: 12px; width: fit-content; margin-left: auto; margin-right: auto; }
.twofa-qr img, .twofa-qr canvas { display: block; }
.twofa-secret {
  font-family: monospace; font-size: 14px; letter-spacing: 1px; word-break: break-all;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color: var(--text);
}
.twofa-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.twofa-block .btn-ghost { border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; padding: 12px 18px; border-radius: 12px; font-weight: 700; }

.sessions-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.sessions-head h3 { margin: 0; }
.sessions-head .sessions-hint { margin: 4px 0 0; }
.sessions-head .btn-sm { flex: none; padding: 8px 16px; font-size: 13px; font-weight: 700; border-radius: 10px; cursor: pointer; align-self: flex-start; }
.modal-body { margin-top: 4px; }

.remember-row { display: flex; align-items: center; gap: 9px; cursor: pointer; font-size: 14px; color: var(--muted); margin-top: 2px; }
.remember-row input { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; flex: none; }

.bb-toolbar { display: flex; gap: 6px; margin: 6px 0 8px; }
.bb-btn {
  min-width: 34px; height: 32px; padding: 0 10px; border-radius: 8px; cursor: pointer;
  background: var(--surface-2, rgba(255,255,255,0.05)); border: 1px solid var(--line); color: var(--text);
  font-size: 14px; display: inline-flex; align-items: center; justify-content: center;
}
.bb-btn:hover { border-color: var(--accent); color: var(--accent); }
.bb-btn b, .bb-btn i, .bb-btn u { pointer-events: none; }

.forum-head-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.forum-head-actions > button {
  min-width: 160px; justify-content: center; padding: 10px 16px; font-size: 14px; font-weight: 700;
  border-radius: 12px; box-sizing: border-box; display: inline-flex; align-items: center; gap: 8px;
}
.thread-closed-tag { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--muted); }
.forum-row-name .thread-closed-tag, .forum-row-name .thread-pin-tag {
  margin: 0 0 0 8px; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: 0.03em; vertical-align: middle;
}
.forum-row-name .thread-closed-tag { background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.thread-pin-tag {
  display: inline-flex; align-items: center;
  background: rgba(var(--accent-rgb), 0.12); border: 1px solid rgba(var(--accent-rgb), 0.3); color: var(--accent);
}
.forum-row-pinned .forum-row-icon { color: var(--accent); }
.forum-rows { display: flex; flex-direction: column; }

.post-pin-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--accent); margin-bottom: 6px; }
.forum-post-pinned { border-color: rgba(var(--accent-rgb), 0.5); box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.25); }

.forum-closed-note {
  display: flex; align-items: center; gap: 10px; padding: 16px 20px; color: var(--muted);
  font-weight: 600; margin-top: 16px;
}

.post-body a { color: var(--accent); text-decoration: underline; }
.post-body strong { font-weight: 800; }

.nav-toggle {
  display: none; width: 42px; height: 42px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); cursor: pointer; font-size: 18px;
  align-items: center; justify-content: center; flex: none;
}
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .topbar .account { margin-left: 12px; }
  .topbar .nav {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 50;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 10px 16px; display: none; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
  }
  .topbar .nav.nav-open { display: flex; }
  .topbar .nav a { padding: 12px 14px; font-size: 15px; }
  .account-menu { right: 0; left: auto; transform: translateY(-8px) scale(0.97); transform-origin: top right; }
  .account-wrap:hover .account-menu { transform: translateY(0) scale(1); }
}
@media (max-width: 860px) {
  .topbar .nav a.nav-active::after {
    left: 0; bottom: auto; top: 50%;
    transform: translateY(-50%);
    width: 3px; height: 20px;
  }
  .topbar .nav a.nav-active { padding-left: 18px; }
}
@media (max-width: 560px) {
  .account .btn-ghost, .account .btn-solid { padding: 8px 12px; font-size: 13px; }
  .brand span { font-size: 17px; }
}
@media (max-width: 480px) {
  .topbar { gap: 10px; }
  .brand { min-width: 0; }
  .brand span { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-actions { gap: 8px; min-width: 0; }
  .topbar .account { margin-left: 0; gap: 8px; }
  .account .btn-ghost, .account .btn-solid {
    padding: 7px 10px; font-size: 12.5px; white-space: nowrap; flex-shrink: 0;
  }
  .theme-toggle { width: 34px; height: 34px; flex-shrink: 0; }
  .nav-toggle { flex-shrink: 0; }
}

.otp-block { max-height: 0; opacity: 0; overflow: hidden; transition: max-height 0.35s ease, opacity 0.3s ease, margin 0.3s ease; margin: 0; }
.otp-block.otp-show { max-height: 200px; opacity: 1; margin: 4px 0 6px; }
.otp-label { font-size: 13.5px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.otp-cells { display: flex; gap: 8px; }
.otp-cell {
  width: 100%; max-width: 52px; aspect-ratio: 3 / 4; text-align: center; font-size: 22px; font-weight: 800;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.otp-cell:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18); }
.otp-block.otp-complete .otp-cell { border-color: var(--online); }
.otp-block.otp-complete .otp-cell:focus { border-color: var(--online); box-shadow: 0 0 0 3px rgba(70, 216, 136, 0.22); }
.otp-block.otp-error .otp-cell { border-color: var(--danger); animation: otp-shake 0.3s ease; }
@keyframes otp-shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-4px)} 75%{transform:translateX(4px)} }

.twofa-modal { display: flex; flex-direction: column; gap: 14px; }
.twofa-step-label { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); }
.recovery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.recovery-code {
  font-family: monospace; font-size: 15px; letter-spacing: 1px; text-align: center;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 8px; color: var(--text);
}
@media (max-width: 480px) { .recovery-grid { grid-template-columns: 1fr; } }

.post-like-row { display: flex; align-items: center; gap: 14px; margin-top: 10px; flex-wrap: wrap; }
.like-btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 20px;
  border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer;
  font-weight: 700; font-size: 13.5px; transition: all 0.18s ease;
}
.like-btn:hover { border-color: var(--accent); color: var(--accent); }
.like-btn.liked { border-color: var(--accent); color: var(--accent); background: rgba(var(--accent-rgb), 0.1); }
.like-btn i { font-size: 14px; }
.like-label {
  background: none; border: none; color: var(--muted); cursor: pointer; font-size: 13px; padding: 0;
  text-align: left;
}
.like-label:hover { color: var(--text); text-decoration: underline; }

.likers-modal { display: flex; flex-direction: column; gap: 12px; padding-top: 8px; }
.likers-list { display: flex; flex-direction: column; gap: 8px; padding: 2px; }
.likers-pager { justify-content: center; }
.liker-card {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--line); cursor: pointer; transition: border-color 0.18s ease, transform 0.18s ease;
}
.liker-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.liker-card .skin-head { width: 42px; height: 42px; flex: none; }
.liker-info { display: flex; flex-direction: column; gap: 3px; }
.liker-name { font-weight: 700; font-size: 15px; }

.status-label { display: inline-flex; gap: 6px; margin-left: 8px; vertical-align: middle; }
.tex-badge { font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 999px; letter-spacing: 0.02em; text-transform: uppercase; border: 1px solid transparent; }
.tex-set { background: rgba(var(--online-rgb), 0.15); color: var(--online); }
.tex-hd { background: rgba(255, 165, 0, 0.16); color: #ffa500; }
.tex-res { background: var(--surface-2); color: var(--text); border-color: var(--line); }
.tex-no { background: rgba(var(--accent-rgb), 0.14); color: var(--danger); }

.steps-zigzag { display: flex; flex-direction: column; gap: 10px; margin: 0; align-items: stretch; }
.step-card {
  position: relative;
  display: flex; align-items: center; gap: 20px; width: 100%; padding: 24px 26px;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface);
  text-decoration: none; color: inherit;
  transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.step-card:hover { transform: translateY(-3px); border-color: rgba(var(--accent-rgb), 0.5); box-shadow: var(--shadow); }
.step-card .step-num { flex: none; }
.step-card-text h3 { margin: 0 0 6px; }
.step-card-text p { margin: 0; color: var(--muted); line-height: 1.55; }

@media (max-width: 720px) {
  .step-card { width: 100%; flex-direction: row; text-align: left; }
  .step-right { flex-direction: row; text-align: left; }
}

.thread-author-line { color: var(--muted); font-size: 14px; margin-top: 6px; }
.thread-author-name { color: var(--text); font-weight: 700; }

.forum-post-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); flex-wrap: wrap;
}
.forum-post-footer .forum-post-meta { margin: 0; }
.forum-post-foot-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.like-own { opacity: 0.55; cursor: not-allowed; }

.step-arrow { display: flex; justify-content: center; color: var(--accent); font-size: 22px; opacity: 0.7; padding: 4px 0; }

.game-stats h3 { margin: 0 0 10px; font-size: 16px; }
.game-servers { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 2px; }
.game-server-tab {
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent;
  color: var(--muted); cursor: pointer; font-weight: 700; font-size: 13px;
  transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease;
}
.game-server-tab:hover { border-color: var(--muted); color: var(--text); }
.game-server-tab.active { background: var(--grad); color: #fff; border-color: transparent; }
.game-stats-body { display: flex; flex-direction: column; gap: 0; }
.game-stats-body .ib-line { margin-top: 4px; }
.game-stats-body .ib-line:first-child { margin-top: 0; }
.game-stats-empty { color: var(--muted); font-size: 14px; }

.site-perms { display: flex; flex-direction: column; gap: 8px; }
.site-perms-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 16px; }
@media (max-width: 560px) { .site-perms-grid { grid-template-columns: 1fr; } }
.site-perm-row { display: flex; align-items: center; gap: 9px; cursor: pointer; font-size: 14px; }
.site-perm-row input { width: 17px; height: 17px; flex: none; accent-color: var(--accent); cursor: pointer; }

.group-admin-note {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; margin: 10px 0 4px;
  border-radius: 12px; background: rgba(255, 165, 0, 0.1); border: 1px solid rgba(255, 165, 0, 0.3);
  color: #ffa500; font-size: 13px; font-weight: 600; line-height: 1.5;
}
.group-admin-note i { flex: none; }

.notify-wrap { position: relative; display: flex; }
.notify-bell {
  position: relative; display: grid; place-items: center;
  width: 38px; height: 38px; flex-shrink: 0;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2);
  color: var(--text); font-size: 15px; cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.notify-bell:hover { border-color: var(--accent); color: var(--accent); }
.notify-badge {
  position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px;
  display: grid; place-items: center; border-radius: 999px;
  background: var(--grad); color: #fff; font-size: 10px; font-weight: 800;
  box-shadow: 0 3px 10px rgba(var(--accent-rgb), 0.5);
}
.notify-menu {
  position: absolute; top: calc(100% + 8px); right: 0; width: 340px; max-width: 86vw; z-index: 80;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(-8px) scale(0.97); transform-origin: top right;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}
.notify-wrap:hover .notify-menu, .notify-open .notify-menu {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0) scale(1);
}
.notify-wrap::after { content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 10px; }
.notify-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px; border-bottom: 1px solid var(--line); font-weight: 800; font-size: 14px;
}
.notify-read-all {
  border: none; background: transparent; color: var(--accent); font: inherit;
  font-size: 12.5px; font-weight: 700; cursor: pointer; padding: 0;
}
.notify-read-all:hover { text-decoration: underline; }
.notify-list { max-height: 380px; overflow-y: auto; padding: 6px; }
.notify-empty { padding: 22px 14px; text-align: center; color: var(--muted); font-size: 13.5px; }
.notify-item {
  display: flex; gap: 10px; padding: 10px 10px; border-radius: 10px;
  text-decoration: none; color: var(--text);
  transition: background 0.14s ease;
}
.notify-item:hover { background: var(--surface-2); }
.notify-unseen { background: rgba(var(--accent-rgb), 0.07); }
.notify-icon { color: var(--accent); font-size: 13px; margin-top: 3px; flex: none; }
.notify-item-main { min-width: 0; }
.notify-title { font-size: 13.5px; font-weight: 700; }
.notify-body { font-size: 12.5px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notify-time { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

.pm-layout {
  display: grid; grid-template-columns: 340px 1fr; gap: 16px; align-items: stretch;
  height: 640px; max-height: calc(100vh - 260px); min-height: 480px;
}
.pm-side { padding: 12px; display: flex; flex-direction: column; gap: 8px; min-height: 0; height: 100%; overflow: hidden; }
.pm-side-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 6px; font-weight: 800; }
.pm-new { padding: 7px 12px; font-size: 13px; }
.pm-list { display: flex; flex-direction: column; gap: 4px; flex: 1; min-height: 0; overflow-y: auto; }
.pm-row {
  position: relative; display: flex; align-items: center;
  border-radius: 12px; overflow: hidden;
  transition: background 0.14s ease;
}
.pm-row:hover { background: var(--surface-2); }
.pm-row-active { background: var(--surface-2); }
.pm-row-open {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px;
  padding: 10px; border: none; border-radius: 12px; background: transparent;
  color: var(--text); font: inherit; text-align: left; cursor: pointer;
  transition: padding-right 0.18s ease;
}
.pm-row:hover .pm-row-open { padding-right: 46px; }
.pm-row-delete {
  position: absolute; right: 0; top: 0; bottom: 0; width: 40px;
  display: grid; place-items: center;
  border: none; border-radius: 0 12px 12px 0; background: transparent; color: var(--muted);
  font-size: 12px; cursor: pointer; opacity: 0; pointer-events: none;
  transform: translateX(100%);
  transition: opacity 0.18s ease, transform 0.18s ease, background 0.14s ease, color 0.14s ease;
}
.pm-row:hover .pm-row-delete { opacity: 1; pointer-events: auto; transform: translateX(0); }
.pm-row-delete:hover { background: rgba(var(--accent-rgb), 0.15); color: var(--accent); }
.pm-avatar { width: 36px; height: 36px; border-radius: 9px; flex: none; }
.pm-row-main { flex: 1; min-width: 0; }
.pm-row-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.pm-row-name { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-row-time { font-size: 11.5px; color: var(--muted); flex: none; }
.pm-row-preview { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-row-unread .pm-row-name { color: var(--accent); }
.pm-badge {
  min-width: 18px; height: 18px; padding: 0 5px; display: grid; place-items: center;
  border-radius: 999px; background: var(--grad); color: #fff; font-size: 10px; font-weight: 800; flex: none;
}
.pm-chat { display: flex; flex-direction: column; min-height: 0; height: 100%; padding: 0; overflow: hidden; }
.pm-chat-head { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.pm-chat-partner {
  display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text);
  border: none; background: transparent; font: inherit; text-align: left; cursor: pointer;
  padding: 4px 8px; margin: -4px -8px; border-radius: 12px;
  transition: background 0.14s ease;
}
.pm-chat-partner:hover { background: var(--surface-2); }
.pm-chat-name { font-weight: 800; font-size: 15px; }
.pm-messages { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 16px; overflow-y: auto; min-height: 0; }
.pm-msg { max-width: 74%; align-self: flex-start; padding: 10px 13px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.pm-msg-mine { align-self: flex-end; background: rgba(var(--accent-rgb), 0.12); border-color: rgba(var(--accent-rgb), 0.28); }
.pm-msg-body { font-size: 14px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.pm-msg-meta { font-size: 11px; color: var(--muted); margin-top: 4px; }
.pm-compose { display: flex; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); align-items: flex-end; }
.pm-compose-input {
  flex: 1; height: 44px; min-height: 44px; max-height: 220px; resize: vertical;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 13px; color: var(--text); font: inherit; font-size: 14px;
  line-height: 1.45; overflow-y: auto;
}
.pm-compose-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.16); }
.pm-send { flex: none; width: 46px; height: 44px; padding: 0; display: grid; place-items: center; }

.nick-auto { position: relative; display: flex; flex-direction: column; }
.nick-auto-menu {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 90;
  display: flex; flex-direction: column; gap: 2px; padding: 6px;
  max-height: 220px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(-6px); transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
}
.nick-auto-open { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); }
.nick-auto-item {
  padding: 9px 12px; border: none; border-radius: 9px; background: transparent;
  color: var(--text); font: inherit; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer;
  transition: background 0.14s ease;
}
.nick-auto-item:hover, .nick-auto-active { background: var(--surface-2); }

@media (max-width: 900px) {
  .pm-layout { grid-template-columns: 1fr; height: auto; max-height: none; }
  .pm-side { height: auto; max-height: 320px; }
  .pm-chat { height: 520px; }
}

.pm-placeholder {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 40px 24px; text-align: center; color: var(--muted);
}
.pm-placeholder i { font-size: 34px; color: var(--line); }
.pm-placeholder p { margin: 0; font-size: 14.5px; }
.pm-placeholder-sm { flex: none; padding: 24px; font-size: 13.5px; }
.pm-search {
  margin: 0 6px 4px; background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 10px 12px; color: var(--text); font: inherit; font-size: 13.5px;
}
.pm-search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.16); }
.pm-to { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 0; }
.pm-to .nick-auto { width: 100%; }
.pm-compose-spacer { flex: 1; }
.pin-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pin-row input[type="number"] { flex: 1; min-width: 140px; }

.pm-users { gap: 6px; }
.pm-user-card {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 9px 10px; border: 1px solid transparent; border-radius: 12px;
  background: transparent; color: var(--text); font: inherit; cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease;
  animation: reveal 0.18s ease both;
}
.pm-user-card:hover { background: var(--surface-2); border-color: var(--line); }
.pm-user-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pm-user-nick { font-weight: 700; font-size: 14px; }

.notify-page { padding: 0; overflow: hidden; }
.notify-page-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  min-height: 52px; padding: 8px 20px;
  background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.notify-page-head .admin-card-title { margin: 0; font-size: 18px; }
.notify-page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.notify-page-list { display: flex; flex-direction: column; gap: 6px; padding: 16px 20px; }
.notify-page .admin-pager { padding: 0 20px 18px; }
.notify-page-item {
  display: flex; align-items: stretch; gap: 6px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2);
  transition: background 0.16s ease, border-color 0.16s ease;
}
.notify-page-item:hover { border-color: var(--muted); }
.notify-page-item.notify-unseen { background: rgba(var(--accent-rgb), 0.08); border-color: rgba(var(--accent-rgb), 0.28); }
.notify-page-link { display: flex; gap: 12px; flex: 1; min-width: 0; padding: 12px 14px; text-decoration: none; color: var(--text); }
.notify-body-full { white-space: normal; overflow: visible; }
.notify-remove {
  display: grid; place-items: center; width: 42px; flex: none;
  border: none; border-left: 1px solid var(--line); border-radius: 0 11px 11px 0;
  background: transparent; color: var(--muted); cursor: pointer; font-size: 13px;
  transition: background 0.14s ease, color 0.14s ease;
}
.notify-remove:hover { background: rgba(var(--accent-rgb), 0.15); color: var(--accent); }

.pp-locked { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.pp-locked p { margin: 0; }

.pm-msg { position: relative; }
.pm-msg-meta { display: flex; align-items: center; gap: 6px; }
.pm-msg-mine .pm-msg-meta { justify-content: flex-end; }
.pm-status { display: inline-flex; align-items: center; font-size: 11px; color: var(--muted); transition: color 0.2s ease; }
.pm-status-read { color: var(--online); }
@keyframes pm-msg-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.pm-msg-enter { animation: pm-msg-in 0.22s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes pm-messages-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.pm-messages-enter { animation: pm-messages-in 0.2s ease; }
@keyframes pm-tick-pop { 0% { transform: scale(1); } 40% { transform: scale(1.4); } 100% { transform: scale(1); } }
.pm-status-pop { animation: pm-tick-pop 0.34s ease; }
.pm-unsend {
  position: absolute; top: -8px; left: -8px;
  display: grid; place-items: center; width: 22px; height: 22px;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--surface); color: var(--muted);
  font-size: 10px; cursor: pointer;
  opacity: 0; pointer-events: none;
  transition: opacity 0.16s ease, background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}
.pm-msg-mine:hover .pm-unsend { opacity: 1; pointer-events: auto; }
.pm-unsend:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.bb-quote {
  display: block; margin: 0 0 10px; padding: 10px 14px;
  border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0;
  background: var(--surface-2); color: var(--muted); font-size: 13.5px; line-height: 1.6;
}
.bb-quote-author { display: block; font-weight: 800; color: var(--text); font-size: 12.5px; margin-bottom: 4px; }
.bb-quote-body { display: block; }
.bb-mention {
  color: var(--accent); font-weight: 700; text-decoration: none;
  padding: 1px 5px; border-radius: 6px; background: rgba(var(--accent-rgb), 0.1);
  transition: background 0.14s ease;
}
.bb-mention:hover { background: rgba(var(--accent-rgb), 0.2); }
.mention-menu { position: fixed; z-index: 120; }

.forum-stats { margin-top: 18px; padding: 18px 20px; }
.forum-stats-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
  padding-bottom: 12px; border-bottom: 1px solid var(--line);
  font-weight: 800; font-size: 15px; color: var(--muted);
}
.forum-stats-head i { color: var(--accent); }
.forum-stats-grid { display: grid; grid-template-columns: 1fr 280px; gap: 20px; align-items: start; }
.forum-stats-online-title { font-size: 13.5px; color: var(--muted); margin-bottom: 8px; }
.forum-stats-names { font-size: 13.5px; line-height: 1.9; color: var(--muted); }
.forum-stats-user {
  padding: 0; border: none; background: none; font: inherit; cursor: pointer;
  text-decoration: none; line-height: inherit;
}
.forum-stats-user:hover { text-decoration: underline; }
.forum-stats-empty { color: var(--muted); }
.forum-stats-counts { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.forum-stats-counts > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.forum-stats-counts dt { color: var(--muted); font-size: 13.5px; }
.forum-stats-counts dd { margin: 0; font-weight: 800; font-size: 14px; }
.forum-stats-newest {
  padding: 0; border: none; background: none; cursor: pointer;
  color: var(--muted); text-decoration: none;
  font: inherit; font-weight: 700; font-size: 14px;
  transition: color 0.16s ease;
}
.forum-stats-newest:hover { color: var(--text); }
@media (max-width: 760px) {
  .forum-stats-grid { grid-template-columns: 1fr; }
}

.pm-compose-wrap { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.pm-compose { border-top: none; }
.pm-reply-bar {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px 0;
  animation: reveal 0.18s ease both;
}
.pm-reply-info {
  flex: 1; min-width: 0; display: flex; flex-direction: column;
  padding: 8px 12px; border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0;
  background: var(--surface-2);
}
.pm-reply-author { font-size: 12px; font-weight: 800; color: var(--accent); }
.pm-reply-text { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-reply-cancel {
  flex: none; display: grid; place-items: center; width: 28px; height: 28px;
  border: 1px solid var(--line); border-radius: 8px; background: transparent;
  color: var(--muted); cursor: pointer; font-size: 12px;
  transition: color 0.14s ease, border-color 0.14s ease;
}
.pm-reply-cancel:hover { color: var(--accent); border-color: var(--accent); }
.pm-msg-quote {
  display: block; margin-bottom: 6px; padding: 6px 10px;
  border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0;
  background: rgba(0, 0, 0, 0.16);
}
.pm-msg-quote-author { display: block; font-size: 11.5px; font-weight: 800; color: var(--accent); }
.pm-msg-quote-body { display: block; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-reply-btn {
  position: absolute; top: -8px; right: -8px;
  display: grid; place-items: center; width: 22px; height: 22px;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--surface); color: var(--muted);
  font-size: 10px; cursor: pointer; opacity: 0; pointer-events: none;
  transition: opacity 0.16s ease, background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}
.pm-msg:hover .pm-reply-btn { opacity: 1; pointer-events: auto; }
.pm-reply-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.twofa-game-note {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; margin: 4px 0 14px; border-radius: 12px;
  background: rgba(var(--accent-rgb), 0.09); border: 1px solid rgba(var(--accent-rgb), 0.25);
  color: var(--text); font-size: 13px; line-height: 1.6;
}
.twofa-game-note i { color: var(--accent); margin-top: 2px; flex: none; }
.twofa-game-note code {
  padding: 1px 6px; border-radius: 6px; background: var(--surface-2);
  border: 1px solid var(--line); font-family: ui-monospace, monospace; font-size: 12px;
}

.pm-typing {
  display: flex; align-items: center; gap: 8px; align-self: flex-start;
  padding: 8px 12px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 12.5px; color: var(--muted);
  animation: reveal 0.2s ease both;
}
.pm-typing-dots { display: inline-flex; gap: 3px; }
.pm-typing-dots i {
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
  animation: pm-bounce 1.1s infinite ease-in-out;
}
.pm-typing-dots i:nth-child(2) { animation-delay: 0.15s; }
.pm-typing-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes pm-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.snack-host {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  z-index: 240; display: flex; flex-direction: column; gap: 10px;
  width: min(420px, calc(100vw - 32px)); pointer-events: none;
}
.snack {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; padding-right: 40px; overflow: hidden;
  border-radius: 14px; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
  animation: snack-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: border-color 0.16s ease, transform 0.16s ease;
}
.snack:hover { border-color: rgba(var(--accent-rgb), 0.5); transform: translateY(-2px); }
.snack-out { animation: snack-out 0.22s ease both; }
@keyframes snack-in {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes snack-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(12px) scale(0.97); }
}
.snack-avatar { width: 38px; height: 38px; border-radius: 10px; flex: none; }
.snack-main { min-width: 0; flex: 1; }
.snack-line { font-size: 13.5px; line-height: 1.4; }
.snack-line b { font-weight: 800; }
.snack-body {
  font-size: 12.5px; color: var(--muted); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.snack-close {
  position: absolute; top: 8px; right: 8px;
  display: grid; place-items: center; width: 24px; height: 24px;
  border: none; border-radius: 7px; background: transparent;
  color: var(--muted); font-size: 11px; cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}
.snack-close:hover { background: var(--surface-2); color: var(--accent); }
.snack-bar {
  position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
  background: var(--grad); transform-origin: left center;
  animation: snack-bar 6s linear forwards;
}
@keyframes snack-bar {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

.u-textures {
  display: flex; gap: 20px; align-items: center;
  padding-bottom: 18px; margin: 14px 0 6px;
  border-bottom: 1px solid var(--line);
}
.u-textures-preview {
  position: relative; flex: none;
  width: 190px; height: 264px; padding: 0;
  border-radius: 16px; background: transparent;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.u-textures-canvas { width: 100%; height: 100%; display: block; }
.u-textures-fallback { color: var(--muted); font-size: 13px; text-align: center; padding: 12px; }
.u-textures-controls { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; justify-content: center; }
.u-texture-row { display: flex; flex-direction: column; gap: 8px; }
.u-texture-title { font-weight: 700; font-size: 15px; }
.u-texture-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.u-texture-actions .action-btn {
  padding: 9px 14px; font-size: 13px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1; text-decoration: none;
}
.u-texture-actions .is-disabled { opacity: 0.45; pointer-events: none; }
.u-texture-actions button:disabled { opacity: 0.45; pointer-events: none; }
.modal:has(.u-textures) { max-width: 660px; }

@media (max-width: 560px) {
  .u-textures { flex-direction: column; }
  .u-textures-preview { width: 100%; min-height: 180px; }
}

.has-presence { position: relative; overflow: visible; }
.presence-dot {
  position: absolute; right: -4px; bottom: -4px;
  width: 11px; height: 11px; border-radius: 50%;
  background: #3fb950; border: 2px solid var(--bg);
  box-shadow: 0 0 8px rgba(63, 185, 80, 0.55);
}
.presence-dot--game { background: #2E86AB; box-shadow: 0 0 8px rgba(46, 134, 171, 0.6); }
.skin-head--lg .presence-dot { width: 15px; height: 15px; right: -5px; bottom: -5px; }

.presence-text, .pm-presence, .profile-mini-presence { font-size: 13px; font-weight: 600; }
.presence-in_game { color: #2E86AB; }
.presence-online { color: #3fb950; }
.presence-offline { color: var(--muted); }
.profile-mini-presence { margin-top: 2px; }
.pm-presence { margin-left: 8px; }

.presence-dot--inline {
  position: static; width: 8px; height: 8px;
  border: 0; box-shadow: none; flex: none;
}
.profile-mini .skin-head--lg .presence-dot { width: 17px; height: 17px; right: -6px; bottom: -6px; }
.account-card .skin-head .presence-dot { width: 10px; height: 10px; right: -3px; bottom: -3px; }
.game-servers { margin: 0 0 10px; }
.game-servers:empty { display: none; margin: 0; }

.launcher-checksums { display: flex; flex-direction: column; gap: 6px; margin: 16px 0 6px; }
.launcher-checksums .muted { font-size: 13px; }
.player-card-head .presence-dot { width: 10px; height: 10px; right: -3px; bottom: -3px; }
.forum-author .skin-head .presence-dot { width: 13px; height: 13px; right: -4px; bottom: -4px; }
.liker-card .skin-head .presence-dot { width: 10px; height: 10px; right: -3px; bottom: -3px; }
.forum-author .skin-head, .liker-card .skin-head, .player-card-head { overflow: visible; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.checksum-row {
  font-size: 12px; word-break: break-all; color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 10px;
}
.play-note { font-size: 13px; margin-top: 6px; line-height: 1.5; }

.consent {
  position: fixed; left: 50%; bottom: 24px; z-index: 120;
  width: min(460px, calc(100vw - 32px));
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; padding: 20px 22px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
  opacity: 0; transform: translate(-50%, 16px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.consent.show { opacity: 1; transform: translate(-50%, 0); }
.consent h3 { font-family: "Unbounded", sans-serif; font-size: 16px; margin: 0 0 8px; }
.consent p { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.consent-link { color: var(--accent); text-decoration: none; font-weight: 700; }
.consent-link:hover { text-decoration: underline; }

.consent-options { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.consent-row {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 12px; cursor: pointer;
}
.consent-row input { margin-top: 3px; width: 16px; height: 16px; flex: none; accent-color: var(--accent); }
.consent-row span { display: flex; flex-direction: column; gap: 2px; }
.consent-row strong { font-size: 13.5px; }
.consent-row .muted { font-size: 12.5px; line-height: 1.35; }

.consent-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.consent-actions button {
  flex: 1; min-width: 120px; min-height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; border-radius: 12px;
}

@media (max-width: 520px) {
  .consent { width: calc(100vw - 24px); bottom: 12px; padding: 18px; }
  .consent-actions button { flex: 1 1 100%; }
}

.admin-section-title {
  grid-column: 1 / -1;
  margin: 6px 0 2px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.2px;
  color: var(--muted); text-transform: uppercase;
}
