:root {
  --bg: #0b1020; --bg2: #111830; --card: #141c34; --card2: #1a2442; --line: #243055;
  --text: #e6ebf5; --muted: #8b97b5; --accent: #4ade80; --accent2: #22c55e; --accent-ink: #052e16;
  --gold: #fbbf24; --red: #f87171; --radius: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); line-height: 1.5;
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background-image: radial-gradient(1200px 500px at 50% -200px, #14532d55, transparent);
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.2; }
h2 { font-size: 1.2rem; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
main.wrap { flex: 1; padding-top: 24px; padding-bottom: 48px; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.wrap-row { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 14px; }

/* Navigation */
.nav { position: sticky; top: 0; z-index: 10; background: #0b1020cc; backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 62px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; font-size: 1.1rem; }
.brand b { color: var(--accent); }
.brand:hover { text-decoration: none; }
.nav nav { display: flex; align-items: center; gap: 16px; }
.nav nav a:not(.btn) { color: var(--text); }
.nav form { margin: 0; }
.me { display: flex; align-items: center; gap: 8px; }
.link { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; padding: 0; }
.link:hover { color: var(--text); }

/* Buttons & Inputs */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 10px;
  padding: 10px 18px; font-weight: 600; font-size: 15px; line-height: 1.2; font-family: inherit; transition: transform .1s, background .15s;
}
.btn:hover { background: var(--accent2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.sm { padding: 7px 12px; font-size: 14px; }
.btn.big { padding: 13px 20px; font-size: 16px; }
.btn.ghost { background: var(--card2); color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--accent); }
.btn.danger { background: transparent; color: var(--red); border: 1px solid #7f1d1d; }
.btn.full { width: 100%; }
input, textarea {
  width: 100%; background: var(--bg2); color: var(--text); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 13px; font: inherit; outline: none; transition: border-color .15s;
}
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px #4ade8022; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: .92rem; }
label small { font-weight: 400; color: var(--muted); }
details summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
details[open] summary { margin-bottom: 10px; }
details > label, details > .grid2 { margin-top: 12px; }

/* Karten */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
section { margin-top: 36px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.sec-head h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.35rem; }
.sec-head small { color: var(--muted); }

.hero { text-align: center; padding: 30px 0 4px; margin: 0; }
.hero h1 { font-size: clamp(1.8rem, 5vw, 3rem); letter-spacing: -.02em; }
.hero h1 span { background: linear-gradient(90deg, var(--accent), #22d3ee); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); margin: 0 0 22px; }
.search { display: flex; gap: 8px; max-width: 560px; margin: 0 auto; }

.sicon { border-radius: 10px; image-rendering: pixelated; background: var(--bg2); flex-shrink: 0; }
.motd {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; line-height: 1.45;
  background: #060914; border-radius: 8px; padding: 8px 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  max-height: 3.5em;
}
.motd.sm { font-size: 12px; }
.motd.big { white-space: normal; max-height: none; font-size: 14px; margin: 10px 0 14px; }

.status { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; font-weight: 600; white-space: nowrap; }
.status i { width: 8px; height: 8px; border-radius: 50%; }
.status.on { color: var(--accent); } .status.on i { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.status.off { color: var(--red); } .status.off i { background: var(--red); }
.votes { color: var(--gold); font-weight: 600; font-size: .88rem; white-space: nowrap; }
.ver { font-size: .75rem; color: var(--muted); background: var(--card2); border-radius: 6px; padding: 2px 7px; margin-left: 8px; }

.ip {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%; cursor: pointer;
  background: var(--bg2); border: 1px solid var(--line); color: var(--text); border-radius: 8px;
  padding: 6px 10px; font: 13px ui-monospace, Consolas, monospace;
}
.ip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ip svg { width: 14px; height: 14px; fill: var(--muted); flex-shrink: 0; }
.ip:hover { border-color: var(--accent); }
.ip.copied { border-color: var(--accent); color: var(--accent); }

.badge { font-size: .68rem; font-weight: 800; letter-spacing: .06em; border-radius: 6px; padding: 3px 7px; vertical-align: middle; }
.badge.new { background: #22d3ee22; color: #22d3ee; }
.badge.gold { background: #fbbf2422; color: var(--gold); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tags span, .tags a { font-size: .75rem; background: var(--card2); color: var(--muted); border-radius: 999px; padding: 3px 10px; }
.tags.filter { margin: -4px 0 14px; }
.tags.filter a:hover, .tags.filter a.cur { background: var(--accent); color: var(--accent-ink); text-decoration: none; }

.sorts { display: flex; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.sorts a { color: var(--muted); padding: 5px 11px; border-radius: 7px; font-size: .88rem; }
.sorts a.cur, .sorts a:hover { background: var(--card2); color: var(--text); text-decoration: none; }

/* Neu eingetragen */
.pulse { width: 10px; height: 10px; border-radius: 50%; background: #22d3ee; box-shadow: 0 0 0 0 #22d3ee88; animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px #22d3ee00; } 100% { box-shadow: 0 0 0 0 #22d3ee00; } }
.fresh { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.fresh-card { display: flex; flex-direction: column; gap: 10px; color: var(--text); scroll-snap-align: start; transition: border-color .15s, transform .15s; }
.fresh-card:hover { border-color: #22d3ee; text-decoration: none; transform: translateY(-2px); }
.fresh-card small { display: block; color: var(--muted); font-size: .8rem; }
.fresh-card b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Gesponsert */
.sponsored { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.sponsor-card {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  border-color: #fbbf2455; background: linear-gradient(160deg, #2a220b 0%, var(--card) 45%);
}
.sponsor-card .badge { position: absolute; top: 14px; right: 14px; }
.sponsor-card > a { color: var(--text); }
.sponsor-card > a:hover { text-decoration: none; }
.sponsor-card h3 { margin: 0; padding-right: 90px; }

/* Liste */
.list { display: flex; flex-direction: column; gap: 10px; }
.srow {
  display: flex; align-items: center; gap: 16px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px; transition: border-color .15s;
}
.srow:hover { border-color: #3b4a7a; }
.srow .rank { font-weight: 800; color: var(--muted); width: 38px; text-align: center; font-size: 1.05rem; }
.srow.top1 { border-color: #fbbf2466; } .srow.top1 .rank { color: var(--gold); }
.srow.top2 .rank { color: #cbd5e1; } .srow.top3 .rank { color: #d97706; }
.srow .name { color: var(--text); font-weight: 700; font-size: 1.05rem; }
.srow .info .motd { margin-top: 6px; }
.srow .meta { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; width: 230px; }
.empty { text-align: center; color: var(--muted); padding: 40px 20px; background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty.big h1 { font-size: 4rem; color: var(--text); }
.pager { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
.pager a { background: var(--card); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 6px 12px; }
.pager a.cur { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* Serverseite */
.server-head { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 18px; }
.server-head h1 { font-size: 1.8rem; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.grid2.tight { grid-template-columns: 1fr 1fr; gap: 14px; }
.side { display: flex; flex-direction: column; gap: 18px; }
.desc { color: #cfd6e6; overflow-wrap: anywhere; }
.links { display: flex; gap: 16px; margin-top: 16px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stats b { display: block; font-size: 1.15rem; }
.stats small { color: var(--muted); }
.graph { width: 100%; height: 140px; display: block; margin: 6px 0; }
.graph .area { fill: #4ade8022; } .graph .line { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.voters { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.voters li { display: flex; align-items: center; gap: 10px; }
.voters li b { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.voters img { border-radius: 4px; image-rendering: pixelated; }
.pos { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; background: var(--card2); font-weight: 700; font-size: .8rem; }
.pos.p1 { background: var(--gold); color: #422006; } .pos.p2 { background: #cbd5e1; color: #1e293b; } .pos.p3 { background: #d97706; color: #2a1503; }
.stars { color: #475569; letter-spacing: 1px; white-space: nowrap; }
.stars i { font-style: normal; } .stars i.f { color: var(--gold); }
.stars i.h { background: linear-gradient(90deg, var(--gold) 50%, #475569 50%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.star-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { font-size: 1.7rem; color: #475569; cursor: pointer; transition: color .1s; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { color: var(--gold); }
.star-input input:focus-visible + label { outline: 2px solid var(--accent); border-radius: 4px; }
.review-form { margin: 8px 0 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.reviews { display: flex; flex-direction: column; gap: 14px; }
.review p { margin: 6px 0 2px; color: #cfd6e6; overflow-wrap: anywhere; }
.banner-prev { max-width: 100%; margin: 8px 0; }
.code { font: 12px ui-monospace, Consolas, monospace; }

.alert { border-radius: 10px; padding: 11px 14px; margin-bottom: 14px; }
.alert.err { background: #7f1d1d44; border: 1px solid #7f1d1d; color: #fecaca; }
.toast {
  position: fixed; top: 76px; left: 50%; transform: translateX(-50%); z-index: 20; max-width: calc(100% - 32px);
  padding: 12px 18px; border-radius: 12px; font-weight: 600; box-shadow: 0 10px 30px #0008; animation: toast-in .25s ease-out;
}
.toast.ok { background: var(--accent); color: var(--accent-ink); }
.toast.err { background: var(--red); color: #450a0a; }
.toast.hide { opacity: 0; transition: opacity .4s; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -10px); } }

/* Formulare */
.auth { max-width: 440px; margin: 30px auto; }
.form-page { max-width: 720px; margin: 0 auto; }
.form-page > .card { margin-bottom: 18px; }
.rules ul { margin: 0; padding-left: 20px; color: #cfd6e6; }
.rules li { margin: 4px 0; }
.addr-row { display: flex; gap: 12px; }
.addr-row .port { width: 120px; }
.check-result { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.check-result.ok { border-color: var(--accent); }
.check-result.bad { border-color: var(--red); }
.check-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.check-list li::before { display: inline-block; width: 22px; font-weight: 700; }
.check-list li.y::before { content: "✓"; color: var(--accent); }
.check-list li.n::before { content: "✗"; color: var(--red); }
.check-title { font-weight: 700; font-size: 1.05rem; }
.spinner { width: 16px; height: 16px; border: 2px solid #fff3; border-top-color: currentColor; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.profile { display: flex; align-items: center; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.profile h1 { margin-bottom: 4px; }
.profile p { margin: 0; }
.avatar {
  display: inline-grid; place-items: center; border-radius: 50%; font-weight: 800; color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent), #22d3ee); flex-shrink: 0;
}
.avatar.sm { width: 30px; height: 30px; font-size: .9rem; }
.avatar.xl { width: 84px; height: 84px; font-size: 2.2rem; }

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

footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; padding: 22px 0; text-align: center; }

@media (max-width: 900px) {
  .grid2 { grid-template-columns: 1fr; }
  .srow { flex-wrap: wrap; }
  .srow .meta { width: 100%; flex-direction: row; justify-content: space-between; align-items: center; flex-wrap: wrap; }
  .srow .vote-btn { width: 100%; }
}
@media (max-width: 600px) {
  .hide-sm { display: none; }
  .nav nav { gap: 10px; }
  .brand { font-size: 1rem; }
  .srow .rank { width: auto; }
  .srow .info { flex-basis: calc(100% - 140px); }
  .server-head { flex-direction: column; }
  .grid2.tight, .addr-row { grid-template-columns: 1fr; flex-direction: column; }
  .addr-row .port { width: 100%; }
  .search { flex-direction: column; }
  .card { padding: 16px; }
}

/* ---------- Browser-Kompatibilität ---------- */
html { -moz-text-size-adjust: 100%; text-size-adjust: 100%; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
.nav { -webkit-backdrop-filter: blur(12px); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .nav { background: #0b1020; } }
/* iOS Safari zoomt bei Inputs < 16px – deshalb 16px; einheitliches Aussehen in allen Browsern */
input, textarea, button { font-size: 16px; -webkit-appearance: none; -moz-appearance: none; appearance: none; }
input[type=radio] { -webkit-appearance: radio; appearance: auto; }
input[type=number] { -moz-appearance: textfield; }
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input::placeholder, textarea::placeholder { color: #5f6b8a; opacity: 1; }
textarea { resize: vertical; }
button { -webkit-tap-highlight-color: transparent; }
a, button { touch-action: manipulation; }
img { max-width: 100%; height: auto; }
.sicon { image-rendering: -moz-crisp-edges; image-rendering: -webkit-optimize-contrast; image-rendering: pixelated; }
details > summary { list-style: none; } details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "▸ "; } details[open] > summary::before { content: "▾ "; }
.fresh { -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.fresh::-webkit-scrollbar { height: 8px; } .fresh::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }
footer { padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { .nav, footer, .side form, .vote-btn { display: none; } body { background: #fff; color: #000; } }
