:root {
    --bg: #0f172a;
    --panel: #111827;
    --panel-soft: #1f2937;
    --text: #e5e7eb;
    --muted: #94a3b8;
    --accent: #38bdf8;
    --danger: #ef4444;
    --warning: #f59e0b;
    --success: #10b981;
    --border: rgba(148,163,184,.25);
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(180deg, #0b1120, #172033);
    color: var(--text);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { width: min(1100px, calc(100% - 32px)); margin: 0 auto; }
.topbar { border-bottom: 1px solid var(--border); background: rgba(15,23,42,.88); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 10; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 18px 0; }
.brand { color: white; font-size: 28px; font-weight: 700; }
.subtitle { color: var(--muted); font-size: 13px; margin-top: 4px; }
.nav { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.user-pill { padding: 8px 12px; border-radius: 999px; background: rgba(56,189,248,.15); }
.content { padding: 28px 0 40px; }
.card { background: rgba(17,24,39,.85); border: 1px solid var(--border); border-radius: 18px; padding: 20px; margin-bottom: 18px; box-shadow: 0 16px 40px rgba(0,0,0,.22); }
.card h1, .card h2, .card h3 { margin-top: 0; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
label { display: block; font-weight: 700; margin-bottom: 6px; }
input, textarea, select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #0b1220;
    color: var(--text);
    margin-bottom: 14px;
}
textarea { min-height: 140px; resize: vertical; }
button, .button {
    display: inline-block;
    background: var(--accent);
    color: #082032;
    border: none;
    padding: 11px 16px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
}
button.danger, .button.danger { background: var(--danger); color: white; }
button.warning, .button.warning { background: var(--warning); color: #111827; }
button.secondary, .button.secondary { background: #334155; color: white; }
.flash { padding: 14px 16px; border-radius: 14px; margin-bottom: 14px; border: 1px solid transparent; }
.flash-success { background: rgba(16,185,129,.12); border-color: rgba(16,185,129,.5); }
.flash-error { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.5); }
.flash-info { background: rgba(56,189,248,.12); border-color: rgba(56,189,248,.5); }
.meta { color: var(--muted); font-size: 14px; }
.topic-list { display: grid; gap: 14px; }
.topic-row { display: grid; gap: 10px; border: 1px solid var(--border); border-radius: 16px; padding: 16px; background: rgba(30,41,59,.55); }
.topic-row h3 { margin: 0; }
.post { display: grid; grid-template-columns: 220px 1fr; gap: 16px; border-top: 1px solid var(--border); padding: 18px 0; }
.post:first-child { border-top: none; padding-top: 0; }
.author-box { background: rgba(15,23,42,.7); border: 1px solid var(--border); border-radius: 14px; padding: 14px; }
.post-body { line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.system-post { border-left: 4px solid var(--warning); padding-left: 14px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { color: white; }
.badge { display: inline-block; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge-admin { background: rgba(168,85,247,.2); color: #d8b4fe; }
.badge-user { background: rgba(56,189,248,.15); color: #7dd3fc; }
.badge-blocked { background: rgba(239,68,68,.15); color: #fca5a5; }
.badge-active { background: rgba(16,185,129,.15); color: #86efac; }
.attachment img, .attachment video { max-width: 100%; border-radius: 12px; margin-top: 10px; }
.empty { color: var(--muted); font-style: italic; }
.small { font-size: 13px; color: var(--muted); }
@media (max-width: 760px) {
    .post { grid-template-columns: 1fr; }
    .topbar-inner { align-items: flex-start; flex-direction: column; }
}
