/* © 2026 Daniel Gelbke, DG Lighting – Alle Rechte vorbehalten. Siehe LICENSE. */
/* Musikwünsche DJ – gemeinsames Stylesheet. Theme über data-theme + --accent (pro Event). */
:root {
  --accent: #ff2d95;
  --accent2: #22d3ee;
  --on-accent: #fff;
  --bg: #0a0a12;
  --bg2: #12121e;
  --card: #181828;
  --card2: #22223a;
  --line: #2b2b46;
  --text: #f2f2fa;
  --muted: #9a9ab8;
  --ok: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;
  --radius: 16px;
  --grad: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 45%, var(--accent2)));
  --glow1: color-mix(in srgb, var(--accent) 22%, transparent);
  --glow2: color-mix(in srgb, var(--accent2) 14%, transparent);
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f6f4f0;
  --bg2: #ffffff;
  --card: #ffffff;
  --card2: #f1eee8;
  --line: #e4dfd6;
  --text: #1d1b22;
  --muted: #6d6874;
  --accent2: #c9a46a;
  --glow1: color-mix(in srgb, var(--accent) 10%, transparent);
  --glow2: color-mix(in srgb, var(--accent2) 12%, transparent);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: radial-gradient(1100px 600px at 0% -10%, var(--glow1), transparent 60%), radial-gradient(900px 500px at 110% 0%, var(--glow2), transparent 55%), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
[data-theme="light"] body { font-family: ui-sans-serif, 'Avenir Next', 'Segoe UI', system-ui, sans-serif; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: var(--accent); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; word-break: break-all; }
.wrap { max-width: 640px; margin: 0 auto; padding: 16px 16px 120px; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; }
.logo-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--grad); display: grid; place-items: center; font-size: 20px; flex: none; }
.gradtext { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
h1 { font-size: 1.7rem; margin: 4px 0 4px; letter-spacing: -.02em; line-height: 1.15; }
h2 { font-size: .95rem; margin: 26px 0 10px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
h3 { margin: 0 0 10px; font-size: 1rem; }

.card, .panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.panel { padding: 16px; }
[data-theme="light"] .card, [data-theme="light"] .panel, [data-theme="light"] .item { box-shadow: 0 1px 2px #0000000a, 0 4px 14px #0000000a; }
.announce { background: color-mix(in srgb, var(--accent) 14%, var(--card)); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); border-radius: var(--radius); padding: 12px 14px; margin: 10px 0; }

.np { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); margin: 12px 0; }
.eq { display: flex; gap: 3px; align-items: flex-end; height: 22px; flex: none; }
.eq i { width: 4px; background: var(--accent); border-radius: 2px; animation: eq 1s infinite ease-in-out; }
.eq i:nth-child(2) { animation-delay: .2s; background: color-mix(in srgb, var(--accent) 50%, var(--accent2)); }
.eq i:nth-child(3) { animation-delay: .4s; background: var(--accent2); }
@keyframes eq { 0%, 100% { height: 5px; } 50% { height: 22px; } }
.label { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

/* Suche */
.search { position: relative; }
.search input { width: 100%; padding: 16px 16px 16px 48px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg2); font-size: 1.05rem; outline: none; transition: border-color .2s, box-shadow .2s; }
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.search .ico { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); opacity: .6; pointer-events: none; }
.results { margin-top: 8px; display: grid; gap: 6px; grid-template-columns: minmax(0, 1fr); }
.result { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); text-align: left; width: 100%; }
.result:hover, .result:focus-visible { border-color: var(--accent); outline: none; }

