/* Klickrausch – gemeinsames Party-Design */
:root {
  --bg: #120b24;
  --bg2: #1c1236;
  --card: #241846;
  --card2: #2e2058;
  --line: #3b2c6b;
  --text: #f4efff;
  --muted: #a89cc8;
  --pink: #ff3d8b;
  --yellow: #ffd23f;
  --cyan: #3ddcff;
  --green: #3dffa2;
  --red: #ff5b5b;
  --orange: #ff9f40;
  --radius: 16px;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: var(--font); }
body { min-height: 100vh; -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; border: 0; border-radius: 12px; padding: .7em 1.1em; background: var(--card2); color: var(--text); font-weight: 600; }
button:disabled { opacity: .45; cursor: not-allowed; }
button.primary { background: linear-gradient(135deg, var(--pink), #b23dff); color: #fff; box-shadow: 0 6px 24px rgba(255, 61, 139, .35); }
button.ghost { background: transparent; border: 1px solid var(--line); }
button.danger { background: #4a1630; color: #ffb3c8; }
input, select { font: inherit; color: var(--text); background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: .65em .8em; width: 100%; }
input:focus, select:focus { outline: 2px solid var(--cyan); outline-offset: 1px; }
label { display: block; color: var(--muted); font-size: .9em; margin: .7em 0 .3em; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.row { display: flex; gap: .6em; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1em 1.2em; }
.pill { display: inline-block; padding: .15em .6em; border-radius: 999px; background: var(--card2); font-size: .85em; }
.pill.hub { background: #5a3a00; color: var(--yellow); }
.pill.forbidden { background: #5a0f1e; color: #ffb3c0; }
.pill.back { background: #123a52; color: var(--cyan); }
.pill.ai { background: #1d3a2a; color: var(--green); }
.logo { font-weight: 900; letter-spacing: -.02em; }
.logo span { color: var(--pink); }
.err { color: #ffb3c0; background: #3a0f22; border-radius: 10px; padding: .6em .8em; margin: .6em 0; }
.ok { color: var(--green); }

/* Autovervollständigung */
.ac { position: relative; }
.ac-list { position: absolute; z-index: 30; left: 0; right: 0; top: 100%; background: var(--card2); border: 1px solid var(--line); border-radius: 12px; margin-top: 4px; overflow: hidden; max-height: 50vh; overflow-y: auto; }
.ac-list div { padding: .6em .8em; cursor: pointer; border-bottom: 1px solid var(--line); }
.ac-list div:last-child { border-bottom: 0; }
.ac-list div:hover, .ac-list div.sel { background: var(--line); }

/* Ticker */
.ticker { display: flex; flex-direction: column; gap: .35em; overflow: hidden; }
.ticker .ev { padding: .35em .6em; border-radius: 10px; background: var(--bg2); animation: slidein .3s ease; }
.ticker .ev.ai { background: #16301f; color: #c9ffe3; font-style: italic; }
.ticker .ev.hub { color: var(--yellow); }
.ticker .ev.forbidden { color: #ffb3c0; }
.ticker .ev.finish { color: var(--green); font-weight: 700; }
.ticker .ev.switch { color: var(--cyan); font-weight: 800; }
.ticker .ev.hint { color: var(--cyan); }
@keyframes slidein { from { transform: translateY(-6px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Weg-Ketten */
.chain { display: flex; flex-wrap: wrap; gap: .25em; align-items: center; }
.chain .st { padding: .2em .55em; border-radius: 8px; background: var(--bg2); }
.chain .st.hub { background: #5a3a00; color: var(--yellow); }
.chain .st.forbidden { background: #5a0f1e; color: #ffb3c0; }
.chain .st.back { background: #123a52; color: var(--cyan); }
.chain .st.goal { background: #164a30; color: var(--green); font-weight: 700; }
.chain .ar { color: var(--muted); }

/* Countdown */
.countdown { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(18, 11, 36, .96); text-align: center; padding: 1em; }
.countdown .num { font-size: 30vmin; font-weight: 900; color: var(--yellow); line-height: 1; animation: pop .9s ease infinite; }
.countdown .pair { font-size: 6vmin; font-weight: 800; margin-top: .4em; }
@keyframes pop { 0% { transform: scale(1.3); opacity: 0; } 30% { transform: scale(1); opacity: 1; } 100% { opacity: .6; } }

/* Konfetti */
.confetti { position: fixed; top: -10px; width: 10px; height: 14px; z-index: 90; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: .7em 1em; z-index: 95; max-width: 90vw; text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); animation: slidein .2s ease; }
.toast.err { background: #3a0f22; }
.bigmsg { position: fixed; inset: 0; z-index: 85; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .75); padding: 1em; text-align: center; }
.bigmsg > div { background: var(--card); border: 2px solid var(--cyan); border-radius: 20px; padding: 1.5em; font-size: 1.4em; font-weight: 800; max-width: 600px; }

/* Konfetti/Modal */
.modal { position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .6); display: flex; align-items: flex-end; justify-content: center; }
.modal > .sheet { background: var(--card); width: 100%; max-width: 560px; border-radius: 20px 20px 0 0; padding: 1.2em; max-height: 80vh; overflow-y: auto; }
