:root {
  --bg: #000;
  --surface: #121212;
  --surface-2: #1c1c1c;
  --line: #2a2a2a;
  --text: #fff;
  --muted: #9a9a9a;
  --red: #ff1d1d;
  --red-dark: #c70000;
  --green: #2ecc71;
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Inter, Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.4;
  min-height: 100dvh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
body::before, body::after {
  content: "";
  position: fixed; left: 0; right: 0; height: 8px; background: var(--red); z-index: 10;
}
body::before { top: 0; }
body::after { bottom: 0; }

.wrap { max-width: 540px; margin: 0 auto; padding: 32px 16px 48px; }
.wrap.narrow { max-width: 380px; }
.center { text-align: center; }

h1, h2 {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1;
  margin: 0 0 8px;
}
h1 { font-size: clamp(40px, 12vw, 64px); }
h2 { font-size: 22px; margin-top: 0; }
.hero { text-align: center; margin-bottom: 20px; }
.hero .logo { width: 150px; height: auto; display: block; margin: 0 auto 18px; }
.logo { max-width: 160px; height: auto; }
.lead { color: var(--muted); margin: 6px 0 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 20px;
}
.label { display: block; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 14px 0 6px; }
.label:first-child { margin-top: 0; }
.opt { font-weight: 400; text-transform: none; letter-spacing: 0; }
input[type="text"], input[type="search"], input[type="password"], textarea {
  width: 100%;
  font: inherit;
  font-size: 17px;
  color: var(--text);
  background: var(--surface-2);
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
input:focus, textarea:focus { border-color: var(--red); }
textarea { resize: vertical; }
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.btn {
  display: inline-block;
  font: inherit;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 15px;
  border: 0;
  border-radius: 10px;
  padding: 14px 20px;
  cursor: pointer;
  text-decoration: none;
  color: #fff;
  background: var(--surface-2);
  transition: transform .08s ease, background .15s ease;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--red); }
.btn.primary:hover { background: var(--red-dark); }
.btn.secondary { background: var(--surface-2); border: 1px solid var(--line); }
.btn.danger { background: transparent; border: 1px solid var(--red-dark); color: var(--red); }
.btn.small { padding: 9px 12px; font-size: 12px; }
.btn[disabled] { opacity: .5; cursor: default; }
.btn.block { width: 100%; }
.link { background: none; border: 0; color: var(--muted); font: inherit; text-decoration: underline; cursor: pointer; padding: 0; }
.muted { color: var(--muted); text-decoration: none; }
.hint { color: var(--muted); font-size: 14px; margin: 10px 0 0; }
.error { color: var(--red); font-weight: 600; margin: 12px 0 0; }
.notice { border-radius: var(--radius); padding: 14px 16px; margin-bottom: 20px; font-weight: 600; }
.notice.closed { background: #2a0a0a; border: 1px solid var(--red-dark); }
.notice.warn { background: #2b2300; border: 1px solid #8a6d00; }

/* Suche */
.search { position: relative; }
.spinner {
  position: absolute; right: 14px; top: 50%; width: 18px; height: 18px; margin-top: -9px;
  border: 2px solid var(--line); border-top-color: var(--red); border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.results { list-style: none; margin: 8px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.results li { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-top: 1px solid var(--line); cursor: pointer; }
.results li:first-child { border-top: 0; }
.results li:hover, .results li:focus-visible { background: var(--surface-2); outline: none; }
.results .cover, .picked .cover, .item .cover, .queue .cover {
  width: 48px; height: 48px; border-radius: 6px; background: var(--surface-2); object-fit: cover; flex: 0 0 auto;
}
.results .t, .picked .t { display: flex; flex-direction: column; min-width: 0; }
.results strong, .picked strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.results span, .picked span { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.results .none { color: var(--muted); cursor: default; }
.manual { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.manual .btn { margin-top: 12px; }
.picked { display: flex; gap: 12px; align-items: center; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; margin-bottom: 4px; }
.picked .cover { width: 56px; height: 56px; }
.actions { display: flex; gap: 10px; margin-top: 18px; }
.actions .btn { flex: 1; }
.success { text-align: center; border-color: var(--green); }
.success h2 { color: var(--green); }

/* Gäste-Queue */
.queue ul { list-style: none; padding: 0; margin: 12px 0 0; }
.queue li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.queue li:first-child { border-top: 0; }
.queue .t { flex: 1; min-width: 0; }
.queue .t strong, .queue .t span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue .t span { color: var(--muted); font-size: 14px; }
.vote { font: inherit; font-weight: 800; background: var(--surface-2); color: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; cursor: pointer; white-space: nowrap; }
.vote[disabled] { opacity: .6; cursor: default; }
.vote.voted { border-color: var(--red); color: var(--red); }
.foot { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; margin-top: 30px; }

/* DJ */
body.dj .wrap { max-width: 720px; padding-top: 20px; }
.bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 900; text-transform: uppercase; font-size: 20px; }
.brand img { border-radius: 8px; }
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 48px; height: 28px; border-radius: 999px; background: var(--line); position: relative; transition: background .15s; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch input:checked + .track { background: var(--green); }
.switch input:checked + .track::after { left: 23px; }
.switch-label { font-weight: 700; font-size: 14px; }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; overflow-x: auto; }
.tabs button { font: inherit; font-weight: 700; font-size: 14px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; cursor: pointer; white-space: nowrap; }
.tabs button.active { color: #fff; border-color: var(--red); background: #1f0b0b; }
.count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--red); color: #fff; font-size: 12px; text-align: center; margin-left: 4px; }
.list { list-style: none; margin: 0; padding: 0; }
.item { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 10px; }
.item.new { animation: flash 1.2s ease; }
@keyframes flash { 0% { background: #3a0c0c; border-color: var(--red); } 100% { background: var(--surface); } }
.item .cover { width: 56px; height: 56px; }
.item .body { flex: 1; min-width: 0; }
.item .title { font-size: 17px; }
.item .artist { color: var(--muted); }
.item .votes { display: inline-block; background: var(--red); color: #fff; font-size: 12px; font-weight: 800; border-radius: 999px; padding: 1px 8px; margin-left: 4px; vertical-align: middle; }
.item .votes:empty { display: none; }
.item .meta { color: var(--muted); font-size: 13px; display: flex; gap: 10px; }
.item .msg { margin-top: 6px; font-size: 14px; white-space: pre-line; background: var(--surface-2); border-radius: 8px; padding: 6px 10px; }
.item.played { opacity: .55; }
.item.rejected { opacity: .4; }
.btns { display: flex; flex-direction: column; gap: 6px; }
.icon { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: #fff; font-size: 18px; font-weight: 800; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.icon.ok { background: #0f3d22; border-color: var(--green); color: var(--green); }
.icon.no { color: var(--red); border-color: var(--red-dark); }
.empty { color: var(--muted); text-align: center; padding: 40px 0; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.tools .meta { color: var(--muted); font-size: 12px; margin-left: auto; }
.inline { display: inline; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: #fff; color: #000; font-weight: 700; padding: 12px 18px; border-radius: 999px; z-index: 20; box-shadow: 0 6px 24px rgba(0,0,0,.6); }
@media (min-width: 600px) { .btns { flex-direction: row; } }
span.cover { display: inline-flex; align-items: center; justify-content: center; color: var(--muted); font-size: 22px; }
span.cover::before { content: "♪"; }
