/* Containified Minecraft site
   Flat forum-era styling: solid colours, 1px borders, no gradients. */

:root {
  --page-bg: #e4e6eb;
  --text: #141414;
  --muted: #6b6f76;
  --link: #2f6b1c;
  --link-hover: #1e4a10;
  --border: #d0d3d8;
  --border-dark: #b9bdc4;
  --panel: #ffffff;
  --panel-alt: #f4f5f7;
  --header-bg: #262b2f;
  --header-text: #ffffff;
  --nav-bg: #5a9e31;
  --nav-bg-dark: #3f7322;
  --nav-text: #ffffff;
  --nav-active-bg: #f4f5f7;
  --nav-active-text: #2f6b1c;
  --subnav-bg: #f4f5f7;
  --block-head: #5a9e31;
  --block-head-text: #ffffff;
  --online: #3faa3f;
  --offline: #a9adb3;
  --btn-primary: #2f6b1c;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--page-bg);
  color: var(--text);
  font: 13px/1.45 "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

img { max-width: 100%; }

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header ---------------------------------------------------------------- */

.site-header {
  background-color: var(--header-bg);
  /* pixel checker texture, hard edged, no smooth gradient */
  background-image:
    linear-gradient(45deg, rgba(255,255,255,.035) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.035) 75%),
    linear-gradient(45deg, rgba(255,255,255,.035) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.035) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 8px 8px;
  color: var(--header-text);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 96px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--header-text);
}
.brand:hover { text-decoration: none; color: #fff; }
.brand img { width: 56px; height: 56px; image-rendering: pixelated; display: block; }
.brand-name { font-size: 26px; font-weight: 700; letter-spacing: .5px; line-height: 1.1; }
.brand-tag { font-size: 12px; color: #b9c0c6; margin-top: 2px; }

.header-notice {
  background: #3a4045;
  border: 1px solid #4b5258;
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.5;
}
.header-notice strong { display: block; }
.header-notice code {
  font: 12px/1 Consolas, Menlo, monospace;
  color: #ffd35c;
}

/* Navigation ------------------------------------------------------------ */

.site-nav {
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-bg-dark);
}

.site-nav .wrap {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex: 1;
  overflow-x: auto;
}

.nav-list li { flex: 0 0 auto; }

.nav-list a {
  display: block;
  padding: 0 16px;
  line-height: 42px;
  color: var(--nav-text);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.nav-list a:hover { background: var(--nav-bg-dark); text-decoration: none; color: #fff; }
.nav-list li.active a,
.nav-list li.active a:hover {
  background: var(--nav-active-bg);
  color: var(--nav-active-text);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px 0 16px;
  line-height: 42px;
  color: var(--nav-text);
  font-weight: 700;
  font-size: 14px;
  border-left: 1px solid var(--nav-bg-dark);
  white-space: nowrap;
}
.nav-user:hover { background: var(--nav-bg-dark); text-decoration: none; color: #fff; }
.nav-user img {
  width: 24px; height: 24px;
  border: 1px solid var(--nav-bg-dark);
  background: #8c8c8c;
  image-rendering: pixelated;
}

/* Sub bar (server address) --------------------------------------------- */

.sub-bar {
  background: var(--subnav-bg);
  border-bottom: 1px solid var(--border);
}
.sub-bar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  font-size: 12px;
  color: var(--muted);
}
.sub-bar .crumbs a { color: var(--muted); }
.sub-bar .crumbs a:hover { color: var(--link); }
.sub-bar .crumbs span { margin: 0 6px; color: var(--border-dark); }
.sub-bar .crumbs strong { color: var(--text); }

.server-addr {
  display: flex;
  align-items: center;
  gap: 6px;
}
.server-addr code {
  font: 12px/1 Consolas, Menlo, monospace;
  background: #fff;
  border: 1px solid var(--border);
  padding: 5px 8px;
  color: var(--text);
}

/* Buttons ----------------------------------------------------------------- */

.btn {
  display: inline-block;
  padding: 4px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border-dark);
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--panel-alt); text-decoration: none; color: var(--text); }
.btn:active { background: #e6e8ec; }
.btn-primary {
  background: var(--btn-primary);
  border-color: #244f15;
  color: #fff;
}
.btn-primary:hover { background: #3a7f24; color: #fff; }
.btn-sm { padding: 2px 8px; font-size: 11px; }

/* Layout ------------------------------------------------------------------ */

.content {
  flex: 1;
  padding: 16px 0 24px;
}

.cols {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.col-main { flex: 1 1 auto; min-width: 0; }
.col-side { flex: 0 0 270px; width: 270px; }

/* Panels and blocks ------------------------------------------------------ */

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
  margin-bottom: 16px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  background: var(--block-head);
  color: var(--block-head-text);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
}
.panel-head a { color: #fff; font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 11px; }
.panel-head a:hover { color: #e6ffd6; }

.panel-body { padding: 12px; }
.panel-body > :first-child { margin-top: 0; }
.panel-body > :last-child { margin-bottom: 0; }

.panel-title {
  margin: 0;
  padding: 10px 12px;
  font-size: 20px;
  font-weight: 400;
  border-bottom: 1px solid var(--border);
}

.panel-section {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
}
.panel-section h3 {
  margin: 0 0 6px;
  font-size: 14px;
}

.notice {
  padding: 10px 12px;
  border: 1px solid #ead9a0;
  background: #fbf6e3;
  color: #6c5a1f;
  font-weight: 700;
  margin: 0 0 12px;
}
.notice.blue { border-color: #b3d6e6; background: #e4f3f9; color: #245a73; }

/* Map ---------------------------------------------------------------------- */

.map-frame {
  display: block;
  width: 100%;
  height: 72vh;
  min-height: 360px;
  border: 0;
  background: #1d1f22;
}

/* Player list --------------------------------------------------------------- */

details.block { border-top: 1px solid var(--border); }
details.block:first-child { border-top: 0; }

details.block > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  background: var(--block-head);
  color: var(--block-head-text);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  user-select: none;
}
details.block > summary::-webkit-details-marker { display: none; }
details.block > summary .count {
  background: rgba(0,0,0,.22);
  padding: 1px 6px;
  font-size: 10px;
  margin-left: 6px;
}
details.block > summary .chev {
  width: 8px; height: 8px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
  transition: transform .12s;
  margin-right: 2px;
}
details.block[open] > summary .chev { transform: rotate(-135deg); margin-top: 4px; }
details.block.offline > summary { background: #7c8188; }

.player-list { list-style: none; margin: 0; padding: 4px 0; }
.player-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 10px;
}
.player-list li:hover { background: var(--panel-alt); }
.player-list img,
.player-list .head {
  width: 32px; height: 32px;
  border: 1px solid var(--border-dark);
  background: #8c8c8c;
  image-rendering: pixelated;
  flex: 0 0 auto;
}
.player-list .name { font-weight: 700; }
.player-list .meta { font-size: 11px; color: var(--muted); }
.player-list .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--online);
  margin-left: auto;
  flex: 0 0 auto;
}
.offline .player-list .dot { background: var(--offline); }
.offline .player-list img { filter: grayscale(1); opacity: .7; }

.list-empty { padding: 10px; color: var(--muted); font-style: italic; }
li.list-empty:hover { background: transparent; }
.list-note {
  padding: 6px 10px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--muted);
}

/* Tabs (forum style) --------------------------------------------------------- */

.tabs {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0 10px;
  background: var(--panel-alt);
  border-bottom: 1px solid var(--border);
}
.tabs li a {
  display: block;
  padding: 8px 18px;
  color: var(--muted);
  font-weight: 700;
  border: 1px solid transparent;
  border-bottom: 0;
  margin-bottom: -1px;
}
.tabs li.active a {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
}
.tabs li a:hover { text-decoration: none; color: var(--text); }

/* Tables --------------------------------------------------------------------- */

table.data {
  width: 100%;
  border-collapse: collapse;
}
table.data th, table.data td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
table.data th {
  background: var(--panel-alt);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--muted);
}
table.data tr:last-child td { border-bottom: 0; }
table.data td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Forms ----------------------------------------------------------------------- */

label { display: block; font-weight: 700; margin-bottom: 4px; }
input[type="text"] {
  font: inherit;
  padding: 6px 8px;
  border: 1px solid var(--border-dark);
  border-radius: 2px;
  width: 100%;
  max-width: 320px;
}
input[type="text"]:focus { outline: 0; border-color: var(--nav-bg); }
.form-row { margin-bottom: 12px; }
.form-actions { display: flex; gap: 8px; }

.form-error, .form-ok {
  display: none;
  padding: 8px 10px;
  margin: 0 0 12px;
  border: 1px solid #e0b4b4;
  background: #fbeaea;
  color: #8a2a2a;
  font-weight: 700;
}
.form-ok { border-color: #b7d9a8; background: #ebf6e4; color: #2f6b1c; }
.form-help { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* Auth pages: a single narrow panel, Desmos style ------------------------------- */

.auth-wrap {
  max-width: 420px;
  margin: 24px auto 0;
}
.auth-wrap .panel-body { padding: 16px; }
.auth-wrap input[type="text"],
.auth-wrap input[type="password"] { max-width: none; }
.auth-links {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}
.auth-links a + a::before { content: "·"; margin: 0 6px; color: var(--border-dark); }
input[type="password"] {
  font: inherit;
  padding: 6px 8px;
  border: 1px solid var(--border-dark);
  border-radius: 2px;
  width: 100%;
  max-width: 320px;
}
input[type="password"]:focus { outline: 0; border-color: var(--nav-bg); }

/* Game chat ------------------------------------------------------------------------ */

.chat-log {
  list-style: none;
  margin: 0;
  padding: 6px 10px;
  height: 260px;
  overflow-y: auto;
  background: #fbfbfc;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  line-height: 1.5;
}
.chat-line { display: flex; gap: 6px; align-items: baseline; }
.chat-time { color: var(--muted); font-size: 11px; flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.chat-name { font-weight: 700; flex: 0 0 auto; }
.chat-line.web .chat-name { color: var(--link); }
.chat-line.system { color: var(--muted); font-style: italic; }
.chat-text { word-break: break-word; }
.chat-form {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 10px;
}
.chat-form input[type="text"] { flex: 1; max-width: none; }
.chat-form .form-error { flex-basis: 100%; margin: 0; }

/* Account page ----------------------------------------------------------------------- */

.kv { margin: 0; }
.kv dt { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.kv dd { margin: 2px 0 10px; }
.sessions li { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tag {
  display: inline-block;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  color: var(--muted);
}
.tag.admin { background: #fff3d6; border-color: #ead9a0; color: #6c5a1f; }

/* Link lists ------------------------------------------------------------------- */

.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { padding: 6px 12px; border-top: 1px solid var(--border); }
.link-list li:first-child { border-top: 0; }

/* Footer ------------------------------------------------------------------------ */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--panel-alt);
  color: var(--muted);
  font-size: 11px;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 10px;
  padding-bottom: 10px;
}

/* Phone widths ------------------------------------------------------------------- */

@media (max-width: 800px) {
  .site-header .wrap { min-height: 0; }
  .header-notice { display: none; }
  .brand img { width: 44px; height: 44px; }
  .brand-name { font-size: 20px; }

  .nav-user { padding: 0 10px; font-size: 12px; }

  .sub-bar .crumbs { display: none; }
  .sub-bar .wrap { justify-content: flex-start; }

  .cols { flex-direction: column; }
  .col-side { flex: 1 1 auto; width: 100%; }

  .map-frame { height: 60vh; min-height: 280px; }
}
