/* ==========================================================================
   LoiNetwork – Steuerzentrale
   Farben angelehnt ans Logo: Tiefblau #0400b4 + Schwarz
   ========================================================================== */

:root {
  color-scheme: light;

  --brand: #0400b4;
  --brand-700: #02007a;
  --brand-900: #01003d;
  --brand-bright: #2c4bff;
  --brand-soft: #eceeff;
  --brand-text: #0400b4;
  --game: var(--brand-bright);

  --ink: #0b0d1f;
  --ink-2: #2a2e47;
  --muted: #61688a;
  --line: #e2e5f1;
  --line-strong: #cfd4e6;
  --bg: #eef1f8;
  --card: #ffffff;
  --card-border: #d8ddeb;
  --mix: #ffffff;
  --field-bg: #ffffff;
  --header-bg: rgba(255, 255, 255, .86);

  --ok: #12a150;
  --ok-soft: #e3f7eb;
  --bad: #dc3545;
  --bad-soft: #fde8ea;
  --warn: #d99a00;
  --warn-soft: #fff4d6;
  --unk: #8a91ad;
  --unk-soft: #eef0f6;

  --console-bg: #0a0d22;
  --console-ink: #d7dcf2;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(10, 14, 60, .06), 0 1px 1px rgba(10, 14, 60, .04);
  --shadow: 0 2px 4px rgba(10, 14, 60, .04), 0 12px 32px -12px rgba(10, 14, 60, .16);
  --shadow-lg: 0 4px 8px rgba(10, 14, 60, .05), 0 24px 56px -16px rgba(4, 0, 180, .28);
  --shadow-card: 0 1px 2px rgba(10, 14, 60, .07), 0 10px 28px -14px rgba(10, 14, 60, .22);

  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --brand-soft: rgba(96, 116, 255, .16);
    --brand-text: #9aa8ff;
    --ink: #e9ecf8;
    --ink-2: #c4c9e0;
    --muted: #8e95b5;
    --line: #252c4d;
    --line-strong: #333b63;
    --bg: #090c1c;
    --card: #121733;
    --card-border: #262e55;
    --mix: #121733;
    --field-bg: #0d1129;
    --header-bg: rgba(12, 15, 36, .82);
    --ok: #3dd68c;
    --ok-soft: rgba(61, 214, 140, .14);
    --bad: #ff6b78;
    --bad-soft: rgba(255, 107, 120, .14);
    --warn: #f2b632;
    --warn-soft: rgba(242, 182, 50, .14);
    --unk: #8e95b5;
    --unk-soft: #1c2244;
    --console-bg: #060816;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 2px 4px rgba(0, 0, 0, .3), 0 12px 32px -12px rgba(0, 0, 0, .6);
    --shadow-lg: 0 4px 8px rgba(0, 0, 0, .35), 0 24px 56px -16px rgba(44, 75, 255, .35);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, .45), 0 12px 30px -14px rgba(0, 0, 0, .7);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --brand-soft: rgba(96, 116, 255, .16);
  --brand-text: #9aa8ff;
  --ink: #e9ecf8;
  --ink-2: #c4c9e0;
  --muted: #8e95b5;
  --line: #252c4d;
  --line-strong: #333b63;
  --bg: #090c1c;
  --card: #121733;
  --card-border: #262e55;
  --mix: #121733;
  --field-bg: #0d1129;
  --header-bg: rgba(12, 15, 36, .82);
  --ok: #3dd68c;
  --ok-soft: rgba(61, 214, 140, .14);
  --bad: #ff6b78;
  --bad-soft: rgba(255, 107, 120, .14);
  --warn: #f2b632;
  --warn-soft: rgba(242, 182, 50, .14);
  --unk: #8e95b5;
  --unk-soft: #1c2244;
  --console-bg: #060816;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 2px 4px rgba(0, 0, 0, .3), 0 12px 32px -12px rgba(0, 0, 0, .6);
  --shadow-lg: 0 4px 8px rgba(0, 0, 0, .35), 0 24px 56px -16px rgba(44, 75, 255, .35);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .45), 0 12px 30px -14px rgba(0, 0, 0, .7);
}

/* Logo: dunkle Variante im Dark Mode */
.logo-dark { display: none !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none !important; }
  :root:not([data-theme="light"]) .logo-dark { display: block !important; }
}
:root[data-theme="dark"] .logo-light { display: none !important; }
:root[data-theme="dark"] .logo-dark { display: block !important; }

