/* =====================================================================
   SOMI Funny Award 2026 – Basis-Styles & Design-Tokens
   Markenwelt: Schwarz/Violett, Montserrat, mobile-first
   ===================================================================== */
@import url("fonts.css");

:root {
  --bg-0: #0b0513;
  --bg-1: #150824;
  --bg-2: #22103a;
  --violet: #a855f7;
  --violet-bright: #c45cff;
  --violet-deep: #7c3aed;
  --magenta: #d946ef;
  --violet-glow: rgba(196, 92, 255, 0.55);
  --text: #ffffff;
  --text-2: #e9dcff;
  --text-3: #bda6e3;
  --gold: #f6c544;
  --gold-2: #ffe08a;
  --silver: #d3d8df;
  --silver-2: #f1f3f6;
  --bronze: #d58c4e;
  --bronze-2: #f0b07a;
  --card: linear-gradient(180deg, rgba(58, 22, 104, 0.62), rgba(32, 10, 60, 0.72));
  --card-border: rgba(178, 96, 255, 0.95);
  --row: rgba(44, 16, 78, 0.55);
  --row-border: rgba(168, 85, 247, 0.55);
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 18px;
  --shadow-glow: 0 0 22px var(--violet-glow);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; }
a { color: var(--violet-bright); }
.ico { width: 1em; height: 1em; display: inline-block; vertical-align: middle; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }

/* ---------- Logo ---------- */
.logo {
  position: relative;
  display: inline-grid;
  justify-items: center;
  text-align: center;
  line-height: 1;
  --logo: 56px;                         /* Grundgröße des Titels */
  padding: 0 .4em;
  user-select: none;
}
.logo--sm { --logo: 38px; }
.logo--md { --logo: 48px; }
.logo--lg { --logo: 76px; }
.logo--xl { --logo: 100px; }
.logo__somi {
  display: flex; align-items: center; gap: calc(var(--logo) * .22);
  font-weight: 700; letter-spacing: .18em;
  font-size: calc(var(--logo) * .42);
  margin-bottom: calc(var(--logo) * .08);
}
.logo__line { display: block; width: calc(var(--logo) * .55); height: 2px; background: var(--violet-bright); box-shadow: 0 0 8px var(--violet-glow); border-radius: 2px; }
.logo__title { display: flex; align-items: baseline; gap: calc(var(--logo) * .18); font-size: var(--logo); font-weight: 900; }
.logo__funny {
  font-style: italic; font-weight: 900; color: #c04dff;
  text-shadow: 0 .04em 0 #5b1aa8, 0 .08em 0 #3b0f73, 0 0 24px rgba(196, 92, 255, 0.45);
  padding-right: .04em;
}
.logo__award { color: #fff; text-shadow: 0 .04em 0 #b08cf0, 0 .08em 0 #5a2d9d, 0 0 20px rgba(255, 255, 255, 0.15); }
.logo__year {
  margin-top: calc(var(--logo) * .22);
  font-size: calc(var(--logo) * .4); font-weight: 700; letter-spacing: .26em;
  padding: calc(var(--logo) * .08) calc(var(--logo) * .34) calc(var(--logo) * .08) calc(var(--logo) * .5);
  border: 2px solid var(--violet-bright); border-radius: 999px;
  box-shadow: var(--shadow-glow), inset 0 0 12px rgba(196, 92, 255, 0.25);
}
.logo__sparks, .logo__crown { position: absolute; fill: none; stroke: #c04dff; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px rgba(196, 92, 255, 0.6)); }
.logo__sparks { width: calc(var(--logo) * .62); height: calc(var(--logo) * .62); left: calc(var(--logo) * -.42); top: calc(var(--logo) * .5); stroke-width: 4; }
.logo__crown { width: calc(var(--logo) * .85); height: calc(var(--logo) * .75); right: calc(var(--logo) * .02); top: calc(var(--logo) * -.34); stroke-width: 3; transform: rotate(10deg); }
.logo__crown circle { fill: #c04dff; stroke: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  border: 0; border-radius: 999px; padding: .85em 1.6em;
  font-weight: 800; letter-spacing: .01em;
  transition: transform .12s ease, box-shadow .2s ease;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary {
  color: #fff;
  background: linear-gradient(90deg, #9b2cf5 0%, #c24dff 55%, #d05cff 100%);
  border: 2px solid rgba(240, 200, 255, 0.85);
  box-shadow: 0 0 0 4px rgba(170, 60, 255, 0.28), 0 0 34px rgba(196, 92, 255, 0.6), inset 0 2px 0 rgba(255, 255, 255, 0.25);
  text-shadow: 0 2px 0 rgba(70, 10, 130, 0.5);
}
.btn-primary:hover { box-shadow: 0 0 0 4px rgba(170, 60, 255, 0.4), 0 0 44px rgba(196, 92, 255, 0.8), inset 0 2px 0 rgba(255, 255, 255, 0.25); }
.btn-primary .btn__divider { width: 2px; height: 1.2em; background: rgba(255, 255, 255, 0.7); border-radius: 2px; }
.btn-primary .ico { stroke-width: 2.2; }
.btn-secondary {
  color: var(--text-2); background: rgba(60, 25, 105, 0.5);
  border: 1.5px solid var(--row-border); box-shadow: 0 0 14px rgba(196, 92, 255, 0.2);
}
.btn-secondary:hover { border-color: var(--violet-bright); color: #fff; }
.btn-ghost { background: transparent; border: 1.5px solid rgba(255, 255, 255, 0.18); color: var(--text-3); }
.btn-ghost:hover { color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.btn-danger { background: rgba(190, 30, 80, 0.25); border: 1.5px solid rgba(255, 80, 120, 0.6); color: #ffd0dc; }
.btn-block { width: 100%; }

/* ---------- Pills & Ribbons ---------- */
.pill {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .45em 1.1em; border-radius: 999px;
  border: 2px solid var(--violet-bright); font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  background: rgba(45, 12, 85, 0.65); box-shadow: var(--shadow-glow);
}
.pill--solid { background: linear-gradient(90deg, #8a2be2, #c04dff); border-color: rgba(240, 200, 255, 0.7); text-transform: none; letter-spacing: 0; }
.ribbon {
  display: inline-block; padding: .45em 1.6em; font-weight: 800;
  background: linear-gradient(90deg, #8a2be2, #c84dff);
  transform: skewX(-12deg); box-shadow: 0 0 20px rgba(196, 92, 255, 0.5);
}
.ribbon > span { display: inline-block; transform: skewX(12deg); }

/* ---------- Karten, Listen ---------- */
.card {
  background: var(--card); border: 2px solid var(--card-border); border-radius: 22px;
  box-shadow: var(--shadow-glow), inset 0 0 30px rgba(120, 50, 200, 0.18);
}
.divider-v { width: 2px; align-self: stretch; background: rgba(255, 255, 255, 0.35); border-radius: 2px; }

.search {
  position: relative; display: flex; align-items: center; gap: .7em;
  border: 2px solid var(--violet-bright); border-radius: 999px; padding: 0 1.1em;
  background: rgba(40, 12, 75, 0.7); box-shadow: var(--shadow-glow);
}
.search .ico { width: 1.4em; height: 1.4em; color: #fff; stroke-width: 2.2; }
.search input { flex: 1; background: transparent; border: 0; outline: 0; color: #fff; padding: .95em 0; font-size: 1.05rem; font-weight: 500; min-width: 0; }
.search input::placeholder { color: rgba(255, 255, 255, 0.55); }

.row {
  display: flex; align-items: center; gap: .9em;
  width: 100%; text-align: left;
  padding: .55em .9em .55em .55em; border-radius: 16px;
  background: var(--row); border: 1.5px solid var(--row-border);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.row:hover { border-color: var(--violet-bright); }
.row.is-selected { border-color: #e2b4ff; background: rgba(90, 30, 150, 0.6); box-shadow: 0 0 18px rgba(196, 92, 255, 0.55); }
.row__name { flex: 1; font-weight: 700; font-size: 1.1rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row__meta { font-size: .78rem; color: var(--text-3); font-weight: 500; }
.radio {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; flex: none;
  display: grid; place-items: center; color: #fff;
}
.radio .ico { width: 16px; height: 16px; stroke-width: 3; opacity: 0; transform: scale(.4); transition: all .15s; }
.is-selected .radio { background: #c04dff; border-color: #f3d4ff; box-shadow: 0 0 12px var(--violet-glow); }
.is-selected .radio .ico { opacity: 1; transform: scale(1); }

/* ---------- Avatare ---------- */
.avatar {
  width: 52px; height: 52px; border-radius: 50%; overflow: hidden; flex: none;
  display: grid; place-items: center; font-weight: 800; letter-spacing: .02em;
  background: #2b1150; border: 2px solid rgba(255, 255, 255, 0.5);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--initials { background: hsl(var(--h) 55% 38%); color: #fff; font-size: 1.05rem; }

/* ---------- Timer-Ring ---------- */
.timer { position: relative; width: var(--size); height: var(--size); flex: none; }
.timer svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.timer__track { fill: none; stroke: rgba(120, 60, 200, 0.35); }
.timer__bar { fill: none; stroke-linecap: round; transition: stroke-dashoffset .25s linear; filter: drop-shadow(0 0 8px rgba(196, 92, 255, 0.7)); }
.timer::before {
  content: ""; position: absolute; inset: 9%; border-radius: 50%;
  background: radial-gradient(circle, rgba(70, 25, 120, 0.85), rgba(25, 8, 45, 0.95));
  box-shadow: inset 0 0 24px rgba(196, 92, 255, 0.35);
}
.timer__inner { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1; }
.timer__num { font-size: calc(var(--size) * .36); font-weight: 900; }
.timer__unit { font-size: calc(var(--size) * .15); font-weight: 700; margin-top: calc(var(--size) * .04); }
.timer.is-low .timer__num { color: #ff7ad9; animation: pulse 1s ease-in-out infinite; }
.timer.is-done .timer__num { color: #ff7ad9; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }

/* ---------- Fortschritts-Punkte ---------- */
.dots { display: flex; align-items: center; --dot: 40px; }
.dot {
  position: relative; width: var(--dot); height: var(--dot); border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 800; font-size: calc(var(--dot) * .42);
  background: #1a0b2f; border: 2px solid rgba(190, 120, 255, 0.75); color: #fff;
}
.dot + .dot { margin-left: calc(var(--dot) * .5); }
.dot + .dot::before { content: ""; position: absolute; right: 100%; top: 50%; width: calc(var(--dot) * .5); height: 2px; background: rgba(190, 120, 255, 0.6); }
.dot.is-current { background: linear-gradient(135deg, #a855f7, #d946ef); border-color: #f0ccff; box-shadow: 0 0 16px var(--violet-glow); }
.dot.is-done { background: #3f1b70; border-color: rgba(190, 120, 255, 0.4); color: var(--text-3); }

/* ---------- Statistik-Spalten ---------- */
.stats { display: flex; align-items: stretch; justify-content: center; }
.stat { flex: 1; display: grid; justify-items: center; text-align: center; padding: 0 .6em; gap: .25em; }
.stat + .stat { border-left: 1.5px solid rgba(255, 255, 255, 0.35); }
.stat .ico { width: 2.2em; height: 2.2em; color: #d8a9ff; stroke-width: 1.5; filter: drop-shadow(0 0 6px rgba(196, 92, 255, 0.5)); }
.stat__value { font-weight: 800; font-size: 1.6em; line-height: 1.1; }
.stat__label { font-size: .85em; color: var(--text-2); font-weight: 500; }

/* ---------- Platzhalter vor der Enthüllung ---------- */
.question-mark { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; font-weight: 900; flex: none;
  background: #2b1150; border: 3px dashed rgba(216, 169, 255, 0.6); color: #d8a9ff; }

/* ---------- Balken ---------- */
.bar { display: block; height: 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #9b2cf5, #e879f9); box-shadow: 0 0 10px var(--violet-glow); transition: width .8s ease; }

/* ---------- QR ---------- */
.qr-box { background: #fff; border-radius: 22px; padding: 6%; box-shadow: 0 0 0 3px rgba(196, 92, 255, 0.35), 0 0 30px rgba(196, 92, 255, 0.5); }
.qr { width: 100%; height: auto; display: block; }

/* ---------- Konfetti-Canvas ---------- */
.confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; }

/* ---------- Hilfsklassen ---------- */
.muted { color: var(--text-3); }
.accent { color: var(--violet-bright); }
.center { text-align: center; }
.fade-in { animation: fadeIn .4s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.pop-in { animation: popIn .55s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes popIn { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Anmelde-Overlay (Admin-Seiten) ---------- */
.gate { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: rgba(11, 5, 19, 0.94); padding: 16px; }
.gate__box { width: min(420px, 100%); padding: 28px; display: grid; gap: 12px; text-align: center; }
.gate__box h1 { margin: 6px 0 0; font-size: 24px; }
.gate__box p { margin: 0; color: var(--text-2); }
.gate__box input { text-align: center; font-size: 20px; font-weight: 700; border: 2px solid var(--violet-bright); background: rgba(40, 12, 75, 0.75); color: #fff; border-radius: 14px; padding: 12px; outline: 0; }
.gate__error { color: #ff8ab8; font-weight: 700; min-height: 1.2em; }
.conn-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 150; text-align: center; padding: 8px 12px; font-size: 13px; font-weight: 700; background: #7a1d4d; color: #fff; }
