/* Hostly – schlankes eigenes Design. Farben als Variablen für Hell/Dunkel. */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --text: #16181d;
  --muted: #5d6573;
  --border: #e1e4ea;
  --primary: #2f7d4f;
  --primary-hover: #276a43;
  --primary-text: #ffffff;
  --good: #1f7a45;
  --good-bg: #e5f4ea;
  --bad: #b42318;
  --bad-bg: #fdecea;
  --warn: #8a5a00;
  --warn-bg: #fff4dc;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --radius: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1115; --surface: #171a21; --surface-2: #1f232c; --text: #e8eaee; --muted: #9aa3b2;
    --border: #2a2f3a; --primary: #3fa76a; --primary-hover: #4cb878; --primary-text: #0b1a11;
    --good: #5fd08f; --good-bg: #13291c; --bad: #ff8a80; --bad-bg: #331616; --warn: #f5c66b; --warn-bg: #2f2510;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1115; --surface: #171a21; --surface-2: #1f232c; --text: #e8eaee; --muted: #9aa3b2;
  --border: #2a2f3a; --primary: #3fa76a; --primary-hover: #4cb878; --primary-text: #0b1a11;
  --good: #5fd08f; --good-bg: #13291c; --bad: #ff8a80; --bad-bg: #331616; --warn: #f5c66b; --warn-bg: #2f2510;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4); color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--primary); }
h1 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 1rem; }
h2 { font-size: 1.15rem; margin: 0 0 .75rem; }
p { margin: 0 0 .75rem; }

/* Kopfleiste */
.topbar { position: sticky; top: 0; z-index: 10; background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar-inner { max-width: 1000px; margin: 0 auto; padding: .6rem 16px; display: flex; align-items: center; gap: .6rem; }
.brand { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; }
.badge { font-size: .75rem; font-weight: 600; padding: .1rem .5rem; border-radius: 999px; background: var(--warn-bg); color: var(--warn); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: .4rem; }
.theme-form { margin: 0; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); }
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: block; }
:root[data-theme="dark"] .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: block; }
  :root:not([data-theme="light"]) .i-moon { display: none; }
}

/* Dropdown-Menü */
.menu { position: relative; }
.menu-btn {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: .25rem; height: 40px;
  padding: 0 .75rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font-weight: 500;
}
.menu-btn::-webkit-details-marker { display: none; }
.menu-name { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-list {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; padding: .35rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.menu-list form { margin: 0; }
.menu-list a, .menu-list button {
  display: block; width: 100%; text-align: left; padding: .6rem .75rem; border-radius: 8px;
  color: var(--text); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer;
}
.menu-list a:hover, .menu-list button:hover { background: var(--surface-2); }

/* Inhalt */
.container { width: 100%; max-width: 1000px; margin: 0 auto; padding: 1.25rem 16px 2rem; flex: 1; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); margin-bottom: 1rem; }
.narrow { max-width: 420px; margin: 1rem auto; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.grid .card { margin: 0; }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(2, 1fr); } }

/* Startseite */
.hero { text-align: center; padding: 2rem 0 1.5rem; }
.hero h1 { font-size: 1.9rem; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 34rem; margin: 0 auto 1.25rem; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
.steps { display: grid; gap: 1rem; grid-template-columns: 1fr; margin: 1rem 0; }
.steps .card { margin: 0; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } .hero h1 { font-size: 2.4rem; } }
.step-num {
  display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--good-bg); color: var(--good); font-weight: 700; margin-bottom: .5rem;
}

/* Knöpfe */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .55rem 1.1rem;
  border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.btn.primary:hover { background: var(--primary-hover); }
.btn.block { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; color: var(--primary); font: inherit; cursor: pointer; text-decoration: underline; }

/* Formulare */
.form { display: flex; flex-direction: column; gap: .9rem; margin-bottom: 1rem; }
.form label { display: flex; flex-direction: column; gap: .3rem; font-weight: 500; }
input, select {
  font: inherit; color: var(--text); background: var(--surface); width: 100%; min-height: 44px;
  padding: .55rem .7rem; border: 1px solid var(--border); border-radius: 10px;
}
input:focus, select:focus, .btn:focus-visible, .icon-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.hint { font-size: .85rem; font-weight: 400; color: var(--muted); }
.hint.good { color: var(--good); }
.hint.bad { color: var(--bad); }

/* Meldungen */
.alert { padding: .7rem .9rem; border-radius: 10px; margin-bottom: 1rem; }
.alert.success { background: var(--good-bg); color: var(--good); }
.alert.error { background: var(--bad-bg); color: var(--bad); }
.alert.warn { background: var(--warn-bg); color: var(--warn); }

/* Admin */
.stats { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); margin-bottom: 1rem; }
.stats .card { margin: 0; }
.stat { display: flex; flex-direction: column; }
.stat-value { font-size: 1.8rem; font-weight: 700; }
.stat-label { color: var(--muted); font-size: .9rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: .5rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; }
.events { list-style: none; padding: 0; margin: 0; }
.events li { padding: .4rem 0; border-bottom: 1px solid var(--border); }