/* ---------- Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
#app { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; min-width: 0; width: 100%; }
a { color: var(--brand-text); text-decoration: none; }
a:hover { color: var(--brand-bright); }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.01em; }
svg { flex-shrink: 0; }
:focus-visible { outline: 3px solid rgba(44, 75, 255, .45); outline-offset: 2px; border-radius: 6px; }
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { height: 28px; width: auto; }
.brand-badge {
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: #fff; background: var(--brand); padding: 3px 8px; border-radius: 999px;
}
.main-nav { display: flex; align-items: center; gap: 4px; }
.nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 10px;
  color: var(--ink-2); font: 600 .95rem var(--font);
  background: none; border: 0; cursor: pointer;
  transition: background .15s, color .15s;
}
.nav-link:hover, .nav-link.is-active { background: var(--brand-soft); color: var(--brand-text); }
.user-chip {
  display: inline-flex; align-items: center; gap: 7px; margin: 0 4px;
  padding: 6px 12px; border-radius: 999px; font-weight: 650; font-size: .9rem;
  color: var(--ink-2); background: var(--bg); border: 1px solid var(--line);
}
.theme-toggle {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center; cursor: pointer;
  color: var(--ink-2); background: transparent; border: 1px solid var(--line);
  transition: background .15s, color .15s, border-color .15s;
}
.theme-toggle:hover { background: var(--brand-soft); color: var(--brand-text); border-color: var(--brand-soft); }
.theme-toggle .icon-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
}
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

/* ---------- Hero (blauer Kopfbereich) ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; color: #fff; padding: 40px 0 96px; }
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(900px 400px at 85% -10%, rgba(80, 110, 255, .55), transparent 60%),
    radial-gradient(700px 380px at 0% 110%, rgba(0, 200, 255, .18), transparent 60%),
    linear-gradient(135deg, var(--brand-900) 0%, var(--brand-700) 35%, var(--brand) 70%, #1530e6 100%);
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at 70% 20%, #000 10%, transparent 70%);
  mask-image: radial-gradient(ellipse at 70% 20%, #000 10%, transparent 70%);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2);
  font-size: .85rem; font-weight: 600; letter-spacing: .02em;
}
.pulse {
  width: 8px; height: 8px; border-radius: 50%; background: #3ee08a;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(62, 224, 138, .6); }
  70% { box-shadow: 0 0 0 10px rgba(62, 224, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(62, 224, 138, 0); }
}
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; margin: 12px 0 6px; letter-spacing: -.025em; }
.lead { font-size: 1.08rem; max-width: 640px; color: rgba(255, 255, 255, .82); margin: 0; }

.stats { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.stat {
  min-width: 150px; padding: 11px 18px; border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; flex-direction: column;
}
.stat-value { font-size: 1.6rem; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat-value small { font-size: .95rem; font-weight: 700; opacity: .7; }
.stat-label { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: rgba(255, 255, 255, .72); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.stat-bar { height: 4px; border-radius: 999px; background: rgba(255, 255, 255, .18); overflow: hidden; margin-top: 7px; }
.stat-bar span { display: block; height: 100%; border-radius: inherit; background: #fff; }
.stat-bar.is-warn span { background: #ffc94d; }
.stat-bar.is-crit span { background: #ff6b78; }

.section { margin-top: -64px; position: relative; padding-bottom: 64px; }
.banner {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 18px; font-weight: 600; font-size: .94rem;
  background: var(--bad-soft); color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 35%, transparent);
}
.banner:empty { display: none; }

/* ---------- Serverliste ---------- */
.list-panel {
  background: var(--card); border: 1px solid var(--card-border); border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow); padding: 18px;
}
.server-row.no-handle { grid-template-columns: minmax(280px, max-content) minmax(0, 1fr); padding-left: 16px; }
.list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.list-head h2 { font-size: 1.1rem; font-weight: 800; }
.list-head .hint { margin: 0; }
.server-list { display: flex; flex-direction: column; gap: 14px; }
.server-row {
  --game: var(--brand-bright);
  --state: var(--unk);
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: auto minmax(280px, max-content) minmax(0, 1fr); align-items: center; gap: 16px;
  background: var(--card);
  border: 1.5px solid var(--state);
  border-left: 7px solid var(--game);
  border-radius: var(--radius);
  padding: 14px 16px 14px 8px;
  box-shadow: var(--shadow-card), 0 12px 30px -22px color-mix(in srgb, var(--state) 70%, transparent);
  transition: box-shadow .2s ease, border-color .4s ease, transform .15s ease;
}
.server-row.is-entering { animation: card-in .45s ease backwards; }
.server-row:nth-child(2) { animation-delay: .04s; }
.server-row:nth-child(3) { animation-delay: .08s; }
.server-row:nth-child(n+4) { animation-delay: .12s; }
@keyframes card-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.server-row:hover { box-shadow: var(--shadow-lg), 0 16px 36px -20px color-mix(in srgb, var(--state) 80%, transparent); }
.server-row[data-status="online"] { --state: var(--ok); }
.server-row[data-status="offline"] { --state: var(--bad); }
.server-row[data-status="starting"], .server-row[data-status="busy"] { --state: var(--warn); }
.server-row.is-dragging { z-index: 5; transform: scale(1.01); box-shadow: var(--shadow-lg), 0 24px 50px -18px rgba(4, 0, 180, .45); opacity: .96; }

.drag-handle {
  display: grid; place-items: center; width: 28px; height: 72px;
  border: 0; border-radius: 8px; background: transparent; color: var(--muted);
  cursor: grab; touch-action: none;
}
.drag-handle:hover { color: var(--brand-text); background: var(--brand-soft); }
.server-row.is-dragging .drag-handle { cursor: grabbing; color: var(--brand-text); }
.server-row > .mc-entry:first-child { margin-left: 8px; }

