:root {
  /* Chrome-blue palette shared by the public site, control panel and admin UI. */
  --bg: #090f19;
  --panel: #121d2b;
  --panel2: #0c1623;
  --line: #26384e;
  --text: #e7f3ff;
  --muted: #a3b5c9;
  --accent: #57d1ff;
  --accent2: #2498f4;
  --on-accent: #061927;
  --warn: #ffbd63;
  --bad: #ff6b80;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(ellipse at top, #142941 0%, var(--bg) 63%) fixed, var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}
a { color: var(--accent); text-decoration: none; }
.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
header { border-bottom: 1px solid var(--line); background: rgba(9, 15, 25, .92); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(6px); }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; height: 60px; }
.brand { color: var(--text); font-size: 1.1rem; display: flex; align-items: center; gap: 10px; }
.brand img { display: block; object-fit: contain; filter: drop-shadow(0 0 6px rgba(0,158,255,.25)); }
.brand .wordmark { height: 24px; width: auto; }
.bar { justify-content: flex-start; }
.bar nav { margin-left: auto; }
.section { color: var(--accent); font-weight: 600; padding-left: 12px; border-left: 1px solid var(--line); }
@media (max-width: 560px) { .brand .wordmark { display: none; } }
.logo { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--panel); color: var(--accent); font-weight: 800; }
nav { display: flex; align-items: center; gap: 12px; font-size: .9rem; }
main { padding: 28px 16px 64px; }
h1 { font-size: 1.6rem; margin-bottom: 4px; }
h2 { font-size: 1.05rem; margin-bottom: 12px; }
.sub { color: var(--muted); margin-bottom: 24px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.cols { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .cols { grid-template-columns: 1fr 1fr; } .span2 { grid-column: span 2; } }

.game { margin-bottom: 28px; }
.game h2 { text-transform: capitalize; }
.server { display: block; color: var(--text); transition: border-color .15s, transform .15s; }
.server:hover, .server:focus-visible { border-color: var(--accent); transform: translateY(-1px); }
.server .name { font-weight: 600; font-size: 1.05rem; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.pill { font-size: .78rem; padding: 2px 10px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); }
.pill.ok { color: #8fdcff; border-color: rgba(87, 209, 255, .42); }
.pill.warn { color: var(--warn); border-color: rgba(255, 181, 71, .4); }
.pill.bad { color: var(--bad); border-color: rgba(255, 92, 108, .4); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: .92rem; margin: 10px 0 14px; }
.kv dt { color: var(--muted); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; }

button, .btn {
  font: inherit; font-size: .9rem; cursor: pointer; border-radius: 10px; padding: 8px 14px;
  border: 1px solid var(--line); background: var(--panel2); color: var(--text);
}
button:hover:not(:disabled) { border-color: var(--muted); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 600; }
button.danger { color: var(--bad); border-color: rgba(255, 92, 108, .45); }
button.ghost { background: transparent; }
button.small { padding: 4px 10px; font-size: .8rem; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; }

label { display: block; font-size: .82rem; color: var(--muted); margin-bottom: 4px; }
input, select {
  font: inherit; width: 100%; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel2); color: var(--text);
}
.form { display: grid; gap: 10px; }
.inline { display: grid; gap: 8px; grid-template-columns: 1fr auto; align-items: end; }
.fields3 { display: grid; gap: 8px; grid-template-columns: 1.2fr 1.2fr .6fr; }
@media (max-width: 520px) { .fields3 { grid-template-columns: 1fr; } }

.players { list-style: none; display: grid; gap: 8px; }
.players li { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; background: var(--panel2); border-radius: 10px; }
.empty { color: var(--muted); font-size: .92rem; }

.console { background: #07090d; border: 1px solid var(--line); border-radius: 10px; padding: 10px; height: 220px; overflow: auto; font-family: ui-monospace, Menlo, monospace; font-size: .82rem; white-space: pre-wrap; margin-bottom: 10px; }
.console .cmd { color: var(--accent); }
.console .err { color: var(--bad); }

table { width: 100%; border-collapse: collapse; font-size: .85rem; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; }
.tablewrap { overflow-x: auto; }

.login { max-width: 380px; margin: 48px auto; }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--panel); border: 1px solid var(--line); padding: 10px 16px; border-radius: 10px; max-width: calc(100% - 32px); z-index: 10; }
#toast.bad { border-color: var(--bad); }
.back { display: inline-block; margin-bottom: 14px; font-size: .9rem; }

