/* Hand-written, no build step. Dark by default -- it is a game server site. */
:root {
  --bg: #14161c;
  --panel: #1d212b;
  --panel-2: #252a37;
  --text: #e6e8ef;
  --muted: #9aa2b5;
  --line: #333a4b;
  --accent: #f0a13a;
  --accent-dark: #c67f1e;
  --up: #4ec97a;
  --down: #e2564a;
  --off: #6a7285;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Leelawadee UI", "Noto Sans Thai", Tahoma, sans-serif;
  line-height: 1.65;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  background: var(--panel-2);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: Consolas, "Courier New", monospace;
  font-size: .92em;
}

/* ---- layout ---- */
.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  padding: 14px 22px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.brand { font-size: 1.25rem; font-weight: 700; color: var(--text); }
.topbar nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-left: auto; }
.topbar nav a { color: var(--muted); }
.topbar nav a:hover { color: var(--text); }
.topbar nav a.cta { color: #1a1206; }

main { max-width: 860px; margin: 0 auto; padding: 28px 22px 60px; }

footer {
  border-top: 1px solid var(--line);
  padding: 20px 22px;
  color: var(--muted);
  font-size: .9rem;
  text-align: center;
}

h1 { font-size: 1.9rem; margin: 0 0 .5em; }
h2 { font-size: 1.3rem; margin: 1.8em 0 .5em; }

/* ---- bits ---- */
.muted { color: var(--muted); }
.lead { font-size: 1.08rem; color: var(--muted); }
.date { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }

.hero { text-align: center; padding: 26px 0 10px; }
.hero h1 { font-size: 2.4rem; }

.cta {
  display: inline-block;
  background: var(--accent);
  color: #1a1206;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 6px;
  border: 0;
  cursor: pointer;
  font-size: 1rem;
}
.cta:hover { background: var(--accent-dark); text-decoration: none; }
.cta.big { padding: 12px 30px; font-size: 1.05rem; }

.linkbtn {
  background: none; border: 0; color: var(--muted);
  cursor: pointer; font: inherit; padding: 0;
}
.linkbtn:hover { color: var(--text); text-decoration: underline; }
.inline { display: inline; }

.dot {
  display: inline-block; width: 10px; height: 10px;
  border-radius: 50%; vertical-align: middle; margin-right: 4px;
}
.dot.up { background: var(--up); }
.dot.down { background: var(--down); }
.dot.off { background: var(--off); }
.status-line { font-size: 1.05rem; }

.error, .ok, .note, .warn {
  padding: 10px 14px; border-radius: 6px; border-left: 4px solid;
}
.error { background: #34191a; border-color: var(--down); }
.ok    { background: #16301f; border-color: var(--up); }
.note  { background: var(--panel); border-color: var(--accent); }
.warn  { background: #322a15; border-color: var(--accent); font-size: .92rem; }

/* ---- forms ---- */
.form { max-width: 420px; display: flex; flex-direction: column; gap: 16px; margin: 22px 0; }
.form label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; }
.form input[type=text], .form input[type=password], .form input[type=email], .form input:not([type]) {
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 9px 11px;
  border-radius: 6px;
  font: inherit;
}
.form input:focus { outline: 2px solid var(--accent); border-color: transparent; }
.form small { font-weight: 400; color: var(--muted); font-size: .85rem; }
.form fieldset { border: 1px solid var(--line); border-radius: 6px; padding: 10px 14px; }
.form legend { font-weight: 600; padding: 0 6px; }
.form label.radio { flex-direction: row; align-items: center; gap: 6px; font-weight: 400; display: inline-flex; margin-right: 18px; }

/* Honeypot: off-screen rather than display:none, since some bots skip hidden
   inputs but happily fill anything still in the layout. */
.hp { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }

/* ---- tables ---- */
table.data {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  background: var(--panel);
  border-radius: 8px;
  overflow: hidden;
}
table.data th, table.data td {
  padding: 9px 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
table.data thead th { background: var(--panel-2); font-size: .88rem; letter-spacing: .02em; }
table.data tbody tr:last-child th, table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody th { width: 38%; color: var(--muted); font-weight: 600; }

/* ---- posts ---- */
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.postlist { list-style: none; padding: 0; margin: 0; }
.postlist li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.postlist .date { display: block; }

.postcard { padding: 14px 0; border-bottom: 1px solid var(--line); }
.postcard h2 { margin: 2px 0 6px; font-size: 1.15rem; }

.post .body { margin-top: 14px; }
.post .body img { max-width: 100%; }
.post .body table { width: 100%; border-collapse: collapse; }
.post .body th, .post .body td { border: 1px solid var(--line); padding: 6px 10px; }
.post .body pre {
  background: var(--panel-2); padding: 12px; border-radius: 6px; overflow-x: auto;
}

/* ---- tags, quick links, info pages ---- */
.tag {
  display: inline-block;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .03em;
  padding: 1px 7px;
  border-radius: 4px;
  background: var(--panel-2);
  color: var(--muted);
  vertical-align: middle;
}
.tag.ok  { background: #16301f; color: var(--up); }
.tag.bad { background: #34191a; color: var(--down); }
.cat-update { background: #17303f; color: #6cc4f0; }
.cat-event  { background: #33280f; color: var(--accent); }
.cat-notice { background: var(--panel-2); color: var(--muted); }

.quicklinks { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 18px 0; }
.cta.alt { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); }
.cta.alt:hover { background: var(--line); }
.cta.danger-btn { background: var(--down); color: #fff; }
.cta.danger-btn:hover { background: #c44136; }

.hot { color: var(--accent); }

ul.rules { list-style: none; padding: 0; }
ul.rules > li {
  background: var(--panel);
  border-left: 3px solid var(--line);
  padding: 11px 15px;
  margin-bottom: 10px;
  border-radius: 0 6px 6px 0;
}

.feature, .qa {
  background: var(--panel);
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 12px;
}
.feature h2, .qa h3 { margin: 0 0 4px; font-size: 1.08rem; }
.feature p, .qa p { margin: 0; color: var(--muted); }

.accept {
  background: var(--panel);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 12px 14px;
}
.accept label { flex-direction: row; align-items: flex-start; gap: 9px; font-weight: 400; }
.accept input[type=checkbox] { margin-top: 4px; flex: 0 0 auto; }

/* ---- admin ---- */
.adminbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  background: var(--panel-2);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 10px 15px;
  margin-bottom: 22px;
  font-size: .93rem;
}
.adminbar b { color: var(--accent); letter-spacing: .08em; }
.adminbar .who { margin-left: auto; color: var(--muted); }

.statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 18px 0; }
.stat { background: var(--panel); padding: 14px; border-radius: 8px; color: var(--muted); font-size: .9rem; }
.stat .n { display: block; font-size: 1.7rem; font-weight: 700; color: var(--text); }
.stat.bad .n { color: var(--down); }

.form.wide { max-width: 560px; }
.req { color: var(--down); }

.filterbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0; }
.filterbar input[type=text], .filterbar input:not([type]) {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  padding: 8px 11px; border-radius: 6px; font: inherit; min-width: 240px;
}

/* Wide tables scroll inside their own box rather than pushing the page
   sideways -- Facebook URLs are long, and the refine table is 12 columns. */
.scroll { overflow-x: auto; }
.scroll table.data { min-width: 700px; }

/* Refine table: colour tells you the risk at a glance, but the number is
   always there too -- colour alone would exclude anyone who cannot see it. */
table.refine th, table.refine td { text-align: center; padding: 7px 9px; }
table.refine td:first-child, table.refine th:first-child { text-align: left; }
table.refine td:nth-child(2) { text-align: left; }
table.refine .safe  { color: var(--up); }
table.refine .mid   { color: var(--accent); }
table.refine .risky { color: var(--down); }

td.fb { max-width: 260px; overflow-wrap: anywhere; font-size: .88rem; }
td.detail { max-width: 340px; overflow-wrap: anywhere; font-size: .84rem; color: var(--muted); }
tr.rowbad { background: #2a1718; }

.danger {
  border: 1px solid var(--down);
  background: #241618;
  border-radius: 8px;
  padding: 14px 18px;
  margin: 24px 0;
}
.danger h3 { margin-top: 0; color: var(--down); }
.warnhead { color: var(--accent); }

.idlist { columns: 3; list-style: none; padding: 0; }
.idlist li { padding: 2px 0; }

pre.codes {
  background: var(--bg);
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 1.05rem;
  letter-spacing: .06em;
  user-select: all;      /* one click-drag selects the whole batch */
  margin: 8px 0;
}

@media (max-width: 640px) {
  .cols { grid-template-columns: 1fr; gap: 6px; }
  .topbar { padding: 12px 16px; }
  main { padding: 20px 16px 46px; }
  table.data tbody th { width: auto; }
  .idlist { columns: 1; }
  .adminbar .who { margin-left: 0; width: 100%; }
  .filterbar input { min-width: 0; width: 100%; }
}
