:root {
    --bg: #08090d;
    --bg-deep: #050609;
    --panel: #111319;
    --panel-2: #151820;
    --panel-3: #1a1e27;
    --line: #252a35;
    --line-soft: #1d212a;
    --text: #eef0f6;
    --muted: #8d94a3;
    --muted-2: #626978;
    --purple: #8b5cf6;
    --purple-2: #6d40df;
    --green: #36dc80;
    --blue: #43b3ff;
    --orange: #ffad42;
    --red: #ff5364;
    --radius: 12px;
    --shadow: 0 18px 60px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 50% -20%, rgba(124, 85, 255, .13), transparent 38rem),
        var(--bg);
    color: var(--text);
    font: 14px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
img { max-width: 100%; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .025;
    z-index: 50;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 1px solid rgba(255, 255, 255, .065);
    background: rgba(8, 9, 13, .9);
    backdrop-filter: blur(18px);
}
.topbar-inner {
    max-width: 1220px;
    height: 68px;
    margin: auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 34px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.brand > span:last-child { display: flex; flex-direction: column; line-height: 1; }
.brand strong { font-size: 16px; letter-spacing: .16em; font-weight: 850; }
.brand small { color: var(--muted-2); font-size: 8px; letter-spacing: .45em; margin-top: 5px; }
.brand-mark {
    position: relative;
    width: 34px;
    height: 34px;
    display: inline-block;
    transform: rotate(45deg);
}
.brand-mark i { position: absolute; display: block; border-radius: 4px; }
.brand-mark i:nth-child(1) { inset: 2px 18px 18px 2px; background: #a878ff; }
.brand-mark i:nth-child(2) { inset: 10px 10px 10px 10px; background: #7952ed; }
.brand-mark i:nth-child(3) { inset: 18px 2px 2px 18px; background: #4b2dae; }
.brand-mark.small { width: 28px; height: 28px; }
.main-nav { display: flex; align-self: stretch; gap: 4px; }
.main-nav a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    color: #9ca2b0;
    font-size: 13px;
    font-weight: 650;
}
.main-nav a:hover { color: #fff; }
.main-nav a::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: -1px;
    height: 2px;
    background: var(--purple);
    transform: scaleX(0);
}
.main-nav a.active { color: #fff; }
.main-nav a.active::after { transform: scaleX(1); }
.header-actions { position: relative; margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
    position: relative;
    width: 38px;
    height: 38px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}
.icon-btn:hover { color: white; background: var(--panel-2); border-color: var(--line); }
.badge-count {
    position: absolute;
    right: 1px;
    top: 0;
    display: grid;
    place-items: center;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border: 2px solid var(--bg);
    border-radius: 10px;
    background: var(--purple);
    color: white;
    font-size: 9px;
    font-weight: 800;
}
.user-menu-button {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-left: 4px;
    padding: 5px 8px 5px 5px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel);
    cursor: pointer;
}
.user-menu-button > span { font-size: 12px; font-weight: 700; }
.user-menu-button > svg { width: 14px; color: var(--muted); }
.dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    z-index: 20;
    width: 220px;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #14171e;
    box-shadow: var(--shadow);
}
.dropdown-user { padding: 10px 11px 12px; border-bottom: 1px solid var(--line); margin-bottom: 5px; }
.dropdown-user strong, .dropdown-user span { display: block; }
.dropdown-user span { color: var(--green); font-size: 11px; margin-top: 2px; }
.dropdown a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; color: #bac0cb; border-radius: 7px; font-size: 12px; }
.dropdown a:hover { color: white; background: var(--panel-3); }
.dropdown svg { width: 16px; }
.header-search {
    position: absolute;
    left: 50%;
    top: 14px;
    transform: translateX(-5%);
    width: min(330px, 28vw);
    height: 40px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 10px 0 13px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #0e1015;
}
.header-search svg { width: 16px; color: var(--muted-2); }
.header-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: white; font-size: 12px; }
.header-search input::placeholder { color: #646b78; }
kbd { padding: 1px 6px; border: 1px solid #2d323d; border-bottom-width: 2px; border-radius: 4px; color: #707785; font: 10px/16px inherit; }
.mobile-search-toggle { display: none; }

.site-shell { width: min(1180px, calc(100% - 40px)); min-height: calc(100vh - 220px); margin: 0 auto; padding: 34px 0 70px; }
.container-narrow { max-width: 920px; margin: 0 auto; }
.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin: 0 0 24px;
}
.page-head h1 { margin: 4px 0 4px; font-size: clamp(25px, 3vw, 34px); line-height: 1.15; letter-spacing: -.035em; }
.page-head p { margin: 0; color: var(--muted); }
.eyebrow { color: #9c7bff; font-size: 10px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.muted { color: var(--muted); }
.subtle { color: var(--muted-2); }
.page-actions { display: flex; gap: 9px; flex-wrap: wrap; }

.btn {
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: white;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .01em;
    cursor: pointer;
    transition: .15s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(135deg, #8b5cf6, #6840d8); box-shadow: 0 8px 24px rgba(124, 85, 255, .2); }
.btn-ghost { border-color: var(--line); background: var(--panel); color: #c7cbd4; }
.btn-danger { background: rgba(255, 83, 100, .12); border-color: rgba(255, 83, 100, .3); color: #ff7c89; }
.btn-success { background: rgba(54, 220, 128, .1); border-color: rgba(54, 220, 128, .3); color: var(--green); }
.btn.compact { min-height: 35px; padding: 0 13px; }
.btn-large { width: 100%; min-height: 50px; font-size: 13px; }
.btn svg { width: 16px; }

.welcome-strip {
    position: relative;
    overflow: hidden;
    min-height: 146px;
    margin-bottom: 28px;
    padding: 28px 32px;
    border: 1px solid #2a2345;
    border-radius: 14px;
    background:
        linear-gradient(100deg, rgba(23, 19, 37, .98) 0%, rgba(18, 18, 29, .96) 70%, rgba(18, 18, 29, .85) 100%),
        radial-gradient(circle at 75% 50%, rgba(139, 92, 246, .5), transparent 26rem);
    box-shadow: inset 0 1px rgba(255,255,255,.035), var(--shadow);
}
.welcome-strip::after {
    content: "";
    position: absolute;
    right: -60px;
    top: -95px;
    width: 390px;
    height: 390px;
    border: 1px solid rgba(139, 92, 246, .18);
    border-radius: 50%;
    box-shadow: 0 0 0 55px rgba(139, 92, 246, .025), 0 0 0 110px rgba(139, 92, 246, .018);
}
.welcome-content { position: relative; z-index: 2; max-width: 650px; }
.welcome-content h1 { margin: 7px 0 7px; font-size: 27px; letter-spacing: -.035em; }
.welcome-content p { margin: 0 0 18px; color: #a5aabb; }
.welcome-actions { display: flex; gap: 9px; }
.welcome-meta { display: flex; gap: 22px; margin-top: 17px; color: var(--muted); font-size: 11px; }
.welcome-meta strong { color: white; }

.layout-grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 22px; align-items: start; }
.content-stack, .sidebar { min-width: 0; }
.content-stack { display: grid; gap: 18px; }
.sidebar { display: grid; gap: 14px; }
.panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(17, 19, 25, .92);
    box-shadow: 0 8px 30px rgba(0,0,0,.12);
}
.panel-head {
    min-height: 47px;
    padding: 0 16px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.panel-head h2, .panel-head h3 { margin: 0; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.panel-head a { color: #8e7ae6; font-size: 11px; font-weight: 700; }
.panel-body { padding: 17px; }
.panel-empty { padding: 48px 22px; text-align: center; color: var(--muted); }
.panel-empty svg { width: 28px; height: 28px; color: var(--muted-2); }
.panel-empty h3 { color: white; margin: 9px 0 3px; }
.panel-empty p { margin: 0; }

.category-row {
    min-height: 82px;
    padding: 14px 15px;
    border-bottom: 1px solid var(--line-soft);
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) 90px 210px;
    gap: 13px;
    align-items: center;
    transition: background .15s;
}
.category-row:last-child { border-bottom: 0; border-radius: 0 0 var(--radius) var(--radius); }
.category-row:hover { background: rgba(255,255,255,.018); }
.category-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--cat) 32%, transparent);
    border-radius: 10px;
    background: color-mix(in srgb, var(--cat) 11%, transparent);
    color: var(--cat);
    font-size: 19px;
}
.category-info { min-width: 0; }
.category-info > a { color: #f1f2f6; font-size: 14px; font-weight: 760; }
.category-info > a:hover { color: #a98fff; }
.category-info p { margin: 3px 0 0; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.category-stats { color: var(--muted); font-size: 10px; text-align: center; text-transform: uppercase; line-height: 1.65; }
.category-stats strong { display: block; color: #d5d8df; font-size: 13px; letter-spacing: 0; }
.last-post { min-width: 0; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 9px; align-items: center; }
.last-post-text { min-width: 0; }
.last-post-text a { display: block; overflow: hidden; color: #cbd0d9; font-size: 11px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.last-post-text span { display: block; color: var(--muted-2); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sidebar-card { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(17,19,25,.88); }
.sidebar-card-head { min-height: 43px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.sidebar-card-head h3 { margin: 0; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.sidebar-card-body { padding: 14px; }
.online-list { display: flex; flex-wrap: wrap; gap: 7px; }
.online-user { position: relative; }
.online-user::after { content:""; position:absolute; right:0; bottom:0; width:8px; height:8px; border:2px solid var(--panel); border-radius:50%; background:var(--green); }
.online-copy { margin: 11px 0 0; color: var(--muted); font-size: 10px; }
.online-copy strong { color: #cfd2d9; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; }
.stat-cell { padding: 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat-cell:nth-child(even) { border-right: 0; }
.stat-cell:nth-last-child(-n+2) { border-bottom: 0; }
.stat-cell strong, .stat-cell span { display: block; }
.stat-cell strong { font-size: 18px; letter-spacing: -.03em; }
.stat-cell span { color: var(--muted-2); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.newest-member { display: flex; align-items: center; gap: 10px; padding: 13px 14px; border-top: 1px solid var(--line); }
.newest-member span { color: var(--muted); font-size: 10px; }
.newest-member a { display: block; color: white; font-size: 11px; font-weight: 700; }
.community-rules { margin: 0; padding: 0; list-style: none; counter-reset: rule; }
.community-rules li { position: relative; padding: 8px 0 8px 29px; color: #a9aebb; font-size: 11px; }
.community-rules li::before { counter-increment: rule; content: counter(rule); position: absolute; left: 0; top: 7px; width: 19px; height: 19px; display: grid; place-items: center; border-radius: 6px; background: rgba(139,92,246,.11); color: #a98fff; font-size: 9px; font-weight: 800; }

.avatar { flex: 0 0 auto; object-fit: cover; border-radius: 9px; background: #232730; }
.avatar-fallback { display: inline-grid; place-items: center; background: linear-gradient(135deg, hsl(var(--avatar-hue) 60% 46%), hsl(var(--avatar-hue) 55% 28%)); color: white; font-weight: 800; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }

.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0 0 17px; color: var(--muted); font-size: 11px; }
.breadcrumb a:hover { color: white; }
.breadcrumb span { color: #4f5664; }
.forum-banner { position: relative; overflow: hidden; min-height: 112px; margin-bottom: 19px; padding: 25px 27px; border: 1px solid color-mix(in srgb, var(--cat) 25%, var(--line)); border-radius: var(--radius); background: linear-gradient(105deg, color-mix(in srgb, var(--cat) 10%, var(--panel)) 0%, var(--panel) 75%); }
.forum-banner::after { content: attr(data-icon); position: absolute; right: 35px; top: -35px; color: color-mix(in srgb, var(--cat) 8%, transparent); font-size: 135px; font-weight: 900; transform: rotate(-10deg); }
.forum-banner h1 { position: relative; z-index: 2; margin: 4px 0; font-size: 27px; }
.forum-banner p { position: relative; z-index: 2; margin: 0; color: var(--muted); }
.forum-toolbar { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.sort-tabs { display: flex; padding: 4px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); }
.sort-tabs a { padding: 7px 11px; border-radius: 6px; color: var(--muted); font-size: 10px; font-weight: 700; }
.sort-tabs a.active { background: var(--panel-3); color: white; }

.thread-row {
    min-height: 72px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--line-soft);
    display: grid;
    grid-template-columns: 38px minmax(0,1fr) 130px 68px 68px;
    gap: 12px;
    align-items: center;
}
.thread-row:last-child { border-bottom: 0; }
.thread-row:hover { background: rgba(255,255,255,.014); }
.thread-state { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; color: var(--muted-2); background: var(--panel-2); }
.thread-state.hot { color: var(--orange); border-color: rgba(255,173,66,.25); background: rgba(255,173,66,.08); }
.thread-state.pinned { color: #a88aff; border-color: rgba(139,92,246,.28); background: rgba(139,92,246,.09); }
.thread-state svg { width: 15px; }
.thread-title { min-width: 0; }
.thread-title-line { display: flex; align-items: center; gap: 7px; min-width: 0; }
.thread-title-line > a { overflow: hidden; color: #e7e9ee; font-size: 12px; font-weight: 720; white-space: nowrap; text-overflow: ellipsis; }
.thread-title-line > a:hover { color: #a98fff; }
.tag { flex: 0 0 auto; padding: 2px 6px; border: 1px solid rgba(139,92,246,.26); border-radius: 4px; background: rgba(139,92,246,.09); color: #aa90ff; font-size: 8px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.tag.locked { color: var(--red); border-color: rgba(255,83,100,.25); background: rgba(255,83,100,.08); }
.thread-byline { margin-top: 4px; color: var(--muted-2); font-size: 9px; }
.thread-byline a { color: #9299a8; }
.thread-last { min-width: 0; color: var(--muted-2); font-size: 9px; }
.thread-last a { display: block; overflow: hidden; color: #b4bac5; font-size: 10px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.thread-number { color: var(--muted-2); font-size: 9px; text-align: center; text-transform: uppercase; }
.thread-number strong { display: block; color: #d6d9e0; font-size: 12px; }
.pagination { display: flex; justify-content: center; gap: 5px; margin-top: 18px; }
.pagination a { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--muted); font-size: 11px; }
.pagination a:hover, .pagination a.active { color: white; border-color: var(--purple); background: rgba(139,92,246,.13); }

.thread-header { margin-bottom: 17px; padding: 21px 23px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.thread-header-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.thread-header h1 { margin: 5px 0 8px; font-size: clamp(20px, 2.6vw, 28px); line-height: 1.25; letter-spacing: -.03em; }
.thread-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 10px; }
.thread-meta span { display: inline-flex; align-items: center; gap: 5px; }
.thread-meta svg { width: 13px; }
.post-card {
    display: grid;
    grid-template-columns: 172px minmax(0,1fr);
    margin-bottom: 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--panel);
}
.post-user {
    padding: 19px 15px;
    border-right: 1px solid var(--line);
    background: rgba(255,255,255,.012);
    text-align: center;
}
.post-user .avatar { margin-bottom: 9px; border-radius: 13px; }
.post-user-name { display: block; color: #f0f1f5; font-weight: 780; overflow: hidden; text-overflow: ellipsis; }
.rank-badge { display: inline-flex; align-items: center; margin-top: 5px; padding: 2px 7px; border-radius: 4px; font-size: 8px; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.seeded-badge { color:#c4b5fd; background:rgba(124,92,255,.13); border:1px solid rgba(124,92,255,.35); }
.rank-admin { background: rgba(255,83,100,.12); color: #ff6c7a; }
.rank-mod { background: rgba(54,220,128,.11); color: var(--green); }
.rank-trusted { background: rgba(67,179,255,.11); color: var(--blue); }
.rank-legend, .rank-veteran { background: rgba(255,173,66,.11); color: var(--orange); }
.rank-contributor { background: rgba(139,92,246,.11); color: #ab91ff; }
.rank-new { background: rgba(141,148,163,.1); color: #9da3af; }
.post-user-stats { display: grid; gap: 4px; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; text-align: left; }
.post-user-stats span { display: flex; justify-content: space-between; }
.post-user-stats strong { color: #c4c9d2; font-weight: 650; }
.post-main { min-width: 0; display: flex; flex-direction: column; }
.post-head { min-height: 45px; padding: 0 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; color: var(--muted-2); font-size: 9px; }
.post-head-right { display: flex; align-items: center; gap: 8px; }
.post-number { color: #7f8694; }
.post-body { min-height: 130px; padding: 21px 20px; color: #cfd3db; font-size: 13px; line-height: 1.75; overflow-wrap: anywhere; }
.post-body a { color: #a98fff; text-decoration: underline; text-underline-offset: 2px; }
.post-body blockquote { margin: 14px 0; padding: 12px 15px; border-left: 3px solid var(--purple); background: #0c0e13; color: #aeb4c0; }
.post-body pre { overflow: auto; margin: 15px 0; padding: 15px; border: 1px solid #282d38; border-radius: 8px; background: #080a0f; color: #c5d0e5; font: 12px/1.65 "SFMono-Regular", Consolas, monospace; white-space: pre; }
.post-signature { margin: 0 20px; padding: 12px 0; border-top: 1px solid var(--line-soft); color: var(--muted-2); font-size: 10px; }
.post-actions { min-height: 45px; margin-top: auto; padding: 0 13px; border-top: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; }
.post-reactions, .post-tools { display: flex; align-items: center; gap: 6px; }
.action-chip { height: 29px; padding: 0 9px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel-2); color: var(--muted); font-size: 9px; cursor: pointer; }
.action-chip:hover, .action-chip.active { color: white; border-color: rgba(139,92,246,.45); background: rgba(139,92,246,.1); }
.action-chip svg { width: 13px; }
.quick-reply { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.quick-reply-head { min-height: 46px; padding: 0 15px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.quick-reply-head h3 { margin: 0; font-size: 12px; }
.editor-toolbar { min-height: 41px; padding: 6px 10px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 4px; }
.editor-toolbar button { width: 28px; height: 28px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer; }
.editor-toolbar button:hover { color: white; background: var(--panel-3); }
.editor-toolbar .divider { width: 1px; height: 18px; margin: 0 4px; background: var(--line); }
.editor-area { width: 100%; min-height: 150px; padding: 15px; border: 0; outline: 0; resize: vertical; background: #0e1015; color: #e2e4e9; line-height: 1.65; }
.editor-area::placeholder { color: #59606e; }
.editor-footer { padding: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.editor-footer span { color: var(--muted-2); font-size: 9px; }

.stack-form { display: grid; gap: 15px; }
.stack-form label, .form-label { display: grid; gap: 6px; color: #c6cad2; font-size: 11px; font-weight: 650; }
.stack-form label > span, .form-label > span { display: flex; align-items: center; justify-content: space-between; }
.stack-form small { color: var(--muted-2); font-size: 9px; font-weight: 400; }
input, select, textarea {
    width: 100%;
    border: 1px solid #2a2f39;
    border-radius: 8px;
    outline: 0;
    background: #0d0f14;
    color: #eceef3;
}
input, select { height: 43px; padding: 0 12px; }
textarea { min-height: 130px; padding: 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #7452d6; box-shadow: 0 0 0 3px rgba(139,92,246,.08); }
input::placeholder, textarea::placeholder { color: #555c69; }
.field-grid { display: grid; gap: 13px; }
.field-grid.two { grid-template-columns: 1fr 1fr; }
.form-section-title { margin-top: 5px; padding-bottom: 7px; border-bottom: 1px solid var(--line); color: #8f76e8; font-size: 9px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.form-card { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin-top: 5px; }
.character-count { color: var(--muted-2); font-size: 9px; font-weight: 500; }
.help-text { margin: -6px 0 0; color: var(--muted-2); font-size: 9px; }
.checkbox-line { display: flex !important; grid-template-columns: 18px 1fr; align-items: center; gap: 9px !important; }
.checkbox-line input { width: 17px; height: 17px; accent-color: var(--purple); }

.flash { position: relative; min-height: 43px; margin-bottom: 14px; padding: 10px 43px 10px 13px; border: 1px solid; border-radius: 9px; display: flex; align-items: center; gap: 9px; font-size: 11px; }
.flash svg { width: 15px; }
.flash button { position: absolute; right: 9px; border: 0; background: transparent; color: currentColor; cursor: pointer; opacity: .7; font-size: 18px; }
.flash-success { color: #70eca8; border-color: rgba(54,220,128,.25); background: rgba(54,220,128,.07); }
.flash-warning { color: #ffc266; border-color: rgba(255,173,66,.25); background: rgba(255,173,66,.07); }
.flash-error { color: #ff7d89; border-color: rgba(255,83,100,.26); background: rgba(255,83,100,.07); }

.auth-body { background: #08090d; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, .85fr) minmax(520px, 1.15fr); }
.auth-brand-panel { position: relative; overflow: hidden; padding: clamp(35px, 6vw, 85px); display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid #201c32; background: linear-gradient(150deg, #161225, #0c0d13 62%); }
.auth-brand-panel::before { content:""; position:absolute; width:600px; height:600px; left:-270px; bottom:-300px; border:1px solid rgba(139,92,246,.2); border-radius:50%; box-shadow: 0 0 0 70px rgba(139,92,246,.025), 0 0 0 140px rgba(139,92,246,.018); }
.auth-brand { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; letter-spacing: .16em; }
.auth-brand-panel > div { position: relative; z-index: 2; }
.auth-brand-panel h1 { max-width: 480px; margin: 10px 0 14px; font-size: clamp(34px, 4.4vw, 62px); line-height: 1.04; letter-spacing: -.055em; }
.auth-brand-panel p { max-width: 500px; color: #9ea3b0; font-size: 15px; }
.auth-proof { display: flex; align-items: center; gap: 11px; color: var(--muted); font-size: 11px; }
.avatar-stack { display: flex; padding-left: 7px; }
.avatar-stack .avatar { margin-left: -7px; border: 2px solid #12101d; }
.auth-form-panel { display: grid; place-items: center; padding: 40px 24px; background: radial-gradient(circle at 60% 0, rgba(139,92,246,.06), transparent 35rem); }
.auth-form-wrap { width: min(390px, 100%); }
.auth-form-wrap.wide { width: min(650px, 100%); }
.auth-form-wrap h2 { margin: 7px 0 5px; font-size: 29px; letter-spacing: -.04em; }
.auth-form-wrap > p { margin: 0 0 24px; }
.auth-switch { margin-top: 20px; color: var(--muted); font-size: 11px; text-align: center; }
.auth-switch a { color: #a98fff; font-weight: 700; }
.install-shell { grid-template-columns: minmax(360px, .75fr) minmax(620px, 1.25fr); }
.install-checks { display: grid; gap: 8px; color: #a8aeb9; font-size: 11px; }

.member-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.member-card { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); display: grid; grid-template-columns: 48px minmax(0,1fr); gap: 12px; }
.member-card:hover { border-color: #3a3f4b; transform: translateY(-1px); }
.member-card h3 { margin: 1px 0 3px; overflow: hidden; font-size: 13px; text-overflow: ellipsis; }
.member-card-meta { color: var(--muted-2); font-size: 9px; }
.member-card-rep { margin-top: 7px; color: var(--green); font-size: 10px; font-weight: 700; }
.member-filter { display: flex; gap: 8px; margin-bottom: 16px; }
.member-filter input { max-width: 300px; }

.profile-hero { position: relative; overflow: hidden; margin-bottom: 17px; padding: 28px; border: 1px solid #2d2841; border-radius: 14px; background: linear-gradient(120deg,#181426,#111319 65%); }
.profile-hero::after { content:""; position:absolute; right:-60px; top:-180px; width:430px; height:430px; border-radius:50%; background:radial-gradient(circle,rgba(139,92,246,.14),transparent 65%); }
.profile-main { position: relative; z-index: 2; display: flex; align-items: center; gap: 20px; }
.profile-main .avatar { border-radius: 18px; box-shadow: 0 12px 30px rgba(0,0,0,.28); }
.profile-main h1 { margin: 0 0 5px; font-size: 27px; letter-spacing: -.04em; }
.profile-main p { margin: 8px 0 0; color: var(--muted); }
.profile-actions { margin-left: auto; align-self: flex-start; display: flex; gap: 8px; }
.profile-stats { position: relative; z-index:2; display:flex; gap:28px; margin:22px 0 0 100px; }
.profile-stats strong, .profile-stats span { display: block; }
.profile-stats strong { font-size: 17px; }
.profile-stats span { color: var(--muted-2); font-size: 9px; text-transform: uppercase; letter-spacing:.08em; }
.activity-item { padding: 14px 16px; border-bottom: 1px solid var(--line-soft); display: flex; gap: 11px; }
.activity-item:last-child { border:0; }
.activity-icon { width:34px; height:34px; flex:0 0 auto; display:grid; place-items:center; border-radius:8px; background:rgba(139,92,246,.09); color:#a98fff; }
.activity-item h4 { margin:0; font-size:11px; }
.activity-item p { margin:3px 0 0; color:var(--muted); font-size:10px; }

.search-box-large { display:flex; gap:8px; padding:14px; margin-bottom:17px; border:1px solid var(--line); border-radius:var(--radius); background:var(--panel); }
.search-box-large input { height:46px; }
.search-result { padding:16px; border-bottom:1px solid var(--line-soft); }
.search-result:last-child { border:0; }
.search-result h3 { margin:0 0 4px; font-size:13px; }
.search-result h3 a:hover { color:#a98fff; }
.search-result p { margin:7px 0; color:#a9afbb; font-size:11px; }
.search-result-meta { display:flex; gap:12px; color:var(--muted-2); font-size:9px; }

.message-layout { display:grid; grid-template-columns:210px minmax(0,1fr); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; background:var(--panel); }
.message-nav { padding:12px; border-right:1px solid var(--line); background:rgba(255,255,255,.012); }
.message-nav .btn { width:100%; margin-bottom:12px; }
.message-nav a:not(.btn) { display:flex; align-items:center; justify-content:space-between; padding:9px 10px; border-radius:7px; color:var(--muted); font-size:11px; }
.message-nav a.active, .message-nav a:hover { background:var(--panel-3); color:white; }
.message-list { min-width:0; }
.message-row { padding:13px 15px; border-bottom:1px solid var(--line-soft); display:grid; grid-template-columns:38px minmax(0,1fr) 100px; gap:11px; align-items:center; }
.message-row.unread { background:rgba(139,92,246,.035); }
.message-row.unread .message-subject { color:white; font-weight:760; }
.message-subject { display:block; overflow:hidden; color:#c9ced7; text-overflow:ellipsis; white-space:nowrap; font-size:11px; }
.message-preview { display:block; overflow:hidden; margin-top:2px; color:var(--muted-2); text-overflow:ellipsis; white-space:nowrap; font-size:9px; }
.message-date { color:var(--muted-2); text-align:right; font-size:9px; }
.message-view { padding:20px; }
.message-view h2 { margin:0 0 7px; font-size:20px; }
.message-view-meta { display:flex; align-items:center; gap:9px; color:var(--muted); font-size:10px; }
.message-view-body { margin-top:18px; padding-top:18px; border-top:1px solid var(--line); line-height:1.75; color:#ced2da; }

.tabs { display:flex; gap:4px; margin-bottom:15px; padding:4px; border:1px solid var(--line); border-radius:9px; background:var(--panel); width:max-content; max-width:100%; overflow:auto; }
.tabs a { padding:7px 11px; border-radius:6px; color:var(--muted); font-size:10px; font-weight:700; white-space:nowrap; }
.tabs a.active { color:white; background:var(--panel-3); }
.data-table { width:100%; border-collapse:collapse; }
.data-table th { padding:10px 12px; color:var(--muted-2); font-size:9px; text-align:left; text-transform:uppercase; letter-spacing:.06em; border-bottom:1px solid var(--line); }
.data-table td { padding:11px 12px; color:#bcc2cd; font-size:10px; border-bottom:1px solid var(--line-soft); vertical-align:middle; }
.data-table tr:last-child td { border-bottom:0; }
.data-table .actions { display:flex; gap:5px; flex-wrap:wrap; }
.mini-btn { padding:5px 8px; border:1px solid var(--line); border-radius:5px; background:var(--panel-2); color:var(--muted); font-size:8px; cursor:pointer; }
.mini-btn:hover { color:white; }
.status-pill { display:inline-flex; padding:3px 7px; border-radius:20px; background:rgba(141,148,163,.1); color:#a3a9b5; font-size:8px; font-weight:800; text-transform:uppercase; }
.status-pill.open { background:rgba(255,173,66,.1); color:var(--orange); }
.status-pill.resolved, .status-pill.active { background:rgba(54,220,128,.1); color:var(--green); }
.status-pill.banned { background:rgba(255,83,100,.1); color:var(--red); }

.modal-backdrop { position:fixed; inset:0; z-index:90; padding:20px; display:grid; place-items:center; background:rgba(2,3,5,.76); backdrop-filter:blur(5px); }
.modal { width:min(480px,100%); border:1px solid var(--line); border-radius:13px; background:#15171e; box-shadow:0 30px 80px rgba(0,0,0,.5); }
.modal-head { padding:14px 16px; border-bottom:1px solid var(--line); display:flex; justify-content:space-between; align-items:center; }
.modal-head h3 { margin:0; font-size:13px; }
.modal-close { border:0; background:transparent; color:var(--muted); font-size:20px; cursor:pointer; }
.modal-body { padding:17px; }

.footer { border-top: 1px solid var(--line-soft); background: var(--bg-deep); }
.footer-inner { max-width: 1180px; min-height: 140px; margin: auto; padding: 28px 20px 78px; display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; }
.footer-brand { display:flex; align-items:center; gap:10px; }
.footer-brand strong, .footer-brand span { display:block; }
.footer-brand strong { font-size:11px; letter-spacing:.14em; }
.footer-brand span { color:var(--muted-2); font-size:9px; margin-top:2px; }
.footer nav { display:flex; gap:18px; color:var(--muted); font-size:10px; }
.footer nav a:hover { color:white; }
.footer p { grid-column:1/-1; margin:0; color:#4e5460; font-size:9px; }
.mobile-nav { display:none; }

@media (max-width: 1060px) {
    .header-search { display: none; }
    .mobile-search-toggle { display:grid; }
    .layout-grid { grid-template-columns:minmax(0,1fr) 260px; }
    .category-row { grid-template-columns:46px minmax(0,1fr) 75px 170px; }
    .member-grid { grid-template-columns:1fr 1fr; }
}

@media (max-width: 820px) {
    body { padding-bottom: 66px; }
    .topbar-inner { height:61px; padding:0 14px; gap:12px; }
    .brand small, .main-nav, .user-menu-button > span, .user-menu-button > svg, .register-header { display:none; }
    .brand strong { font-size:13px; }
    .brand-mark { width:30px; height:30px; }
    .header-search.open { display:flex; position:absolute; inset:61px 0 auto; transform:none; width:100%; border:0; border-bottom:1px solid var(--line); border-radius:0; background:#0d0f14; }
    .site-shell { width:min(100% - 24px, 720px); padding:21px 0 35px; }
    .layout-grid { grid-template-columns:1fr; }
    .sidebar { grid-template-columns:1fr 1fr; }
    .welcome-strip { padding:23px; }
    .welcome-content h1 { font-size:23px; }
    .category-row { grid-template-columns:42px minmax(0,1fr) 64px; }
    .last-post { display:none; }
    .thread-row { grid-template-columns:36px minmax(0,1fr) 55px 55px; }
    .thread-last { display:none; }
    .post-card { grid-template-columns:1fr; }
    .post-user { padding:12px 14px; border-right:0; border-bottom:1px solid var(--line); display:grid; grid-template-columns:44px minmax(0,1fr) auto; align-items:center; gap:10px; text-align:left; }
    .post-user .avatar { width:44px!important; height:44px!important; margin:0; grid-row:1/3; }
    .post-user-stats { display:flex; gap:13px; margin:0; padding:0; border:0; grid-column:2/4; }
    .post-user-stats span { gap:4px; }
    .post-user-stats span:nth-child(n+3) { display:none; }
    .rank-badge { margin:0; justify-self:end; }
    .profile-hero { padding:20px; }
    .profile-main { align-items:flex-start; }
    .profile-actions { position:absolute; right:0; top:0; }
    .profile-stats { margin-left:82px; gap:18px; }
    .auth-shell, .install-shell { grid-template-columns:1fr; }
    .auth-brand-panel { min-height:310px; padding:35px 24px; border-right:0; border-bottom:1px solid #201c32; }
    .auth-brand-panel h1 { font-size:39px; }
    .auth-form-panel { padding:36px 18px; }
    .message-layout { grid-template-columns:1fr; }
    .message-nav { border-right:0; border-bottom:1px solid var(--line); display:flex; gap:5px; overflow:auto; }
    .message-nav .btn { width:auto; margin:0; }
    .message-nav a:not(.btn) { white-space:nowrap; }
    .footer-inner { padding-bottom:25px; }
    .mobile-nav { position:fixed; left:0; right:0; bottom:0; z-index:60; height:66px; padding-bottom:env(safe-area-inset-bottom); display:grid; grid-template-columns:repeat(5,1fr); border-top:1px solid #282c35; background:rgba(10,11,15,.96); backdrop-filter:blur(16px); }
    .mobile-nav a { position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; color:#737a88; font-size:8px; }
    .mobile-nav a.active { color:white; }
    .mobile-nav svg { width:18px; }
    .mobile-nav .mobile-create svg { width:34px; height:34px; padding:8px; margin-top:-18px; border-radius:50%; background:linear-gradient(135deg,#8b5cf6,#6640d3); color:white; box-shadow:0 6px 20px rgba(139,92,246,.35); }
}

@media (max-width: 580px) {
    .site-shell { width:calc(100% - 18px); }
    .icon-btn { width:34px; }
    .welcome-strip { min-height:0; padding:20px 18px; }
    .welcome-actions { flex-direction:column; align-items:stretch; }
    .welcome-meta { gap:13px; flex-wrap:wrap; }
    .sidebar { grid-template-columns:1fr; }
    .category-row { min-height:72px; grid-template-columns:38px minmax(0,1fr); gap:10px; padding:12px; }
    .category-icon { width:37px; height:37px; }
    .category-stats { display:none; }
    .thread-row { grid-template-columns:32px minmax(0,1fr) 48px; gap:8px; padding:10px; }
    .thread-row .thread-number:nth-last-child(1) { display:none; }
    .thread-state { width:30px; height:30px; }
    .forum-banner { padding:20px; }
    .forum-toolbar, .page-head { align-items:stretch; flex-direction:column; }
    .sort-tabs { width:100%; }
    .sort-tabs a { flex:1; text-align:center; }
    .page-actions .btn { flex:1; }
    .thread-header { padding:17px; }
    .thread-header-top { flex-direction:column; }
    .post-body { padding:17px 15px; }
    .post-signature { margin:0 15px; }
    .post-actions { align-items:flex-start; padding:8px 10px; gap:7px; }
    .post-reactions, .post-tools { flex-wrap:wrap; }
    .editor-footer { align-items:stretch; flex-direction:column; }
    .editor-footer .btn { width:100%; }
    .field-grid.two { grid-template-columns:1fr; }
    .member-grid { grid-template-columns:1fr; }
    .profile-main { display:grid; grid-template-columns:68px minmax(0,1fr); gap:13px; }
    .profile-main .avatar { width:68px!important; height:68px!important; }
    .profile-actions { position:static; grid-column:1/-1; margin:5px 0 0; }
    .profile-stats { margin:18px 0 0; justify-content:space-between; gap:8px; }
    .search-box-large { flex-direction:column; }
    .message-row { grid-template-columns:34px minmax(0,1fr); }
    .message-date { display:none; }
    .data-table { display:block; overflow-x:auto; }
    .footer-inner { grid-template-columns:1fr; }
    .footer nav { flex-wrap:wrap; }
    .auth-brand-panel { min-height:275px; }
    .auth-proof { display:none; }
}

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