/* Community forum: a classic message-board look (tables, bevelled headers, member panels) in the game's colours. */
:root {
  --page: #e9e6f5;
  --panel: #ffffff;
  --alt: #f5f3fc;
  --line: #c9c2e6;
  --head1: #5b3fe0;
  --head2: #3a1f7a;
  --head-text: #ffffff;
  --text: #1f1a3d;
  --muted: #6d6890;
  --link: #3d2bb8;
  --link-hover: #ff4fa3;
  --accent: #ffc93c;
  --staff: #e0215f;
  --quote: #f1eefc;
  --font: Verdana, Geneva, Tahoma, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #120e26;
    --panel: #1c1736;
    --alt: #221c40;
    --line: #3a3166;
    --head1: #4a32b8;
    --head2: #2a1660;
    --text: #ece9fb;
    --muted: #a49fc4;
    --link: #b9a8ff;
    --quote: #2a2350;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--page); color: var(--text); font: 13px/1.5 var(--font); }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 14px 12px 30px; }
.muted { color: var(--muted); }
.small { font-size: 11px; }

/* banner */
.banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 16px 18px; border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0;
  background: linear-gradient(135deg, #3a1f7a, #7c5cff 55%, #ff4fa3);
  color: #fff;
}
.logo { display: flex; align-items: center; gap: 4px 12px; color: #fff; flex-wrap: wrap; min-width: 0; max-width: 100%; }
.logo:hover { color: #fff; text-decoration: none; }
.logo b { display: block; font-size: 22px; letter-spacing: .5px; text-shadow: 2px 2px 0 rgba(0, 0, 0, .3); }
.logo small { display: block; font-size: 12px; opacity: .9; text-transform: uppercase; letter-spacing: 2px; }
.site-logo { width: min(330px, 100%); height: auto; display: block; min-width: 0; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .25)); }
@media (max-width: 600px) { .site-logo { width: min(230px, 100%); } }
.logo-mark { width: 44px; height: 44px; border-radius: 10px; background: url(favicon.png) center / cover, #fff; box-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
.toplinks { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.toplinks a { color: #fff; font-weight: bold; }
#who { color: #fff; }
#who button { margin-left: 6px; }

.navbar {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 0 0 8px 8px; margin-bottom: 14px;
}
.crumbs a + a::before, .crumbs a + span::before { content: "\00bb"; color: var(--muted); margin: 0 6px; }
.crumbs span { font-weight: bold; }

/* boxes + tables */
.box { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; margin-bottom: 14px; }
.box-head {
  background: linear-gradient(var(--head1), var(--head2)); color: var(--head-text);
  padding: 7px 12px; font-weight: bold; font-size: 13px; letter-spacing: .3px;
  border-bottom: 1px solid rgba(0, 0, 0, .25); text-shadow: 1px 1px 0 rgba(0, 0, 0, .3);
}
table.list { width: 100%; border-collapse: collapse; }
table.list th { background: var(--alt); color: var(--muted); text-align: left; font-size: 11px; text-transform: uppercase; padding: 6px 10px; border-bottom: 1px solid var(--line); }
table.list td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list tr:nth-child(even) td { background: var(--alt); }
table.list tr:last-child td { border-bottom: 0; }
td.num { text-align: center; width: 80px; color: var(--muted); }
td.last { width: 230px; font-size: 11px; color: var(--muted); }
td.icon { width: 46px; text-align: center; font-size: 22px; }
.board-name { font-size: 14px; font-weight: bold; }
.board-desc { color: var(--muted); font-size: 12px; }
.tag { display: inline-block; font-size: 10px; font-weight: bold; padding: 1px 6px; border-radius: 3px; margin-right: 6px; vertical-align: 1px; text-transform: uppercase; }
.tag.pin { background: var(--accent); color: #3a2a00; }
.tag.lock { background: #888; color: #fff; }
.tag.staff { background: var(--staff); color: #fff; }

/* posts */
.post { display: grid; grid-template-columns: 170px 1fr; border-bottom: 1px solid var(--line); }
.post:last-child { border-bottom: 0; }
.post:nth-child(even) .post-main, .post:nth-child(even) .member { background: var(--alt); }
.member { padding: 14px 12px; border-right: 1px solid var(--line); text-align: center; font-size: 11px; color: var(--muted); }
.avatar {
  width: 64px; height: 64px; border-radius: 12px; margin: 0 auto 8px; display: grid; place-items: center;
  font-size: 30px; font-weight: bold; color: #fff; text-shadow: 1px 1px 0 rgba(0, 0, 0, .25);
}
.member .name { display: block; font-size: 13px; font-weight: bold; color: var(--link); word-break: break-word; }
.member .rank { display: block; margin: 2px 0 4px; font-style: italic; }
.post-main { display: flex; flex-direction: column; min-width: 0; }
.post-meta { display: flex; justify-content: space-between; gap: 8px; padding: 6px 12px; font-size: 11px; color: var(--muted); border-bottom: 1px dashed var(--line); }
.post-body { padding: 12px 14px 16px; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; flex: 1; }
.post-body blockquote { margin: 8px 0; padding: 8px 12px; background: var(--quote); border: 1px solid var(--line); border-left: 4px solid var(--head1); border-radius: 4px; }
.post-body blockquote cite { display: block; font-style: normal; font-weight: bold; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.post-body pre { background: var(--quote); padding: 8px 10px; border-radius: 4px; overflow: auto; font-size: 12px; }
.post-body .art { display: inline-block; margin: 6px 6px 6px 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; vertical-align: top; }
.post-body .art img { display: block; width: 320px; max-width: 100%; height: auto; }
.post-body .art span { display: block; padding: 3px 8px; font-size: 11px; color: var(--muted); background: var(--alt); }
.post-actions { display: flex; gap: 10px; justify-content: flex-end; padding: 4px 12px 8px; font-size: 11px; }
.post-actions button { background: none; border: 0; color: var(--link); cursor: pointer; font: inherit; padding: 0; }
.post-actions button:hover { color: var(--link-hover); text-decoration: underline; }
.edited { font-size: 11px; color: var(--muted); font-style: italic; padding: 0 14px 8px; }

/* forms */
.btn {
  font: bold 12px var(--font); padding: 6px 14px; border-radius: 4px; cursor: pointer;
  border: 1px solid var(--line); background: linear-gradient(var(--panel), var(--alt)); color: var(--text);
}
.btn:hover { border-color: var(--head1); }
.btn.primary { background: linear-gradient(#7c5cff, #5b3fe0); color: #fff; border-color: #4a32b8; }
.btn.danger { color: var(--staff); }
.btn.small { padding: 3px 9px; font-size: 11px; }
.editor { padding: 12px; }
.editor input[type=text], .editor textarea, .dialog input {
  width: 100%; font: 13px var(--font); padding: 7px 9px; border: 1px solid var(--line); border-radius: 4px;
  background: var(--panel); color: var(--text);
}
.editor textarea { min-height: 170px; resize: vertical; line-height: 1.5; }
.toolbar { display: flex; gap: 4px; flex-wrap: wrap; margin: 8px 0 6px; }
.toolbar button { font: bold 11px var(--font); padding: 3px 8px; border: 1px solid var(--line); background: var(--alt); color: var(--text); border-radius: 3px; cursor: pointer; }
.row-btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; flex-wrap: wrap; }
.pages { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; font-size: 12px; }
.pages a, .pages span { padding: 2px 8px; border: 1px solid var(--line); border-radius: 3px; background: var(--panel); }
.pages span.cur { background: var(--head1); color: #fff; border-color: var(--head1); }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0 0 10px; flex-wrap: wrap; }
.empty { padding: 26px; text-align: center; color: var(--muted); }
.error { color: var(--staff); font-weight: bold; min-height: 1.2em; }
.dialog { padding: 0; width: min(420px, 94vw); color: var(--text); }
.dialog::backdrop { background: rgba(10, 6, 30, .6); }
.dialog-body { padding: 14px; }
.dialog label { display: block; margin: 8px 0; font-weight: bold; font-size: 12px; }
.headlines { padding: 8px 12px; }
.headlines li { margin: 3px 0; }
.foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 11px; padding: 10px 2px; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; transition: .25s;
  background: #1f1a3d; color: #fff; padding: 9px 16px; border-radius: 6px; font-weight: bold; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* phones: member panel goes above the post */
@media (max-width: 680px) {
  .post { grid-template-columns: 1fr; }
  .member { border-right: 0; border-bottom: 1px dashed var(--line); display: flex; gap: 10px; align-items: center; text-align: left; padding: 8px 12px; }
  .avatar { width: 36px; height: 36px; font-size: 18px; margin: 0; border-radius: 8px; }
  td.last, th.last { display: none; }
  td.num, th.num { width: 56px; }
  td.icon, th.icon { display: none; }
}
