/* ThoosieSMP — Minecraft-inspired UI
   Drop a Minecraft-style pixel font (e.g. Monocraft, OFL licensed) into assets/fonts/minecraft.ttf
   to replace the fallback Pixelify Sans. */

@font-face {
  font-family: "MCPixel";
  src: url("../fonts/minecraft.woff2") format("woff2"),
       url("../fonts/minecraft.ttf") format("truetype");
  font-display: swap;
}

:root {
  --font-pixel: "MCPixel", "Pixelify Sans", ui-monospace, monospace;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

  --mc-white: #ffffff;
  --mc-gray: #aaaaaa;
  --mc-dim: #a0a0a0;
  --mc-dark: #3f3f3f;
  --mc-yellow: #ffff55;
  --mc-splash: #ffff00;
  --mc-splash-shadow: #3f3f00;
  --mc-gold: #ffaa00;
  --mc-green: #55ff55;
  --mc-dgreen: #3c8527;
  --mc-red: #ff5555;
  --mc-aqua: #55ffff;
  --mc-blue: #5d6fb5;

  --btn: #707070;
  --panel: rgba(0, 0, 0, 0.58);
  --card: rgba(14, 14, 14, 0.86);
  --line: rgba(255, 255, 255, 0.09);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  background: #15121a;
  color: var(--mc-white);
  font: 16px/1.55 var(--font-body);
  overflow-x: hidden;
}
a { color: var(--mc-aqua); }
code { font-family: var(--font-mono); font-size: 0.9em; background: rgba(255,255,255,.08); padding: 1px 5px; }
img { max-width: 100%; }

/* ---------- background panorama ---------- */
.panorama {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  transform: scale(1.04);
  z-index: -2;
  image-rendering: pixelated;
  filter: blur(2px) saturate(1.1);
}
.panorama-image {
  background-size: cover;
  background-position: 0% 50%;
  animation: pan 140s linear infinite alternate;
}
@keyframes pan { to { background-position: 100% 50%; } }
.panorama-shade {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 50% 35%, rgba(0,0,0,0) 30%, rgba(0,0,0,.55) 100%);
}
body:not(.layout-title) .panorama { filter: blur(6px) brightness(.6) saturate(.9); }
body:not(.layout-title) .panorama-shade { background: rgba(10, 8, 14, .45); }
body.layout-admin .panorama-shade { background: rgba(8, 8, 10, .72); }

/* ---------- logo & splash ---------- */
.logo { display: block; margin: 0 auto; }
.logo-title { width: 100%; height: auto; filter: drop-shadow(0 6px 12px rgba(0,0,0,.45)); }
img.logo-small { width: min(70vw, 300px); height: auto; filter: drop-shadow(0 4px 8px rgba(0,0,0,.5)); }
img.logo-tiny { width: 100%; max-height: 64px; object-fit: contain; }

