/* ==========================================================================
   Miao APEX — dark gradient design system
   ========================================================================== */

:root {
  --bg: #05060f;
  --bg-elevated: #0a0d1a;
  --panel: rgba(18, 22, 43, 0.62);
  --panel-solid: #0d1020;
  --panel-soft: rgba(255, 255, 255, 0.035);
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.26);
  --text: #eef1ff;
  --text-soft: #c7cdea;
  --muted: #9aa3bd;
  --muted-2: #6f7896;
  --violet: #a78bfa;
  --indigo: #818cf8;
  --cyan: #22d3ee;
  --pink: #e879f9;
  --green: #34d399;
  --amber: #fbbf24;
  --danger: #f87171;
  --grad: linear-gradient(115deg, #c4b5fd 0%, #818cf8 42%, #22d3ee 100%);
  --grad-strong: linear-gradient(135deg, #7c3aed 0%, #4f46e5 48%, #0891b2 100%);
  --grad-panel: linear-gradient(155deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.018));
  --radius: 18px;
  --radius-lg: 24px;
  --shadow: 0 30px 80px -34px rgba(0, 0, 0, 0.9);
  --shadow-glow: 0 24px 70px -30px rgba(99, 102, 241, 0.75);
  --font: "Inter", "SF Pro Display", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 700px at 50% -20%, rgba(76, 29, 149, 0.25), transparent 65%),
    linear-gradient(180deg, #060813 0%, #05060f 55%, #04050c 100%);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(820px 560px at 8% -8%, rgba(124, 58, 237, 0.26), transparent 62%),
    radial-gradient(760px 520px at 96% 2%, rgba(34, 211, 238, 0.16), transparent 60%),
    radial-gradient(760px 620px at 50% 112%, rgba(232, 121, 249, 0.1), transparent 62%);
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.024) 1px, transparent 1px);
  background-size: 68px 68px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 78%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 78%);
  pointer-events: none;
}

::selection {
  background: rgba(129, 140, 248, 0.35);
  color: #fff;
}

h1, h2, h3, h4, h5 {
  margin: 0;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img, svg {
  max-width: 100%;
  display: block;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: #070812;
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.24);
  border-radius: 99px;
  border: 2px solid #070812;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(167, 139, 250, 0.5);
}

/* --------------------------------------------------------------------------
   Layout primitives
   -------------------------------------------------------------------------- */

.shell {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
}

.section {
  padding: 104px 0;
  position: relative;
}

.section-tight {
  padding: 64px 0;
}

.section-head {
  max-width: 720px;
  margin: 0 auto 52px;
  text-align: center;
}

.section-head.left {
  margin-left: 0;
  text-align: left;
}

.section-head h2 {
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: -0.035em;
}

.section-head p {
  margin-top: 16px;
  color: var(--muted);
  font-size: 16.5px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  padding: 6px 13px;
  border-radius: 99px;
  border: 1px solid rgba(167, 139, 250, 0.28);
  background: rgba(124, 58, 237, 0.1);
  color: #c4b5fd;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
}

.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.muted {
  color: var(--muted);
}

.mono {
  font-family: var(--mono);
}

.hidden {
  display: none !important;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid transparent;
  background: rgba(5, 6, 15, 0.55);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  transition: border-color 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
  background: rgba(5, 6, 15, 0.82);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 0 14px rgba(129, 140, 248, 0.4));
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.brand-text {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-text span {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--muted-2);
  transform: translateY(-1px);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-link {
  position: relative;
  padding: 9px 13px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.nav-link.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
}

.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 3px;
  height: 2px;
  border-radius: 99px;
  background: var(--grad);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
  margin-left: auto;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.03);
  padding: 11px 10px;
  flex-direction: column;
  justify-content: space-between;
}

.nav-toggle span {
  display: block;
  height: 1.6px;
  width: 100%;
  border-radius: 2px;
  background: var(--text-soft);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-header.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}
.site-header.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}
.site-header.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

/* User menu */
.user-menu {
  position: relative;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 0 10px 0 5px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.user-chip:hover,
.user-chip[aria-expanded="true"] {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.06);
}

.user-chip-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
  max-width: 128px;
}

.user-chip-name {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 128px;
}

.user-chip-role {
  font-size: 10.5px;
  color: var(--muted-2);
}

.user-chip .chev {
  color: var(--muted-2);
  transition: transform 0.2s ease;
}

.user-chip[aria-expanded="true"] .chev {
  transform: rotate(180deg);
}

.avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background:
    radial-gradient(circle at 30% 20%, hsl(var(--h) 90% 72% / 0.95), transparent 62%),
    linear-gradient(145deg, hsl(var(--h) 70% 46%), hsl(calc(var(--h) + 55) 78% 42%));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 6px 18px -8px hsl(var(--h) 80% 50% / 0.8);
  letter-spacing: 0.02em;
  user-select: none;
}

.avatar-admin {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.22),
    0 0 0 2px rgba(167, 139, 250, 0.28),
    0 6px 20px -8px rgba(139, 92, 246, 0.9);
}

.avatar-subadmin {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.2),
    0 0 0 2px rgba(34, 211, 238, 0.26),
    0 6px 20px -8px rgba(34, 211, 238, 0.75);
}

.avatar-sm {
  width: 30px;
  height: 30px;
  font-size: 11px;
}

.avatar-md {
  width: 40px;
  height: 40px;
  font-size: 13px;
}

.avatar-lg {
  width: 52px;
  height: 52px;
  font-size: 16px;
}

.avatar-xl {
  width: 120px;
  height: 120px;
  font-size: 34px;
}

.avatar-img {
  display: block;
  object-fit: cover;
  background: #0b0e1c;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 236px;
  padding: 8px;
  border: 1px solid var(--border-strong);
  border-radius: 15px;
  background: rgba(12, 15, 30, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 70;
}

.user-menu.open .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.dropdown-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px 11px;
}

.dropdown-head strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
}

.dropdown-head span:not(.avatar) {
  display: block;
  font-size: 11.5px;
  color: var(--muted-2);
}

.dropdown-sep {
  height: 1px;
  margin: 6px 4px;
  background: var(--border);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-soft);
  font-size: 13.5px;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.dropdown-item.danger {
  color: #fca5a5;
}

.dropdown-item.danger:hover {
  background: rgba(248, 113, 113, 0.1);
  color: #fecaca;
}

.dropdown-ico {
  width: 17px;
  text-align: center;
  color: var(--muted-2);
  font-size: 13px;
}

/* --------------------------------------------------------------------------
   Buttons, badges, forms
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, filter 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--grad-strong);
  color: #fff;
  box-shadow: 0 14px 34px -14px rgba(99, 102, 241, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn-primary:hover {
  filter: brightness(1.12);
  box-shadow: 0 18px 42px -14px rgba(99, 102, 241, 1), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.btn-ghost {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
}

.btn-ghost:hover {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.btn-outline {
  border-color: rgba(167, 139, 250, 0.4);
  background: rgba(124, 58, 237, 0.08);
  color: #ddd6fe;
}

.btn-outline:hover {
  background: rgba(124, 58, 237, 0.18);
  border-color: rgba(167, 139, 250, 0.6);
}

.btn-danger {
  border-color: rgba(248, 113, 113, 0.32);
  background: rgba(248, 113, 113, 0.1);
  color: #fca5a5;
}

.btn-danger:hover {
  background: rgba(248, 113, 113, 0.18);
  border-color: rgba(248, 113, 113, 0.5);
}

.btn-sm {
  height: 36px;
  padding: 0 14px;
  border-radius: 9px;
  font-size: 13px;
}

.btn-lg {
  height: 52px;
  padding: 0 28px;
  border-radius: 14px;
  font-size: 15.5px;
}

.btn-block {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

.btn.is-loading::after {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  transition: all 0.18s ease;
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.06);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
}

.badge-dot::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 99px;
  background: currentColor;
}

.badge-admin {
  border-color: rgba(167, 139, 250, 0.4);
  background: rgba(124, 58, 237, 0.14);
  color: #c4b5fd;
}

.badge-subadmin {
  border-color: rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.1);
  color: #67e8f9;
}

.badge-banned {
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.1);
  color: #fca5a5;
}

.badge-pinned {
  border-color: rgba(34, 211, 238, 0.34);
  background: rgba(34, 211, 238, 0.1);
  color: #67e8f9;
}

.badge-success {
  border-color: rgba(52, 211, 153, 0.32);
  background: rgba(52, 211, 153, 0.1);
  color: #6ee7b7;
}

.cat-announcements { --cat: #a78bfa; }
.cat-releases { --cat: #22d3ee; }
.cat-feedback { --cat: #fbbf24; }
.cat-help { --cat: #34d399; }
.cat-general { --cat: #94a3b8; }

.category-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border-radius: 99px;
  border: 1px solid color-mix(in srgb, var(--cat) 32%, transparent);
  background: color-mix(in srgb, var(--cat) 11%, transparent);
  color: var(--cat);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.category-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 99px;
  background: var(--cat);
  box-shadow: 0 0 8px var(--cat);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.status-pill i {
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: pulse 2.4s ease-in-out infinite;
}

/* Forms */
.field {
  display: block;
  margin-bottom: 18px;
}

