:root {
  --bg: #0b0d10;
  --panel: #12151a;
  --panel2: #161a20;
  --border: #26201f;
  --text: #c9d1d9;
  --muted: #7d8590;
  --accent: #e02424;
  --accent-dim: #571313;
  --link: #9ecbff;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 "Segoe UI", system-ui, sans-serif;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* header — xenforo-style top bar */
.site-header {
  background: var(--panel);
  border-bottom: 2px solid var(--accent-dim);
}
.header-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 9px 16px;
}
.logo {
  font-size: 19px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 2px;
}
.logo span { color: var(--accent); }
.logo:hover { text-decoration: none; }
.main-nav {
  display: flex;
  gap: 2px;
  flex: 1;
}
.main-nav a {
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  padding: 8px 13px;
  border-radius: 4px;
}
.main-nav a:hover { background: var(--panel2); color: #fff; text-decoration: none; }
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.h-search {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  padding: 6px 10px;
  font: inherit;
  font-size: 12px;
  width: 150px;
}
.h-search:focus { outline: none; border-color: var(--accent); }
.user-box {
  position: relative;
  font-size: 13px;
  color: var(--muted);
}
.user-box a, .user-box button {
  background: none; border: none; color: var(--link);
  cursor: pointer; font-size: 13px; padding: 0; font-family: inherit;
}
.user-box a:hover, .user-box button:hover { text-decoration: underline; }
.user-box .auth-link { color: var(--accent); font-weight: 700; }
.user-box .u-name {
  color: var(--text); font-weight: 700;
  display: flex; align-items: center; gap: 7px;
  background: var(--panel2); border: 1px solid var(--border);
  padding: 4px 10px 4px 4px; border-radius: 4px;
}
.user-box .u-name:hover { border-color: var(--accent); text-decoration: none; }
.avatar.nav-av { width: 26px; height: 26px; font-size: 12px; margin: 0; border-radius: 3px; }

/* account dropdown */
.acct-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 250px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0,0,0,.55);
  z-index: 60;
  padding: 14px;
  text-align: left;
}
.am-head { display: flex; gap: 12px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.avatar.am-av { width: 52px; height: 52px; font-size: 22px; margin: 0; border-radius: 50%; }
.am-role { font-size: 12px; color: var(--muted); margin-top: 2px; }
.am-stats { font-size: 11px; color: var(--muted); margin-top: 3px; }
.am-link {
  display: block;
  padding: 8px 10px;
  border-radius: 4px;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}
.am-link:hover { background: var(--panel2); color: var(--accent); text-decoration: none; }
.am-out { width: 100%; text-align: left; margin-top: 4px; border-top: 1px solid var(--border); border-radius: 0 0 4px 4px; color: #ff6b6b !important; }
/* forum node list — xenforo style */
.node-stats-h { text-align: right; }
.node-stats {
  font-size: 11px;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
  line-height: 1.7;
}
.node-stats b { color: var(--text); }
.node-icon {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--panel2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.lp-wrap { display: flex; gap: 9px; align-items: center; }
.avatar.lp-av { width: 28px; height: 28px; font-size: 12px; margin: 0; border-radius: 4px; flex: none; }
.lp-title { font-size: 12px; }
.lp-meta { font-size: 11px; color: var(--muted); margin-top: 1px; }
.online-u { display: inline-flex; align-items: center; gap: 7px; margin: 0 10px 6px 0; }
.avatar.ol-av { width: 22px; height: 22px; font-size: 10px; margin: 0; border-radius: 50%; }

/* announcement bars */
.notice-bar {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 7px 14px;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--accent);
}

/* index layout */
.index-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 16px;
  align-items: start;
  margin-top: 14px;
}
.side-box { padding: 12px 14px; font-size: 13px; }
.online-names a { display: inline-block; margin: 0 8px 4px 0; font-weight: 700; }
.side-total {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  color: var(--muted);
  font-size: 11px;
}
@media (max-width: 800px) { .index-grid { grid-template-columns: 1fr; } }

/* breadcrumbs */
.breadcrumbs { padding: 14px 0; font-size: 13px; color: var(--muted); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs .sep { margin: 0 6px; color: #3a4048; }

/* panels / tables */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 18px;
  overflow: hidden;
}
.panel-title {
  background: var(--panel2);
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--accent);
}
table.board { width: 100%; border-collapse: collapse; }
table.board th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}
table.board td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
table.board tr:last-child td { border-bottom: none; }
table.board tr.row:hover td { background: var(--panel2); }
.f-title { font-weight: 600; font-size: 15px; }
.f-desc { color: var(--muted); font-size: 12px; margin-top: 2px; }
.stat-cell { text-align: right; color: var(--muted); font-size: 12px; white-space: nowrap; }
.stat-cell b { color: var(--text); font-size: 14px; display: block; }
.lastpost { font-size: 12px; color: var(--muted); white-space: nowrap; }
.lastpost a { display: block; }
.icon-cell { width: 34px; text-align: center; font-size: 18px; }
.tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: middle;
}
.tag.pinned { background: var(--accent-dim); color: var(--accent); }
.tag.locked { background: #3a3a2a; color: #d4c26a; }
.tag.banned { background: #4a1212; color: #ff6b6b; }

/* stats strip */
.stats-strip {
  display: flex;
  gap: 28px;
  padding: 10px 14px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}
.stats-strip b { color: var(--accent); }

/* posts */
.post { display: table; width: 100%; border-bottom: 1px solid var(--border); }
.post:last-child { border-bottom: none; }
.post-side {
  display: table-cell;
  width: 170px;
  background: var(--panel2);
  border-right: 1px solid var(--border);
  padding: 14px;
  vertical-align: top;
}
.post-body { display: table-cell; padding: 14px; vertical-align: top; }
.post-head {
  font-size: 12px; color: var(--muted);
  border-bottom: 1px dashed var(--border);
  padding-bottom: 8px; margin-bottom: 10px;
  display: flex; justify-content: space-between;
}
.post-content { white-space: pre-wrap; word-wrap: break-word; }
.avatar {
  width: 56px; height: 56px;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 700; color: #0b0d10;
  margin-bottom: 8px;
}
img.avatar { object-fit: cover; background: var(--panel2); }
.avatar.m-av { width: 32px; height: 32px; font-size: 15px; margin: 0; }
.p-username { font-weight: 700; font-size: 14px; }
.p-username.owner { color: #ff2e2e; }
.p-username.admin { color: #f0b429; }
.p-username.mod { color: #7aa2f7; }
.p-meta { font-size: 11px; color: var(--muted); margin-top: 4px; }
.msg-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  background: var(--accent-dim);
  color: var(--accent);
  padding: 2px 7px;
  border-radius: 3px;
  margin: 5px 0 8px;
}
.plink { color: var(--muted); }

/* profile tabs — xenforo style */
.pf-tabs {
  display: flex;
  gap: 2px;
  margin: 2px 0 0;
  border-bottom: 1px solid var(--border);
}
.pf-tab {
  background: none;
  border: none;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.pf-tab:hover { color: var(--text); }
.pf-tab.on { color: var(--accent); border-bottom-color: var(--accent); }
.pf-pane { margin-bottom: 18px; }

/* forms */
.form-box { padding: 14px; }
.form-box label { display: block; font-size: 12px; color: var(--muted); margin: 10px 0 4px; text-transform: uppercase; letter-spacing: .5px; }
.form-box input[type=text], .form-box input[type=password], .form-box select, .form-box textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  padding: 8px 10px;
  font: inherit;
}
.form-box input:focus, .form-box textarea:focus, .form-box select:focus {
  outline: none;
  border-color: var(--accent);
}
.form-box textarea { min-height: 140px; resize: vertical; }
.form-err { color: #ff6b6b; font-size: 13px; margin-top: 10px; min-height: 18px; }
.form-alt { margin-top: 12px; font-size: 13px; color: var(--muted); }
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 8px 18px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  margin-top: 12px;
}
.btn:hover { filter: brightness(1.15); text-decoration: none; }
.btn.secondary { background: var(--panel2); color: var(--text); border: 1px solid var(--border); }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.toolbar h2 { font-size: 17px; color: #fff; }

/* auth */
.auth-wrap { max-width: 420px; margin: 24px auto; }
.notice { padding: 16px; text-align: center; color: var(--muted); font-size: 13px; }
body.logged-out .main-nav, body.logged-out .breadcrumbs { display: none; }
body.logged-out #app { min-height: 40vh; }

/* shoutbox */
.shout-list {
  max-height: 340px;
  min-height: 200px;
  overflow-y: auto;
  padding: 10px 14px;
}
.shout {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 13px;
  border-bottom: 1px dashed var(--border);
  word-wrap: break-word;
}
.shout:last-child { border-bottom: none; }
.shout .s-av {
  width: 24px; height: 24px;
  border-radius: 50%;
  font-size: 11px;
  flex: none;
  margin: 0;
}
.shout .s-body { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.comment-list { max-height: 300px; overflow-y: auto; padding: 10px 14px; }
.c-del {
  background: none; border: none; color: var(--muted);
  cursor: pointer; font-size: 14px; padding: 0 2px; font-family: inherit;
}
.c-del:hover { color: var(--accent); }
.shout .s-time { color: var(--muted); font-size: 11px; margin-left: auto; white-space: nowrap; }
.shout .s-name { font-weight: 700; }
.shout .s-name.owner { color: #ff2e2e; }
.shout .s-name.admin { color: #f0b429; }
.shout .s-name.mod { color: #7aa2f7; }
.shout-form {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
}
.shout-form input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  padding: 8px 10px;
  font: inherit;
}
.shout-form input:focus { outline: none; border-color: var(--accent); }
.shout-form input:disabled, .shout-form .btn:disabled { opacity: .5; cursor: not-allowed; }
.shout-title { display: flex; justify-content: space-between; align-items: center; }
.clear-btn {
  background: none; border: none; color: var(--muted);
  cursor: pointer; font: inherit; font-size: 11px;
  text-transform: uppercase; letter-spacing: .5px;
}
.clear-btn:hover { color: var(--accent); }

/* profile */
.profile-head { display: flex; gap: 18px; align-items: center; padding: 18px; }
.profile-head .avatar { width: 72px; height: 72px; font-size: 32px; margin: 0; }
.profile-head .p-username { font-size: 20px; }
.role-edit { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.role-edit select, .role-edit .uid-in {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  padding: 5px 8px;
  font: inherit;
  font-size: 13px;
}
.role-edit .uid-in { width: 80px; }
.role-edit .btn { padding: 5px 12px; font-size: 12px; }
.ban-btn { background: #4a1212; color: #ff6b6b; border: 1px solid #6b2020; }
.mini-list td { padding: 8px 14px; font-size: 13px; }

/* members */
.member-row td { padding: 8px 14px; }
.empty { padding: 20px 14px; color: var(--muted); text-align: center; }
.site-footer { border-top: 1px solid var(--border); padding: 18px 0; margin-top: 30px; color: var(--muted); font-size: 12px; }
@media (max-width: 720px) {
  .post-side, .post-body { display: block; width: 100%; border-right: none; }
  .stat-cell, .lastpost { display: none; }
  .main-nav { gap: 12px; }
}