/* Fußzeile */
.footer { display: flex; gap: 1rem; justify-content: center; align-items: center; padding: 1rem 16px 1.5rem; color: var(--muted); font-size: .9rem; }
.lang-form { margin: 0; }

/* ---------- Stufe 2–5 ---------- */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.big { font-size: 1.15rem; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.plus { color: var(--good); font-weight: 600; }
.minus { color: var(--bad); }
.title-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.title-row h1 { margin: 0; }
.title-with-icon { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.title-with-icon h1 { overflow-wrap: anywhere; }
.coin-chip { display: inline-flex; align-items: center; height: 40px; padding: 0 .7rem; border: 1px solid var(--border); border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 600; white-space: nowrap; }
.coin-chip:hover { background: var(--surface-2); }
.avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: none; }
.avatar.pixel { image-rendering: pixelated; border-radius: 6px; }
.avatar.letter { display: inline-flex; align-items: center; justify-content: center; background: var(--good-bg); color: var(--good); font-weight: 700; font-size: .85rem; }
.avatar-preview .avatar { width: 64px; height: 64px; font-size: 1.6rem; margin-bottom: .5rem; }
.menu-btn { gap: .4rem; }
@media (max-width: 420px) { .menu-name { display: none; } .brand span { display: none; } }

.tabs { display: flex; gap: .25rem; overflow-x: auto; margin: 0 0 1rem; border-bottom: 1px solid var(--border); scrollbar-width: none; }
.tabs a { padding: .6rem .8rem; color: var(--muted); text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; font-weight: 500; }
.tabs a.active { color: var(--text); border-bottom-color: var(--primary); }

.pill { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .82rem; font-weight: 600; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.pill.on { background: var(--good-bg); color: var(--good); }
.pill.off { background: var(--surface-2); color: var(--muted); }
.pill.sleep { background: #e8eefc; color: #3451a3; }
.pill.busy { background: var(--warn-bg); color: var(--warn); }
:root[data-theme="dark"] .pill.sleep { background: #1a2340; color: #9db4ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill.sleep { background: #1a2340; color: #9db4ff; } }
.pill.big { font-size: 1rem; padding: .3rem .8rem; }

.btn.small { min-height: 34px; padding: .3rem .7rem; font-size: .9rem; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.link-btn.small { font-size: .9rem; }

.server-list { display: flex; flex-direction: column; gap: .75rem; }
.server-card { display: flex; align-items: center; gap: .9rem; margin: 0; color: var(--text); text-decoration: none; }
.server-card:hover { border-color: var(--primary); }
.server-icon { width: 48px; height: 48px; border-radius: 8px; image-rendering: pixelated; flex: none; background: var(--surface-2); }
.server-info { flex: 1; min-width: 0; }
.server-name { font-weight: 600; overflow-wrap: anywhere; }

.status-box { display: flex; flex-direction: column; gap: .6rem; }
.status-line { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.control-buttons { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; }
.copy-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.copy-row code { overflow-wrap: anywhere; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: .3rem 1rem; margin: .75rem 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.banner-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; }
.banner-row form { margin: 0; }
.banner-actions { display: flex; align-items: center; gap: .5rem; }

.console { background: #0b0d10; color: #d6dde6; padding: .75rem; border-radius: 10px; height: 55vh; min-height: 260px; overflow: auto; font: .8rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-word; margin: 0 0 .75rem; }
.console-form { display: flex; gap: .5rem; }
.console-form input { flex: 1; }

.choice { border: 0; padding: 0; margin: 0; display: grid; gap: .5rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .choice { grid-template-columns: repeat(3, 1fr); } }
.choice legend { font-weight: 600; margin-bottom: .5rem; padding: 0; }
.choice-card { display: flex; gap: .6rem; align-items: flex-start; padding: .75rem; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; font-weight: 400 !important; flex-direction: row !important; }
.choice-card:has(input:checked) { border-color: var(--primary); background: var(--good-bg); }
.choice-card input { width: auto; min-height: 0; margin-top: .25rem; }
.radio { flex-direction: row !important; align-items: center; gap: .5rem !important; font-weight: 400 !important; }
.radio input { width: auto; min-height: 0; }
.compare th, .compare td { text-align: center; }
.compare th:first-child { text-align: left; }
.price-box { padding: .9rem; border-radius: 10px; background: var(--surface-2); }
.old-price { text-decoration: line-through; color: var(--muted); margin-right: .4rem; }
.new-price { font-size: 1.4rem; font-weight: 700; margin-right: .4rem; }
.price-box .alert { margin: .5rem 0 0; }

.row-form { flex-direction: row; flex-wrap: wrap; align-items: flex-end; }
.row-form label { flex: 1 1 160px; }
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0; }
.inline-form input { width: auto; min-height: 34px; padding: .25rem .5rem; }
.inline-form input.tiny { width: 5rem; }
.inline-form input.short { width: 8rem; }
.add-form { margin: .75rem 0; }
.add-form input { flex: 1; }
.search-form { display: flex; gap: .5rem; margin-bottom: 1rem; }
.actions-cell { display: flex; gap: .4rem; flex-wrap: wrap; }
.actions-cell form { margin: 0; }
.row-between { display: flex; justify-content: space-between; align-items: center; }
.row-between form { margin: 0; }
.code-list { list-style: none; padding: 0; margin: 0 0 .75rem; }
.code-list li { display: flex; align-items: center; gap: .5rem; padding: .3rem 0; }
.highlight { border-color: var(--primary); }
.danger-zone { border-color: var(--bad); }
.stats { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.stat-value { font-size: 1.4rem; }
textarea { font: inherit; color: var(--text); background: var(--surface); width: 100%; padding: .55rem .7rem; border: 1px solid var(--border); border-radius: 10px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.motd-buttons { display: flex; flex-wrap: wrap; gap: .3rem; }
.swatch { width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--border); cursor: pointer; }
.fmt { min-width: 32px; height: 28px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.mc-preview { display: flex; gap: .75rem; align-items: center; padding: .6rem; background: #2b2b2b; border-radius: 6px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.mc-preview img { image-rendering: pixelated; }
.mc-name { color: #fff; }
.mc-motd { color: #aaa; min-height: 2.6em; line-height: 1.3; }
.crop-area { max-width: 100%; max-height: 360px; }
.crop-area img { display: block; max-width: 100%; }

/* ---------- Stufe 6–9 ---------- */
.maintenance-bar { background: var(--warn-bg); color: var(--warn); text-align: center; padding: .5rem 16px; font-size: .92rem; }
.feature { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.feature h2 { font-size: 1.25rem; margin: .1rem 0 .3rem; }
.feature p { margin: 0; }
.feature-text { flex: 1 1 260px; }
.feature-kicker { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--primary); }
.feature.promo { border-color: #e8a33a; background: linear-gradient(135deg, var(--surface), var(--warn-bg)); }
.feature.giveaway { border-color: var(--primary); background: linear-gradient(135deg, var(--surface), var(--good-bg)); }
.ext-list { list-style: none; padding: 0; margin: .75rem 0 0; display: flex; flex-direction: column; gap: .5rem; }
.ext-item { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; padding: .6rem; border: 1px solid var(--border); border-radius: 10px; }
.ext-item.disabled { opacity: .6; }
.ext-icon { border-radius: 8px; flex: none; }
.ext-info { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.ext-versions:empty { display: none; }
.ext-versions { margin-top: .4rem; }
.np { border: 0; padding: 0; margin: 0; }
.np legend { font-weight: 600; margin-bottom: .4rem; padding: 0; }
.np-times { display: flex; gap: .75rem; flex-wrap: wrap; }
.np-times label { flex-direction: row !important; align-items: center; gap: .4rem !important; font-weight: 400 !important; }
.np-times select { width: auto; }
.row-form .wide { flex-basis: 100%; }
.checks { border: 0; padding: 0; margin: 0; display: flex; gap: 1rem; flex-wrap: wrap; }
.checks legend { font-weight: 500; padding: 0; margin-bottom: .3rem; }
.checks input { width: auto; min-height: 0; }
.crumbs { margin-bottom: .75rem; overflow-wrap: anywhere; }
.file-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.file-list li { padding: .4rem 0; border-bottom: 1px solid var(--border); gap: .5rem; }
.file-list a { overflow-wrap: anywhere; }
.chart { width: 100%; height: auto; }
.chart rect { fill: var(--primary); }
.chart .axis { stroke: var(--border); }
.mc-list { display: flex; flex-direction: column; gap: 2px; background: #1e1e1e; padding: 6px; border-radius: 8px; }
.mc-entry { display: flex; gap: .75rem; padding: .5rem; background: #2b2b2b; border-radius: 4px; color: #ddd; font-family: ui-monospace, Menlo, Consolas, monospace; }
.mc-entry img { image-rendering: pixelated; width: 64px; height: 64px; flex: none; }
.mc-body { flex: 1; min-width: 0; }
.mc-top { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.mc-players { color: #aaa; white-space: nowrap; display: inline-flex; align-items: flex-end; gap: .4rem; }
.mc-bottom { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: .3rem; }
.mc-bottom code { color: #ccc; overflow-wrap: anywhere; }
.mc-bottom a { color: #8fd3a8; }
.ping { display: inline-flex; align-items: flex-end; gap: 1px; height: 12px; }
.ping i { display: block; width: 3px; background: #555; }
.ping i:nth-child(1) { height: 3px; } .ping i:nth-child(2) { height: 5px; } .ping i:nth-child(3) { height: 7px; }
.ping i:nth-child(4) { height: 9px; } .ping i:nth-child(5) { height: 11px; }
.ping.on i { background: #55ff55; }
.templates { grid-template-columns: 1fr; }
@media (min-width: 640px) { .templates { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .templates { grid-template-columns: repeat(3, 1fr); } }
.install-hint { display: none; }