.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
}

.field-label small {
  font-weight: 400;
  color: var(--muted-2);
  font-size: 11.5px;
}

.input,
.textarea,
.select {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(6, 8, 18, 0.72);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.input::placeholder,
.textarea::placeholder {
  color: #5c6480;
}

.input:hover,
.textarea:hover,
.select:hover {
  border-color: var(--border-strong);
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: rgba(129, 140, 248, 0.65);
  background: rgba(8, 10, 22, 0.92);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.16);
}

.textarea {
  min-height: 130px;
  resize: vertical;
}

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239aa3bd' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 40px;
}

.password-wrap {
  position: relative;
}

.password-wrap .input {
  padding-right: 48px;
}

.reveal-btn {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted-2);
  font-size: 15px;
}

.reveal-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.reveal-btn svg {
  width: 16px;
  height: 16px;
}

.form-error {
  display: none;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
  border: 1px solid rgba(248, 113, 113, 0.28);
  border-radius: 10px;
  background: rgba(248, 113, 113, 0.08);
  color: #fca5a5;
  font-size: 13px;
  line-height: 1.55;
}

.form-error.show {
  display: flex;
}

.form-hint {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted-2);
}

/* Switch */
.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-soft);
  user-select: none;
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  position: relative;
  width: 40px;
  height: 23px;
  border-radius: 99px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.06);
  transition: all 0.2s ease;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #cbd5e1;
  transition: transform 0.2s ease, background 0.2s ease;
}

.switch input:checked + .switch-track {
  border-color: rgba(129, 140, 248, 0.6);
  background: rgba(99, 102, 241, 0.35);
}

.switch input:checked + .switch-track::after {
  transform: translateX(17px);
  background: #fff;
}

.switch input:focus-visible + .switch-track {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Landing — hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding: 96px 0 40px;
  overflow: hidden;
  text-align: center;
}

.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  pointer-events: none;
  z-index: -1;
}

.aurora-1 {
  width: 560px;
  height: 420px;
  top: -120px;
  left: 50%;
  transform: translateX(-70%);
  background: radial-gradient(circle, rgba(124, 58, 237, 0.5), transparent 68%);
  animation: drift-a 18s ease-in-out infinite alternate;
}

.aurora-2 {
  width: 520px;
  height: 380px;
  top: 60px;
  right: 4%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.28), transparent 66%);
  animation: drift-b 22s ease-in-out infinite alternate;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px 7px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  font-size: 12.5px;
  backdrop-filter: blur(10px);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.hero-badge:hover {
  border-color: rgba(167, 139, 250, 0.45);
  background: rgba(124, 58, 237, 0.12);
}

.hero-badge .tag-new {
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--grad-strong);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.hero-badge .arrow {
  color: var(--muted-2);
}

.hero-title {
  margin: 26px 0 0;
  font-size: clamp(46px, 7.2vw, 82px);
  line-height: 1.04;
  letter-spacing: -0.045em;
  font-weight: 700;
}

.hero-title .line {
  display: block;
}

.hero-title .gradient-text {
  background-size: 200% 100%;
  animation: gradient-shift 8s ease infinite;
}

.hero-sub {
  max-width: 640px;
  margin: 24px auto 0;
  color: var(--muted);
  font-size: clamp(15.5px, 1.8vw, 18px);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.hero-note {
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--muted-2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-note span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.hero-note span + span::before {
  content: "·";
  margin-right: 8px;
  color: var(--muted-2);
}

.trust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 38px;
  flex-wrap: wrap;
  margin-top: 64px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
  color: var(--muted-2);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.trust-row .trust-label {
  letter-spacing: 0.1em;
  color: #5d6583;
}

.trust-logo {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #8089a8;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.trust-logo::before {
  content: "";
  width: 10px;
  height: 10px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  transform: rotate(45deg);
  opacity: 0.8;
}

/* Hero product window */
.hero-visual {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 72px auto 0;
  padding: 0 28px;
}

.app-window {
  position: relative;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(23, 27, 51, 0.92), rgba(9, 11, 23, 0.96));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 60px 140px -50px rgba(79, 70, 229, 0.6),
    0 30px 70px -40px rgba(0, 0, 0, 0.9);
  overflow: hidden;
  transform: perspective(1600px) rotateX(1.6deg);
  animation: window-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.app-window::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(700px 260px at 20% 0%, rgba(124, 58, 237, 0.14), transparent 70%);
  pointer-events: none;
}

.window-top {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 46px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(255, 255, 255, 0.025);
}

.window-dots {
  display: flex;
  gap: 6px;
}

.window-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3b4260;
}

.window-dots i:nth-child(1) { background: #f87171; }
.window-dots i:nth-child(2) { background: #fbbf24; }
.window-dots i:nth-child(3) { background: #34d399; }

.window-title {
  flex: 1;
  text-align: center;
  font-size: 11.5px;
  color: var(--muted-2);
  letter-spacing: 0.03em;
}

.window-avatars {
  display: flex;
  align-items: center;
}

.window-avatars span {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  border: 2px solid #12152a;
  margin-left: -7px;
  background: linear-gradient(145deg, #8b5cf6, #22d3ee);
}

.window-avatars span:nth-child(2) { background: linear-gradient(145deg, #f472b6, #8b5cf6); }
.window-avatars span:nth-child(3) { background: linear-gradient(145deg, #34d399, #0891b2); }

.window-body {
  display: grid;
  grid-template-columns: 188px minmax(0, 1fr) 246px;
  height: 492px;
}

.mock-sidebar {
  padding: 18px 14px;
  border-right: 1px solid rgba(148, 163, 184, 0.1);
  background: rgba(4, 6, 14, 0.45);
}

.mock-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 6px 16px;
  font-size: 12.5px;
  font-weight: 600;
}

.mock-brand i {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: var(--grad-strong);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.6);
}

.mock-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mock-nav span {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border-radius: 7px;
  font-size: 11.5px;
  color: #7d86a4;
}

.mock-nav span::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.7;
}

.mock-nav span.active {
  background: rgba(124, 58, 237, 0.16);
  color: #c4b5fd;
}

.mock-nav span.active::before {
  background: #a78bfa;
  box-shadow: 0 0 8px #a78bfa;
}

.mock-section-label {
  margin: 20px 9px 8px;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #4e5673;
}

.mock-files {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mock-files span {
  padding: 6px 9px;
  border-radius: 6px;
  font-size: 11px;
  color: #7d86a4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mock-files span.active {
  background: rgba(255, 255, 255, 0.05);
  color: #d7dcf5;
}

.mock-main {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background-image:
    radial-gradient(circle, rgba(148, 163, 184, 0.14) 1px, transparent 1px);
  background-size: 22px 22px;
}

.mock-artboard {
  width: min(100%, 400px);
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  background:
    radial-gradient(120% 120% at 15% 10%, rgba(255, 255, 255, 0.24), transparent 42%),
    linear-gradient(135deg, #6d28d9 0%, #4338ca 40%, #0891b2 100%);
  box-shadow: 0 30px 60px -24px rgba(67, 56, 202, 0.8);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 26px;
}

.mock-artboard::before {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  top: -80px;
  right: -60px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.32), transparent 65%);
}

.mock-artboard::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.18) 0.6px, transparent 0.6px);
  background-size: 8px 8px;
  opacity: 0.5;
  mix-blend-mode: overlay;
}

.mock-artboard .art-kicker {
  position: relative;
  z-index: 1;
  font-size: 9px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 8px;
}

.mock-artboard .art-title {
  position: relative;
  z-index: 1;
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: #fff;
}

.mock-artboard .art-meta {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.mock-artboard .art-meta i {
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.55);
}

.mock-artboard .art-meta i:nth-child(1) { width: 54px; }
.mock-artboard .art-meta i:nth-child(2) { width: 30px; opacity: 0.5; }

.mock-cursor {
  position: absolute;
  right: 16%;
  top: 30%;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
}

.mock-cursor::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 7px solid #22d3ee;
  border-bottom: 10px solid transparent;
  filter: drop-shadow(0 2px 6px rgba(34, 211, 238, 0.7));
  transform: rotate(-12deg);
}

.mock-cursor span {
  padding: 2px 7px;
  border-radius: 5px;
  background: #22d3ee;
  color: #042027;
  font-size: 9px;
  font-weight: 700;
}

.mock-panel {
  padding: 16px 15px;
  border-left: 1px solid rgba(148, 163, 184, 0.1);
  background: rgba(4, 6, 14, 0.45);
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.mock-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: #c7cdea;
}

.mock-panel-head i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
}