.cover { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; flex: none; background: var(--card2); display: grid; place-items: center; font-size: 22px; }
.meta { min-width: 0; flex: 1; }
.meta .t { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta .a { color: var(--muted); font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Liste */
.list { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); align-content: start; }
.item { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); position: relative; overflow: hidden; }
.item.mine { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.item.top { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, var(--card)), var(--card) 60%); }
.rank { width: 26px; text-align: center; font-weight: 800; color: var(--muted); flex: none; }
.item.top .rank { color: var(--accent); }
.badge { display: inline-block; font-size: .7rem; padding: 2px 7px; border-radius: 999px; background: var(--card2); color: var(--muted); margin-right: 4px; vertical-align: middle; font-weight: 600; }
.badge.mine { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.badge.safe { background: #22c55e22; color: #16a34a; }
.badge.warn { background: #f59e0b26; color: #d97706; }
.vote { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 56px; height: 56px; border-radius: 12px; background: var(--card2); border: 1px solid var(--line); flex: none; transition: transform .1s; }
.vote:active { transform: scale(.92); }
.vote .n { font-weight: 800; font-size: 1.05rem; }
.vote .h { font-size: 1.1rem; line-height: 1; }
.vote.on { background: var(--grad); border-color: transparent; color: var(--on-accent); }
.vote[disabled] { opacity: .85; cursor: default; }
.expbar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--warn); opacity: .7; }
.empty { text-align: center; padding: 30px 10px; color: var(--muted); }

/* Buttons & Formulare */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 12px; font-weight: 700; background: var(--card2); border: 1px solid var(--line); text-decoration: none; color: var(--text); }
.btn.primary { background: var(--grad); border: 0; color: var(--on-accent); }
.btn.ok { background: var(--ok); color: #04200f; border: 0; }
.btn.danger { background: transparent; border-color: #b91c1c88; color: #f87171; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 7px 12px; font-size: .9rem; border-radius: 10px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.linkbtn { color: var(--accent); text-decoration: underline; padding: 6px 0; }
label { display: block; font-size: .85rem; color: var(--muted); margin: 12px 0 6px; }
.field { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); outline: none; }
.field:focus { border-color: var(--accent); }
textarea.field { resize: vertical; min-height: 70px; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.switch input[type=checkbox] { width: 46px; height: 26px; appearance: none; -webkit-appearance: none; background: var(--card2); border-radius: 999px; position: relative; border: 1px solid var(--line); cursor: pointer; flex: none; transition: background .2s; margin: 0; }
.switch input[type=checkbox]::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #0004; transition: transform .2s; }
.switch input[type=checkbox]:checked { background: var(--ok); }
.switch input[type=checkbox]:checked::after { transform: translateX(20px); }

/* Sheet / Modal */
.overlay { position: fixed; inset: 0; background: #000a; backdrop-filter: blur(4px); display: flex; align-items: flex-end; justify-content: center; z-index: 50; animation: fade .2s; }
.sheet { background: var(--bg2); border: 1px solid var(--line); border-radius: 22px 22px 0 0; width: 100%; max-width: 640px; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); animation: up .25s ease-out; max-height: 92vh; overflow: auto; }
@media (min-width: 700px) { .overlay { align-items: center; } .sheet { border-radius: 22px; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

/* Toast */
.toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 100; width: min(92vw, 460px); pointer-events: none; }
.toast { background: color-mix(in srgb, var(--card) 96%, transparent); color: var(--text); border: 1px solid var(--line); padding: 12px 16px; border-radius: 12px; box-shadow: 0 10px 30px #0006; animation: up .25s; pointer-events: auto; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.toast.err { border-color: #b91c1c; }
.toast.ok { border-color: #16a34a; }
.conn { position: fixed; top: 0; left: 0; right: 0; text-align: center; background: var(--warn); color: #000; font-size: .85rem; font-weight: 700; padding: 4px; z-index: 200; }
.footer { text-align: center; margin-top: 40px; font-size: .8rem; color: var(--muted); }
.footer a { color: var(--muted); }

.brand-block { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; color: var(--text); }
.brand-block .brandlogo { width: auto; object-fit: contain; filter: drop-shadow(0 2px 10px #0003); }
.brand-block .brandname { font-weight: 900; font-style: italic; letter-spacing: .06em; font-size: .95rem; color: #baae99; }
[data-theme="light"] .brand-block .brandname { color: #7d725d; }
.evlogo { max-width: 70%; object-fit: contain; }
.confetti { position: fixed; top: -10px; width: 8px; height: 14px; z-index: 300; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }


/* Wartungsmodus: Vollbild-Seite steht in maint.css (wird bei Bedarf geladen) */
.maintbar { background: color-mix(in srgb, var(--warn) 18%, var(--card)); border: 1px solid var(--warn); border-radius: 12px; padding: 10px 14px; margin: 12px auto; max-width: 1100px; font-size: .9rem; }
.mswitch { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; }