/* Eintrag wie in der Mehrspieler-Serverliste von Minecraft */
.mc-entry {
  display: flex; gap: 8px; align-items: flex-start; min-width: 0; width: fit-content; max-width: 100%;
  padding: 4px; border-radius: 3px;
  font: 600 14px/1.3 "Minecraft", "Minecraftia", "Monocraft", var(--mono);
  color: #AAAAAA; background-color: #1d1d22;
  background-image: linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
  background-size: 8px 8px;
  border: 2px solid #000; box-shadow: inset 0 0 0 1px #3a3a42;
  transition: box-shadow .15s;
}
.mc-entry:hover { color: #AAAAAA; box-shadow: inset 0 0 0 2px #a0a0a0; }
.mc-icon { width: 56px; height: 56px; flex-shrink: 0; image-rendering: pixelated; }
/* Textbreite wie in Minecraft: 271 Pixel – dort bricht die MOTD um */
.mc-body { width: calc(271ch / 6); flex: 0 1 auto; min-width: 0; }
.mc-top { display: flex; align-items: center; gap: 8px; }
.mc-name { flex: 1; min-width: 0; color: #FFFFFF; text-shadow: .12em .12em 0 #3f3f3f; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-players { color: #AAAAAA; text-shadow: .12em .12em 0 #2a2a2a; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mc-slash { color: #555555; }
.mc-ping { display: inline-flex; align-items: flex-end; gap: 1px; height: 14px; flex-shrink: 0; }
.mc-ping i { width: 2px; background: #2c2c2c; box-shadow: 1px 1px 0 #111; }
.mc-ping i:nth-child(1) { height: 3px; } .mc-ping i:nth-child(2) { height: 5px; } .mc-ping i:nth-child(3) { height: 8px; }
.mc-ping i:nth-child(4) { height: 11px; } .mc-ping i:nth-child(5) { height: 14px; }
.mc-ping i.on { background: #00e030; }
.mc-ping.is-off { color: #e02020; align-items: center; }
.mc-ping.is-pinging i { animation: ping-cycle 1s infinite; }
.mc-ping.is-pinging i:nth-child(2) { animation-delay: .1s; } .mc-ping.is-pinging i:nth-child(3) { animation-delay: .2s; }
.mc-ping.is-pinging i:nth-child(4) { animation-delay: .3s; } .mc-ping.is-pinging i:nth-child(5) { animation-delay: .4s; }
@keyframes ping-cycle { 0%, 60%, 100% { background: #2c2c2c; } 20% { background: #00e030; } }
.mc-motd.is-inline {
  padding: 0; margin-top: 3px; border: 0; box-shadow: none; background: none;
  font: inherit; line-height: 1.3; min-height: 2.6em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mc-motd.is-error { color: #AA0000; text-shadow: .12em .12em 0 #2a0000; }
.mc-motd.is-waiting { color: #555555; text-shadow: .12em .12em 0 #151515; }

.row-side { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.row-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-head .row-actions { margin-left: auto; }
.row-head .status-pill { margin-top: 0; }
.row-port { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; font-weight: 650; color: var(--muted); }
.row-stats { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.5fr) minmax(0, .8fr) minmax(0, 1fr) minmax(0, 1.1fr); gap: 8px; }
.row-stat { padding: 5px 10px; border-radius: 9px; background: var(--bg); min-width: 0; display: flex; flex-direction: column; }
.row-stat-label { display: flex; align-items: center; gap: 4px; font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.row-stat-label svg { color: var(--game); }
.row-stat strong { font-size: .9rem; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-stat .meta-bar { margin-top: 4px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.row-actions .btn { padding: 5px 10px; font-size: .82rem; border-radius: 9px; }

.add-row {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 18px; border-radius: var(--radius); border: 2px dashed var(--line-strong); color: var(--muted);
  font-weight: 650; transition: border-color .2s, background .2s, color .2s;
}
.add-row:hover { border-color: var(--brand-bright); background: var(--brand-soft); color: var(--brand-text); }
.add-row strong { color: var(--ink); }
.add-row .add-card-icon { width: 40px; height: 40px; border-radius: 12px; margin: 0; }

@media (max-width: 1100px) {
  .server-row { grid-template-columns: auto minmax(0, 1fr); }
  .row-side { grid-column: 2; }
  .mc-entry { max-width: 520px; }
  .server-row.no-handle { grid-template-columns: minmax(0, 1fr); }
  .server-row.no-handle .row-side { grid-column: 1; }
}
@media (max-width: 600px) {
  .list-panel { padding: 10px; }
  .server-row { gap: 10px; padding: 10px 10px 10px 4px; }
}
@media (max-width: 600px) {
  .row-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mc-entry { font-size: 13px; }
  .mc-icon { width: 48px; height: 48px; }
}

.status-pill {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 7px; margin-top: 4px;
  padding: 5px 11px; border-radius: 999px;
  font-size: .8rem; font-weight: 700; white-space: nowrap;
  background: var(--unk-soft); color: var(--unk);
}
.status-pill i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-pill.is-online, .status-pill.is-offline, .status-pill.is-busy { color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }
.status-pill.is-online { background: linear-gradient(135deg, #1fbf6a, #0f9a52); box-shadow: 0 4px 14px -4px rgba(18, 161, 80, .65), inset 0 1px 0 rgba(255, 255, 255, .25); }
.status-pill.is-online i { background: #fff; animation: pulse-white 2s infinite; }
.status-pill.is-offline { background: linear-gradient(135deg, #f0475a, #c9283b); box-shadow: 0 4px 14px -4px rgba(220, 53, 69, .65), inset 0 1px 0 rgba(255, 255, 255, .25); }
.status-pill.is-offline i { background: #fff; }
.status-pill.is-busy { background: linear-gradient(135deg, #f5b52e, #d98a00); box-shadow: 0 4px 14px -4px rgba(217, 138, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .25); }
.status-pill.is-busy i { background: #fff; animation: blink 1s infinite; }
@keyframes pulse-white {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .8); }
  70% { box-shadow: 0 0 0 6px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}
@keyframes blink { 50% { opacity: .25; } }

.meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0; }
.meta-item { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--bg); min-width: 0; }
.meta dt { display: flex; align-items: center; gap: 6px; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.meta dt svg { color: var(--game); }
.meta dd { margin: 2px 0 0; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.meta-bar { height: 4px; border-radius: 999px; background: var(--unk-soft); overflow: hidden; margin-top: 6px; }
.meta-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--game), color-mix(in srgb, var(--game) 55%, var(--mix))); }
.meta-bar.is-warn span { background: var(--warn); }
.meta-bar.is-crit span { background: var(--bad); }

.tps-bad { color: var(--bad); }

/* Statuswechsel: Lichtstreifen + Leuchten */
.server-row.flash::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit;
  background: linear-gradient(105deg, transparent 30%, color-mix(in srgb, var(--state) 28%, transparent) 50%, transparent 70%);
  background-size: 250% 100%;
  animation: sweep 1.2s ease-out .1s both;
}
.server-row.flash .status-pill { animation: pill-flip .7s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes sweep { from { background-position: 120% 0; } to { background-position: -120% 0; } }
@keyframes pill-flip {
  0% { transform: perspective(300px) rotateX(90deg) scale(.8); }
  100% { transform: perspective(300px) rotateX(0) scale(1); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 15px; border-radius: 12px; border: 1px solid transparent;
  font: 650 .92rem var(--font); cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: transform .1s, box-shadow .15s, background .15s, color .15s, border-color .15s, opacity .15s;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.btn-primary {
  color: #fff; background: linear-gradient(180deg, #1a1cd0, var(--brand));
  box-shadow: 0 1px 0 rgba(255, 255, 255, .2) inset, 0 6px 16px -6px rgba(4, 0, 180, .6);
}
.btn-primary:hover:not(:disabled) { color: #fff; background: linear-gradient(180deg, #2a31ff, #0806c8); }
.btn-start {
  color: #fff; background: linear-gradient(180deg, #1fbf6a, #0f9a52);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .2) inset, 0 6px 16px -6px rgba(18, 161, 80, .6);
}
.btn-start:hover:not(:disabled) { color: #fff; background: linear-gradient(180deg, #2bd27a, #12a85a); }
.btn-stop {
  color: #fff; background: linear-gradient(180deg, #f0475a, #c9283b);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .2) inset, 0 6px 16px -6px rgba(220, 53, 69, .6);
}
.btn-stop:hover:not(:disabled) { color: #fff; background: linear-gradient(180deg, #ff5a6c, #d42f43); }
.btn-ghost { color: var(--ink-2); background: var(--card); border-color: var(--line); }
.btn-ghost:hover:not(:disabled) { color: var(--brand-text); border-color: var(--brand-text); background: var(--brand-soft); }
.btn-ghost.is-danger:hover:not(:disabled) { color: var(--bad); border-color: var(--bad); background: var(--bad-soft); }
.btn-glass { color: #fff; background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .28); }
.btn-glass:hover:not(:disabled) { color: #fff; background: rgba(255, 255, 255, .22); }
.btn-glass.is-danger:hover:not(:disabled) { background: rgba(255, 90, 108, .35); border-color: rgba(255, 150, 160, .6); }
.btn-block { width: 100%; }

/* ---------- Detailseite ---------- */
.detail-hero { padding: 28px 0 96px; }
.back-link {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 18px;
  color: rgba(255, 255, 255, .78); font-weight: 600; font-size: .92rem;
}
.back-link:hover { color: #fff; }
.detail-head { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.detail-icon {
  flex-shrink: 0; width: 76px; height: 76px; border-radius: 22px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(145deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, .08));
  border: 1px solid rgba(255, 255, 255, .3);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .35);
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-5px) rotate(-2deg); } }
.detail-heading { flex: 1; min-width: 220px; }
.detail-heading h1 { margin: 2px 0 0; font-size: clamp(1.7rem, 4.5vw, 2.4rem); }
.detail-kicker { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; opacity: .8; }
.detail-motd { margin: 4px 0 0; opacity: .82; overflow-wrap: anywhere; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 999px; font-size: .82rem; font-weight: 700;
  color: #fff; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .24);
}
.hero-badges .status-pill { margin-top: 0; padding: 6px 12px; font-size: .82rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.tiles { display: grid; gap: 14px; grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 24px; }
@media (max-width: 1180px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat-tile {
  display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center;
  padding: 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--card-border);
  box-shadow: var(--shadow-card); min-width: 0;
}
.stat-tile-icon {
  grid-row: span 3; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  color: var(--brand-text); background: var(--brand-soft);
}
.stat-tile-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.stat-tile-value { font-size: 1.3rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.25; overflow-wrap: anywhere; }
.stat-tile-sub { font-size: .78rem; color: var(--muted); }
.stat-tile .meta-bar { grid-column: 2; }
.stat-tile.is-good .stat-tile-value { color: var(--ok); }
.stat-tile.is-good .stat-tile-icon { color: var(--ok); background: var(--ok-soft); }
.stat-tile.is-warn .stat-tile-value { color: var(--warn); }
.stat-tile.is-warn .stat-tile-icon { color: var(--warn); background: var(--warn-soft); }
.stat-tile.is-bad .stat-tile-value { color: var(--bad); }
.stat-tile.is-bad .stat-tile-icon { color: var(--bad); background: var(--bad-soft); }

.columns { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
.panel {
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius);
  box-shadow: var(--shadow-card); padding: 20px; min-width: 0;
}
.panel-title {
  display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
  font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; color: var(--muted);
}
.panel-title svg { color: var(--brand-text); }
.panel-title .count { margin-left: auto; font-size: .75rem; padding: 1px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-text); letter-spacing: 0; }

.players { display: flex; flex-wrap: wrap; gap: 8px; }
.player {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px 5px 6px; border-radius: 999px; font-size: .88rem; font-weight: 650;
  background: var(--bg); border: 1px solid var(--line);
}
.player.is-clickable { font: inherit; font-size: .88rem; font-weight: 650; color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.player.is-clickable:hover { border-color: var(--brand-text); background: var(--brand-soft); color: var(--brand-text); }

/* Spieler-Dialog */
.player-dialog { gap: 14px; overflow-y: auto; }
.player-dialog > * { flex-shrink: 0; }
.pd-avatar {
  width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0; display: grid; place-items: center;
  font-size: 1.4rem; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--brand-bright), var(--brand));
}
.player-dialog .modal-head p { font-family: var(--mono); font-size: .76rem; overflow-wrap: anywhere; }
.pd-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 28px; }
.pd-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px;
  font-size: .78rem; font-weight: 700; background: var(--bg); border: 1px solid var(--line); color: var(--ink-2);
}
.pd-chip svg { color: var(--muted); }
.pd-chip.is-brand { color: var(--brand-text); border-color: var(--brand-text); background: var(--brand-soft); }
.pd-chip.is-brand svg { color: currentColor; }
.pd-chip.is-ok { color: var(--ok); border-color: var(--ok); background: var(--ok-soft); }
.pd-chip.is-ok svg { color: currentColor; }
.pd-chip.is-warn { color: var(--warn); border-color: var(--warn); background: var(--warn-soft); }
.pd-chip.is-warn svg { color: currentColor; }
.pd-note { font-size: .78rem; color: var(--muted); }
.pd-section { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.pd-section h4 { margin: 0; font-size: .72rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.pd-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pd-row input, .pd-row select {
  flex: 1 1 180px; min-width: 0; font: inherit; font-size: .88rem; color: var(--ink);
  padding: 7px 11px; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--field-bg);
}
.pd-row input:focus, .pd-row select:focus { outline: 0; border-color: var(--brand-bright); box-shadow: 0 0 0 3px rgba(44, 75, 255, .12); }
.seg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 3px; border-radius: 11px; background: var(--bg); border: 1px solid var(--line); }
.seg-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  border: 0; background: transparent; cursor: pointer; font: 700 .82rem var(--font); color: var(--muted);
  padding: 8px 6px; border-radius: 8px; transition: background .15s, color .15s;
}
.seg-btn:hover:not(:disabled) { color: var(--ink); background: var(--card); }
.seg-btn.is-active, .seg-btn.is-active:hover:not(:disabled) {
  background: var(--brand-bright); color: #fff; box-shadow: 0 6px 16px -6px rgba(44, 75, 255, .7);
}
.seg-btn.is-active:disabled { opacity: 1; }
.pd-section h4 { display: flex; align-items: center; gap: 8px; }
.pd-plugin {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px;
  font-size: .68rem; letter-spacing: 0; text-transform: none; color: var(--brand-text); background: var(--brand-soft);
}
.seg-btn:disabled { opacity: .6; cursor: default; }
@media (max-width: 520px) { .seg { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.player-avatar {
  width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center;
  font-size: .72rem; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--brand-bright), var(--brand));
}
.empty {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: 22px 14px; border-radius: 14px; border: 1px dashed var(--line-strong); color: var(--muted); font-size: .9rem;
}
.empty svg { color: var(--brand-text); }
.hint { margin: 12px 0 0; font-size: .82rem; color: var(--muted); }

.info-list { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0; }
.info-list dt, .info-list dd { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.info-list dt { color: var(--muted); font-weight: 600; }
.info-list dd { margin: 0; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.info-list dt:nth-last-child(2), .info-list dd:last-child { border-bottom: 0; }
.yes { color: var(--ok); }

.side-col { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.panel-head .panel-title { margin: 0; }
.hint.is-warn { color: var(--warn); font-weight: 600; }

/* ---------- MOTD im Minecraft-Stil ---------- */
.mc-motd {
  font: 600 .92rem/1.5 "Minecraft", "Minecraftia", "Monocraft", var(--mono);
  white-space: pre-wrap; overflow-wrap: anywhere;
  padding: 9px 12px; border-radius: 10px;
  color: #AAAAAA; background: #101014;
  background-image: linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
  background-size: 8px 8px;
  border: 1px solid #2c2c35;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .6);
}
.mc-motd.is-hero { margin-top: 10px; max-width: 640px; background-color: rgba(0, 0, 0, .45); border-color: rgba(255, 255, 255, .16); }
/* Breiten wie in der Minecraft-Schrift: 1 Minecraft-Pixel = 1ch / 6, normale Zeichen 6 px, fett jeweils +1 px.
   Schmalere Zeichen (mc-w2 … mc-w5) werden links und rechts gleichmäßig beschnitten, damit sie mittig bleiben. */
.mc-motd, .mc-name { letter-spacing: 0; }
.mc-b { font-weight: 800; --mc-bold: calc(1ch / 6); letter-spacing: var(--mc-bold); }
.mc-w2 { --mc-trim: calc(-4ch / 12); }
.mc-w3 { --mc-trim: calc(-3ch / 12); }
.mc-w4 { --mc-trim: calc(-2ch / 12); }
.mc-w5 { --mc-trim: calc(-1ch / 12); }
.mc-w7 { --mc-trim: calc(1ch / 12); }
.mc-w2, .mc-w3, .mc-w4, .mc-w5, .mc-w7 { margin-left: var(--mc-trim); letter-spacing: calc(var(--mc-trim) + var(--mc-bold, 0ch)); }
.mc-i { font-style: italic; }
.mc-u { text-decoration: underline; }
.mc-s { text-decoration: line-through; }
.mc-u.mc-s { text-decoration: underline line-through; }

/* ---------- Onlinezeit ---------- */
.uptime-panel { margin-bottom: 24px; }
.uptime-body { display: flex; flex-direction: column; gap: 16px; transition: opacity .2s; }
.uptime-body.is-loading { opacity: .45; }
.range-tabs { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--bg); border: 1px solid var(--line); }
.range-tabs button {
  border: 0; background: transparent; cursor: pointer; font: 700 .8rem var(--font); color: var(--muted);
  padding: 6px 11px; border-radius: 8px; transition: background .15s, color .15s;
}
.range-tabs button:hover { color: var(--ink); }
.range-tabs button.is-active { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }
.history-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.h-tile { padding: 12px 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.h-tile-label { display: flex; align-items: center; gap: 6px; font-size: .7rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.h-tile-label svg { color: var(--brand-text); }
.h-tile strong { font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.2; }
.h-tile small { font-size: .76rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-tile.is-good strong, .h-tile.is-good .h-tile-label svg { color: var(--ok); }
.h-tile.is-warn strong, .h-tile.is-warn .h-tile-label svg { color: var(--warn); }
.h-tile.is-bad strong, .h-tile.is-bad .h-tile-label svg { color: var(--bad); }
.chart-block { padding: 14px; border-radius: 16px; background: var(--bg); border: 1px solid var(--line); }
.uptime-strip { display: flex; gap: 2px; height: 34px; }
.uptime-strip span { flex: 1; min-width: 2px; border-radius: 4px; transition: transform .15s, filter .15s; }
.uptime-strip span:hover { transform: scaleY(1.15); filter: brightness(1.1); }
.seg-up { background: var(--ok); }
.seg-partial { background: var(--warn); }
.seg-down { background: var(--bad); }
.seg-none { background: var(--unk-soft); box-shadow: inset 0 0 0 1px var(--line-strong); }
.uptime-axis { display: flex; justify-content: space-between; margin-top: 6px; font-size: .74rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.uptime-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: .78rem; font-weight: 600; color: var(--muted); }
.uptime-legend span { display: inline-flex; align-items: center; gap: 6px; }
.uptime-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.empty strong { color: var(--ink); }

/* ---------- RAM ---------- */
.ram-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ram-value { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.ram-slider {
  --fill: 50%;
  -webkit-appearance: none; appearance: none; width: 100%; height: 8px; margin: 14px 0 6px;
  border-radius: 999px; cursor: pointer;
  background: linear-gradient(90deg, var(--brand-bright) var(--fill), var(--unk-soft) var(--fill));
}
.ram-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 3px solid var(--brand-bright); box-shadow: 0 2px 8px rgba(4, 0, 180, .35);
}
.ram-slider::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; border: 3px solid var(--brand-bright); box-shadow: 0 2px 8px rgba(4, 0, 180, .35);
}
.ram-scale { display: flex; justify-content: space-between; font-size: .74rem; font-weight: 600; color: var(--muted); }
.ram-info { margin: 14px 0 6px; font-size: .85rem; color: var(--ink-2); }
.ram-info.is-warn { color: var(--bad); font-weight: 650; }
.ram-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.ram-actions .btn { flex: 1 1 auto; }

/* ---------- Übersicht: Kopf + "Neuer Server" ---------- */
.hero-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.btn-light {
  color: var(--brand); background: #fff; padding: 12px 18px; font-size: .98rem;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .45);
}
.btn-light:hover:not(:disabled) { color: var(--brand); transform: translateY(-1px); box-shadow: 0 14px 28px -10px rgba(0, 0, 0, .55); }
.add-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  min-height: 260px; padding: 22px; border-radius: var(--radius);
  border: 2px dashed var(--line-strong); color: var(--muted); background: transparent;
  transition: border-color .2s, background .2s, color .2s, transform .2s;
}
.add-card:hover { border-color: var(--brand-bright); background: var(--brand-soft); color: var(--brand-text); transform: translateY(-3px); }
.add-card strong { color: var(--ink); font-size: 1.1rem; }
.add-card-icon {
  width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; margin-bottom: 6px;
  color: #fff; background: linear-gradient(135deg, var(--brand-bright), var(--brand));
  box-shadow: 0 10px 24px -10px rgba(4, 0, 180, .6);
}

/* ---------- Formulare ---------- */
.create-wrap { max-width: 920px; margin: 0 auto; }
.create-form { display: flex; flex-direction: column; gap: 20px; }
.form-section { display: flex; flex-direction: column; gap: 4px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.grid-2.spaced { margin-top: 18px; }
.field small { font-weight: 500; color: var(--muted); font-size: .8rem; }
.field input:not([type="checkbox"]):not([type="color"]):not([type="range"]), .field select {
  font: inherit; color: var(--ink); width: 100%;
  padding: 11px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--field-bg);
  transition: border-color .15s, box-shadow .15s;
}
.field select { cursor: pointer; }
.field input:focus, .field select:focus { outline: 0; border-color: var(--brand-bright); box-shadow: 0 0 0 4px rgba(44, 75, 255, .14); }
.field.has-error input, .field.has-error select { border-color: var(--bad); }
.field-error { color: var(--bad) !important; font-weight: 600 !important; }
.field-error:empty { display: none; }
.field.has-warn small { color: var(--warn); font-weight: 650; }
.path-preview { font-family: var(--mono); font-size: .78rem; }
.color-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.color-row input[type="color"] { width: 46px; height: 40px; padding: 2px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--field-bg); cursor: pointer; }
.swatch { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--line-strong); cursor: pointer; }
.swatch:hover { transform: scale(1.1); }
.motd-preview { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.mc-motd.is-preview { min-height: 3.4em; }
.small { font-size: .8rem; }
.toggles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.toggle {
  position: relative; display: flex; align-items: center; gap: 12px; cursor: pointer;
  padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--bg);
}
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle strong { display: block; font-size: .92rem; }
.toggle small { display: block; color: var(--muted); font-size: .8rem; }
.toggle-ui { flex-shrink: 0; width: 42px; height: 24px; border-radius: 999px; background: var(--line-strong); position: relative; transition: background .2s; }
.toggle-ui::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s;
}
.toggle input:checked + .toggle-ui { background: var(--brand-bright); }
.toggle input:checked + .toggle-ui::after { transform: translateX(18px); }
.toggle input:focus-visible + .toggle-ui { outline: 3px solid rgba(44, 75, 255, .45); outline-offset: 2px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: .95rem; color: var(--ink-2); cursor: pointer; padding: 6px 0; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--brand-bright); flex-shrink: 0; }
.form-finish .form-error { text-align: left; margin-top: 6px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding-top: 14px; margin-top: 8px; border-top: 1px solid var(--line); }
.btn-lg { padding: 12px 22px; font-size: 1rem; }
.spinner {
  width: 16px; height: 16px; border-radius: 50%; display: inline-block;
  border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Löschen ---------- */
.danger-panel { border-color: color-mix(in srgb, var(--bad) 40%, var(--card-border)); }
.danger-panel .panel-title, .danger-panel .panel-title svg { color: var(--bad); }
.danger-panel .hint { margin: 0 0 14px; }
.btn-danger-outline { color: var(--bad); background: transparent; border-color: color-mix(in srgb, var(--bad) 50%, transparent); }
.btn-danger-outline:hover:not(:disabled) { color: #fff; background: var(--bad); border-color: var(--bad); }

/* ---------- Dialog ---------- */
html.modal-open { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(20, 24, 120, .45), rgba(2, 1, 30, .72));
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; transition: opacity .25s ease;
}
.modal.is-danger .modal-backdrop { background: radial-gradient(circle at 50% 30%, rgba(120, 20, 40, .4), rgba(20, 2, 10, .75)); }
.modal-dialog {
  position: relative; width: 100%; max-width: 480px;
  display: flex; flex-direction: column; gap: 14px;
  background: var(--card); border-radius: 22px; padding: 28px;
  box-shadow: 0 50px 120px -30px rgba(2, 0, 60, .75), 0 0 0 1px rgba(255, 255, 255, .06);
  opacity: 0; transform: translateY(24px) scale(.96);
  transition: opacity .2s ease, transform .4s cubic-bezier(.2, 1, .3, 1);
}
.modal.is-open .modal-backdrop { opacity: 1; }
.modal.is-open .modal-dialog { opacity: 1; transform: none; }
.modal-dialog h2 { font-size: 1.35rem; font-weight: 800; text-align: center; }
.modal-icon-wrap { display: flex; justify-content: center; }
.modal-danger-icon {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #f0475a, #c9283b);
  box-shadow: 0 0 0 8px var(--bad-soft), 0 14px 30px -10px rgba(220, 53, 69, .7);
}
.modal-list { margin: 0; padding: 12px 14px 12px 32px; border-radius: 12px; background: var(--bg); color: var(--ink-2); font-size: .9rem; display: flex; flex-direction: column; gap: 4px; }
.modal-dialog .field input { font: inherit; color: var(--ink); width: 100%; padding: 11px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--field-bg); }
.modal-dialog .field input:focus { outline: 0; border-color: var(--bad); box-shadow: 0 0 0 4px var(--bad-soft); }
.modal-dialog .form-error { text-align: left; min-height: 0; }
.modal-dialog .form-error:empty { display: none; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.modal-actions .btn { flex: 1 1 140px; }

[hidden] { display: none !important; }

/* ---------- MOTD-Editor ---------- */
.motd-editor { display: flex; flex-direction: column; gap: 12px; }
.motd-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 10px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--line);
}
.motd-colors { display: grid; grid-template-columns: repeat(8, 26px); gap: 5px; }
.motd-color {
  width: 26px; height: 26px; border-radius: 6px; cursor: pointer;
  border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--line-strong);
  transition: transform .1s;
}
.motd-color:hover { transform: scale(1.15); box-shadow: 0 0 0 2px var(--brand-bright); }
.motd-divider { width: 1px; align-self: stretch; background: var(--line-strong); }
.motd-formats { display: flex; flex-wrap: wrap; gap: 5px; }
.motd-format {
  min-width: 36px; height: 36px; padding: 0 8px; border-radius: 8px; cursor: pointer;
  font: 800 .95rem var(--mono); color: var(--ink); background: var(--card); border: 1px solid var(--line-strong);
}
.motd-format:hover { border-color: var(--brand-bright); color: var(--brand-text); background: var(--brand-soft); }
.motd-lines { display: flex; flex-direction: column; gap: 8px; }
.motd-line-wrap {
  display: flex; align-items: center; gap: 10px;
  padding: 0 0 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--field-bg);
  transition: border-color .15s, box-shadow .15s;
}
.motd-line-wrap > span { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); white-space: nowrap; }
.motd-line-wrap.is-active { border-color: var(--brand-bright); box-shadow: 0 0 0 4px rgba(44, 75, 255, .12); }
.motd-line { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 11px 12px 11px 0; font: 14px var(--mono); color: var(--ink); }
.motd-hint { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.motd-hint small { color: var(--muted); font-size: .8rem; }
.motd-count { font-variant-numeric: tabular-nums; }
.motd-count.is-warn { color: var(--bad) !important; font-weight: 700; }
.motd-preview-box { display: flex; flex-direction: column; gap: 6px; }
.motd-preview-label { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; color: var(--muted); }
/* Hintergrund wie das Mehrspieler-Menü (dunkle Erde) */
.mc-list-bg {
  padding: 14px; border-radius: 10px;
  background-color: #1f1a14;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Crect width='16' height='16' fill='%23231d16'/%3E%3Crect x='2' y='3' width='2' height='2' fill='%23302619'/%3E%3Crect x='9' y='1' width='2' height='2' fill='%231a1510'/%3E%3Crect x='12' y='8' width='2' height='2' fill='%23302619'/%3E%3Crect x='5' y='10' width='2' height='2' fill='%231a1510'/%3E%3Crect x='1' y='13' width='2' height='2' fill='%23291f15'/%3E%3Crect x='10' y='13' width='2' height='2' fill='%231a1510'/%3E%3C/svg%3E");
  background-size: 32px 32px; image-rendering: pixelated;
  box-shadow: inset 0 0 0 1px #000, inset 0 0 30px rgba(0, 0, 0, .6);
}
/* Detailseite: Eintrag wie in der Serverübersicht, gleiche Maße */
.detail-entry { margin-top: 12px; }
.detail-entry .mc-entry { box-shadow: inset 0 0 0 1px #3a3a42, 0 10px 26px -12px rgba(0, 0, 0, .6); }
.detail-entry .mc-entry:hover { box-shadow: inset 0 0 0 1px #3a3a42, 0 10px 26px -12px rgba(0, 0, 0, .6); }
.mc-list-bg .mc-entry { background: rgba(0, 0, 0, .35); border-color: #808080; box-shadow: inset 0 0 0 1px #000; }

/* ---------- Server bearbeiten ---------- */
.edit-wrap { max-width: 1100px; margin: 0 auto; }
.edit-stack { display: flex; flex-direction: column; gap: 24px; }
.edit-lists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
@media (max-width: 900px) { .edit-lists { grid-template-columns: 1fr; } }
.form-actions .is-left { margin-right: auto; }
.btn-sm { padding: 6px 11px; font-size: .8rem; gap: 6px; border-radius: 9px; }
.motd-status {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px;
  padding: 10px 14px; border-radius: var(--radius-sm); font-size: .88rem;
  background: var(--bg); border: 1px solid var(--line); color: var(--ink-2);
}
.motd-status:empty { display: none; }
.motd-status > svg { flex-shrink: 0; color: var(--brand-text); }
.motd-status > span { flex: 1; min-width: 200px; }
.motd-status.is-ok > svg { color: var(--ok); }
.motd-status.is-warn { border-color: var(--warn); background: var(--warn-soft); }
.motd-status.is-warn > svg { color: var(--warn); }
.motd-list-count:not(:empty) { margin-left: 4px; font-size: .8rem; font-weight: 700; }
.motd-list { display: flex; flex-direction: column; gap: 10px; max-height: 620px; overflow-y: auto; padding-right: 2px; }
.motd-item { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.motd-item.is-current { border-color: var(--ok); }
.motd-item-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.motd-item-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.motd-badge {
  display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; margin-left: auto;
  padding: 2px 8px; border-radius: 999px; font-size: .72rem; font-weight: 800;
  color: var(--ok); background: var(--ok-soft); border: 1px solid var(--ok);
}
.motd-item-preview { font-size: .8rem; min-height: calc(2 * 1.5em + 18px); }
.motd-item-preview.is-empty { color: #666; font-style: italic; }
.motd-item-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.motd-item-meta { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; color: var(--muted); }
.motd-item-actions { display: flex; gap: 6px; margin-left: auto; }
.modal:not(.is-danger) .modal-dialog .field input:focus { border-color: var(--brand-bright); box-shadow: 0 0 0 4px rgba(44, 75, 255, .12); }

/* ---------- Plugins ---------- */
.plugin-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.plugin-summary { flex: 1; min-width: 220px; display: flex; flex-wrap: wrap; gap: 6px; }
.plugin-summary .hint { margin: 0; }
.plugin-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 11px; border-radius: 999px;
  font-size: .85rem; font-weight: 650; color: var(--brand-text); background: var(--brand-soft);
}
.plugin-chip small { font-weight: 600; opacity: .7; }
.plugin-chip button {
  width: 22px; height: 22px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
  color: inherit; background: transparent;
}
.plugin-chip button:hover { background: rgba(127, 127, 127, .2); }
.modal-dialog.is-wide { max-width: 720px; max-height: calc(100vh - 40px); }
.modal-head { display: flex; align-items: flex-start; gap: 14px; }
.modal-head h2 { text-align: left; }
.modal-head p { margin: 2px 0 0; font-size: .86rem; }
.modal-head > div { flex: 1; min-width: 0; }
.modal-head-icon {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; flex-shrink: 0; color: #fff;
  background: linear-gradient(135deg, var(--brand-bright), var(--brand));
}
.modal-close {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; flex-shrink: 0;
  color: var(--muted); background: var(--bg); border: 1px solid var(--line);
}
.modal-close:hover { color: var(--ink); }
.plugin-tools { display: flex; gap: 8px; }
.plugin-tools input {
  flex: 1; min-width: 0; font: inherit; color: var(--ink); padding: 9px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--field-bg);
}
.plugin-tools input:focus { outline: 0; border-color: var(--brand-bright); box-shadow: 0 0 0 4px rgba(44, 75, 255, .14); }
.plugin-list { overflow-y: auto; min-height: 120px; max-height: 52vh; display: flex; flex-direction: column; gap: 6px; padding: 2px; margin: 0 -2px; }
.plugin-item {
  position: relative; display: flex; align-items: flex-start; gap: 12px; cursor: pointer;
  padding: 11px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: var(--bg);
  transition: border-color .15s, background .15s;
}
.plugin-item:hover { border-color: var(--line-strong); }
.plugin-item input { position: absolute; opacity: 0; pointer-events: none; }
.plugin-check {
  width: 22px; height: 22px; border-radius: 7px; flex-shrink: 0; margin-top: 1px; display: grid; place-items: center;
  border: 2px solid var(--line-strong); background: var(--card); color: transparent; transition: all .15s;
}
.plugin-item.is-checked { border-color: var(--brand-bright); background: var(--brand-soft); }
.plugin-item.is-checked .plugin-check { background: var(--brand-bright); border-color: var(--brand-bright); color: #fff; }
.plugin-item input:focus-visible + .plugin-check { outline: 3px solid rgba(44, 75, 255, .45); outline-offset: 2px; }
.plugin-text { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.plugin-name { font-weight: 750; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.plugin-version { font-size: .76rem; font-weight: 700; color: var(--muted); }
.plugin-file { font: .76rem var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.plugin-desc { font-size: .84rem; color: var(--ink-2); margin-top: 2px; }
.plugin-authors { font-size: .76rem; color: var(--muted); }
.plugin-count { margin-right: auto; align-self: center; font-size: .86rem; font-weight: 650; color: var(--muted); }
.modal-dialog.is-wide .modal-actions .btn { flex: 0 1 auto; }

/* ---------- Papierkorb ---------- */
.list-head .trash-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; font-size: .84rem; font-weight: 650;
  color: var(--muted); border: 1px solid var(--line);
}
.list-head .trash-link:hover { color: var(--brand-text); border-color: var(--brand-text); background: var(--brand-soft); }
.list-head h2 { margin-right: auto; }
.trash-list { display: flex; flex-direction: column; gap: 14px; max-width: 980px; margin: 0 auto; }
.trash-item { display: flex; align-items: center; gap: 16px; padding: 16px 18px; }
.trash-color { width: 6px; align-self: stretch; border-radius: 4px; flex-shrink: 0; }
.trash-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.trash-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.trash-title strong { font-size: 1.1rem; }
.trash-id { font: .8rem var(--mono); color: var(--muted); }
.trash-meta, .trash-paths { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .84rem; color: var(--ink-2); }
.trash-meta span, .trash-paths span { display: inline-flex; align-items: center; gap: 5px; }
.trash-meta svg, .trash-paths svg { color: var(--muted); }
.trash-paths code { font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }
.trash-problem { display: flex; align-items: center; gap: 6px; margin: 2px 0 0; font-size: .84rem; font-weight: 650; color: var(--bad); }
.trash-actions { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.trash-actions .btn { justify-content: center; }
@media (max-width: 600px) {
  .trash-item { flex-wrap: wrap; }
  .trash-actions { width: 100%; }
  .trash-item .btn { width: 100%; }
  .motd-colors { grid-template-columns: repeat(8, 1fr); width: 100%; }
}

/* ---------- Konsole ---------- */
.console-panel { padding: 0; overflow: hidden; }
.console-head {
  display: flex; align-items: center; gap: 10px; padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.console-head .panel-title { margin: 0; }
.console-status {
  margin-left: auto; display: inline-flex; align-items: center; gap: 7px;
  font-size: .78rem; font-weight: 700; color: var(--muted);
}
.console-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--unk); }
.console-status.is-live { color: var(--ok); }
.console-status.is-live i { background: var(--ok); animation: blink 2s infinite; }
.console-status.is-lost { color: var(--warn); }
.console-status.is-lost i { background: var(--warn); }
.console {
  background: var(--console-bg); color: var(--console-ink);
  height: 62vh; min-height: 320px; overflow-y: auto; padding: 14px 18px;
  font: 13px/1.6 var(--mono); white-space: pre-wrap; word-break: break-word;
  scrollbar-color: #2a3366 transparent;
}
.console .warn { color: #f2c14e; }
.console .err { color: #ff7b86; }
.console .info { color: #8fa6ff; }
.console .echo { color: #5ee6a0; }
.console .time { color: #6b7499; }
.cmd-form {
  display: flex; gap: 10px; align-items: center; padding: 12px;
  background: var(--console-bg); border-top: 1px solid rgba(255, 255, 255, .08);
}
.cmd-input {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px;
  padding: 0 14px; border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12);
  transition: border-color .15s, box-shadow .15s;
}
.cmd-input:focus-within { border-color: var(--brand-bright); box-shadow: 0 0 0 4px rgba(44, 75, 255, .2); }
.cmd-input .prompt { font-family: var(--mono); font-weight: 700; color: #5ee6a0; }
.cmd-input input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  padding: 11px 0; color: var(--console-ink); font: 14px var(--mono);
}
.cmd-input input::placeholder { color: #6b7499; }

/* ---------- Login ---------- */
.auth-wrap { position: relative; isolation: isolate; min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; overflow: hidden; }
.auth-card {
  width: 100%; max-width: 420px; background: var(--card); border-radius: 22px;
  padding: 36px 32px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5);
  display: flex; flex-direction: column; gap: 16px;
  animation: card-in .5s ease both;
}
.auth-logo { width: 230px; height: auto; margin: 0 auto 6px; }
.auth-card h1 { font-size: 1.5rem; font-weight: 800; text-align: center; }
.auth-card .muted { text-align: center; margin: -8px 0 6px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-weight: 650; font-size: .9rem; color: var(--ink-2); }
.field input {
  font: inherit; color: var(--ink); width: 100%;
  padding: 11px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--field-bg);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus { outline: 0; border-color: var(--brand-bright); box-shadow: 0 0 0 4px rgba(44, 75, 255, .14); }
.form-error { margin: 0; min-height: 1.3em; font-size: .9rem; font-weight: 600; color: var(--bad); text-align: center; }
.auth-card .btn { padding: 12px 18px; font-size: 1rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: linear-gradient(135deg, var(--brand-900), var(--brand-700));
  color: rgba(255, 255, 255, .7); padding: 26px 0;
}
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; font-size: .85rem; }
.footer-logo { height: 30px; width: auto; opacity: .95; }

/* ---------- Meldungen ---------- */
#toasts {
  position: fixed; z-index: 120; right: 20px; bottom: 20px;
  width: min(380px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 10px;
}
.toast {
  --c: var(--brand-bright);
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  color: var(--ink); font-size: .92rem; font-weight: 600;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 45%, var(--card-border));
  border-radius: 16px;
  box-shadow: var(--shadow-lg), 0 10px 30px -12px color-mix(in srgb, var(--c) 60%, transparent);
  backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%);
  animation: toast-in .45s cubic-bezier(.2, 1.2, .3, 1) both;
}
.toast.ok { --c: var(--ok); }
.toast.error { --c: var(--bad); }
.toast-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 14%, var(--mix)); }
.toast.is-leaving { opacity: 0; transform: translateX(30px); transition: all .3s ease; }
.toast::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
  background: var(--c); transform-origin: left; animation: toast-progress var(--t, 4s) linear forwards;
}
@keyframes toast-in { from { opacity: 0; transform: translateX(40px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toast-progress { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .columns { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .history-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .toggles { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .container { padding: 0 16px; }
  .header-inner { height: 60px; }
  .brand img { height: 22px; }
  .hide-sm { display: none; }
  .nav-link { padding: 8px 10px; }
  .hero { padding: 28px 0 84px; }
  .stats { gap: 8px; }
  .stat { min-width: 0; flex: 1 1 calc(50% - 8px); padding: 10px 12px; }
  .stat-value { font-size: 1.25rem; }
  .server-grid { grid-template-columns: 1fr; gap: 20px; }
  .detail-icon { width: 60px; height: 60px; border-radius: 18px; }
  .hero-actions { width: 100%; }
  .console { height: 55vh; }
}
@media (max-width: 420px) {
  .user-chip { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