.mock-message {
  padding: 10px 11px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 10.5px;
  line-height: 1.65;
  color: #9aa3bd;
}

.mock-message strong {
  display: block;
  margin-bottom: 4px;
  color: #c4b5fd;
  font-size: 10px;
  font-weight: 600;
}

.mock-prompt {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid rgba(129, 140, 248, 0.35);
  border-radius: 8px;
  background: rgba(79, 70, 229, 0.1);
  font-size: 10px;
  color: #7d86a4;
}

.mock-prompt .spark {
  color: #67e8f9;
}

.mock-progress {
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.mock-progress i {
  display: block;
  width: 68%;
  height: 100%;
  background: var(--grad);
  border-radius: inherit;
}

.floating-card {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 15px;
  border: 1px solid var(--border-strong);
  border-radius: 13px;
  background: rgba(13, 16, 32, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  animation: float 6s ease-in-out infinite;
}

.floating-card .fc-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(52, 211, 153, 0.14);
  color: #6ee7b7;
  font-size: 15px;
}

.floating-card strong {
  display: block;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
}

.floating-card small {
  display: block;
  font-size: 10.5px;
  color: var(--muted-2);
}

.floating-card.one {
  top: 16%;
  left: -18px;
}

.floating-card.two {
  bottom: 12%;
  right: -14px;
  animation-delay: -3s;
}

.floating-card.two .fc-icon {
  background: rgba(167, 139, 250, 0.14);
  color: #c4b5fd;
}

.hero-visual::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: -60px;
  height: 180px;
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.4), transparent 70%);
  filter: blur(50px);
  z-index: -1;
}

/* --------------------------------------------------------------------------
   Landing — features / steps / showcase
   -------------------------------------------------------------------------- */

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.feature-card {
  position: relative;
  padding: 28px 26px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--grad-panel);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.feature-card::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  top: -120px;
  right: -90px;
  border-radius: 50%;
  background: radial-gradient(circle, hsla(var(--tint, 258), 90%, 66%, 0.18), transparent 65%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}

.feature-card:hover::after {
  opacity: 1;
}

.feature-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02));
  color: #c4b5fd;
  margin-bottom: 20px;
  box-shadow: 0 8px 20px -12px rgba(167, 139, 250, 0.7);
}

.feature-card:nth-child(2) .feature-icon { color: #67e8f9; }
.feature-card:nth-child(3) .feature-icon { color: #f0abfc; }
.feature-card:nth-child(4) .feature-icon { color: #6ee7b7; }
.feature-card:nth-child(5) .feature-icon { color: #fcd34d; }
.feature-card:nth-child(6) .feature-icon { color: #a5b4fc; }

.feature-card h3 {
  font-size: 17.5px;
  margin-bottom: 9px;
}

.feature-card p {
  color: var(--muted);
  font-size: 13.8px;
  line-height: 1.7;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  counter-reset: step;
  position: relative;
}

.step {
  position: relative;
  padding: 30px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 20px;
  border-radius: 11px;
  border: 1px solid rgba(167, 139, 250, 0.35);
  background: rgba(124, 58, 237, 0.14);
  color: #ddd6fe;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 0 24px -8px rgba(167, 139, 250, 0.7);
}

.step h3 {
  font-size: 17px;
  margin-bottom: 9px;
}

.step p {
  color: var(--muted);
  font-size: 13.8px;
}

.showcase-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 18px;
}

.showcase-card {
  position: relative;
  min-height: 300px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.showcase-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}

.showcase-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 20% 0%, rgba(255, 255, 255, 0.22), transparent 50%),
    linear-gradient(155deg, #4c1d95, #1e1b4b 48%, #0e7490);
  z-index: -2;
}

.showcase-card:nth-child(2)::before {
  background:
    radial-gradient(120% 90% at 80% 0%, rgba(255, 255, 255, 0.2), transparent 55%),
    linear-gradient(155deg, #831843, #4c1d95 55%, #1e1b4b);
}

.showcase-card:nth-child(3)::before {
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, 0.16), transparent 55%),
    linear-gradient(155deg, #064e3b, #0f172a 55%, #312e81);
}

.showcase-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.25) 0.7px, transparent 0.7px);
  background-size: 7px 7px;
  opacity: 0.22;
  mix-blend-mode: overlay;
  z-index: -1;
}

.showcase-card .sc-tag {
  position: absolute;
  top: 20px;
  left: 20px;
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.85);
}

.showcase-card h3 {
  position: relative;
  font-size: 21px;
  color: #fff;
  letter-spacing: -0.02em;
}

.showcase-card p {
  position: relative;
  margin-top: 7px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.68);
}

.stats-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--border);
  overflow: hidden;
}

.stat {
  padding: 34px 26px;
  background: #080a16;
  text-align: center;
}

.stat strong {
  display: block;
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.04em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat span {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--muted-2);
}

/* --------------------------------------------------------------------------
   Landing — pricing, community, faq, cta, footer
   -------------------------------------------------------------------------- */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.025);
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.price-card:hover {
  border-color: var(--border-strong);
}

.price-card.featured {
  border-color: rgba(167, 139, 250, 0.45);
  background:
    radial-gradient(500px 300px at 50% 0%, rgba(124, 58, 237, 0.18), transparent 70%),
    rgba(255, 255, 255, 0.03);
  box-shadow: var(--shadow-glow);
}

.price-card.featured::before {
  content: "最受欢迎";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 13px;
  border-radius: 99px;
  background: var(--grad-strong);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  box-shadow: 0 8px 20px -8px rgba(99, 102, 241, 0.9);
  white-space: nowrap;
}

.plan-name {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.plan-desc {
  margin-top: 5px;
  font-size: 12.5px;
  color: var(--muted-2);
  min-height: 39px;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin: 20px 0 22px;
}

.plan-price strong {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
}

.plan-price .currency {
  font-size: 18px;
  color: var(--text-soft);
  font-weight: 500;
}

.plan-price .period {
  font-size: 12.5px;
  color: var(--muted-2);
}

.price-list {
  list-style: none;
  padding: 0;
  margin: 0 0 26px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  flex: 1;
}

.price-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13.3px;
  color: var(--text-soft);
}

.price-list li::before {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  flex: none;
  width: 17px;
  height: 17px;
  margin-top: 1px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(52, 211, 153, 0.12);
  color: #6ee7b7;
  font-size: 10px;
}

.price-list li.muted-feature {
  color: var(--muted-2);
}

.price-list li.muted-feature::before {
  content: "–";
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted-2);
}

.pricing-note {
  margin-top: 26px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted-2);
}

/* Locked community */
.locked-community {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 32px;
  align-items: center;
  padding: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(600px 300px at 10% 0%, rgba(124, 58, 237, 0.16), transparent 65%),
    var(--grad-panel);
  overflow: hidden;
}

.locked-copy h3 {
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}

.locked-copy p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.locked-copy .hero-note {
  justify-content: flex-start;
  margin-top: 14px;
}

.locked-preview {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(5, 7, 16, 0.6);
  padding: 12px;
  min-height: 260px;
  overflow: hidden;
}

