/* Sahur Host – verspielt, aber aufgeräumt */
:root {
  --bg: #121722;
  --bg2: #171d2b;
  --card: #1e2638;
  --card2: #252f45;
  --line: #2f3a54;
  --text: #eef2fb;
  --muted: #a3aec7;
  --green: #5ed16a;
  --green-d: #3fae4c;
  --gold: #ffcf4a;
  --red: #ff6b6b;
  --blue: #5cc8ff;
  --dirt: #8b5a2b;
  --radius: 18px;
  --shadow: 0 8px 24px rgba(0, 0, 0, .25);
  --font: ui-rounded, "Nunito", "Segoe UI Rounded", "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.55; color: var(--text);
  background: radial-gradient(1200px 600px at 80% -10%, #22314f 0%, transparent 60%),
              radial-gradient(900px 500px at -10% 10%, #1d3a2a 0%, transparent 55%), var(--bg);
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h2 { font-size: 1.3rem; }
code, pre { font-family: ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.main { flex: 1; padding-top: 28px; padding-bottom: 48px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.center { text-align: center; }
.inline { display: inline; }

/* Kopfzeile */
.topbar { background: rgba(18, 23, 34, .85); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.35rem; color: var(--text); letter-spacing: .3px; }
.logo:hover { text-decoration: none; }
.logo-host { color: var(--green); margin-left: 2px; }
.block { width: 26px; height: 26px; border-radius: 6px; background: linear-gradient(var(--green) 0 38%, var(--dirt) 38%); box-shadow: inset 0 -3px 0 rgba(0,0,0,.25); transform: rotate(-6deg); }
.nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav > a, .linkbtn { color: var(--text); padding: 8px 12px; border-radius: 12px; font-weight: 700; font-size: .95rem; }
.nav > a:hover, .linkbtn:hover { background: var(--card); text-decoration: none; }
.nav > a.active { background: var(--card2); }
.linkbtn { background: none; border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.flash .linkbtn { color: inherit; text-decoration: underline; padding: 0 4px; }
.pill { background: var(--green-d); color: #fff; border-radius: 999px; padding: 1px 9px; font-size: .85rem; margin-left: 4px; }
.pill-bad { background: var(--red); }

/* Buttons */
.btn {
  display: inline-block; border: 0; cursor: pointer; font: inherit; font-weight: 800; color: #10301a;
  background: var(--green); padding: 11px 20px; border-radius: 14px; box-shadow: 0 4px 0 var(--green-d);
  transition: transform .08s, box-shadow .08s, filter .15s; text-align: center;
}
.btn:hover { filter: brightness(1.07); text-decoration: none; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--green-d); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-small { padding: 6px 12px; font-size: .9rem; border-radius: 10px; box-shadow: 0 3px 0 var(--green-d); }
.btn-big { padding: 14px 28px; font-size: 1.1rem; }
.btn-block { display: block; width: 100%; }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 2px var(--line); }
.btn-green { background: var(--green); }
.btn-gold { background: var(--gold); color: #3b2c00; box-shadow: 0 4px 0 #d9a91f; }
.btn-gray { background: var(--card2); color: var(--text); box-shadow: 0 4px 0 #161c2a; }
.btn-red { background: var(--red); color: #3a0a0a; box-shadow: 0 4px 0 #c94848; }
.btn-discord { background: #5865F2; color: #fff; box-shadow: 0 4px 0 #3b45b0; display: flex; align-items: center; justify-content: center; gap: 10px; }
.btn-discord:hover { background: #4f5ced; }
.btn-small.btn-gray, .btn-small.btn-red { box-shadow: 0 3px 0 rgba(0,0,0,.35); }

/* Karten */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-bottom: 20px; }
.card.narrow, .narrow { max-width: 460px; margin-left: auto; margin-right: auto; }
.card.highlight { border-color: var(--gold); }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1, .page-head h2 { margin: 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px 20px; }
.grid2 > .card { margin-bottom: 0; }
.grid2 + .card { margin-top: 20px; }

/* Flash */
.flash { border-radius: 14px; padding: 12px 16px; margin-bottom: 18px; font-weight: 600; border: 2px solid; }
.flash-ok { background: rgba(94, 209, 106, .12); border-color: var(--green); }
.flash-err { background: rgba(255, 107, 107, .12); border-color: var(--red); }
.flash-info { background: rgba(92, 200, 255, .12); border-color: var(--blue); }
.flash a { color: inherit; text-decoration: underline; }

/* Formulare */
.form { display: flex; flex-direction: column; gap: 16px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; }
.hint { font-weight: 400; color: var(--muted); font-size: .88rem; }
input[type=text], input[type=email], input[type=password], select, textarea {
  font: inherit; color: var(--text); background: var(--bg2); border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); }
textarea { resize: vertical; }
label.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 600; }
label.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--green); flex: none; }
.addr-input { display: flex; align-items: stretch; }
.addr-input input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.addr-suffix { background: var(--card2); border: 2px solid var(--line); border-left: 0; border-radius: 0 12px 12px 0; padding: 10px 12px; color: var(--muted); white-space: nowrap; font-weight: 600; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 700; margin-bottom: 8px; }
.plan-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.plan-pick legend { grid-column: 1 / -1; }
.plan-option input { position: absolute; opacity: 0; }
.plan-option-box { display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--bg2); cursor: pointer; font-weight: 400; height: 100%; }
.plan-option-box b { font-size: 1.1rem; }
.plan-option-box .price { color: var(--gold); font-weight: 700; }
.plan-option input:checked + .plan-option-box { border-color: var(--green); background: rgba(94, 209, 106, .1); }
.plan-option input:focus-visible + .plan-option-box { outline: 3px solid var(--blue); }

/* Startseite */
.hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center; padding: 32px 0 48px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.3rem); font-weight: 900; }
.hl { color: var(--green); }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 36em; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 24px; }
.tag { display: inline-block; background: var(--card2); color: var(--gold); font-weight: 800; padding: 4px 12px; border-radius: 999px; font-size: .85rem; margin-bottom: 14px; }
.hero-art { display: flex; justify-content: center; }
.cube { width: 190px; height: 190px; position: relative; transform: rotate(-8deg); animation: bob 4s ease-in-out infinite; }
.cube.small { width: 90px; height: 90px; margin: 0 auto 10px; }
.cube-top { position: absolute; inset: 0 0 62% 0; background: var(--green); border-radius: 22px 22px 0 0;
  background-image: linear-gradient(45deg, rgba(255,255,255,.12) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.12) 75%);
  background-size: 24px 24px; }
.cube-side { position: absolute; inset: 38% 0 0 0; background: var(--dirt); border-radius: 0 0 22px 22px;
  background-image: linear-gradient(45deg, rgba(0,0,0,.15) 25%, transparent 25%, transparent 75%, rgba(0,0,0,.15) 75%);
  background-size: 24px 24px; box-shadow: 0 30px 50px rgba(0,0,0,.35); }
@keyframes bob { 50% { transform: rotate(-4deg) translateY(-12px); } }
@media (prefers-reduced-motion: reduce) { .cube { animation: none; } }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-bottom: 56px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.tile-icon { font-size: 2rem; width: 56px; height: 56px; display: grid; place-items: center; background: var(--card2); border-radius: 16px; margin-bottom: 12px; }
.tile p { color: var(--muted); margin: 0; }
.section-title { text-align: center; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px; margin-top: 24px; }
.plan { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 6px; transition: transform .15s; }
.plan:hover { transform: translateY(-4px); }
.plan-name { font-weight: 900; font-size: 1.3rem; }
.plan-price { font-size: 1.8rem; font-weight: 900; color: var(--gold); }
.plan-price small { font-size: .9rem; color: var(--muted); font-weight: 600; }
.plan-hour { color: var(--muted); font-size: .9rem; }
.plan ul { list-style: none; padding: 0; margin: 10px 0 16px; flex: 1; }
.plan li { padding: 3px 0; }
.plan-Dirt { border-top: 6px solid var(--dirt); }
.plan-Stone { border-top: 6px solid #9aa3ad; }
.plan-Iron { border-top: 6px solid #e2e2e2; }
.plan-Diamond { border-top: 6px solid #5ee6e0; }
.plan-Netherite { border-top: 6px solid #6b4b5a; }

/* Server */
.server-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.server-card { display: block; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 20px; color: var(--text); transition: transform .15s, border-color .15s; }
.server-card:hover { text-decoration: none; transform: translateY(-3px); border-color: var(--green); }
.server-card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.server-name { font-weight: 900; font-size: 1.2rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.server-addr { font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--blue); margin: 8px 0 4px; word-break: break-all; }
.server-meta { color: var(--muted); font-size: .9rem; }
.empty { padding: 48px 24px; }
.badge { display: inline-block; padding: 3px 11px; border-radius: 999px; font-weight: 800; font-size: .82rem; white-space: nowrap; background: var(--card2); }
.badge-big { font-size: 1rem; padding: 6px 16px; }
.st-online { background: rgba(94, 209, 106, .18); color: var(--green); }
.st-starting, .st-stopping { background: rgba(255, 207, 74, .16); color: var(--gold); }
.st-stopped { background: rgba(163, 174, 199, .15); color: var(--muted); }
.st-offline, .st-suspended, .st-crashed, .st-quota { background: rgba(255, 107, 107, .16); color: var(--red); }
.st-online::before, .st-starting::before, .st-stopping::before { content: "●"; margin-right: 6px; }
.st-starting::before, .st-stopping::before { animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.copy-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.address { font-size: 1.3rem; background: var(--bg2); border: 2px dashed var(--line); padding: 10px 16px; border-radius: 12px; color: var(--green); word-break: break-all; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.details { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0; }
.details dt { color: var(--muted); }
.details dd { margin: 0; }
@media (max-width: 560px) { .details { grid-template-columns: 1fr; } .details dd { margin-bottom: 8px; } }
.danger-zone { border-color: rgba(255, 107, 107, .4); }

/* Guthaben */
.balance { font-size: 2.6rem; font-weight: 900; color: var(--green); }
.balance.bad { color: var(--red); }
.topups { display: flex; gap: 12px; flex-wrap: wrap; }

/* Tabellen */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { color: var(--muted); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .4px; }
.table tr:last-child td { border-bottom: 0; }
.num { text-align: right !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
.plus { color: var(--green); }
.minus { color: var(--red); }
.row-actions { display: flex; gap: 6px; }
.credit-form { display: flex; gap: 6px; flex-wrap: wrap; }
.credit-form input { width: auto; padding: 5px 8px; font-size: .9rem; }
pre.code { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; overflow-x: auto; font-size: .85rem; }

/* Support */
.messages { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.msg { max-width: 80%; border-radius: 16px; padding: 12px 16px; background: var(--card); border: 1px solid var(--line); }
.msg-user { align-self: flex-end; background: #1f3a2a; border-color: #2d5a3c; }
.msg-staff { align-self: flex-start; }
.msg-head { color: var(--muted); font-size: .82rem; margin-bottom: 4px; font-weight: 700; }
.msg-body { white-space: pre-wrap; word-break: break-word; }
@media (max-width: 560px) { .msg { max-width: 100%; } }

/* Fehlerseite */
.big-code { font-size: 4rem; font-weight: 900; color: var(--gold); line-height: 1; margin-bottom: 8px; }

/* Fußzeile */
.footer { border-top: 1px solid var(--line); padding: 20px 0; color: var(--muted); font-size: .85rem; }
.footer-inner { display: flex; gap: 8px 24px; flex-wrap: wrap; justify-content: space-between; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .hero { grid-template-columns: 1fr; padding-top: 8px; }
  .hero-art { display: none; }
  .nav > a, .linkbtn { padding: 6px 8px; }
}

/* Server-Tabs (v2) */
.tabs{display:flex;flex-wrap:wrap;gap:.35rem;margin:0 0 1.2rem;padding:.35rem;border-radius:14px;background:rgba(127,127,127,.12)}
.tabs a{padding:.45rem .8rem;border-radius:10px;text-decoration:none;color:inherit;font-weight:600;font-size:.92rem;white-space:nowrap}
.tabs a:hover{background:rgba(127,127,127,.18)}
.tabs a.active{background:var(--green);color:#10220f}

/* manage */
.mg-list { display: flex; flex-direction: column; gap: 10px; }
.mg-item { background: var(--card2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.mg-item summary { cursor: pointer; }
.mg-item details { margin-top: 8px; }
.mg-backup-head { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; }
.mg-inline-form { margin-top: 8px; }
.mg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 16px; margin: 10px 0; }
.mg-presets { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.mg-sched { display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.mg-sched-main { flex: 1 1 280px; }
.mg-off { opacity: .6; }
.mg-wrap { flex-wrap: wrap; }
.mg-nowrap { white-space: nowrap; }
.mg-row-form { flex-direction: row; align-items: flex-end; flex-wrap: wrap; }
.mg-row-form label { flex: 1 1 240px; }
.mg-choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.mg-subtabs { margin-bottom: 14px; }
.mg-search { display: flex; gap: 8px; margin-bottom: 14px; }
.mg-search input[type=search] { flex: 1; min-width: 0; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); font: inherit; }
.mg-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.mg-result { display: flex; gap: 12px; background: var(--card2); border: 1px solid var(--line); border-radius: 14px; padding: 12px; min-width: 0; }
.mg-result img, .mg-noicon { width: 56px; height: 56px; border-radius: 12px; flex: none; object-fit: cover; background: var(--bg2); display: grid; place-items: center; font-size: 1.6rem; }
.mg-result-body { min-width: 0; flex: 1; }
.mg-result-body p { margin: 4px 0; overflow-wrap: anywhere; }
.mg-result-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.mg-presetgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 14px; }
.mg-presetgrid .tile { padding: 16px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.mg-presetgrid .tile p { flex: 1; }
.mg-spin { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: mg-rot .8s linear infinite; vertical-align: -2px; }
@keyframes mg-rot { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .mg-spin { animation: none; } }
[hidden] { display: none !important; }
@media (max-width: 560px) { .mg-results { grid-template-columns: 1fr; } .mg-row-form { flex-direction: column; align-items: stretch; } }

/* tools */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tool-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.tool-head h2 { margin: 0; }
.tool-sub { font-size: 1rem; margin: 18px 0 8px; color: var(--muted); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn-row .btn-small { margin-bottom: 3px; }
input[type=number] { font: inherit; color: var(--text); background: var(--bg2); border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; width: 100%; max-width: 220px; }
input[type=number]:focus { outline: none; border-color: var(--green); }
input[type=file] { font: inherit; color: var(--muted); max-width: 100%; }
kbd { background: var(--card2); border: 1px solid var(--line); border-radius: 6px; padding: 0 5px; font-size: .85em; }
.warn-text { color: var(--gold); font-weight: 700; }
.ok-text { color: var(--green); font-weight: 700; }

/* Konsole */
.conn-pill { border-radius: 999px; padding: 3px 12px; font-weight: 800; font-size: .85rem; background: var(--card2); color: var(--muted); }
.conn-pill::before { content: "●"; margin-right: 6px; }
.conn-pill[data-state=ok] { background: rgba(94, 209, 106, .18); color: var(--green); }
.conn-pill[data-state=bad] { background: rgba(255, 107, 107, .16); color: var(--red); }
.conn-pill[data-state=connecting]::before { animation: blink 1s infinite; }
.stats-line { display: flex; gap: 8px 20px; flex-wrap: wrap; color: var(--muted); font-size: .9rem; margin-bottom: 10px; }
.stats-line b { color: var(--text); font-variant-numeric: tabular-nums; }
.terminal {
  background: #0b0f17; color: #d7dde8; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
  height: min(60vh, 520px); overflow-y: auto; font-family: ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
  font-size: .82rem; line-height: 1.45; white-space: pre-wrap; word-break: break-word;
}
.terminal:focus { outline: 2px solid var(--line); }
.tl.l-warn { color: var(--gold); }
.tl.l-err { color: var(--red); }
.tl.l-chat { color: #8fe3ff; background: rgba(92, 200, 255, .07); }
.tl.l-join { color: var(--green); }
.tl.l-ok { color: var(--green); font-weight: 700; }
.tl.l-cmd { color: var(--blue); font-weight: 700; margin-top: 4px; }
.tl.l-out { color: #e6e9f2; padding-left: 14px; }
.tl.l-info { color: var(--muted); font-style: italic; }
.console-input { display: flex; align-items: center; gap: 8px; margin-top: 10px; background: #0b0f17; border: 2px solid var(--line); border-radius: 12px; padding: 4px 6px 4px 12px; }
.console-input:focus-within { border-color: var(--green); }
.console-input .prompt { color: var(--green); font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 800; }
.console-input input[type=text] { border: 0; background: transparent; padding: 8px 4px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9rem; min-width: 0; }
.console-foot { display: flex; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; margin-top: 8px; }
.player-list { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-direction: column; gap: 10px; }
.player { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.player-name { display: block; font-weight: 800; margin-bottom: 6px; }
.name-row { margin-bottom: 8px; }
.name-row input { max-width: 280px; }
.gm-pick { display: flex; flex-direction: column; gap: 4px; font-weight: 700; margin-bottom: 8px; max-width: 280px; }
.action-msg { min-height: 1.5em; margin: 14px 0 0; font-weight: 700; word-break: break-word; }
.action-msg.ok { color: var(--green); }
.action-msg.bad { color: var(--red); }

/* Dateien */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-weight: 700; word-break: break-all; }
.crumbs .sep { color: var(--muted); }
.file-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 12px; }
.file-toolbar > .btn, .tool-pop > summary { margin-bottom: 3px; }
.tool-pop { position: relative; }
.tool-pop > summary { list-style: none; }
.tool-pop > summary::-webkit-details-marker { display: none; }
.pop-form { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.pop-form input[type=text] { padding: 6px 10px; font-size: .9rem; width: auto; min-width: 180px; flex: 1; }
.tool-pop.rename[open] { flex-basis: 100%; }
.files-table td { padding: 7px 8px; }
.files-table .sel-col { width: 34px; }
.files-table input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--green); }
.files-table .fname { word-break: break-all; }
.ficon { display: inline-block; width: 1.6em; }
.files-table .row-actions { justify-content: flex-end; flex-wrap: wrap; }
.selection-actions { margin-top: 12px; }
.dropzone { border: 3px dashed var(--green); background: rgba(94, 209, 106, .1); border-radius: 14px; padding: 28px; text-align: center; font-weight: 800; margin-bottom: 12px; }
.upload-progress { margin: 8px 0 12px; }
.upload-progress .bar { height: 12px; background: var(--bg2); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; margin-bottom: 4px; }
.upload-progress .bar span { display: block; height: 100%; width: 0; background: var(--green); transition: width .2s; }
.upload-progress.bad .bar span { background: var(--red); }
.upload-progress.bad { color: var(--red); }
.upload-progress.ok { color: var(--green); }
.howto { margin-top: 10px; }
.howto summary { cursor: pointer; font-weight: 700; color: var(--blue); }
.howto ol { margin: 8px 0 0; padding-left: 22px; }
.editor { font-family: ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace; font-size: .85rem; line-height: 1.5; min-height: 50vh; white-space: pre; overflow: auto; tab-size: 4; background: #0b0f17; }
.edit-title { margin: 4px 0 2px; word-break: break-all; }
@media (max-width: 560px) { .hide-sm { display: none; } .card { padding: 18px; } }

/* Einstellungen */
.config-form .card .form { gap: 18px; }.save-bar { position: sticky; bottom: 12px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; z-index: 5; border-color: var(--green); }
.config-files { list-style: none; padding: 0; margin: 0 0 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 16px; }
.config-files li { word-break: break-all; }

/* Baufortschritt (Server-Erstellung) + Spieler-Pill */
.build-progress .stages { list-style: none; margin: 14px 0 6px; padding: 0; counter-reset: stage; }
.build-progress .stages li { position: relative; padding: 4px 0 4px 34px; counter-increment: stage; color: var(--muted, #90a0b8); }
.build-progress .stages li::before { content: counter(stage); position: absolute; left: 0; top: 4px; width: 22px; height: 22px; line-height: 20px; text-align: center; border-radius: 999px; border: 2px solid var(--line); background: var(--bg2); font-weight: 800; font-size: .8rem; }
.build-progress .stages li.done { color: var(--green); }
.build-progress .stages li.done::before { content: "✓"; border-color: var(--green); background: var(--green); color: #0c2012; }
.build-progress .stages li.active { color: var(--text); font-weight: 700; }
.build-progress .stages li.active::before { border-color: var(--green); animation: stagepulse 1.2s ease-in-out infinite; }
.build-progress .stages li:not(.done):not(.active)::before { border-color: var(--green); opacity: .35; }
@keyframes stagepulse { 0%,100% { box-shadow: 0 0 0 0 rgba(94,209,106,.5); } 50% { box-shadow: 0 0 0 6px rgba(94,209,106,0); } }
.pill.players { color: var(--blue); }
.pill.players.hidden { display: none; }
.hidden { display: none !important; }

/* Audit-Tab */
.audit-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.audit-kind { background: var(--card2, #1b2333); border: 1px solid var(--line); }
.audit-kind b { margin-left: 3px; }
.audit-icon { margin-right: 4px; }

/* Crash-Tab: rot pulsierend ab 5 aufeinanderfolgenden Start-Abstürzen */
.tab-crash { color: #ff5c5c !important; font-weight: 800; animation: crash-pulse 1.1s ease-in-out infinite; }
.tab-crash.active { border-bottom-color: #ff5c5c !important; }
@keyframes crash-pulse {
  0%, 100% { opacity: 1; text-shadow: 0 0 0 rgba(255,92,92,0); }
  50% { opacity: .55; text-shadow: 0 0 10px rgba(255,92,92,.8); }
}
.flash-card-crash { border-color: #ff5c5c; }
.crash-errors { margin: 10px 0 0; padding-left: 20px; }
.crash-errors li { margin: 4px 0; }
.crash-errors code { color: #ff8a8a; overflow-wrap: break-word; }
.crash-log { max-height: 55vh; overflow: auto; font-size: .78rem; white-space: pre-wrap; word-break: break-word; }
.llm-result { background: var(--bg2, #131a26); border: 1px solid var(--green, #5ed16a); border-radius: 12px; padding: 14px; margin: 12px 0; }
.llm-result h3 { margin-top: 0; }
.llm-text { white-space: pre-wrap; }

/* KI-Fix: Status oben rechts + Auftragsliste */
.ai-status { margin-left: 8px; }
.ai-status a { display: inline-block; border: 1px solid var(--gold, #f5c95a); color: var(--gold, #f5c95a); border-radius: 999px; padding: 4px 12px; font-size: .82rem; font-weight: 700; background: rgba(245,201,90,.12); }
.ai-status.ai-busy a { animation: crash-pulse 1.1s ease-in-out infinite; }
.ai-status a:hover { text-decoration: none; filter: brightness(1.1); }
.ai-job { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 10px 0; background: var(--bg2, #131a26); }
.ai-job-done { border-color: var(--green); }
.ai-job-error { border-color: var(--red); }
.ai-job-awaiting { border-color: var(--gold); }
.ai-job-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.ai-job-status { font-weight: 800; }
.ai-job-analyzing .ai-job-status, .ai-job-fixing .ai-job-status, .ai-job-queued .ai-job-status { color: var(--gold, #f5c95a); }
.ai-job-question { margin: 10px 0 0; }
.ai-job-options { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.ai-job-result { margin-top: 10px; }
.ai-job-result pre { white-space: pre-wrap; background: var(--bg, #0b0f17); border-radius: 10px; padding: 12px; font-size: .85rem; }

/* ===== Animationen / Live-Gefühl ===== */
/* Badge-Wechsel: sanfter Pop */
.badge, .ai-status a { transition: background-color .25s, color .25s, transform .15s; }
.badge-pop { animation: badgepop .45s ease; }
@keyframes badgepop { 0% { transform: scale(1.35); } 60% { transform: scale(.92); } 100% { transform: scale(1); } }
/* Guthaben-Pill: kurzes Aufleuchten bei Änderung */
.pill-flash { animation: pillflash .9s ease; }
@keyframes pillflash { 0% { background: var(--green); color: #fff; box-shadow: 0 0 0 0 rgba(94,209,106,.6); } 100% { background: transparent; box-shadow: 0 0 0 10px rgba(94,209,106,0); } }
/* online-Badge: dezenter grüner Puls, solange der Server läuft */
.st-online { animation: softpulse 2.4s ease-in-out infinite; }
@keyframes softpulse { 0%,100% { box-shadow: 0 0 0 0 rgba(94,209,106,.35); } 50% { box-shadow: 0 0 0 5px rgba(94,209,106,0); } }
/* Server-Karten: Hover-Lift */
.server-card { transition: transform .18s ease, box-shadow .18s ease; }
.server-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,0,0,.35); }
/* Flash-/Fade-In von Karten beim Seitenaufbau */
.card, .server-card, .section-title { animation: fadein .35s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
/* Buttons: sanfter Zustand */
.btn { transition: transform .08s, box-shadow .08s, filter .15s, opacity .2s; }

/* ===== KI-Frage Modal ===== */
.modal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; background: rgba(5,8,14,.72); backdrop-filter: blur(2px); animation: fadein .2s ease; padding: 16px; }
.modal-box { background: var(--bg2, #151c2b); border: 1px solid var(--line); border-radius: 16px; padding: 22px; max-width: 460px; width: 100%; animation: modalpop .22s ease; box-shadow: 0 18px 50px rgba(0,0,0,.5); }
@keyframes modalpop { from { transform: scale(.92) translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-box h3 { margin-top: 0; }
.modal-box .btn { transition: transform .1s ease; }
.ai-modal-options { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }
.ai-modal-options .btn { width: 100%; }
.modal-close { margin-top: 6px; }

/* Crash-Tab: sofort sichtbar ab 1. Crash (JS-gesteuert), blinken ab 3 */
.tabs a[hidden] { display: none !important; }
.crash-count { font-weight: 800; }