.logo-text {
  font-family: var(--font-pixel);
  font-weight: 600;
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 0.04em;
  line-height: 1;
  color: transparent;
  background: linear-gradient(180deg, #ffffff 0%, #d9d9d9 38%, #9a9a9a 62%, #7a7a7a 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-stroke: 2px #1c1c1c;
  paint-order: stroke fill;
  filter: drop-shadow(4px 4px 0 #2c2c2c) drop-shadow(0 4px 0 #161616) drop-shadow(0 0 16px rgba(0,0,0,.5));
  white-space: nowrap;
  width: fit-content;
  padding: 0.08em 0.1em;
}
.logo-title.logo-text { font-size: clamp(30px, 9vw, 88px); }
.logo-small.logo-text { font-size: clamp(30px, 8vw, 46px); }
.logo-tiny.logo-text { font-size: 22px; -webkit-text-stroke-width: 1px; filter: drop-shadow(2px 2px 0 #222); }

.logo-wrap { position: relative; width: min(100%, 620px); margin: 0 auto 40px; }

.splash {
  position: absolute;
  right: 4%;
  bottom: 2%;
  font-family: var(--font-pixel);
  font-size: var(--splash-size, 22px);
  color: var(--mc-splash);
  text-shadow: 0.12em 0.12em 0 var(--mc-splash-shadow);
  white-space: nowrap;
  pointer-events: none;
  transform-origin: center;
  --splash-x: 45%;
  transform: translate(var(--splash-x), 0) rotate(-20deg);
  animation: splash 0.5s infinite;
}
@keyframes splash {
  0%   { transform: translate(var(--splash-x), 0) rotate(-20deg) scale(1.07); animation-timing-function: ease-out; }
  50%  { transform: translate(var(--splash-x), 0) rotate(-20deg) scale(1);    animation-timing-function: ease-in; }
  100% { transform: translate(var(--splash-x), 0) rotate(-20deg) scale(1.07); }
}

/* ---------- title screen ---------- */
.title-main {
  min-height: 100vh;
  display: flex; justify-content: center; align-items: flex-start;
  padding: max(5vh, 28px) 16px 110px;
}
.title-screen { width: min(100%, 640px); display: flex; flex-direction: column; align-items: center; }
.title-message {
  font-family: var(--font-pixel); font-size: 20px; text-align: center; max-width: 480px;
  margin: 0 0 18px; color: #f0f0f0; text-shadow: 2px 2px 0 var(--mc-dark);
}
.admin-preview {
  font-size: 13px; color: var(--mc-gold); background: rgba(0,0,0,.6); border: 1px solid var(--mc-gold);
  padding: 6px 12px; margin-bottom: 16px;
}

.countdown {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  margin: 0 0 24px; padding: 12px 22px;
  background: rgba(0,0,0,.5); border: 2px solid #000; box-shadow: inset 0 0 0 2px rgba(255,255,255,.1);
}
.countdown-label { font-family: var(--font-pixel); color: var(--mc-dim); font-size: 15px; text-transform: uppercase; letter-spacing: .1em; }
.countdown-value { font-family: var(--font-pixel); font-size: clamp(26px, 6vw, 40px); text-shadow: 3px 3px 0 var(--mc-dark); font-variant-numeric: tabular-nums; }

.server-address {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  margin: 0 0 22px; padding: 10px 26px; cursor: pointer;
  background: rgba(0,0,0,.55); border: 2px solid #000; box-shadow: inset 0 0 0 2px rgba(255,255,255,.12);
  color: #fff; font-family: var(--font-pixel);
}
.server-address:hover, .server-address:focus-visible { box-shadow: inset 0 0 0 2px #fff; outline: none; }
.server-address .addr-label { font-size: 13px; color: var(--mc-dim); text-transform: uppercase; letter-spacing: .1em; }
.server-address .addr-value { font-size: 22px; color: var(--mc-yellow); text-shadow: 2px 2px 0 var(--mc-splash-shadow); }
.server-address.copied .addr-label::after { content: " — copied!"; color: var(--mc-green); }
.server-address.compact { flex-direction: row; gap: 12px; margin: 16px 0; }

.menu { display: flex; flex-direction: column; gap: 8px; width: min(100%, 400px); }
.menu-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.menu-row form { display: contents; }
.menu-row:has(> :only-child) { grid-template-columns: 1fr; }
.menu-staff { align-self: center; margin-top: 8px; }
.menu-discord { align-self: center; margin-top: 10px; }

.corners {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
  padding: 0 8px 6px;
}
.corners {
  position: fixed; left: 0; right: 0; bottom: 0; margin: 0; z-index: 5; pointer-events: none;
  padding-top: 18px;
}
body:not(.layout-title) .corners { background: linear-gradient(to top, rgba(10,8,14,.85), rgba(10,8,14,0)); }
.corner { font-family: var(--font-pixel); font-size: 14px; color: #fff; text-shadow: 2px 2px 0 var(--mc-dark); opacity: .9; }
.corner-right { max-width: 58vw; text-align: right; }
.map-page .corners { display: none; }

/* ---------- buttons ---------- */
.mc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 2px 16px 4px;
  font: 400 19px/1.1 var(--font-pixel);
  color: #fff; text-shadow: 2px 2px 0 var(--mc-dark);
  text-decoration: none; text-align: center;
  background-color: var(--btn);
  background-image:
    linear-gradient(180deg, rgba(255,255,255,.07), rgba(0,0,0,.07)),
    repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 4px, rgba(0,0,0,.025) 4px 8px);
  border: 2px solid #000;
  box-shadow: inset 2px 2px 0 rgba(255,255,255,.38), inset -2px -4px 0 rgba(0,0,0,.38);
  cursor: pointer; user-select: none;
  transition: color .05s;
}
.mc-btn:hover, .mc-btn:focus-visible { border-color: #fff; color: #ffffa0; outline: none; }
.mc-btn:active { box-shadow: inset -2px -2px 0 rgba(255,255,255,.2), inset 2px 4px 0 rgba(0,0,0,.4); padding-top: 4px; padding-bottom: 2px; }
.mc-btn.disabled, .mc-btn:disabled {
  background: #2b2b2b; color: var(--mc-dim); text-shadow: none; cursor: not-allowed;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.05); border-color: #000;
}
.mc-btn-wide { width: 100%; }
.mc-btn-small { min-height: 32px; font-size: 16px; padding: 0 12px 2px; }
.mc-btn-primary { --btn: #3c8527; background-color: #3c8527; }
.mc-btn-danger { background-color: #a4302d; }
.mc-btn-blue { background-color: #4b5f9e; }

/* ---------- inner public pages ---------- */
.panel-header { display: flex; justify-content: center; padding: 26px 16px 4px; }
.panel-logo-link { text-decoration: none; }
.panel-main { display: flex; justify-content: center; padding: 14px 16px 110px; }

.mc-window {
  width: min(100%, 470px);
  background: var(--panel);
  border: 2px solid #000;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.1), 0 10px 30px rgba(0,0,0,.35);
  padding: 26px clamp(16px, 4vw, 30px);
  backdrop-filter: blur(3px);
}
.mc-window.wide { width: min(100%, 780px); }
.window-title {
  font: 600 28px/1.2 var(--font-pixel); text-align: center; margin: 0 0 20px;
  text-shadow: 3px 3px 0 var(--mc-dark);
}
.window-intro { color: #ddd; text-align: center; margin: -8px 0 22px; }
.mc-window h2, .rules-text h2 {
  font: 400 21px/1.3 var(--font-pixel); color: var(--mc-yellow); text-shadow: 2px 2px 0 var(--mc-splash-shadow);
  margin: 28px 0 12px;
}
.rules-text h2:first-child { margin-top: 0; text-align: center; font-size: 28px; color: #fff; text-shadow: 3px 3px 0 var(--mc-dark); }
.rules-text h3 { font: 400 18px var(--font-pixel); color: var(--mc-gold); }
.mc-list { padding-left: 0; list-style: none; }
.mc-list li { position: relative; padding: 6px 0 6px 26px; border-bottom: 1px solid var(--line); }
.mc-list li::before { content: ""; position: absolute; left: 4px; top: 14px; width: 8px; height: 8px; background: var(--mc-green); box-shadow: 2px 2px 0 #1a5a1a; }

.muted { color: var(--mc-dim); }
.small { font-size: 13px; }
.good { color: var(--mc-green); }

/* ---------- forms ---------- */
.mc-form label { display: block; margin-bottom: 16px; color: #e6e6e6; font-size: 15px; }
.mc-form label > .mc-input, .mc-form label > select { margin-top: 6px; }
.mc-form small { display: block; color: var(--mc-dim); margin-top: 5px; font-size: 13px; }
.mc-form h2:first-of-type { margin-top: 6px; }
.mc-input, select.mc-input {
  display: block; width: 100%;
  background: #000; color: #fff;
  border: 2px solid #a0a0a0;
  padding: 9px 11px;
  font: 16px/1.4 var(--font-body);
  border-radius: 0;
}
.mc-input:focus { border-color: #fff; outline: none; }
textarea.mc-input { resize: vertical; min-height: 80px; }
.mc-input.code, textarea.code { font-family: var(--font-mono); font-size: 13px; }
.form-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 22px; align-items: stretch; }
.form-actions form { display: contents; }

.mc-check { display: flex !important; align-items: center; gap: 10px; cursor: pointer; }
.mc-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mc-check span {
  flex: none; width: 22px; height: 22px; background: #000; border: 2px solid #a0a0a0; display: grid; place-items: center;
}
.mc-check input:focus-visible + span { border-color: #fff; }
.mc-check input:checked + span::after { content: ""; width: 10px; height: 10px; background: var(--mc-green); box-shadow: 2px 2px 0 #1a5a1a; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.mc-name-row { display: flex; gap: 16px; align-items: flex-start; }
.mc-name-row label { flex: 1; }
.mc-head-preview, .mc-head { image-rendering: pixelated; border: 2px solid #000; box-shadow: 0 0 0 2px rgba(255,255,255,.15); background: #222; flex: none; }
.mc-head-preview { margin-top: 26px; }

.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; margin-bottom: 18px; font-size: 14px; }
.check.ok { color: var(--mc-green); }
.check.bad { color: var(--mc-red); }

/* ---------- notices / toasts / pills ---------- */
.notice { padding: 10px 14px; margin-bottom: 14px; border-left: 4px solid var(--mc-aqua); background: rgba(85,255,255,.08); font-size: 15px; }
.notice-error { border-color: var(--mc-red); background: rgba(255,85,85,.12); }
.notice-warn { border-color: var(--mc-gold); background: rgba(255,170,0,.1); }
.notice-success { border-color: var(--mc-green); background: rgba(85,255,85,.1); }

.toasts { position: fixed; top: 14px; right: 14px; z-index: 50; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 28px)); }
.toast {
  background: #1d1d1d; border: 2px solid #000; box-shadow: inset 0 0 0 2px #555, 0 8px 20px rgba(0,0,0,.4);
  padding: 12px 16px 12px 20px; position: relative; font-size: 15px;
  animation: toast-in .25s ease-out;
}
.toast::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 4px; background: var(--mc-aqua); }
.toast-success::before { background: var(--mc-green); }
.toast-error::before { background: var(--mc-red); }
.toast-warn::before { background: var(--mc-gold); }
.toast.hide { opacity: 0; transform: translateX(20px); transition: .3s; }
@keyframes toast-in { from { transform: translateX(30px); opacity: 0; } }

.pill { display: inline-block; font: 400 14px/1 var(--font-pixel); padding: 5px 8px 6px; border: 2px solid #000; white-space: nowrap; color: #000; background: #aaa; }
.pill-pending, .pill-queued { background: var(--mc-gold); }
.pill-running { background: var(--mc-aqua); }
.pill-accepted, .pill-done { background: var(--mc-green); }
.pill-rejected, .pill-failed { background: var(--mc-red); }
.pill-revoked { background: #b06060; }
.pill-withdrawn { background: #777; color: #fff; }
.pill-admin { background: var(--mc-aqua); vertical-align: middle; font-size: 12px; }

/* ---------- account ---------- */
.account-head { display: flex; gap: 16px; align-items: center; margin-bottom: 8px; }
.account-name { font: 400 24px var(--font-pixel); }
.app-card {
  background: rgba(255,255,255,.04); border: 2px solid #000; box-shadow: inset 0 0 0 2px rgba(255,255,255,.06);
  padding: 16px 18px; margin-bottom: 12px;
}
.app-card p { margin: 10px 0; }
.app-card-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.app-mc { font: 400 22px var(--font-pixel); }
.app-card.status-accepted { box-shadow: inset 0 0 0 2px rgba(85,255,85,.35); }
.app-card.status-pending { box-shadow: inset 0 0 0 2px rgba(255,170,0,.35); }
.staff-note { margin: 12px 0; padding: 10px 14px; border-left: 4px solid var(--mc-gold); background: rgba(255,170,0,.07); }
.staff-note span { display: block; font: 400 14px var(--font-pixel); color: var(--mc-gold); margin-bottom: 4px; }
details > summary { cursor: pointer; font: 400 17px var(--font-pixel); color: #ddd; padding: 6px 0; }
details > summary:hover { color: #ffffa0; }
.answers .qa { padding: 8px 0; border-bottom: 1px solid var(--line); }
.answers .q, .qa .q { color: var(--mc-dim); font-size: 14px; }
.settings-block { margin-top: 24px; }
.inline-copy { background: none; border: 0; padding: 0; color: var(--mc-yellow); font: inherit; font-family: var(--font-pixel); cursor: pointer; text-decoration: underline dotted; }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.tool {
  display: flex; flex-direction: column; gap: 4px; padding: 14px; text-decoration: none; color: #fff;
  background: rgba(255,255,255,.05); border: 2px solid #000; box-shadow: inset 0 0 0 2px rgba(255,255,255,.08);
}
.tool:hover { box-shadow: inset 0 0 0 2px #fff; }
.tool strong { font: 400 18px var(--font-pixel); }
.tool span { color: var(--mc-dim); font-size: 13px; }

/* ---------- tables ---------- */
.mc-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.mc-table th { text-align: left; font: 400 14px var(--font-pixel); color: var(--mc-dim); padding: 8px 10px; border-bottom: 2px solid rgba(255,255,255,.15); white-space: nowrap; }
.mc-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.mc-table tr:hover td { background: rgba(255,255,255,.025); }
.mc-table .actions { text-align: right; white-space: nowrap; }
.mc-table .actions form { display: inline; }
.table-wrap { overflow-x: auto; }
.cell-player { display: flex; align-items: center; gap: 10px; }
.cell-player img { width: 28px; height: 28px; image-rendering: pixelated; }

/* ---------- status board ---------- */
.status-row { display: flex; align-items: center; gap: 16px; }
.status-light { width: 18px; height: 18px; background: #555; border: 2px solid #000; flex: none; }
.status-light.online { background: var(--mc-green); box-shadow: 0 0 12px var(--mc-green); }
.status-light.offline { background: var(--mc-red); }
.status-light.starting { background: var(--mc-gold); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .3; } }
.status-big { font: 400 26px var(--font-pixel); }
.status-count { margin-left: auto; text-align: right; font: 400 34px var(--font-pixel); }
.status-count small { display: block; font-size: 14px; color: var(--mc-dim); }
.player-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.player-list li.player { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: rgba(255,255,255,.05); border: 2px solid #000; font-family: var(--font-pixel); }
.player-list img { width: 32px; height: 32px; image-rendering: pixelated; }

/* ---------- map ---------- */
.map-page .panel-header { display: none; }
.map-page .panel-main { padding: 0; }
.map-frame-wrap { position: fixed; inset: 0; display: flex; flex-direction: column; }
.map-bar { display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: rgba(0,0,0,.8); border-bottom: 2px solid #000; }
.map-title { font: 400 20px var(--font-pixel); margin-right: auto; }
.map-frame { flex: 1; width: 100%; border: 0; background: #000; }

/* ---------- admin ---------- */
.admin-shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.admin-side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 12px; padding: 16px 14px;
  background: rgba(0,0,0,.72); border-right: 2px solid #000; box-shadow: inset -2px 0 0 rgba(255,255,255,.07);
}
.admin-brand { display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; }
.admin-brand > span { font: 400 15px var(--font-pixel); color: var(--mc-gold); letter-spacing: .2em; text-transform: uppercase; }
.side-status { display: flex; align-items: center; gap: 8px; justify-content: center; font: 400 14px var(--font-pixel); color: var(--mc-dim); }
.side-status .dot { width: 10px; height: 10px; background: var(--mc-red); border: 2px solid #000; }
.side-status.on .dot { background: var(--mc-green); box-shadow: 0 0 8px var(--mc-green); }
.admin-nav { display: flex; flex-direction: column; gap: 6px; }
.mc-btn-nav { justify-content: flex-start; min-height: 36px; font-size: 17px; width: 100%; }
.mc-btn-nav.active { background-color: #4b5f9e; border-color: #fff; }
.badge { margin-left: auto; background: var(--mc-red); color: #fff; font-size: 13px; padding: 2px 6px 3px; border: 2px solid #000; text-shadow: none; }
.admin-side-foot { margin-top: auto; display: grid; gap: 6px; }
.admin-side-foot form { display: contents; }
.admin-main { padding: 24px clamp(16px, 3vw, 40px) 60px; min-width: 0; }

.page-title { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin: 0 0 20px; }
.page-title h1 { font: 600 30px/1.2 var(--font-pixel); margin: 0; text-shadow: 3px 3px 0 var(--mc-dark); }
.card {
  background: var(--card); border: 2px solid #000; box-shadow: inset 0 0 0 2px rgba(255,255,255,.07);
  padding: 20px; margin-bottom: 20px;
}
.card > h2, .card-head h2 { font: 400 21px/1.2 var(--font-pixel); color: var(--mc-yellow); text-shadow: 2px 2px 0 var(--mc-splash-shadow); margin: 0 0 14px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
.card p:first-child { margin-top: 0; }
.cards-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 0 20px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn-row form { display: contents; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--card); border: 2px solid #000; box-shadow: inset 0 0 0 2px rgba(255,255,255,.07); padding: 14px 16px; }
.stat-label { font-size: 13px; color: var(--mc-dim); text-transform: uppercase; letter-spacing: .06em; }
.stat-value { font: 400 28px/1.2 var(--font-pixel); margin-top: 4px; }
.stat-value.on { color: var(--mc-green); }
.stat-value.off { color: var(--mc-red); }
.stat a { color: inherit; text-decoration: none; }

.console {
  height: 62vh; min-height: 300px; overflow: auto;
  background: #000; border: 2px solid #a0a0a0; padding: 12px 14px;
  font: 13px/1.5 var(--font-mono); color: #d6d6d6;
  white-space: pre-wrap; word-break: break-word;
}
.console .l-warn { color: var(--mc-gold); }
.console .l-error { color: var(--mc-red); }
.console .l-cmd { color: var(--mc-aqua); }
.console .l-join { color: var(--mc-green); }
.console-input { display: flex; gap: 8px; margin-top: 10px; }
.console-input .mc-input { font-family: var(--font-mono); }
.console-input .prompt { font: 400 22px var(--font-pixel); color: var(--mc-dim); align-self: center; }
.quick-cmds { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.joblog { background: #000; border: 2px solid #333; padding: 10px; max-height: 260px; overflow: auto; font: 12px/1.5 var(--font-mono); white-space: pre-wrap; margin: 8px 0 0; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 15px; }
.kv dt { color: var(--mc-dim); }
.kv dd { margin: 0; word-break: break-word; }

.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.filters .mc-btn.active { background-color: #4b5f9e; border-color: #fff; }

.search-row { display: flex; gap: 8px; margin-bottom: 14px; }
.search-row .mc-input { flex: 1; }
.plugin-results { display: grid; gap: 8px; }
.plugin-result { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; padding: 10px; background: rgba(255,255,255,.04); border: 2px solid #000; }
.plugin-result img, .plugin-result .noicon { width: 48px; height: 48px; image-rendering: pixelated; background: #222; }
.plugin-result .title { font: 400 18px var(--font-pixel); }
.plugin-result .desc { font-size: 13px; color: var(--mc-dim); }

.file-path { font-family: var(--font-mono); font-size: 14px; margin-bottom: 12px; word-break: break-all; }
.file-path a { color: var(--mc-aqua); text-decoration: none; }
.file-list a { color: #fff; text-decoration: none; }
.file-list a:hover { color: #ffffa0; }
.file-list .dir a::before { content: "▸ "; color: var(--mc-gold); }
textarea.editor { width: 100%; min-height: 60vh; font: 13px/1.5 var(--font-mono); background: #000; color: #e6e6e6; border: 2px solid #a0a0a0; padding: 12px; tab-size: 2; }

@media (max-width: 860px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; }
  .admin-nav { flex-direction: row; flex-wrap: wrap; }
  .mc-btn-nav { width: auto; flex: 1 1 140px; }
  .admin-side-foot { grid-template-columns: 1fr 1fr; }
  .cards-2 { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .corner { font-size: 11px; }
  .corner-left { display: none; }
  .corner-right { max-width: none; }
  .splash { right: 0; bottom: -6%; --splash-x: 8%; }
  .checks { grid-template-columns: 1fr; }
  .status-row { flex-wrap: wrap; }
  .plugin-result { grid-template-columns: 40px 1fr; }
  .plugin-result > :last-child { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  .splash { animation: none; }
  .panorama { transform: none; }
  .panorama-image { animation: none; }
}

/* ---------- coming soon: logo + splash centred on the page ---------- */
.coming-soon .title-main { align-items: center; padding: 40px 16px 120px; }
.coming-soon .title-screen { justify-content: center; }
.coming-soon .logo-wrap { margin-bottom: 30px; }
.coming-soon .menu {
  position: fixed; left: 50%; bottom: 46px; transform: translateX(-50%);
  width: auto; z-index: 6;
}
.coming-soon .menu-staff { margin: 0; }

/* Admin-only notice floats at the top so it never shifts the layout. */
.admin-preview { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 20; white-space: nowrap; margin: 0; }
@media (max-width: 520px) { .admin-preview { white-space: normal; width: calc(100% - 24px); text-align: center; } }

/* ---------- title screen extras ---------- */
.menu-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.menu-row-small { margin-top: 8px; }
.mc-btn-discord { background-color: #5865f2; }
.coming-soon .menu { width: min(calc(100% - 32px), 640px); }
.layout-title .title-main { padding-bottom: 130px; }

/* ---------- Discord, bans ---------- */
.discord-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0 10px; }
.discord-badge { font: 400 13px var(--font-pixel); background: #5865f2; color: #fff; padding: 3px 8px 4px; border: 2px solid #000; }
.discord-link-form { max-width: 520px; }
.banned-title { color: var(--mc-red) !important; text-shadow: 2px 2px 0 #3f0000 !important; }
.ban-card {
  padding: 14px 16px; margin-bottom: 12px;
  background: rgba(255, 85, 85, .07); border: 2px solid #000; box-shadow: inset 0 0 0 2px rgba(255, 85, 85, .35);
}
.ban-card p { margin: 10px 0; }
.ban-platform { font: 400 19px var(--font-pixel); color: var(--mc-red); }
.setup-steps { padding-left: 22px; line-height: 1.7; }
.setup-steps li { margin-bottom: 8px; }

/* ---------- radio / fieldset ---------- */
.mc-fieldset { border: 0; padding: 0; margin: 0 0 16px; display: flex; gap: 22px; flex-wrap: wrap; align-items: center; }
.mc-fieldset legend { color: #e6e6e6; font-size: 15px; margin-bottom: 8px; width: 100%; }
.mc-radio { margin: 0 !important; }
.mc-radio span { border-radius: 50%; }
.mc-radio input:checked + span::after { border-radius: 50%; }

/* ---------- tickets & chat ---------- */
.ticket-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.ticket-subject { font: 400 22px/1.25 var(--font-pixel); }
.ticket-details { margin-bottom: 14px; }
.ticket-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1000px) { .ticket-layout { grid-template-columns: 1fr; } }

.chat {
  display: flex; flex-direction: column; gap: 10px;
  max-height: 60vh; overflow-y: auto; padding: 12px;
  background: rgba(0, 0, 0, .45); border: 2px solid #000; box-shadow: inset 0 0 0 2px rgba(255,255,255,.06);
}
.msg { max-width: 85%; padding: 10px 14px; border: 2px solid #000; background: #2a2a2a; box-shadow: inset 0 0 0 2px rgba(255,255,255,.06); }
.msg-user { align-self: flex-start; }
.msg-staff { align-self: flex-end; background: #2d3756; }
.msg-internal { background: #4a3d14; box-shadow: inset 0 0 0 2px rgba(255,170,0,.4); }
.msg-system { align-self: center; max-width: 100%; background: none; border: 0; box-shadow: none; padding: 2px 8px; color: var(--mc-dim); font-size: 13px; text-align: center; font-style: italic; }
.msg-head { font-size: 13px; margin-bottom: 4px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.msg-tag { font: 400 11px var(--font-pixel); background: var(--mc-aqua); color: #000; padding: 1px 5px 2px; }
.msg-tag-internal { background: var(--mc-gold); }
.msg-time { color: var(--mc-dim); font-size: 12px; font-style: normal; }
.msg-body { word-wrap: break-word; }
.chat-reply { margin-top: 12px; }
.chat-reply textarea { margin-bottom: 8px; }

.custom-page img { max-width: 100%; height: auto; }
.custom-page table { border-collapse: collapse; }

/* Locked (auto-filled) fields */
.mc-input[readonly] { background: #1b1b1b; color: #b8b8b8; border-color: #555; cursor: not-allowed; }
.mc-input[readonly]:focus { border-color: #777; }

/* ---------- application question builder ---------- */
.q-title { font: 400 18px var(--font-pixel); color: var(--mc-gold); margin: 22px 0 4px; }
.q-list { display: grid; gap: 12px; margin: 12px 0; }
.q-row { padding: 14px 16px 6px; background: rgba(255,255,255,.035); border: 2px solid #000; box-shadow: inset 0 0 0 2px rgba(255,255,255,.07); }
.q-row-main { display: grid; grid-template-columns: minmax(0, 2fr) minmax(200px, 1fr); gap: 0 14px; }
.q-row-foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.q-row-foot .mc-check { margin: 0; }
@media (max-width: 640px) { .q-row-main { grid-template-columns: 1fr; } }
.mc-choices { flex-direction: column; align-items: flex-start; gap: 8px; }
.mc-choices legend { margin-bottom: 4px; }
[hidden] { display: none !important; }
.mc-choices .mc-check { margin: 0 !important; }
.player-mc { display: block; font-family: var(--font-body); font-size: 11px; color: var(--mc-dim); }
.display-name-form .search-row { margin-bottom: 4px; flex-wrap: wrap; }
.discord-linked { display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin-bottom: 14px; background: rgba(88,101,242,.15); border: 2px solid #000; box-shadow: inset 0 0 0 2px rgba(88,101,242,.5); }
.discord-linked img { border-radius: 50%; image-rendering: auto; }
.discord-linked .good { margin-left: auto; }
.skip-discord { margin-top: 22px; padding: 14px 16px; background: rgba(255,255,255,.04); border: 2px solid #000; box-shadow: inset 0 0 0 2px rgba(255,255,255,.07); }
.skip-discord p { margin: 6px 0 10px; }
.link-reminder { margin: 4px 0 12px; padding: 12px 14px; background: rgba(88,101,242,.12); border: 2px solid #000; box-shadow: inset 0 0 0 2px rgba(88,101,242,.45); }
.link-reminder p { margin: 0 0 10px; }
.link-reminder p:last-child { margin: 10px 0 0; }

/* ---------- Java / Bedrock choice ---------- */
.platform-pick { flex-direction: column; align-items: flex-start; gap: 8px; }
.platform-pick .mc-check small { margin: 0 0 0 4px; display: inline; }
.mc-name-row[data-platform="java"] [data-show-bedrock],
.mc-name-row[data-platform="bedrock"] [data-show-java] { display: none !important; }
.pill-java { background: #c6a46c; }
.pill-bedrock { background: #9ad0ff; }

/* ---------- Discord DM template editor ---------- */
.dm-tpl { padding: 14px 16px; margin-bottom: 12px; background: rgba(255,255,255,.035); border: 2px solid #000; box-shadow: inset 0 0 0 2px rgba(255,255,255,.07); }
.dm-tpl-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.dm-tpl-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
@media (max-width: 1100px) { .dm-tpl-body { grid-template-columns: 1fr; } }
.dm-text { font-family: var(--font-body); min-height: 120px; }
.dm-vars { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.dm-var { font: 12px var(--font-mono); background: #1f2a44; color: var(--mc-aqua); border: 1px solid #000; padding: 2px 6px; cursor: pointer; }
.dm-var:hover { background: #2d3c63; }
/* preview styled like a Discord embed */
.dm-preview { background: #2b2d31; border-radius: 4px; border-left: 4px solid var(--dm-color, #5865f2); padding: 10px 14px; color: #dbdee1; font: 14px/1.4 "gg sans", system-ui, sans-serif; white-space: normal; word-wrap: break-word; align-self: start; }
.dm-preview blockquote { margin: 2px 0; padding-left: 10px; border-left: 4px solid #4e5058; }
.dm-preview a { color: #00a8fc; }
.dm-preview .dm-footer { margin-top: 8px; font-size: 12px; color: #949ba4; }
.dm-preview.plain { border-left: 0; background: #313338; }
.dm-sent { margin-top: 6px; padding: 8px 10px; background: #2b2d31; color: #dbdee1; font-size: 13px; border-left: 3px solid #5865f2; }

/* ---------- resend / send DM panels ---------- */
.dm-panel { margin-top: 18px; padding-top: 14px; border-top: 2px solid rgba(255,255,255,.08); }
.card > .dm-panel:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.dm-panel.compact { margin-top: 10px; padding-top: 10px; }
.dm-panel h2 { font: 400 21px/1.2 var(--font-pixel); color: var(--mc-yellow); text-shadow: 2px 2px 0 var(--mc-splash-shadow); margin: 0 0 10px; }
.dm-history td { padding: 6px 8px; }
.dm-send { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.dm-send select { flex: 1 1 200px; width: auto; }
.catchup-result { margin-top: 14px; padding: 12px 14px; background: rgba(85,255,255,.06); border-left: 4px solid var(--mc-aqua); }
.catchup-result p { margin: 0 0 10px; }

/* ---------- ranks & locked features ---------- */
.mc-btn.locked { background: #2b2b2b; color: #8a8a8a; text-shadow: none; cursor: not-allowed; box-shadow: inset 0 0 0 2px rgba(255,255,255,.04); }
.mc-btn.locked:hover { border-color: #000; color: #8a8a8a; }
.mc-btn-nav .lock { margin-left: auto; font-size: 12px; opacity: .7; }
.side-rank { text-align: center; font-size: 13px; color: var(--mc-dim); display: flex; gap: 6px; justify-content: center; align-items: center; flex-wrap: wrap; }
.rank-pill { color: #000; text-shadow: none; letter-spacing: 0; vertical-align: middle; }
.denied { max-width: 560px; margin: 8vh auto 0; text-align: center; }
.denied h1 { font: 600 30px var(--font-pixel); margin: 6px 0 12px; color: var(--mc-red); text-shadow: 2px 2px 0 #3f0000; }
.denied-icon { font-size: 54px; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 18px; }
.perm-grid .mc-check { margin: 4px 0 !important; }
.perm-group { font: 400 15px var(--font-pixel); color: var(--mc-gold); margin: 14px 0 4px; grid-column: 1 / -1; }
.rank-form { margin: 0; }
.mc-input.mc-input-small { padding: 4px 6px; font-size: 13px; width: auto; min-width: 0; max-width: 150px; }

/* ---------- dialogs & Discord member picker ---------- */
.mc-dialog {
  width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 20px;
  background: #141414; color: var(--mc-white); border: 2px solid #000;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.08), 0 20px 60px rgba(0,0,0,.6);
}
.mc-dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(2px); }
.mc-dialog[open] { display: flex; flex-direction: column; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.dialog-head h2 { margin: 0; }
.picker-search { margin: 0 0 8px; }
.picker-search .mc-input { flex: 1; }
.picker-filter { margin: 4px 0 8px !important; font-size: 14px; }
.picker-count { margin-bottom: 8px; }
.picker-list { overflow-y: auto; min-height: 120px; max-height: 52vh; border: 2px solid #000; background: rgba(0,0,0,.35); }
.picker-row {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 12px; text-align: left;
  background: transparent; color: inherit; border: 0; border-bottom: 1px solid rgba(255,255,255,.06); font: inherit; cursor: pointer;
}
.picker-row:hover:not(:disabled), .picker-row:focus-visible { background: rgba(85,255,255,.1); outline: none; }
.picker-row:focus-visible { box-shadow: inset 3px 0 0 var(--mc-aqua); }
.picker-row:disabled { cursor: default; opacity: .6; }
.picker-row.is-current { opacity: 1; background: rgba(85,255,85,.06); }
.picker-row img, .picker-selected img { border-radius: 50%; flex: 0 0 auto; background: #222; }
.picker-name { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.picker-name strong, .picker-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-row .pill { flex: 0 0 auto; }
.picker-empty { padding: 16px; margin: 0; }
.picker-selected { display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: 12px; border: 2px solid #000; background: rgba(85,255,255,.07); }
.picker-confirm .mc-check { margin: 8px 0 !important; }
.picker-confirm .btn-row { margin-top: 14px; }
@media (max-width: 600px) { .picker-row .pill { display: none; } .picker-row.is-linked .picker-name::after { content: 'Linked to another account'; color: var(--mc-gold); font-size: 12px; } }

/* ---------- polls ---------- */
.poll-list { display: grid; gap: 10px; margin-bottom: 22px; }
.poll-card { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 2px 14px; align-items: center; padding: 14px 16px;
  background: rgba(0,0,0,.35); border: 2px solid #000; box-shadow: inset 0 0 0 2px rgba(255,255,255,.06); color: inherit; text-decoration: none; }
.poll-card:hover { box-shadow: inset 0 0 0 2px rgba(255,255,255,.25); }
.poll-card-q { font-weight: 600; font-size: 17px; color: #fff; }
.poll-card-meta { grid-column: 1; }
.poll-card > .pill, .poll-card > .mc-btn { grid-column: 2; grid-row: 1 / span 2; }
.poll-card.is-closed .poll-card-q { color: #e6e6e6; }
.poll-question { font: 600 26px/1.25 var(--font-pixel, inherit); margin: 18px 0 6px; color: #fff; text-shadow: 2px 2px 0 #3f3f3f; }
.poll-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.poll-description { margin-bottom: 14px; }
.poll-options { display: grid; gap: 8px; margin: 6px 0 16px; }
.poll-option { padding: 12px 14px; background: rgba(0,0,0,.35); border: 2px solid #000; margin: 0 !important; }
.poll-option:has(input:checked) { border-color: var(--mc-green); background: rgba(85,255,85,.08); }
.poll-voted { padding: 12px 14px; background: rgba(85,255,85,.08); border: 2px solid #000; }
.poll-results { display: grid; gap: 8px; margin-top: 10px; }
.poll-bar { position: relative; background: rgba(0,0,0,.45); border: 2px solid #000; min-height: 44px; overflow: hidden; }
.poll-bar-fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(#3b6fd1, #2a54a8); box-shadow: inset 0 -3px 0 rgba(0,0,0,.25); transition: width .6s ease; }
.poll-bar.is-winner .poll-bar-fill { background: linear-gradient(#4caf3b, #2f7d22); }
.poll-bar-text { position: relative; display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 12px; text-shadow: 1px 1px 0 #000; }
.poll-bar-label { font-weight: 600; }
.poll-bar-num { white-space: nowrap; font-size: 14px; }
.poll-you { font-size: 11px; font-weight: 500; background: var(--mc-gold); color: #000; text-shadow: none; padding: 1px 6px; margin-left: 6px; vertical-align: middle; }
.poll-total { margin-top: 4px; }
.poll-nudge { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0 0 18px; padding: 12px 16px; background: rgba(255,170,0,.12); border: 2px solid #000;
  box-shadow: inset 0 0 0 2px rgba(255,170,0,.35); color: #fff; text-decoration: none; }
.poll-nudge span { margin-left: auto; color: var(--mc-gold); }
.poll-option-rows { display: grid; gap: 6px; margin-bottom: 8px; }
.poll-option-row { display: flex; gap: 8px; align-items: center; }
.poll-option-row .mc-input { flex: 1; margin: 0; }
.poll-option-votes { white-space: nowrap; min-width: 64px; text-align: right; }
.field-label { color: #e6e6e6; font-size: 15px; margin: 4px 0 6px; }
.tool .badge { font-size: 12px; vertical-align: middle; }

/* ---------- mass messages ---------- */
.audience-pick { flex-direction: column; align-items: stretch; gap: 10px; }
.audience-option { align-items: flex-start !important; padding: 10px 12px; background: rgba(0,0,0,.3); border: 2px solid #000; }
.audience-option:has(input:checked) { border-color: var(--mc-aqua); }
.audience-option > span { margin-top: 2px; flex: none; }
.audience-text { line-height: 1.4; }
.audience-text small { display: block; margin-top: 2px; }
.char-count { text-align: right; margin-top: 4px; }
.char-count.over { color: var(--mc-gold); }
.dm-stats { display: flex; gap: 6px; flex-wrap: wrap; }
.dm-stat { font-size: 13px; padding: 2px 8px; border: 1px solid rgba(255,255,255,.12); background: rgba(0,0,0,.3); white-space: nowrap; }
.dm-stat.sent strong { color: var(--mc-green); }
.dm-stat.queued strong { color: var(--mc-aqua); }
.dm-stat.blocked strong, .dm-stat.failed strong { color: var(--mc-red); }
.progress { height: 14px; background: rgba(0,0,0,.5); border: 2px solid #000; margin: 14px 0 6px; }
.progress-fill { height: 100%; background: var(--mc-green); transition: width .4s; }
.dm-preview .dm-sub { display: block; font-size: 12px; color: #949ba4; margin-top: 2px; }
.dm-preview .dm-h { font-size: 16px; }

.page-title h1 .pill { text-shadow: none; font-size: 13px; vertical-align: middle; position: relative; top: -3px; }

/* ---------- poll audience & Discord channel ---------- */
.pill-audience-all { background: #2a5f8f; color: #fff; }
.pill-audience-wl { background: #3a3a3a; color: #ffdd55; }
.poll-card-meta .pill { font-size: 11px; margin-right: 4px; }
.poll-card.is-locked { opacity: .75; cursor: default; }
.poll-card.is-locked:hover { box-shadow: inset 0 0 0 2px rgba(255,255,255,.06); }
.poll-channel-status { margin-top: 14px; padding: 10px 12px; background: rgba(0,0,0,.3); border: 2px solid #000; font-size: 14px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.poll-channel-status.has-error { box-shadow: inset 3px 0 0 var(--mc-red); }