.fake-thread {
  display: flex;
  gap: 12px;
  padding: 13px 12px;
  border-radius: 10px;
  filter: blur(4px);
  opacity: 0.72;
  user-select: none;
}

.fake-thread + .fake-thread {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.fake-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex: none;
  background: linear-gradient(145deg, #8b5cf6, #22d3ee);
}

.fake-thread:nth-child(2) .fake-avatar { background: linear-gradient(145deg, #e879f9, #8b5cf6); }
.fake-thread:nth-child(3) .fake-avatar { background: linear-gradient(145deg, #34d399, #0891b2); }
.fake-thread:nth-child(4) .fake-avatar { background: linear-gradient(145deg, #fbbf24, #f97316); }

.fake-lines {
  flex: 1;
}

.fake-lines i {
  display: block;
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.14);
  margin-bottom: 8px;
}

.fake-lines i:nth-child(1) { width: 72%; }
.fake-lines i:nth-child(2) { width: 92%; height: 6px; opacity: 0.55; }
.fake-lines i:nth-child(3) { width: 45%; height: 6px; opacity: 0.35; margin-bottom: 0; }

.lock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  background: radial-gradient(circle at center, rgba(6, 8, 18, 0.5), rgba(6, 8, 18, 0.84));
  backdrop-filter: blur(2px);
  padding: 20px;
}

.lock-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(167, 139, 250, 0.4);
  background: rgba(124, 58, 237, 0.16);
  color: #ddd6fe;
  box-shadow: 0 0 30px -6px rgba(167, 139, 250, 0.7);
}

.lock-overlay p {
  font-size: 13px;
  color: var(--text-soft);
}

.lock-overlay small {
  font-size: 11.5px;
  color: var(--muted-2);
}

/* FAQ */
.faq {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.faq-item[open] {
  border-color: rgba(148, 163, 184, 0.26);
  background: rgba(255, 255, 255, 0.035);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 19px 22px;
  cursor: pointer;
  list-style: none;
  font-size: 14.5px;
  font-weight: 550;
  color: var(--text-soft);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "\f067";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  flex: none;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--muted);
  font-size: 15px;
  transition: transform 0.2s ease, color 0.2s ease;
}

.faq-item[open] summary::after {
  content: "\f068";
  color: var(--text);
  transform: rotate(180deg);
}

.faq-body {
  padding: 0 22px 21px;
  color: var(--muted);
  font-size: 13.8px;
  line-height: 1.8;
}

/* CTA */
.cta-panel {
  position: relative;
  overflow: hidden;
  padding: 70px 40px;
  border: 1px solid rgba(167, 139, 250, 0.28);
  border-radius: 28px;
  text-align: center;
  background:
    radial-gradient(800px 400px at 50% -20%, rgba(124, 58, 237, 0.32), transparent 70%),
    radial-gradient(600px 300px at 100% 100%, rgba(34, 211, 238, 0.16), transparent 70%),
    linear-gradient(160deg, rgba(30, 27, 75, 0.7), rgba(8, 10, 22, 0.92));
  box-shadow: var(--shadow-glow);
}

.cta-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 0.6px, transparent 0.6px);
  background-size: 9px 9px;
  opacity: 0.25;
  pointer-events: none;
}

.cta-panel > * {
  position: relative;
  z-index: 1;
}

.cta-panel h2 {
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -0.04em;
}

.cta-panel p {
  max-width: 540px;
  margin: 16px auto 30px;
  color: var(--muted);
  font-size: 15px;
}

.cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  flex-wrap: wrap;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 64px 0 34px;
  background: rgba(4, 5, 12, 0.6);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 40px;
  padding-bottom: 44px;
}

.footer-brand p {
  max-width: 280px;
  margin-top: 14px;
  color: var(--muted-2);
  font-size: 13px;
  line-height: 1.75;
}

.footer-col h4 {
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer-col a {
  display: block;
  padding: 4px 0;
  color: var(--muted-2);
  font-size: 13px;
  transition: color 0.15s ease;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--muted-2);
  font-size: 12px;
}

.footer-bottom .footer-social {
  display: flex;
  gap: 16px;
}

.footer-bottom a:hover {
  color: var(--text);
}

.app-footer {
  margin-top: 80px;
  padding: 26px 0;
  border-top: 1px solid var(--border);
  background: rgba(4, 5, 12, 0.45);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
}

.footer-copy {
  color: var(--muted-2);
  font-size: 12px;
}

.footer-links {
  display: flex;
  gap: 18px;
  font-size: 12px;
  color: var(--muted-2);
}

.footer-links a:hover {
  color: var(--text);
}

/* --------------------------------------------------------------------------
   Auth page
   -------------------------------------------------------------------------- */

.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-topbar {
  padding: 22px 0;
}

.auth-topbar .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-topbar .back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.auth-topbar .back-link:hover {
  color: var(--text);
}

.auth-shell {
  flex: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 28px 60px;
  display: grid;
  grid-template-columns: 1fr 460px;
  gap: 70px;
  align-items: center;
}

.auth-aside {
  position: relative;
  padding: 20px 0;
}

.auth-aside .eyebrow {
  margin-bottom: 22px;
}

.auth-aside h1 {
  font-size: clamp(34px, 4.4vw, 54px);
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.auth-aside > p {
  margin-top: 20px;
  max-width: 440px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.auth-features {
  margin-top: 38px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-feature {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.auth-feature .af-icon {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
  color: #c4b5fd;
  font-size: 14px;
}

.auth-feature strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 2px;
}

.auth-feature span {
  display: block;
  font-size: 12.5px;
  color: var(--muted-2);
  line-height: 1.6;
}

.auth-card {
  position: relative;
  padding: 30px;
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  background:
    radial-gradient(420px 240px at 50% 0%, rgba(124, 58, 237, 0.14), transparent 70%),
    rgba(11, 14, 28, 0.85);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(167, 139, 250, 0.4), transparent 40%, rgba(34, 211, 238, 0.25));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.auth-card h2 {
  font-size: 23px;
  letter-spacing: -0.02em;
}

.auth-card .auth-sub {
  margin-top: 6px;
  color: var(--muted-2);
  font-size: 13px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 22px 0 24px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(5, 7, 16, 0.6);
}

.auth-tab {
  padding: 9px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  transition: all 0.18s ease;
}

.auth-tab:hover {
  color: var(--text);
}

.auth-tab.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.auth-submit {
  margin-top: 4px;
}

.auth-foot {
  margin-top: 20px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted-2);
  line-height: 1.7;
}

.auth-foot button {
  border: 0;
  background: none;
  color: #c4b5fd;
  font-size: inherit;
}

.auth-foot button:hover {
  text-decoration: underline;
}

.auth-aside-art {
  position: absolute;
  right: -20px;
  bottom: -40px;
  width: 260px;
  height: 170px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background:
    radial-gradient(120% 120% at 20% 10%, rgba(255, 255, 255, 0.2), transparent 45%),
    linear-gradient(145deg, #5b21b6, #1e1b4b 55%, #0e7490);
  box-shadow: var(--shadow);
  transform: rotate(-6deg);
  opacity: 0.6;
  z-index: -1;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   App pages — page header, breadcrumbs
   -------------------------------------------------------------------------- */

.page {
  padding: 48px 0 0;
  min-height: calc(100vh - 260px);
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 26px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.page-head-main {
  max-width: 700px;
}

.page-head h1 {
  font-size: clamp(30px, 4vw, 42px);
  letter-spacing: -0.035em;
}

.page-head .lede {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14.5px;
  max-width: 600px;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.head-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 16px;
  color: var(--muted-2);
  font-size: 12.5px;
}

.head-stats b {
  color: var(--text-soft);
  font-weight: 600;
}

.head-stats span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.head-stats span + span::before {
  content: "•";
  margin-right: 12px;
  color: #39415c;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 12.5px;
  color: var(--muted-2);
  flex-wrap: wrap;
}

.breadcrumb a:hover {
  color: var(--text);
}

.breadcrumb .sep {
  color: #39415c;
}

/* --------------------------------------------------------------------------
   Forum index
   -------------------------------------------------------------------------- */

.forum-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 28px;
  align-items: start;
}

.forum-main {
  min-width: 0;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.search {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 340px;
}

.search input {
  height: 42px;
  padding-left: 38px;
  font-size: 13px;
}

.search svg {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-2);
  pointer-events: none;
}

.search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted-2);
  font-size: 14px;
}

.search-clear:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.sort-tabs {
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}

.sort-tab {
  padding: 6px 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 500;
  transition: all 0.16s ease;
}

.sort-tab:hover {
  color: var(--text-soft);
}

.sort-tab.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.category-tabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 12px;
  scrollbar-width: thin;
}

.cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.18s ease;
}

.cat-tab:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.cat-tab.active {
  border-color: rgba(167, 139, 250, 0.45);
  background: rgba(124, 58, 237, 0.16);
  color: #ddd6fe;
}

.cat-tab .cat-count {
  padding: 0 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 10.5px;
  color: var(--muted-2);
  line-height: 17px;
  min-width: 17px;
  text-align: center;
}

.cat-tab.active .cat-count {
  background: rgba(167, 139, 250, 0.22);
  color: #ddd6fe;
}

.thread-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.thread-row {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 19px 20px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.022);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.thread-row:hover {
  transform: translateY(-2px);
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.04);
}