/* ---------- server page (v2) ---------- */
:root { --blue: #5aa0ff; --panel3: #181d28; }
.hero { padding: 20px; background: linear-gradient(135deg, rgba(87,209,255,.07), rgba(90,160,255,.07) 60%, transparent), var(--panel); }
.hero-top { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.hero-emblem { border-radius: 12px; }
.hero-title { flex: 1; min-width: 220px; }
.hero-title h1 { margin: 0; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.chips { margin-top: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; padding: 3px 10px; border-radius: 99px; background: var(--panel2); border: 1px solid var(--line); color: var(--muted); }
.chip.ok { color: #8fdcff; border-color: rgba(87,209,255,.42); }
.chip.addr { text-transform: none; color: var(--text); }
.chip .small { padding: 0 6px; font-size: .72rem; }
.hero-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-top: 16px; }
.stat { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; }
.stat b { font-size: 1.15rem; text-transform: capitalize; }
.stat span { color: var(--muted); font-size: .78rem; }
.job { min-height: 1.2em; margin-top: 8px; font-size: .85rem; }

.pickbar { position: sticky; top: 60px; z-index: 4; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 16px 0 0; padding: 10px 14px; background: rgba(20,24,33,.92); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: 12px; }
.pickbar label { margin: 0; color: var(--text); font-weight: 600; }
.pickbar select { width: auto; min-width: 200px; }

.tabs { display: flex; gap: 4px; overflow-x: auto; margin: 14px 0 16px; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.tabs button { background: transparent; border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--muted); padding: 10px 14px; white-space: nowrap; }
.tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
.tabs button:hover { color: var(--text); }
.pane[hidden] { display: none !important; }
.pane > h3, .pane h3 { font-size: .95rem; margin: 6px 0 10px; color: var(--muted); font-weight: 600; }
.sub-card { margin-top: 16px; }

.pgrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.pcard { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.pbtns { display: flex; flex-wrap: wrap; gap: 6px; }
.small-select { width: auto; padding: 4px 8px; font-size: .8rem; }
.avatar { display: inline-grid; place-items: center; border-radius: 10px; font-weight: 700; font-size: .9rem; color: #fff;
  background: linear-gradient(135deg, hsl(var(--h) 65% 45%), hsl(calc(var(--h) + 40) 70% 30%)); flex: none; }

.chips-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; }
.chip-btn { font-size: .8rem; padding: 5px 12px; border-radius: 99px; }
.chip-btn.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.igrid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.itile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; background: var(--panel); border-radius: 12px; font-size: .78rem; text-align: center; }
.itile:hover { border-color: var(--accent); transform: translateY(-1px); }
.mc-item-icon { display: inline-grid; place-items: center; flex: none; border-radius: 8px; overflow: hidden; }
.mc-item-icon img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.itile .mc-item-icon { margin: 2px 0; }
.item-icon { display: inline-grid; place-items: center; border-radius: 10px; font-weight: 800; letter-spacing: .02em; color: #fff;
  background: linear-gradient(145deg, hsl(var(--h) 70% 52%), hsl(var(--h) 60% 28%)); box-shadow: inset 0 -3px 0 rgba(0,0,0,.25), inset 0 2px 0 rgba(255,255,255,.18); flex: none; }

.modal { margin: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); color: var(--text); padding: 22px; width: min(420px, calc(100% - 32px)); }
.modal::backdrop { background: rgba(0,0,0,.6); backdrop-filter: blur(2px); }
.modal h2 { margin: 0; }

.tgrid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.tile { padding: 14px 10px; border-radius: 12px; background: var(--panel); text-align: center; font-weight: 500; width: 100%; }
.tile:hover { border-color: var(--accent); }
.tile.kit { background: linear-gradient(135deg, rgba(90,160,255,.12), transparent), var(--panel); }
.tile-wrap { position: relative; }
.tile-wrap .x { position: absolute; top: 4px; right: 4px; padding: 0 6px; font-size: .8rem; background: transparent; border: 0; color: var(--muted); }

.spawns { display: flex; flex-direction: column; gap: 8px; }
.spawn { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; }
.spawn.on { border-color: rgba(87,209,255,.45); }
.live { display: inline-flex; align-items: center; gap: 8px; color: var(--warn); font-size: .9rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
details { margin-top: 8px; } summary { cursor: pointer; color: var(--muted); font-size: .88rem; padding: 4px 0; }
.checks { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.check { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 4px 10px; border: 1px solid var(--line); border-radius: 99px; color: var(--text); font-size: .8rem; cursor: pointer; }
.check input { width: auto; }
.check:has(input:checked) { border-color: var(--accent); background: rgba(87,209,255,.08); }

.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; border-radius: 0; border-right: 1px solid var(--line); background: var(--panel2); }
.seg button:last-child { border-right: 0; }
.seg button:hover:not(:disabled) { background: var(--panel3); }
.seg button.on { background: var(--accent); color: var(--on-accent); }
.rules { display: flex; flex-direction: column; }
.rule { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--text); font-size: .92rem; }
.rule:last-child { border-bottom: 0; }
.switch { appearance: none; width: 42px !important; height: 24px; border-radius: 99px; background: var(--line); position: relative; cursor: pointer; padding: 0; border: 0; flex: none; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch:checked { background: var(--accent); }
.switch:checked::after { left: 21px; }
.switch:disabled { opacity: .5; cursor: not-allowed; }
.fields2 { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .fields2 { grid-template-columns: 1fr; } .pickbar select { min-width: 0; flex: 1; } .hero-actions { width: 100%; } }

select.auto { width: auto; min-width: 150px; }
#nav { white-space: nowrap; }
#who { overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
#logout { white-space: nowrap; }
@media (max-width: 700px) { #who .role { display: none; } .hero-emblem { display: none; } }

/* live console */
.console-card { display: flex; flex-direction: column; gap: 10px; }
.log-wrap { position: relative; }
.live-log { height: calc(100vh - 330px); min-height: 320px; max-height: 900px; margin: 0; overflow-y: auto; overscroll-behavior: contain;
  font-size: .8rem; line-height: 1.45; padding: 10px 12px; background: #05070a; }
.live-log div { white-space: pre-wrap; word-break: break-word; }
.live-log .warn { color: var(--warn); }
.live-log .err { color: var(--bad); }
.live-log .cmd { color: var(--accent); margin-top: 4px; }
.live-log .reply { color: var(--blue); }
.live-log .cmdlog { color: #a9b6cc; }
.live-log .sys { color: var(--muted); font-style: italic; text-align: center; }
.jump { position: absolute; right: 16px; bottom: 12px; background: var(--accent); color: var(--on-accent); border-color: var(--accent); box-shadow: 0 4px 14px rgba(0,0,0,.4); }
.jump[hidden] { display: none; }
.cmdline { grid-template-columns: auto 1fr auto; align-items: center; }
.cmdline .prompt { font-family: ui-monospace, Menlo, monospace; color: var(--accent); font-weight: 700; }
.cmdline input { font-family: ui-monospace, Menlo, monospace; }

/* plugins & updates */
.updbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.warn-chip { color: var(--warn); border-color: rgba(255,181,71,.4); }
.chip.bad { color: var(--bad); border-color: rgba(255,92,108,.4); }
.addlink { margin-top: 12px; }
.preview { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; margin-top: 10px; padding: 14px; border: 1px solid var(--accent); border-radius: 12px; background: rgba(87,209,255,.05); }
.picon { border-radius: 8px; background: var(--panel2); object-fit: cover; flex: none; }
.ptable td { vertical-align: middle; }
.events { display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow-y: auto; }
.event { display: grid; grid-template-columns: auto auto 1fr auto; gap: 8px; align-items: center; font-size: .82rem; padding: 6px 8px; background: var(--panel2); border-radius: 8px; }
.event.bad { border-left: 3px solid var(--bad); }
@media (max-width: 700px) { .event { grid-template-columns: 1fr; } }

/* plugin browser */
.browse > summary { list-style: none; cursor: pointer; }
.browse > summary::-webkit-details-marker { display: none; }
.browse > summary::before { content: "▸ "; color: var(--accent); }
.browse[open] > summary::before { content: "▾ "; }
.bgrid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.bcard { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; min-height: 170px; }
.bcard:hover { border-color: rgba(87,209,255,.4); }
.bname { color: var(--text); font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bdesc { font-size: .82rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* files */
.crumbs { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; font-family: ui-monospace, Menlo, monospace; }
.crumbs .small { padding: 2px 6px; }
.ftable td { padding: 7px 8px; }
.frow:hover { background: var(--panel2); }
.editor-modal { width: min(1100px, calc(100% - 32px)); height: min(86vh, 900px); display: flex; flex-direction: column; gap: 10px; }
.editor-modal:not([open]) { display: none; }
.editor { flex: 1; width: 100%; resize: none; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; line-height: 1.5;
  background: #05070a; color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 12px; tab-size: 2; white-space: pre; overflow: auto; }

.we.on { border-color: var(--accent); color: var(--accent); }

/* Shared public/control/admin shell */
[hidden] { display: none !important; }
.site-links { margin-left: auto; }
.bar { height: auto; min-height: 64px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.bar #nav { margin-left: 0; }
/* Homepage-only banner: transparent chrome/blue ZX brand artwork, no image backdrop. */
.home-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  text-align: center;
  margin: 16px 0 36px;
  padding: clamp(36px, 6vw, 72px) 24px;
  border: 1px solid rgba(36, 169, 250, .28);
  border-radius: 22px;
  background:
    radial-gradient(ellipse at 50% 8%, rgba(9, 73, 125, .28), transparent 67%),
    linear-gradient(145deg, #0c1627 0%, #060c17 64%, #090c12 100%);
  box-shadow: inset 0 1px rgba(255,255,255,.065), 0 20px 58px rgba(0,0,0,.25);
}
.welcome-banner-glow {
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: .45;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(0, 137, 255, .12), transparent 68%),
    repeating-linear-gradient(0deg, transparent 0 47px, rgba(27, 124, 216, .05) 48px 49px);
  mask-image: linear-gradient(to bottom, transparent, #000 28%, transparent);
}
.welcome-banner-content { position: relative; max-width: 1080px; margin-inline: auto; }
.welcome-eyebrow {
  display: inline-block;
  color: #69d2ff;
  font-size: .77rem;
  font-weight: 800;
  letter-spacing: .24em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.home-hero h1.welcome-brand-title {
  display: block;
  margin: 0 auto;
  background: none;
  color: inherit;
  font-size: inherit;
  line-height: normal;
}
.welcome-brand-graphic {
  display: block;
  width: 100%;
  max-width: 1080px;
  height: auto;
  margin-inline: auto;
  object-fit: contain;
  filter: drop-shadow(0 5px 17px rgba(0, 125, 255, .20));
}
.home-hero p {
  color: #c0d1e2;
  font-size: clamp(1rem, 2vw, 1.25rem);
  margin: clamp(10px, 2vw, 20px) auto 28px;
  max-width: 650px;
}
.home-hero .btn.primary {
  display: inline-block;
  background: linear-gradient(120deg, #048bda, #48d9ff);
  color: #001523;
  font-weight: 800;
  padding: 13px 24px;
  box-shadow: 0 8px 30px rgba(0, 151, 255, .18);
}
.home-hero .btn.primary:hover { filter: brightness(1.1); }
@media (max-width: 560px) {
  .home-hero { padding: 38px 16px 42px; border-radius: 16px; }
  .welcome-eyebrow { font-size: .64rem; letter-spacing: .14em; }
  .home-hero p { margin-top: 8px; }
}
@media (prefers-reduced-motion: reduce) { .home-hero .btn.primary { transition: none; } }
/* ZXG Clean template: banner sits on the page itself, no frame or backdrop. */
.home-hero.home-hero-clean {
  overflow: visible;
  margin: clamp(28px, 5vw, 56px) 0 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.home-hero-clean + .home-section { margin-top: 24px; }
.home-hero-clean ~ #about { margin-top: 48px; }
/* Seasonal effect canvas: over the header/banner, never blocks clicks, fades out at the bottom. */
.seasonal-layer {
  position: absolute; top: 0; left: 0; width: 100%; z-index: 50; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0, #000 70%, transparent 100%);
}
.home-section { margin-top: 48px; }
.home-section > p { margin: 12px 0 20px; }
.home-section .news-refresh-status {
  margin-top: -9px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.65;
}
.news-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.home-section h3 { margin-bottom: 8px; }
.news-card { overflow: hidden; }
.news-image-link { display: block; margin: -18px -18px 16px; }
.news-image { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--panel2); }
.site-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); padding: 32px 16px; }
.site-version { margin-left: auto; text-align: right; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .76rem; font-variant-numeric: tabular-nums; color: #91b2cc; white-space: nowrap; }
.site-settings { max-width: 720px; }
.site-settings textarea { display: block; width: 100%; min-height: 96px; margin-top: 6px; background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 10px; font: inherit; resize: vertical; }
.site-settings label:has(input[type=checkbox]) { display: flex; align-items: center; gap: 8px; }
.site-settings input[type=checkbox] { width: auto; }
.site-settings fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; }
.site-settings legend { padding: 0 6px; color: var(--accent); }
@media (max-width: 640px) { .bar .brand { width: 100%; } .site-links { margin-left: 0; } }

/* Paper Kits & Buffs: individual effect apply/remove and particle visibility. */
.effect-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 12px; margin-top: 12px; }
.effect-card { display: flex; flex-direction: column; gap: 12px; }
.effect-card h4 { font-size: 1rem; margin: 0 0 3px; }
.effect-card p { font-size: .85rem; margin: 0; }
.effect-particles { display: flex; align-items: center; gap: 9px; font-size: .88rem; color: var(--muted); cursor: pointer; }
.effect-particles input { width: auto; accent-color: var(--accent); }
.effect-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.effect-actions button { flex: 1; min-width: 90px; }
.effect-duration { margin: 14px 0; }
.effect-duration label { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; font-weight: 600; }


/* Shared navigation: blue-metal segmented controls, not bare text links. */
.menu-selector {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px;
  min-width: 0;
  margin-left: auto;
  border: 1px solid #2d435c;
  border-radius: 15px;
  background: linear-gradient(155deg, rgba(26, 44, 64, .92), rgba(11, 24, 40, .92));
  box-shadow: inset 0 1px rgba(255,255,255,.065), 0 7px 22px rgba(0,0,0,.18);
}
.menu-selector .menu-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 11px;
  color: #b6c9dd;
  font-weight: 650;
  font-size: .83rem;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: 10px;
  transition: color .16s, background .16s, border-color .16s, box-shadow .16s;
}
.menu-selector .menu-item svg { display: block; width: 16px; height: 16px; flex: none; }
.menu-selector .menu-item:hover,
.menu-selector .menu-item:focus-visible {
  color: #f1f9ff;
  background: rgba(62, 147, 210, .14);
  border-color: rgba(87, 209, 255, .2);
}
.menu-selector .menu-item.is-active {
  color: #f0fbff;
  background: linear-gradient(145deg, rgba(29, 109, 169, .47), rgba(18, 58, 109, .62));
  border-color: rgba(87, 209, 255, .48);
  box-shadow: inset 0 1px rgba(161, 223, 255, .13), 0 0 17px rgba(21, 139, 224, .12);
}
.menu-selector .menu-item.is-active svg { color: #72d7ff; }
.menu-selector .menu-item:focus-visible,
.admin-section-menu a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.admin-section-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 23px;
  padding: 6px;
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel2);
}
.admin-section-menu a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 13px;
  border-radius: 9px;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 650;
}
.admin-section-menu a:hover { background: rgba(87,209,255,.10); color: var(--text); }
.admin-section-menu a.is-active {
  color: #f0fbff;
  background: rgba(26,124,198,.32);
  border-color: rgba(87,209,255,.48);
}
@media (max-width: 1080px) {
  .bar { row-gap: 8px; }
  .menu-selector { order: 3; flex: 1 0 100%; margin-left: 0; justify-content: flex-start; overflow-x: auto; scrollbar-width: thin; }
  .bar #nav { margin-left: auto; }
}
@media (max-width: 640px) {
  .bar .brand { width: auto; }
  .menu-selector { margin-left: 0; }
  .menu-selector .menu-item { padding: 8px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .menu-selector .menu-item { transition: none; }
}

/* Multi-game dashboard — distinct installed Minecraft UI vs upcoming games. */
.game-dashboard-summary { display: flex; gap: 12px; flex-wrap: wrap; margin: 4px 0 20px; }
.game-dashboard-summary > div {
  display: inline-flex; align-items: baseline; gap: 10px; padding: 12px 17px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel2);
}
.game-dashboard-summary strong { color: var(--accent); font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.game-dashboard-summary span { font-size: .81rem; color: var(--muted); }
.game-filter-actions { display: flex; gap: 8px; margin-bottom: 12px; }
.game-filter-all { color: var(--text); border-color: var(--line); }
.game-filter-all.is-selected {
  border-color: rgba(87,209,255,.60); background: rgba(39,124,194,.26); color: #c7f0ff;
}
.game-catalog-section { margin-bottom: 26px; }
.game-catalog-head { margin-bottom: 12px; }
.game-catalog-head h2 { margin-bottom: 4px; font-size: 1.04rem; }
.game-catalog-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 285px), 1fr)); gap: 12px;
}
.game-selector-tile {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 104px;
  border: 1px solid #314a65; border-radius: 14px; padding: 14px 12px;
  text-align: left; background: linear-gradient(145deg, #192d43, #111e2e);
  color: var(--text); box-shadow: inset 0 1px rgba(255,255,255,.045);
}
.game-selector-tile:disabled { opacity: .7; cursor: not-allowed; }
.game-selector-tile:not(:disabled):hover, .game-selector-tile.is-selected {
  opacity: 1; border-color: rgba(87,209,255,.78);
  background: linear-gradient(145deg, #183d60, #101f38);
  box-shadow: 0 0 22px rgba(30,127,211,.13), inset 0 1px rgba(163,228,255,.12);
}
.game-selector-icon, .game-section-icon {
  display: inline-grid; place-items: center; flex: none; width: 48px; height: 48px;
  border-radius: 12px; background: linear-gradient(140deg, #0b83c1, #16436c);
  border: 1px solid rgba(110,205,255,.38); color: #effaff; font-size: 1.05rem;
  font-weight: 850; letter-spacing: -.03em; text-shadow: 0 1px rgba(0,0,0,.4);
}
.game-selector-main { display: flex; flex: 1; flex-direction: column; min-width: 0; gap: 3px; }
.game-selector-main strong { font-size: .96rem; }
.game-selector-detail { color: #a4b9cf; font-size: .75rem; line-height: 1.35; }
.game-selector-state { border: 1px solid var(--line); border-radius: 999px; padding: 4px 7px;
  color: #a5b7cb; background: #102033; font-size: .68rem; white-space: nowrap; }
.game-selector-state.available { border-color: rgba(87,209,255,.4); color: #88dfff; }
.server-list-section { margin-top: 22px; }
.game-section-heading, .game-detail-context, .game-server-intro {
  display: flex; align-items: center; gap: 12px;
}
.game-section-heading { padding: 2px 0 13px; }
.game-section-heading h2 { font-size: 1.2rem; margin: 0; }
.game-section-heading p, .game-detail-context p { margin: 3px 0 0; font-size: .79rem; }
.game-section-heading .game-section-icon { width: 42px; height: 42px; font-size: .93rem; }
.game-detail-context {
  margin: 0 0 17px; padding: 12px 15px; border: 1px solid var(--line);
  border-radius: 12px; background: linear-gradient(135deg, #162b41, #111d2a);
}
.game-detail-context strong { font-size: .99rem; color: #cbf0ff; }
.game-detail-context .game-section-icon { width: 41px; height: 41px; font-size: .85rem; }
.game-server-placeholder { max-width: 860px; display: flex; flex-direction: column; gap: 16px; }
.game-server-placeholder h1 { margin: 0; }
.game-server-placeholder h2 { margin: 4px 0 0; font-size: 1.2rem; }
.game-server-placeholder .sub { margin: 0; }
.game-future-capabilities { display: flex; flex-wrap: wrap; gap: 8px; }
.game-future-chip { border: 1px solid var(--line); border-radius: 9px; padding: 7px 11px;
  background: var(--panel2); color: var(--muted); font-size: .82rem; }
@media (max-width: 600px) {
  .game-dashboard-summary > div { flex: 1 1 180px; }
  .game-selector-tile { gap: 9px; }
  .game-selector-icon { width: 41px; height: 41px; font-size: .9rem; }
  .game-selector-state { font-size: .64rem; }
}

/* Admin operational logs: preserve readable console output on small screens. */
.admin-log-output {min-height:320px;max-height:65vh;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;padding:16px;}
.admin-log-detail {white-space:pre-wrap;overflow-wrap:anywhere;max-width:650px;max-height:320px;overflow:auto;}

/* Read-only server insights and game comparison. */
.server-insights { margin-top: 24px; }
.perf-meters { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,280px),1fr)); gap: 20px; margin: 20px 0; }
.perf-meter { min-width: 0; }
.perf-meter .row { gap: 8px; align-items: baseline; }
.perf-meter strong { font-size: .8rem; font-variant-numeric: tabular-nums; }
.perf-track { height: 12px; background: #07111d; border: 1px solid #29455e; border-radius: 8px; overflow: hidden; margin-top: 8px; }
.perf-track > span { display: block; height: 100%; background: linear-gradient(90deg,#1679bd,#59d5f8); border-radius: 8px; transition: width .6s ease; }
.perf-track > .perf-high { background: linear-gradient(90deg,#bf7b2e,#f7bf61); }
.perf-chart { display: block; width: 100%; height: auto; margin: 16px 0; background: #091421; border-radius: 12px; }
.perf-chart text { fill: #9bb2c8; font-size: 12px; }
.perf-gridline { stroke: #294156; stroke-width: 1; }
.perf-line { fill: none; stroke: #50cafa; stroke-width: 2.5; stroke-linejoin: round; }
.perf-dot { fill: #6bd8ff; opacity: .6; }
.perf-dot:hover,.perf-dot:focus { opacity: 1; r: 5; outline: none; }
.perf-table-wrap { overflow-x: auto; }
.perf-table-wrap table { width: 100%; white-space: nowrap; }
.game-performance > .card { margin: 16px 0; }
@media (prefers-reduced-motion: reduce) { .perf-track > span { transition: none; } }

.server-insights [role=tab][aria-selected=true] { color: #67d5ff; border-bottom: 2px solid #52c9f9; }

/* Health reports page and System updates. */
.warn-text { color: var(--warn); }
.bad-text { color: var(--bad); }
.small { font-size: .8rem; }
.perf-track > .perf-crit { background: linear-gradient(90deg,#b23a4b,#ff6b80); }
.health-toolbar { margin-bottom: 12px; }
.health-report > .card, .health-report > .health-stats, .os-hosts > .card { margin-bottom: 16px; }
.health-report h3, .os-host h3 { margin: 18px 0 8px; font-size: 1rem; }
.health-banner { border-left: 4px solid var(--accent); }
.health-banner.health-warning { border-left-color: var(--warn); }
.health-banner.health-critical { border-left-color: var(--bad); }
.health-stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.health-stat.is-ok b { color: var(--accent); }
.health-stat.is-warn b { color: var(--warn); }
.health-stat.is-bad b { color: var(--bad); }
.health-lines { height: auto; max-height: 340px; font-size: .76rem; }
.os-summary { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin: 6px 0 12px; }
.os-packages td:first-child { width: 32px; }
.os-packages .desc { color: var(--muted); font-size: .8rem; }
.os-log { height: auto; max-height: 360px; font-size: .76rem; }

/* btop-style node cores and memory split on the server performance tab. */
.node-cores { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 0 0 18px; }
.core-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 4px 14px; margin: 10px 0 12px; }
.core-cell { display: grid; grid-template-columns: 2.6em 1fr 3em; align-items: center; gap: 6px; font-size: .78rem; font-variant-numeric: tabular-nums; }
.core-label { color: var(--muted); }
.core-value { text-align: right; }
.core-track { height: 8px; background: #07111d; border: 1px solid #29455e; border-radius: 6px; overflow: hidden; }
.core-track > span { display: block; height: 100%; background: linear-gradient(90deg,#1679bd,#59d5f8); }
.core-track > .core-warm { background: linear-gradient(90deg,#bf7b2e,#f7bf61); }
.core-track > .core-hot { background: linear-gradient(90deg,#b23a4b,#ff6b80); }
.mem-split { margin-top: 4px; }
.mem-track { display: flex; height: 12px; background: #07111d; border: 1px solid #29455e; border-radius: 8px; overflow: hidden; margin-top: 6px; }
.mem-track > span { display: block; height: 100%; }
.mem-used { background: #59d5f8; }
.mem-cache { background: #2b6f99; }
.mem-free { background: transparent; }
.mem-legend { gap: 14px; font-size: .78rem; color: var(--muted); margin-top: 6px; }
.mem-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; border: 1px solid #29455e; }

/* Backup destination folder picker. */
.folder-picker { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 8px 0 12px; background: var(--panel2); }
.folder-list { list-style: none; max-height: 260px; overflow: auto; margin-top: 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 2px 10px; }
.folder-list .linkish { background: none; border: 0; color: var(--accent); padding: 4px 2px; text-align: left; width: 100%; overflow-wrap: anywhere; }
.folder-list .linkish:hover { text-decoration: underline; }

/* Discord notifications card. */
.discord-events { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 8px 16px; margin: 8px 0 14px; }
.discord-event { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel2); cursor: pointer; }
.discord-event input { margin-top: 4px; }
.discord-event span { display: flex; flex-direction: column; }

/* Members' live web map (sandboxed iframe served from /map/<token>/) */
.webmap { position: relative; height: min(70vh, 640px); border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #000; }
.webmap.full { height: calc(100vh - 170px); min-height: 360px; }
.webmap iframe { display: block; width: 100%; height: 100%; border: 0; }
.webmap > p { padding: 16px; }
.webmap-head { justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.webmap-head h2, .webmap-head .back { margin: 0; }

/* Home page Discord invite */
.discord-card { --blurple: #5865f2; grid-column: 1 / -1; position: relative; overflow: hidden; display: flex; align-items: center; gap: 20px; padding: 22px 24px; color: var(--text); text-decoration: none; border-color: color-mix(in srgb, var(--blurple) 55%, var(--line)); background: radial-gradient(120% 160% at 0% 50%, color-mix(in srgb, var(--blurple) 28%, transparent), transparent 60%), var(--panel); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.discord-card:hover, .discord-card:focus-within { transform: translateY(-2px); border-color: var(--blurple); box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--blurple) 70%, transparent); }
.discord-cta:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.discord-card h2 { margin: 0 0 4px; }
.discord-card p { margin: 0; }
.discord-card .discord-note { margin-top: 6px; font-size: .9rem; }
.discord-actions { flex: none; display: flex; flex-direction: column; gap: 8px; }
.discord-body { flex: 1; min-width: 0; }
.discord-icon { flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; color: #fff; background: var(--blurple); box-shadow: 0 0 0 0 color-mix(in srgb, var(--blurple) 60%, transparent); animation: discord-spin-in 1.1s cubic-bezier(.2,.9,.3,1.2) both, discord-pulse 2.8s ease-out 1.2s infinite; }
.discord-icon svg { width: 36px; height: 36px; }
.discord-card:hover .discord-icon { animation: discord-spin .7s ease-in-out, discord-pulse 2.8s ease-out infinite; }
.discord-cta { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; padding: 10px 18px; border-radius: 999px; background: var(--blurple); color: #fff; font-weight: 700; white-space: nowrap; transition: filter .2s ease; }
.discord-cta svg { width: 18px; height: 18px; }
.discord-cta:hover { filter: brightness(1.12); }
.discord-cta.secondary { background: transparent; color: var(--text); border: 1px solid color-mix(in srgb, var(--blurple) 70%, var(--line)); font-weight: 600; }
.discord-cta.secondary:hover { background: color-mix(in srgb, var(--blurple) 22%, transparent); filter: none; }
@keyframes discord-spin-in { from { transform: rotate(-720deg) scale(.2); opacity: 0; } to { transform: rotate(0) scale(1); opacity: 1; } }
@keyframes discord-spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes discord-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--blurple) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 16px transparent; } }
@media (max-width: 600px) { .discord-card { flex-wrap: wrap; gap: 14px; } .discord-body { flex-basis: calc(100% - 84px); } .discord-actions { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .discord-icon, .discord-card:hover .discord-icon { animation: none; } .discord-card, .discord-card:hover { transition: none; transform: none; } }

/* Homepage message (Website settings > Homepage message) */
.home-notice { --tone: var(--accent); margin: 8px 0 24px; padding: 18px 22px; border: 1px solid color-mix(in srgb, var(--tone) 45%, var(--line)); border-left: 4px solid var(--tone); border-radius: 14px; background: linear-gradient(90deg, color-mix(in srgb, var(--tone) 12%, transparent), transparent 70%), var(--panel); overflow-wrap: anywhere; }
.home-notice-success { --tone: #3ba55c; } .home-notice-warning { --tone: var(--warn); } .home-notice-alert { --tone: var(--bad); }
.home-notice-plain { --tone: var(--line); border-left-width: 1px; background: var(--panel); }
.home-notice-title { margin: 0 0 8px; font-size: 1.15rem; }
.home-notice-dropdown > summary { margin: 0; color: var(--text); font-size: 1.05rem; cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; font-weight: 600; }
.home-notice-dropdown > summary::-webkit-details-marker { display: none; }
.home-notice-dropdown > summary::before { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--tone); border-bottom: 2px solid var(--tone); transform: rotate(-45deg); transition: transform .2s ease; flex: none; }
.home-notice-dropdown[open] > summary::before { transform: rotate(45deg); }
.home-notice-dropdown[open] > summary { margin-bottom: 12px; }
.home-notice-body > :first-child { margin-top: 0; } .home-notice-body > :last-child { margin-bottom: 0; }
.home-notice-body img { max-width: 100%; height: auto; border-radius: 8px; }
.home-notice-body a { color: var(--accent); }
.home-notice-body table { border-collapse: collapse; max-width: 100%; display: block; overflow-x: auto; }
.home-notice-body td, .home-notice-body th { border: 1px solid var(--line); padding: 6px 10px; }
.home-notice-body blockquote { margin: 8px 0; padding-left: 12px; border-left: 3px solid var(--line); color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .home-notice-dropdown > summary::before { transition: none; } }
.notice-fieldset { display: grid; gap: 12px; }
.notice-settings { display: grid; gap: 12px; }
.notice-settings[hidden] { display: none; }
.label-like { display: grid; gap: 6px; font-size: .92rem; }
.rich-editor-host { min-height: 200px; }
.rich-editor-host .jodit-container { border-radius: 10px; }

