/* Pub-Quiz Night – gemeinsames Design */
@font-face { font-family: 'Poppins'; font-style: normal; font-display: swap; font-weight: 400; src: url(/fonts/poppins-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-display: swap; font-weight: 500; src: url(/fonts/poppins-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-display: swap; font-weight: 600; src: url(/fonts/poppins-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-display: swap; font-weight: 700; src: url(/fonts/poppins-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-display: swap; font-weight: 800; src: url(/fonts/poppins-latin-800-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-display: swap; font-weight: 900; src: url(/fonts/poppins-latin-900-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-display: swap; font-weight: 400; src: url(/fonts/poppins-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-display: swap; font-weight: 600; src: url(/fonts/poppins-latin-ext-600-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-display: swap; font-weight: 800; src: url(/fonts/poppins-latin-ext-800-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

:root {
  --bg: #0A0F24;
  --surface: #121A3A;
  --surface-2: #1B2554;
  --surface-3: #263270;
  --berry: #D41367;
  --mint: #00ADBB;
  --amber: #F7A81B;
  --violet: #00A2E0;
  /* Weitere Farben der Rotary/Rotaract-Palette */
  --royal: #0067C8;
  --sky: #00A2E0;
  --gold: #F7A81B;
  --turquoise: #00ADBB;
  --green: #009739;
  --orange: #FF7600;
  --purple: #901F93;
  --cardinal: #E02927;
  --grad-brand: linear-gradient(120deg, #D41367 0%, #FF7600 55%, #F7A81B 100%);
  --grad-cool: linear-gradient(120deg, #00ADBB 0%, #00A2E0 50%, #0067C8 100%);
  --text: #FFFFFF;
  --muted: rgba(255, 255, 255, 0.68);
  --faint: rgba(255, 255, 255, 0.42);
  --line: rgba(255, 255, 255, 0.12);
  --danger: #E02927;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
a { color: var(--mint); }
[hidden] { display: none !important; }

/* Weiche, langsam wandernde Leuchtflächen in Markenfarben + feine Körnung */
.glow-bg { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.glow-bg::before, .glow-bg::after, .glow-bg i {
  content: ''; position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.42;
}
.glow-bg::before { width: 46vmax; height: 46vmax; left: -14vmax; top: -16vmax; background: radial-gradient(circle, var(--berry), transparent 65%); }
.glow-bg::after { width: 50vmax; height: 50vmax; right: -18vmax; bottom: -22vmax; background: radial-gradient(circle, var(--royal), transparent 65%); opacity: 0.55; }
.glow-bg i { width: 30vmax; height: 30vmax; right: 10vmax; top: -12vmax; background: radial-gradient(circle, rgba(0, 173, 187, 0.8), transparent 65%); opacity: 0.16; }
@media (prefers-reduced-motion: no-preference) {
  .glow-bg::before { animation: glow-drift 22s ease-in-out infinite alternate; }
  .glow-bg::after { animation: glow-drift 28s ease-in-out infinite alternate-reverse; }
}
@keyframes glow-drift { to { transform: translate(6vmax, 4vmax) scale(1.08); } }
.grain { position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: 0.07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>"); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 48px; padding: 0.7em 1.2em; border: 0; border-radius: 999px;
  background: var(--surface-2); color: var(--text); font-weight: 700; font-size: 1rem;
  cursor: pointer; transition: transform 0.12s ease, background 0.2s ease, box-shadow 0.2s ease, opacity 0.2s;
  text-decoration: none; user-select: none; touch-action: manipulation;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: scale(0.97); }
.btn:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-primary { background: linear-gradient(135deg, #E2307F, #D41367 55%, #B50F58); box-shadow: 0 10px 30px rgba(212, 19, 103, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.btn-primary:hover { background: linear-gradient(135deg, #EA4A8E, #DC2272 55%, #C0125F); box-shadow: 0 14px 38px rgba(212, 19, 103, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.btn-mint { background: var(--mint); color: #0A0F24; box-shadow: 0 10px 30px rgba(0, 173, 187, 0.25); }
.btn-mint:hover { background: #19C3D0; }
.btn-amber { background: var(--amber); color: #0A0F24; }
.btn-amber:hover { background: #F9BA45; }
.btn-ghost { background: transparent; border: 1.5px solid var(--line); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.06); }
.btn-danger { background: rgba(224, 41, 39, 0.16); color: #FF9FC4; border: 1.5px solid rgba(224, 41, 39, 0.4); }
.btn-small { min-height: 36px; padding: 0.35em 0.9em; font-size: 0.88rem; }
.btn-block { width: 100%; }

/* Karten & Flächen */
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)), var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.09); border-radius: var(--radius); padding: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 12px 32px rgba(0, 0, 0, 0.18);
}
.card-2 { background: var(--surface-2); border-radius: var(--radius-sm); padding: 14px 16px; }
.pill {
  display: inline-flex; align-items: center; gap: 0.4em; padding: 0.3em 0.85em; border-radius: 999px;
  background: rgba(255, 255, 255, 0.08); color: var(--muted); font-weight: 600; font-size: 0.85rem; white-space: nowrap;
}
.pill-berry { background: rgba(212, 19, 103, 0.16); color: #F77BB0; }
.pill-mint { background: rgba(0, 173, 187, 0.14); color: var(--mint); }
.pill-amber { background: rgba(247, 168, 27, 0.16); color: var(--amber); }
.pill-violet { background: rgba(0, 162, 224, 0.18); color: #9FDDF7; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-weight: 700; font-size: 0.78rem; color: var(--violet); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }

/* Formulare */
.field { display: grid; gap: 6px; }
.field > span { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.input {
  width: 100%; min-height: 52px; padding: 12px 16px; border-radius: var(--radius-sm);
  background: var(--bg); border: 2px solid var(--surface-3); color: var(--text); font-size: 1.05rem; font-weight: 500;
  transition: border-color 0.15s;
}
.input:focus { outline: none; border-color: var(--violet); }
.input::placeholder { color: var(--faint); }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
textarea.input { min-height: 90px; resize: vertical; }

/* Toasts */
.toasts { position: fixed; z-index: 1000; left: 50%; transform: translateX(-50%); bottom: 18px; display: grid; gap: 8px; width: min(92vw, 520px); pointer-events: none; }
.toast {
  background: var(--surface-2); border: 1px solid var(--line); border-left: 5px solid var(--violet);
  padding: 12px 16px; border-radius: 14px; box-shadow: var(--shadow); font-weight: 600; font-size: 0.95rem;
  animation: toast-in 0.25s ease; pointer-events: auto;
}
.toast.warn { border-left-color: var(--amber); }
.toast.error { border-left-color: var(--berry); }
.toast.ok, .toast.join { border-left-color: var(--mint); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* Verbindungsanzeige */
.conn {
  position: fixed; z-index: 900; top: 10px; left: 50%; transform: translateX(-50%);
  background: rgba(27, 37, 84, 0.95); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px;
  font-weight: 600; font-size: 0.88rem; display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}
.conn .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--amber); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }

/* Spendenbarometer */
.donation { display: grid; gap: 10px; }
.donation-bar { height: 18px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; position: relative; }
.donation-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--mint), var(--amber)); width: 0; transition: width 1.2s cubic-bezier(.2,.8,.2,1); box-shadow: 0 0 24px rgba(0, 173, 187, 0.5); }
.donation-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.donation-sum { font-weight: 800; font-size: 1.6em; letter-spacing: -0.02em; }

/* Kleine Helfer */
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.center { text-align: center; }
.stack { display: grid; gap: 14px; }
.stack > * { min-width: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.logo-img { max-height: 64px; max-width: 220px; object-fit: contain; }

.confetti-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 950; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