.thread-row.is-pinned {
  border-color: rgba(34, 211, 238, 0.2);
  background:
    linear-gradient(90deg, rgba(34, 211, 238, 0.05), transparent 40%),
    rgba(255, 255, 255, 0.025);
}

.thread-row .avatar {
  margin-top: 1px;
}

.thread-main {
  flex: 1;
  min-width: 0;
}

.thread-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 5px;
}

.thread-title {
  font-size: 16px;
  font-weight: 620;
  letter-spacing: -0.01em;
  color: var(--text);
  transition: color 0.16s ease;
}

.thread-row:hover .thread-title {
  color: #d8ccff;
}

.thread-excerpt {
  color: var(--muted-2);
  font-size: 12.8px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.thread-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 9px;
  color: var(--muted-2);
  font-size: 11.5px;
  flex-wrap: wrap;
}

.thread-meta .author-name {
  color: var(--muted);
}

.thread-meta .meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #39415c;
}

.thread-meta .meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.thread-row-side {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 9px;
  padding-top: 3px;
  min-width: 92px;
}

.reply-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.reply-pill svg {
  color: var(--muted-2);
}

.thread-row-side .view-count {
  font-size: 11px;
  color: var(--muted-2);
}

.empty-state {
  padding: 64px 24px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.015);
}

.empty-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  border: 1px solid var(--border);
  background: rgba(124, 58, 237, 0.1);
  color: #c4b5fd;
  font-size: 20px;
}

.empty-state h3 {
  font-size: 17px;
  margin-bottom: 7px;
}

.empty-state p {
  color: var(--muted-2);
  font-size: 13px;
  margin-bottom: 20px;
}

.loading-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skeleton {
  height: 98px;
  border-radius: 15px;
  border: 1px solid var(--border);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.025) 25%, rgba(255, 255, 255, 0.055) 37%, rgba(255, 255, 255, 0.025) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.5s ease infinite;
}

.skeleton.short {
  height: 54px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 26px;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 12.5px;
  transition: all 0.16s ease;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--border-strong);
  color: var(--text);
}

.page-btn.active {
  border-color: rgba(167, 139, 250, 0.5);
  background: rgba(124, 58, 237, 0.2);
  color: #ddd6fe;
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.page-info {
  margin: 0 8px;
  font-size: 11.5px;
  color: var(--muted-2);
}

/* Forum sidebar */
.forum-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 98px;
}

.side-card {
  padding: 21px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--grad-panel);
}

.side-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
}

.side-title .side-ico {
  color: var(--muted-2);
  font-size: 13px;
}

.rules {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.rules li {
  position: relative;
  padding-left: 16px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
}

.rules li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(167, 139, 250, 0.8);
}

.side-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: 11px;
  overflow: hidden;
  background: var(--border);
}

.side-stat {
  padding: 13px 14px;
  background: rgba(8, 10, 22, 0.86);
}

.side-stat strong {
  display: block;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.side-stat span {
  font-size: 10.5px;
  color: var(--muted-2);
}

.moderator {
  display: flex;
  align-items: center;
  gap: 12px;
}

.moderator-info strong {
  display: block;
  font-size: 13.5px;
}

.moderator-info span {
  display: block;
  font-size: 11.5px;
  color: var(--muted-2);
}

.side-note {
  margin-top: 12px;
  padding-top: 13px;
  border-top: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--muted-2);
  line-height: 1.65;
}

/* --------------------------------------------------------------------------
   Thread detail
   -------------------------------------------------------------------------- */

.thread-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}

.thread-article {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.022);
  overflow: hidden;
}

.thread-head {
  padding: 30px 32px 24px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(600px 200px at 10% 0%, rgba(124, 58, 237, 0.12), transparent 70%),
    rgba(255, 255, 255, 0.012);
}

.thread-head .label-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 13px;
}

.thread-head h1 {
  font-size: clamp(24px, 3.2vw, 33px);
  line-height: 1.3;
  letter-spacing: -0.025em;
}

.thread-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.thread-byline .author-block {
  display: flex;
  align-items: center;
  gap: 10px;
}

.thread-byline .author-block > div > strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.thread-byline .author-block > div > span {
  display: block;
  font-size: 11px;
  color: var(--muted-2);
}

.thread-byline .byline-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  color: var(--muted-2);
  font-size: 11.5px;
  flex-wrap: wrap;
}

.thread-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.thread-body {
  padding: 30px 32px 34px;
}

.rich-text {
  color: var(--text-soft);
  font-size: 14.5px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.rich-text > *:first-child {
  margin-top: 0;
}

.rich-text > *:last-child {
  margin-bottom: 0;
}

.rich-text p {
  margin: 0 0 15px;
}

.rich-text h2 {
  margin: 30px 0 13px;
  font-size: 21px;
  color: var(--text);
}

.rich-text h3 {
  margin: 24px 0 11px;
  font-size: 17.5px;
  color: var(--text);
}

.rich-text h4 {
  margin: 20px 0 10px;
  font-size: 15.5px;
  color: var(--text);
}

.rich-text strong {
  color: var(--text);
  font-weight: 650;
}

.rich-text a {
  color: #a5b4fc;
  text-decoration: underline;
  text-decoration-color: rgba(165, 180, 252, 0.35);
  text-underline-offset: 3px;
}

.rich-text a:hover {
  color: #c7d2fe;
  text-decoration-color: currentColor;
}

.rich-text ul,
.rich-text ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

.rich-text li {
  margin: 5px 0;
}

.rich-text li::marker {
  color: #a78bfa;
}

.rich-text blockquote {
  margin: 20px 0;
  padding: 12px 18px;
  border-left: 2px solid rgba(167, 139, 250, 0.6);
  border-radius: 0 10px 10px 0;
  background: rgba(124, 58, 237, 0.08);
  color: var(--muted);
}

.rich-text code {
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  color: #f0abfc;
  font-family: var(--mono);
  font-size: 0.88em;
}

.rich-text pre {
  margin: 18px 0;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(3, 4, 10, 0.8);
  overflow-x: auto;
}

.rich-text pre code {
  padding: 0;
  border: 0;
  background: none;
  color: #cbd5e1;
  font-size: 12.5px;
  line-height: 1.7;
}

.rich-text hr {
  margin: 26px 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.replies-section {
  margin-top: 26px;
}

.replies-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.replies-head h2 {
  font-size: 17px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.replies-head h2 span {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.replies {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reply {
  display: flex;
  gap: 13px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.reply:hover {
  border-color: rgba(148, 163, 184, 0.24);
}

.reply-main {
  flex: 1;
  min-width: 0;
}

.reply-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 7px;
}

.reply-head strong {
  font-size: 12.5px;
  font-weight: 600;
}

.reply-head .reply-time {
  font-size: 11px;
  color: var(--muted-2);
}

.reply-floor {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10.5px;
  color: #4e5673;
}

.reply-body {
  color: var(--text-soft);
  font-size: 13.5px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.reply-body p {
  margin: 0 0 8px;
}

.reply-body p:last-child {
  margin-bottom: 0;
}

.reply-delete {
  border: 0;
  background: none;
  padding: 0;
  color: var(--muted-2);
  font-size: 11px;
}

.reply-delete:hover {
  color: #fca5a5;
}

.composer {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--grad-panel);
  padding: 20px;
}

.composer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.composer-user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
}

.composer-role {
  color: var(--muted-2);
  font-size: 11.5px;
}

.composer textarea {
  min-height: 120px;
  background: rgba(4, 6, 14, 0.7);
}

.composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.char-count {
  font-size: 11px;
  color: var(--muted-2);
}

.char-count.over {
  color: var(--danger);
}

/* Thread sidebar */
.thread-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 98px;
}

.thread-stats {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.thread-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}

.thread-stat b {
  color: var(--text-soft);
  font-weight: 600;
}

.related-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.related-item {
  display: block;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.related-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.related-item strong {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-soft);
  transition: color 0.15s ease;
}

.related-item:hover strong {
  color: #d8ccff;
}

.related-item span {
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
  color: var(--muted-2);
}

/* --------------------------------------------------------------------------
   Admin
   -------------------------------------------------------------------------- */

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}

.stat-card {
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--grad-panel);
}

.stat-card .sc-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 10px;
}

