.forum-page{max-width:none;width:100%;min-height:calc(100vh - var(--topbar-offset, 0px));margin:0;padding:0 18px 32px;background:var(--bg,#0f172a);color:var(--text,#e5e7eb)}
.forum-shell{width:100%;max-width:none;margin:0;display:grid;gap:16px}
.forum-topbar{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px 2px 2px}
.forum-topbar-title{font-size:clamp(24px,3vw,36px);line-height:1;font-weight:900;letter-spacing:-.035em}
.forum-layout{display:grid;grid-template-columns:240px minmax(0,1fr);gap:18px;align-items:start}
.forum-sidebar,.forum-main,.forum-create,.forum-login-hint{border:1px solid var(--t-border,rgba(148,163,184,.22));border-radius:20px;background:var(--t-surface,rgba(15,23,42,.72));box-shadow:0 14px 34px rgba(2,6,23,.16)}
.forum-sidebar{position:sticky;top:88px;padding:12px;display:grid;gap:8px}
.forum-sidebar-title{padding:8px 10px;color:var(--muted,#94a3b8);font-weight:800;font-size:12px;text-transform:uppercase;letter-spacing:.08em}
.forum-space{width:100%;border:0;border-radius:14px;background:transparent;color:inherit;text-align:left;padding:11px 12px;font-weight:750;cursor:pointer}
.forum-space:hover,.forum-space.active{background:rgba(96,165,250,.16);color:#bfdbfe}
.forum-main{padding:14px;display:grid;gap:12px}
.forum-toolbar{display:grid;grid-template-columns:1fr auto auto;gap:10px}
.forum-search,.forum-select,.forum-create input,.forum-create select,.forum-create textarea,.forum-comment-form textarea{border:1px solid var(--t-border,rgba(148,163,184,.24));border-radius:14px;background:transparent;color:inherit;padding:11px 12px;font:inherit;outline:none}
.forum-image-input{display:none}
.forum-image-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.forum-image-label{display:inline-flex}
.forum-image-hint{font-size:13px;color:var(--muted,#94a3b8)}
.forum-image-preview{width:min(420px,100%);max-height:260px;object-fit:cover;border-radius:16px;border:1px solid var(--t-border,rgba(148,163,184,.22))}
.forum-image-preview.hidden{display:none}
.forum-modal{position:fixed;inset:0;z-index:60;display:grid;place-items:center;padding:24px}
.forum-modal.hidden{display:none}
.forum-modal-backdrop{position:absolute;inset:0;border:0;background:rgba(2,6,23,.6);cursor:pointer}
.forum-modal-panel{position:relative;width:min(820px,100%);max-height:90vh;overflow:auto;border-radius:22px;border:1px solid var(--t-border,rgba(148,163,184,.22));background:var(--bg,#0f172a);padding:18px 18px 20px;box-shadow:0 25px 70px rgba(2,6,23,.45)}
.forum-modal-header{font-weight:900;font-size:20px;margin-bottom:8px}
.forum-modal-close{position:absolute;top:14px;right:14px;border:0;background:rgba(148,163,184,.18);color:inherit;width:34px;height:34px;border-radius:999px;font-size:20px;cursor:pointer}
.forum-modal-panel .forum-create{padding:0;border:0;background:transparent;box-shadow:none}
.forum-modal-panel .forum-create input,.forum-modal-panel .forum-create select,.forum-modal-panel .forum-create textarea{background:transparent}
body.forum-modal-open{overflow:hidden}
.forum-confirm-modal{position:fixed;inset:0;z-index:70;display:grid;place-items:center;padding:16px}
.forum-confirm-modal.hidden{display:none}
.forum-confirm-backdrop{position:absolute;inset:0;border:0;background:rgba(2,6,23,.52)}
.forum-confirm-panel{position:relative;width:min(360px,100%);border-radius:14px;border:1px solid var(--t-border,rgba(148,163,184,.26));background:var(--t-surface,rgba(15,23,42,.96));box-shadow:0 18px 40px rgba(2,6,23,.34);padding:14px;display:grid;gap:12px}
.forum-confirm-text{font-size:14px;font-weight:700;line-height:1.4}
.forum-confirm-actions{display:flex;justify-content:flex-end;gap:8px}
.forum-create{padding:16px;display:grid;gap:10px}
.forum-create.hidden,.forum-login-hint.hidden,.forum-status.hidden,.forum-posts.hidden,.forum-detail.hidden{display:none}
.forum-create textarea,.forum-comment-form textarea{resize:vertical;min-height:110px;white-space:pre-wrap}
.forum-form-actions{display:flex;justify-content:flex-end;gap:10px}
.forum-primary,.forum-ghost{border:0;border-radius:14px;padding:11px 16px;font-weight:850;cursor:pointer;white-space:nowrap}
.forum-primary{background:#2563eb;color:white}
.forum-ghost{background:rgba(148,163,184,.16);color:inherit}
.forum-login-hint,.forum-status{padding:13px 14px;color:var(--muted,#94a3b8)}
.forum-status.error{color:#fecaca}
.forum-posts{display:grid;gap:10px}
.forum-post-card{display:grid;grid-template-columns:auto 1fr;gap:12px;padding:14px;border:1px solid var(--t-border,rgba(148,163,184,.18));border-radius:18px;background:transparent}
.forum-like{border:1px solid rgba(248,113,113,.22);border-radius:16px;background:rgba(248,113,113,.08);color:#fecaca;min-width:54px;padding:8px;display:inline-flex;align-items:center;justify-content:center;gap:6px;font-weight:900;cursor:pointer;height:max-content}
.forum-like.liked{background:rgba(248,113,113,.2);color:#fb7185;border-color:rgba(248,113,113,.42)}
.forum-like.inline{width:max-content;margin-top:12px;padding-inline:14px}
.forum-post-content{min-width:0}
.forum-post-meta{font-size:12px;font-weight:750;color:var(--muted,#94a3b8);margin-bottom:6px}
.forum-user-link{color:var(--text,#e5e7eb);font-weight:900;text-decoration:none}
.forum-user-link:hover{color:#93c5fd}
.forum-post-title{border:0;background:transparent;color:var(--text,#e5e7eb);text-align:left;padding:0;font-size:20px;font-weight:900;cursor:pointer;line-height:1.2}
.forum-post-title:hover{color:#93c5fd}
.forum-post-image{display:block;width:100%;max-width:100%;aspect-ratio:16/9;height:auto;max-height:none;object-fit:contain;border-radius:16px;margin:10px auto;border:0;background:transparent}
.forum-post-image.full{width:100%;max-width:100%;aspect-ratio:16/9;height:auto;max-height:none;object-fit:contain;background:transparent}
.forum-post-excerpt{margin:8px 0;color:var(--text,#e5e7eb);line-height:1.55;white-space:pre-wrap}
.forum-post-stats{font-size:13px;color:var(--muted,#94a3b8);font-weight:750}
.forum-detail{display:grid;gap:12px}
.forum-back{width:max-content;border:0;background:transparent;color:#93c5fd;font-weight:850;cursor:pointer;padding:6px 0}
.forum-post-full,.forum-comments{padding:18px;border:1px solid var(--t-border,rgba(148,163,184,.18));border-radius:18px;background:transparent}
.forum-post-full h2{margin:0 0 12px;font-size:30px;line-height:1.15}
.forum-post-full p,.forum-comment p{white-space:pre-wrap;line-height:1.65;margin:0;color:var(--text,#e5e7eb)}
.forum-comments{display:grid;gap:12px}
.forum-comments h3{margin:0;font-size:18px}
.forum-comment{padding:12px;border-radius:14px;background:rgba(148,163,184,.08)}
.forum-comment.is-reply{background:rgba(59,130,246,.10);border:1px solid rgba(59,130,246,.28)}
.forum-reply-label{font-size:12px;font-weight:800;color:#93c5fd;margin-bottom:6px;letter-spacing:.01em}
.forum-comment-node{margin-left:calc(var(--comment-depth,0) * 14px)}
.forum-comment-children{display:grid;gap:8px;margin-top:8px;padding-left:10px;border-left:1px solid rgba(148,163,184,.24)}
.forum-action-row.comment{margin-top:8px}
.forum-reply-form{margin-top:8px;padding:10px;border-radius:12px;background:rgba(148,163,184,.08)}
.forum-reply-form .forum-primary{justify-self:start}
.forum-comment-form{display:grid;gap:10px}
.forum-comment-form .forum-primary{justify-self:end}
[data-theme="light"] .forum-page{background:#ffffff;color:#0f172a}
[data-theme="light"] .forum-sidebar,[data-theme="light"] .forum-main,[data-theme="light"] .forum-create,[data-theme="light"] .forum-login-hint{background:#fff;color:#0f172a;box-shadow:0 14px 34px rgba(15,23,42,.08)}
[data-theme="light"] .forum-search,[data-theme="light"] .forum-select,[data-theme="light"] .forum-create input,[data-theme="light"] .forum-create select,[data-theme="light"] .forum-create textarea,[data-theme="light"] .forum-comment-form textarea{background:transparent;color:#0f172a}
[data-theme="light"] .forum-post-card,[data-theme="light"] .forum-post-full,[data-theme="light"] .forum-comments{background:transparent}
[data-theme="light"] .forum-comment,[data-theme="light"] .forum-reply-form{background:#f3f4f6}
[data-theme="light"] .forum-comment.is-reply{background:#eaf2ff;border-color:#bfdbfe}
[data-theme="light"] .forum-reply-label{color:#1d4ed8}
[data-theme="light"] .forum-modal-panel{background:#f8fafc;color:#0f172a;box-shadow:0 24px 60px rgba(15,23,42,.2)}
[data-theme="light"] .forum-modal-panel .forum-create input,[data-theme="light"] .forum-modal-panel .forum-create select,[data-theme="light"] .forum-modal-panel .forum-create textarea{background:#f8fafc}
[data-theme="light"] .forum-confirm-panel{background:#fff;border-color:rgba(15,23,42,.12);box-shadow:0 14px 30px rgba(15,23,42,.16)}
@media (max-width:860px){.forum-page{padding-inline:12px}.forum-topbar{flex-direction:column;align-items:flex-start}.forum-layout{grid-template-columns:1fr}.forum-sidebar{position:static;display:flex;overflow:auto}.forum-space{white-space:nowrap}.forum-toolbar{grid-template-columns:1fr}.forum-post-card{grid-template-columns:1fr}.forum-like{width:max-content}.forum-form-actions{justify-content:stretch}.forum-form-actions>*{flex:1}}

.forum-layout{grid-template-columns:236px minmax(0,1fr);grid-template-areas:"side main";align-items:start}
.forum-main{grid-area:main;padding:0;background:transparent;border:0;box-shadow:none}
.forum-sidebar{grid-area:side;background:transparent;border:0;box-shadow:none;padding:0}
.forum-toolbar,.forum-posts,.forum-detail{width:min(50%,960px);margin-inline:auto}
.forum-about-card{padding:16px;border:1px solid var(--t-border,rgba(148,163,184,.22));border-radius:18px;background:var(--t-surface,rgba(15,23,42,.72));display:grid;gap:10px}
.forum-about-title{font-weight:900;font-size:18px}
.forum-about-card p{margin:0;color:var(--muted,#94a3b8);line-height:1.5}
.forum-sidebar-create{width:100%;justify-content:center}
.forum-spaces-card{padding:14px;border:1px solid var(--t-border,rgba(148,163,184,.18));border-radius:20px;background:transparent;display:grid;gap:8px}
.forum-spaces-card .forum-sidebar-title{padding:0 0 4px;color:var(--text,#111827);font-size:18px;font-weight:900;text-transform:none;letter-spacing:-.02em}
.forum-spaces-card .forum-space{display:grid;grid-template-columns:30px 1fr;align-items:center;gap:8px;padding:9px 10px;border-radius:12px;color:var(--text,#111827);font-size:15px;font-weight:850}
.forum-spaces-card .forum-space:hover,.forum-spaces-card .forum-space.active{background:#eef4ff;color:#2563eb}
.forum-space-icon{display:inline-grid;place-items:center;width:24px;height:24px;color:#6b7280}
.forum-spaces-card .forum-space.active .forum-space-icon{color:#2563eb}
.forum-space-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.forum-spaces-card .forum-sidebar-create{margin-top:8px;padding-block:11px;border-radius:13px;background:#2563eb;font-size:15px;box-shadow:0 10px 20px rgba(37,99,235,.22)}
.forum-toolbar{border:1px solid var(--t-border,rgba(148,163,184,.22));border-radius:18px;background:var(--t-surface,rgba(15,23,42,.72));padding:12px}
.forum-post-card{display:grid;grid-template-columns:1fr;padding:14px 18px 12px;border-radius:18px;background:transparent;gap:8px}
.forum-post-card:hover{border-color:rgba(148,163,184,.38)}
.forum-post-meta-row{display:flex;align-items:center;gap:6px;color:var(--muted,#94a3b8);font-size:13px;font-weight:650;min-width:0}
.forum-post-meta-wrap{position:relative}
.forum-post-id{font-weight:900;color:var(--muted,#94a3b8)}
.forum-post-space{font-weight:900;color:var(--text,#e5e7eb)}
.forum-post-more{margin-left:auto;border:0;background:transparent;color:var(--muted,#94a3b8);font-size:22px;line-height:1;cursor:pointer;border-radius:999px;width:32px;height:28px}
.forum-post-more:hover{background:rgba(148,163,184,.16);color:var(--text,#e5e7eb)}
.forum-post-menu{position:absolute;right:0;top:34px;display:none;min-width:190px;padding:8px;border:1px solid var(--t-border,rgba(148,163,184,.28));border-radius:12px;background:var(--t-surface,rgba(15,23,42,.96));box-shadow:0 12px 30px rgba(2,6,23,.28);z-index:12}
.forum-post-menu.open{display:grid;gap:4px}
.forum-post-menu .forum-action{justify-content:flex-start;width:100%;padding:8px 10px;border-radius:10px;font-size:14px}
.forum-post-menu .forum-action:hover{background:rgba(148,163,184,.14)}
.forum-post-menu .forum-action.reported:hover{background:transparent}
.forum-post-title{font-size:22px;color:var(--text,#e5e7eb)}
.forum-post-excerpt{margin:0;font-size:16px;line-height:1.5;color:var(--text,#e5e7eb)}
.forum-post-image{width:100%;max-width:100%;aspect-ratio:16/9;height:auto;max-height:none;object-fit:contain;border-radius:18px;margin:6px auto 2px;border:0;background:transparent}
.forum-post-image.full{width:100%;max-width:100%;aspect-ratio:16/9;height:auto;max-height:none;object-fit:contain}
.forum-action-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:2px}
.forum-action{border:0;border-radius:0;background:transparent;color:inherit;padding:0;font-weight:850;cursor:pointer;display:inline-flex;align-items:center;gap:6px}
.forum-action:hover,.forum-action.liked{background:transparent}
.forum-action.liked{color:#fb7185}
.forum-action.warn{color:#fda4af}
.forum-action.reported{opacity:.72;cursor:not-allowed}
.forum-action svg{width:18px;height:18px;display:block}
.forum-post-full{display:grid;gap:10px}
[data-theme="light"] .forum-main,[data-theme="light"] .forum-sidebar{background:transparent;box-shadow:none}
[data-theme="light"] .forum-about-card,[data-theme="light"] .forum-toolbar{background:#fff;color:#0f172a;box-shadow:0 14px 34px rgba(15,23,42,.08)}
[data-theme="light"] .forum-post-title,[data-theme="light"] .forum-post-excerpt{color:#0f172a}
[data-theme="light"] .forum-post-menu{background:#fff;border-color:rgba(15,23,42,.12);box-shadow:0 10px 24px rgba(15,23,42,.12)}
[data-theme="light"] .forum-spaces-card{background:#ffffff;color:#000000;border-color:rgba(15,23,42,.12);box-shadow:0 10px 24px rgba(15,23,42,.06)}
[data-theme="light"] .forum-spaces-card .forum-sidebar-title,[data-theme="light"] .forum-spaces-card .forum-space{color:#000000}
[data-theme="light"] .forum-space-icon{color:#000000}
[data-theme="light"] .forum-spaces-card .forum-space:hover,[data-theme="light"] .forum-spaces-card .forum-space.active{background:#eef4ff;color:#2563eb}
[data-theme="dark"] .forum-spaces-card{background:var(--bg,#0f172a);border-color:rgba(148,163,184,.22);box-shadow:0 10px 24px rgba(0,0,0,.35)}
[data-theme="dark"] .forum-spaces-card .forum-sidebar-title,[data-theme="dark"] .forum-spaces-card .forum-space{color:#e5e7eb}
[data-theme="dark"] .forum-space-icon{color:#a7b0bf}
[data-theme="dark"] .forum-spaces-card .forum-space:hover{background:rgba(148,163,184,.16);color:#f8fafc}
[data-theme="dark"] .forum-spaces-card .forum-space.active{background:rgba(30,41,59,.95);color:#f8fafc}
[data-theme="dark"] .forum-spaces-card .forum-space.active .forum-space-icon{color:#f8fafc}
@media (max-width:980px){.forum-layout{grid-template-columns:1fr;grid-template-areas:"side" "main"}.forum-sidebar{position:static}.forum-toolbar,.forum-posts,.forum-detail{width:100%;margin-inline:0}}

.forum-modal-backdrop{background:rgba(0,0,0,.62)!important}
.forum-modal-panel{background:#171a20!important}
.forum-modal-panel .forum-create input,.forum-modal-panel .forum-create select,.forum-modal-panel .forum-create textarea{background:transparent!important}
[data-theme="light"] .forum-modal-panel{background:#f8fafc!important}
[data-theme="light"] .forum-modal-panel .forum-create input,[data-theme="light"] .forum-modal-panel .forum-create select,[data-theme="light"] .forum-modal-panel .forum-create textarea{background:transparent!important}