.stat-card .sc-ico {
  color: var(--muted-2);
  font-size: 13px;
}

.stat-card strong {
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.stat-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 11px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.admin-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.022);
  overflow: hidden;
}

.admin-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.015);
}

.admin-section-head h2 {
  font-size: 15.5px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.admin-section-head h2 span {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--muted-2);
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 99px;
}

.admin-section-body {
  padding: 22px;
}

.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 20px;
}

.editor-preview {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(4, 6, 14, 0.6);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.editor-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  color: var(--muted-2);
  letter-spacing: 0.05em;
}

.editor-preview-body {
  flex: 1;
  min-height: 320px;
  max-height: 460px;
  overflow-y: auto;
  padding: 16px;
}

.editor-grid .textarea {
  min-height: 320px;
}

.editor-preview-body .rich-text {
  font-size: 13px;
}

.editor-preview-body .empty-preview {
  color: var(--muted-2);
  font-size: 12px;
  text-align: center;
  padding-top: 100px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-row .field {
  margin-bottom: 0;
}

.editor-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.editor-foot .left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.data-table th {
  padding: 11px 14px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.075);
  color: var(--muted);
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.018);
}

.data-table .cell-title {
  color: var(--text-soft);
  font-weight: 500;
  max-width: 320px;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-table .cell-title:hover {
  color: #d8ccff;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
}

.table-btn {
  height: 28px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 11.5px;
  transition: all 0.15s ease;
}

.table-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.table-btn.danger {
  color: #fca5a5;
}

.table-btn.danger:hover {
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(248, 113, 113, 0.08);
}

.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 600;
  border: 1px solid var(--border);
  color: var(--muted);
}

.role-badge.admin {
  border-color: rgba(167, 139, 250, 0.4);
  background: rgba(124, 58, 237, 0.14);
  color: #c4b5fd;
}

.role-badge.subadmin {
  border-color: rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.1);
  color: #67e8f9;
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 9px;
}

.user-cell strong {
  display: block;
  font-size: 12px;
  color: var(--text-soft);
  font-weight: 500;
}

.user-cell > div > span {
  display: block;
  font-size: 10.5px;
  color: var(--muted-2);
}

.admin-side-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.admin-note {
  font-size: 12px;
  color: var(--muted-2);
  line-height: 1.7;
}

.admin-note strong {
  color: var(--text-soft);
}

.quick-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quick-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.02);
  font-size: 12.5px;
  color: var(--text-soft);
  transition: all 0.16s ease;
}

.quick-link:hover {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
}

.quick-link span {
  color: var(--muted-2);
  font-size: 11px;
}

/* --------------------------------------------------------------------------
   Profile
   -------------------------------------------------------------------------- */

.profile-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.profile-card {
  position: sticky;
  top: 98px;
  padding: 30px 24px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(360px 200px at 50% 0%, rgba(124, 58, 237, 0.14), transparent 70%),
    var(--grad-panel);
  text-align: center;
}

.profile-avatar-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 18px;
}

.profile-avatar-box {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 18px 46px -20px rgba(99, 102, 241, 0.8);
}

.profile-avatar-box .avatar {
  width: 120px;
  height: 120px;
  font-size: 34px;
}

.avatar-edit-badge {
  position: absolute;
  right: -1px;
  bottom: 2px;
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border: 3px solid #0c0f1f;
  border-radius: 50%;
  background: var(--grad-strong);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(99, 102, 241, 0.9);
  transition: transform 0.18s ease, filter 0.18s ease;
}

.avatar-edit-badge:hover {
  transform: translateY(-1px) scale(1.04);
  filter: brightness(1.12);
}

.profile-name {
  font-size: 23px;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}

.profile-handle {
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 12.5px;
  overflow-wrap: anywhere;
}

.profile-role {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.profile-role.admin {
  border-color: rgba(167, 139, 250, 0.4);
  background: rgba(124, 58, 237, 0.14);
  color: #c4b5fd;
}

.profile-role.subadmin {
  border-color: rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.1);
  color: #67e8f9;
}

.profile-role.banned {
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.1);
  color: #fca5a5;
}

.profile-layout[data-banned="1"] .btn:disabled,
.profile-layout[data-banned="1"] .input:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.notice-banner {
  margin: 16px 0;
  padding: 13px 16px;
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 11px;
  background: rgba(251, 191, 36, 0.07);
  color: #fcd34d;
  font-size: 12.8px;
  line-height: 1.7;
}

.notice-banner.danger {
  border-color: rgba(248, 113, 113, 0.3);
  background: rgba(248, 113, 113, 0.07);
  color: #fca5a5;
}

.banned-banner {
  position: relative;
  z-index: 50;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(248, 113, 113, 0.28);
  background: rgba(127, 29, 29, 0.42);
  color: #fecaca;
  font-size: 12.5px;
  line-height: 1.6;
  text-align: center;
}

.banned-banner strong {
  color: #fff;
  font-weight: 650;
}

.profile-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 24px 0 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--border);
  gap: 1px;
}

.profile-stat {
  padding: 14px 10px;
  background: rgba(8, 10, 22, 0.86);
}

.profile-stat strong {
  display: block;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.profile-stat span {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 10.5px;
}

.profile-meta {
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: left;
}

.profile-meta div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin: 8px 0;
  font-size: 11.5px;
}

.profile-meta dt {
  color: var(--muted-2);
}

.profile-meta dd {
  margin: 0;
  color: var(--text-soft);
  text-align: right;
}

.profile-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.avatar-uploader {
  padding: 16px;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.015);
}

.upload-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.upload-filename {
  min-width: 0;
  color: var(--muted-2);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.upload-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 15px;
}

.upload-actions .btn-danger {
  margin-left: auto;
}

.profile-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.profile-security-note {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--muted-2);
  font-size: 11.5px;
  line-height: 1.7;
}

.profile-security-note strong {
  color: var(--text-soft);
  font-weight: 600;
}

.compose-wrap {
  max-width: 1040px;
  margin: 0 auto;
}

.compose-note {
  margin-top: 16px;
  color: var(--muted-2);
  font-size: 12.5px;
  line-height: 1.7;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Invite codes
   -------------------------------------------------------------------------- */

.invite-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.invite-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.invite-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex-wrap: wrap;
}

.invite-code {
  padding: 4px 10px;
  border: 1px solid rgba(167, 139, 250, 0.28);
  border-radius: 7px;
  background: rgba(124, 58, 237, 0.12);
  color: #c4b5fd;
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.invite-meta {
  color: var(--muted-2);
  font-size: 11.5px;
}

.invite-actions {
  display: flex;
  gap: 6px;
  flex: none;
}

.invite-empty {
  padding: 26px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  color: var(--muted-2);
  font-size: 12.5px;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Download
   -------------------------------------------------------------------------- */

.download-hero {
  position: relative;
  padding: 64px 0 30px;
  text-align: center;
}

.download-hero h1 {
  font-size: clamp(36px, 5vw, 58px);
  letter-spacing: -0.04em;
}

.download-hero .lede {
  max-width: 560px;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 15px;
}

.version-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 22px;
  padding: 7px 14px;
  border: 1px solid rgba(167, 139, 250, 0.3);
  border-radius: 99px;
  background: rgba(124, 58, 237, 0.1);
  color: #c4b5fd;
  font-size: 12px;
}

.version-chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}

.build-grid {
  display: grid;
  grid-template-columns: minmax(0, 460px);
  justify-content: center;
  gap: 18px;
  margin-top: 42px;
}

.build-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--grad-panel);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.build-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
}

.build-card.is-current {
  border-color: rgba(34, 211, 238, 0.35);
  box-shadow: 0 20px 60px -30px rgba(34, 211, 238, 0.4);
}

.build-card.is-current::after {
  content: "适用于当前设备";
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 3px 9px;
  border-radius: 99px;
  border: 1px solid rgba(34, 211, 238, 0.3);
  background: rgba(34, 211, 238, 0.1);
  color: #67e8f9;
  font-size: 10px;
  font-weight: 600;
}

.os-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  color: var(--text-soft);
  margin-bottom: 20px;
}

.build-card h3 {
  font-size: 19px;
  margin-bottom: 6px;
}

.build-card .build-req {
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.6;
  min-height: 38px;
}

.build-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--muted-2);
}

.build-meta b {
  color: var(--text-soft);
  font-weight: 500;
}

.checksum {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(4, 6, 14, 0.5);
}

.checksum code {
  flex: 1;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.checksum button {
  border: 0;
  background: none;
  color: var(--muted-2);
  font-size: 11px;
  padding: 2px 4px;
  border-radius: 4px;
}

.checksum button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.download-note {
  max-width: 780px;
  margin: 26px auto 0;
  padding: 14px 18px;
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 11px;
  background: rgba(251, 191, 36, 0.05);
  color: #d6c48d;
  font-size: 12px;
  line-height: 1.7;
  text-align: left;
}

.download-sections {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: 22px;
  align-items: start;
  margin-top: 54px;
}

.changelog {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.log-item {
  display: flex;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.log-item:last-child {
  border-bottom: 0;
}

.log-version {
  flex: none;
  width: 76px;
  font-family: var(--mono);
  font-size: 12px;
  color: #c4b5fd;
  padding-top: 2px;
}

.log-content h4 {
  font-size: 14px;
  margin-bottom: 5px;
}

.log-content p {
  color: var(--muted-2);
  font-size: 12.5px;
  line-height: 1.7;
}

.log-content .log-date {
  font-size: 10.5px;
  color: #4e5673;
  margin-left: 8px;
  font-weight: 400;
}

.req-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.req-table td {
  padding: 9px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  color: var(--muted);
}

.req-table tr:last-child td {
  border-bottom: 0;
}

.req-table td:first-child {
  color: var(--muted-2);
  width: 90px;
}

/* --------------------------------------------------------------------------
   Docs
   -------------------------------------------------------------------------- */

.docs-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 46px;
  align-items: start;
}

.docs-nav {
  position: sticky;
  top: 98px;
  padding: 18px 0;
}

.docs-nav-title {
  padding: 0 12px 12px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.docs-nav a {
  display: block;
  padding: 6px 12px;
  margin-bottom: 2px;
  border-left: 2px solid transparent;
  color: var(--muted);
  font-size: 12.5px;
  transition: all 0.16s ease;
}

.docs-nav a:hover {
  color: var(--text);
}

.docs-nav a.active {
  border-left-color: #a78bfa;
  color: #ddd6fe;
  background: linear-gradient(90deg, rgba(124, 58, 237, 0.12), transparent);
}

.docs-nav .docs-nav-group {
  margin-top: 16px;
}

.docs-content {
  min-width: 0;
  max-width: 780px;
}

.doc-hero {
  padding-bottom: 30px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.doc-hero h1 {
  font-size: clamp(30px, 4vw, 40px);
  letter-spacing: -0.035em;
}

.doc-hero p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14.5px;
}

.doc-section {
  padding: 34px 0;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 100px;
}

.doc-section:last-of-type {
  border-bottom: 0;
}

.doc-section h2 {
  font-size: 23px;
  margin-bottom: 14px;
  letter-spacing: -0.025em;
}

.doc-section h3 {
  font-size: 16px;
  margin: 22px 0 9px;
}

.doc-section p {
  color: var(--muted);
  font-size: 13.8px;
  line-height: 1.85;
  margin-bottom: 14px;
}

.doc-section ul,
.doc-section ol {
  margin: 0 0 16px;
  padding-left: 22px;
  color: var(--muted);
  font-size: 13.8px;
  line-height: 1.85;
}

.doc-section li {
  margin: 5px 0;
}

.doc-section li::marker {
  color: #a78bfa;
}

.doc-section strong {
  color: var(--text-soft);
  font-weight: 600;
}

.doc-steps {
  counter-reset: docstep;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 18px 0 20px;
}

.doc-step {
  position: relative;
  padding: 16px 18px 16px 54px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.75;
}

.doc-step::before {
  counter-increment: docstep;
  content: counter(docstep);
  position: absolute;
  left: 16px;
  top: 16px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  border: 1px solid rgba(167, 139, 250, 0.35);
  background: rgba(124, 58, 237, 0.14);
  color: #ddd6fe;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
}

.doc-step strong {
  display: block;
  margin-bottom: 2px;
  color: var(--text-soft);
}

.callout {
  display: flex;
  gap: 12px;
  margin: 20px 0;
  padding: 15px 17px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 12px;
  background: rgba(34, 211, 238, 0.055);
  color: #a5e8f3;
  font-size: 12.8px;
  line-height: 1.75;
}

.callout.warn {
  border-color: rgba(251, 191, 36, 0.22);
  background: rgba(251, 191, 36, 0.05);
  color: #d6c48d;
}

.callout-icon {
  flex: none;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid currentColor;
  font-size: 11px;
  font-weight: 700;
  margin-top: 1px;
}

.code-block {
  position: relative;
  margin: 18px 0;
  padding: 15px 17px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(3, 4, 10, 0.75);
  overflow-x: auto;
}

.code-block code {
  font-family: var(--mono);
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.7;
  white-space: pre;
}

.kbd {
  display: inline-block;
  min-width: 20px;
  padding: 1px 6px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 11px;
  text-align: center;
}

.docs-cta {
  margin-top: 34px;
  padding: 26px;
  border: 1px solid rgba(167, 139, 250, 0.28);
  border-radius: 16px;
  background:
    radial-gradient(500px 200px at 0% 0%, rgba(124, 58, 237, 0.2), transparent 70%),
    rgba(255, 255, 255, 0.025);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.docs-cta h3 {
  font-size: 18px;
  margin-bottom: 5px;
}

.docs-cta p {
  color: var(--muted-2);
  font-size: 12.5px;
}

/* --------------------------------------------------------------------------
   Modal, toast, misc
   -------------------------------------------------------------------------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(3, 4, 10, 0.72);
  backdrop-filter: blur(8px);
  animation: fade-in 0.18s ease both;
}

.modal {
  width: 100%;
  max-width: 430px;
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  background: #0c0f1f;
  box-shadow: var(--shadow);
  animation: modal-in 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
  overflow: hidden;
}

.modal.wide {
  max-width: 520px;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 0;
}

.modal-head h2 {
  font-size: 19px;
  letter-spacing: -0.02em;
}

.modal-head p {
  margin-top: 5px;
  color: var(--muted-2);
  font-size: 12.5px;
}

.modal-close {
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
}

.modal-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.modal-body {
  padding: 20px 24px 24px;
}

.modal-message {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.75;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.toast-wrap {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-width: min(360px, calc(100vw - 44px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 15px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background: rgba(15, 18, 35, 0.96);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.9);
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.5;
  backdrop-filter: blur(14px);
  animation: toast-in 0.24s cubic-bezier(0.22, 1, 0.36, 1) both;
  pointer-events: auto;
}

.toast.leaving {
  animation: toast-out 0.2s ease both;
}

.toast-icon {
  flex: none;
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  margin-top: 1px;
}

.toast-success .toast-icon {
  background: rgba(52, 211, 153, 0.16);
  color: #6ee7b7;
}

.toast-error .toast-icon {
  background: rgba(248, 113, 113, 0.16);
  color: #fca5a5;
}

.toast-info .toast-icon {
  background: rgba(129, 140, 248, 0.16);
  color: #a5b4fc;
}

/* Error page */
.error-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 24px;
  text-align: center;
}

.error-card {
  max-width: 520px;
}

.error-code {
  font-size: clamp(90px, 18vw, 160px);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.06em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 20px 60px rgba(124, 58, 237, 0.35));
}

.error-card h1 {
  margin-top: 18px;
  font-size: 25px;
}

.error-card p {
  margin: 12px auto 26px;
  color: var(--muted);
  font-size: 14px;
  max-width: 380px;
}

.error-actions {
  display: flex;
  justify-content: center;
  gap: 11px;
  flex-wrap: wrap;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------------------------
   Keyframes
   -------------------------------------------------------------------------- */

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@keyframes shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

@keyframes drift-a {
  from { transform: translateX(-70%) translateY(0) scale(1); }
  to { transform: translateX(-58%) translateY(40px) scale(1.08); }
}

@keyframes drift-b {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-40px, 30px) scale(1.1); }
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes window-rise {
  from { opacity: 0; transform: perspective(1600px) rotateX(6deg) translateY(30px); }
  to { opacity: 1; transform: perspective(1600px) rotateX(1.6deg) translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateY(6px) scale(0.98); }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1080px) {
  .hero-title {
    font-size: clamp(44px, 7.8vw, 70px);
  }

  .showcase-grid {
    grid-template-columns: 1fr 1fr;
  }

  .showcase-card:first-child {
    grid-column: span 2;
    min-height: 260px;
  }

  .auth-shell {
    gap: 40px;
    grid-template-columns: 1fr 420px;
  }
}

@media (max-width: 940px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 20px 18px;
    border-bottom: 1px solid var(--border);
    background: rgba(7, 9, 19, 0.97);
    backdrop-filter: blur(18px);
    box-shadow: 0 24px 40px -24px rgba(0, 0, 0, 0.9);
  }

  .site-header.nav-open .main-nav {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-link {
    padding: 11px 12px;
  }

  .nav-link.is-active::after {
    display: none;
  }

  .header-inner {
    gap: 16px;
  }

  .forum-layout,
  .thread-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .forum-side,
  .thread-side {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .thread-side {
    grid-template-columns: 1fr;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .download-sections {
    grid-template-columns: 1fr;
  }

  .docs-layout {
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 30px;
  }

  .auth-shell {
    grid-template-columns: 1fr;
    max-width: 520px;
    gap: 34px;
    padding-top: 10px;
  }

  .auth-aside {
    text-align: center;
    padding: 0;
  }

  .auth-aside > p {
    margin-left: auto;
    margin-right: auto;
  }

  .auth-features {
    display: none;
  }

  .auth-aside-art {
    display: none;
  }

  .window-body {
    grid-template-columns: 170px minmax(0, 1fr);
  }

  .mock-panel {
    display: none;
  }

  .features-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }

  .price-card.featured {
    transform: none;
  }

  .locked-community {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }

  .editor-grid {
    grid-template-columns: 1fr;
  }

  .editor-preview-body {
    min-height: 200px;
  }

  .build-grid {
    grid-template-columns: 1fr;
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
  }

  .auth-page .site-footer {
    display: none;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 14.5px;
  }

  .shell {
    padding: 0 18px;
  }

  .section {
    padding: 72px 0;
  }

  .section-tight {
    padding: 50px 0;
  }

  .section-head {
    margin-bottom: 36px;
  }

  .header-inner {
    height: 66px;
  }

  .brand-text {
    font-size: 17px;
  }

  .user-chip-meta {
    display: none;
  }

  .user-chip {
    width: 42px;
    padding: 0;
    justify-content: center;
  }

  .user-chip .chev {
    display: none;
  }

  .header-actions {
    gap: 8px;
  }

  .hero {
    padding: 64px 0 20px;
  }

  .hero-title {
    font-size: clamp(38px, 10.5vw, 56px);
  }

  .hero-sub {
    font-size: 14.5px;
    margin-top: 18px;
  }

  .hero-actions {
    margin-top: 28px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-visual {
    margin-top: 48px;
    padding: 0 18px;
  }

  .app-window {
    transform: none;
  }

  .window-body {
    grid-template-columns: minmax(0, 1fr);
    height: 380px;
  }

  .mock-sidebar {
    display: none;
  }

  .mock-main {
    padding: 18px;
  }

  .floating-card {
    display: none;
  }

  .trust-row {
    gap: 20px;
    margin-top: 44px;
    padding-top: 24px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .showcase-grid {
    grid-template-columns: 1fr;
  }

  .showcase-card:first-child {
    grid-column: auto;
  }

  .showcase-card {
    min-height: 220px;
  }

  .stats-band {
    grid-template-columns: 1fr 1fr;
  }

  .stat {
    padding: 24px 18px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  .footer-brand {
    grid-column: span 2;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta-panel {
    padding: 48px 22px;
    border-radius: 22px;
  }

  .cta-actions .btn {
    width: 100%;
  }

  .locked-community {
    padding: 22px;
  }

  .locked-preview {
    min-height: 220px;
  }

  .page {
    padding-top: 32px;
  }

  .page-head {
    margin-bottom: 22px;
  }

  .toolbar {
    align-items: stretch;
  }

  .search {
    max-width: none;
  }

  .sort-tabs {
    align-self: flex-start;
  }

  .forum-side {
    grid-template-columns: 1fr;
  }

  .thread-row {
    padding: 16px;
    gap: 12px;
  }

  .thread-row .avatar {
    width: 34px;
    height: 34px;
    font-size: 12px;
  }

  .thread-row-side {
    display: none;
  }

  .thread-meta {
    gap: 10px;
  }

  .thread-meta .meta-optional {
    display: none;
  }

  .thread-head {
    padding: 22px 20px 20px;
  }

  .thread-body {
    padding: 22px 20px 26px;
  }

  .thread-byline .byline-meta {
    margin-left: 0;
    width: 100%;
  }

  .reply {
    padding: 15px 15px;
  }

  .composer {
    padding: 16px;
  }

  .admin-section-head,
  .admin-section-body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .admin-stats {
    grid-template-columns: 1fr 1fr;
  }

  .download-hero {
    padding-top: 44px;
  }

  .docs-layout {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .docs-nav {
    position: static;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 0 0 12px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 10px;
  }

  .docs-nav-title {
    display: none;
  }

  .docs-nav a {
    flex: none;
    padding: 6px 11px;
    border: 1px solid var(--border);
    border-radius: 99px;
    white-space: nowrap;
    font-size: 11.5px;
  }

  .docs-nav a.active {
    border-color: rgba(167, 139, 250, 0.4);
    background: rgba(124, 58, 237, 0.14);
  }

  .doc-section {
    padding: 26px 0;
  }

  .docs-cta {
    padding: 20px;
  }

  .footer-inner {
    justify-content: center;
    text-align: center;
  }

  .app-footer {
    margin-top: 52px;
  }

  .landing-header .header-actions > .nav-link {
    display: none;
  }

  .landing-header .header-actions > .nav-link[href="/login"] {
    display: inline-flex;
  }

  .landing-header .header-actions .btn-sm {
    height: 38px;
    padding: 0 14px;
    font-size: 12.5px;
  }

  .head-stats {
    gap: 6px 14px;
    font-size: 12px;
  }

  .head-stats span + span::before {
    display: none;
  }

  .editor-grid .textarea {
    min-height: 220px;
  }

  .auth-card {
    padding: 24px 20px;
  }

  .auth-shell {
    padding: 10px 18px 44px;
  }

  .auth-topbar {
    padding: 16px 0;
  }

  .toast-wrap {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .modal-actions .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 36px;
  }

  .hero-badge {
    font-size: 11.5px;
  }

  .hero-note {
    font-size: 11.5px;
  }

  .stat strong {
    font-size: 26px;
  }

  .admin-stats {
    grid-template-columns: 1fr 1fr;
  }

  .thread-excerpt {
    -webkit-line-clamp: 2;
  }

  .page-head h1 {
    font-size: 30px;
  }

  .log-item {
    flex-direction: column;
    gap: 4px;
  }
}

@media (max-width: 940px) {
  .profile-layout {
    grid-template-columns: 1fr;
  }

  .profile-card {
    position: static;
  }
}

@media (max-width: 720px) {
  .profile-card {
    padding: 24px 18px;
  }

  .upload-actions .btn-danger {
    margin-left: 0;
  }

  .invite-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .invite-actions {
    align-self: flex-end;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
