/* Gronau Plus Halloween Challenge – dunkles Design mit Gronau-Plus-Grün */
@font-face { font-family: "Sora"; font-weight: 600 800; font-display: swap; src: url(/fonts/sora.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400 700; font-display: swap; src: url(/fonts/inter.woff2) format("woff2"); }

:root {
  --bg: #0E1316;
  --bg-2: #141B1F;
  --card: #1A2328;
  --card-2: #212C32;
  --line: rgba(232, 234, 235, 0.10);
  --text: #E8EAEB;
  --muted: #A9B3B8;       /* ≥ 4,5:1 auf --bg und --card */
  --lime: #8CC63F;
  --green: #1E9B52;
  --green-text: #5FD08E;
  --orange: #F0A14B;      /* dezentes Kürbis-Orange, nur als Akzent */
  --red: #FF8A7A;
  --radius: 20px;
  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.55 var(--font-body);
  background-image:
    radial-gradient(900px 500px at 85% -10%, rgba(140, 198, 63, 0.10), transparent 60%),
    radial-gradient(700px 420px at -10% 30%, rgba(30, 155, 82, 0.08), transparent 60%);
  background-attachment: fixed;
}
a { color: var(--lime); text-underline-offset: 3px; }
a:hover { color: #A6DB5E; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 7vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.35rem, 4vw, 1.75rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.hidden { display: none !important; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; border-radius: 6px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--lime); color: #0E1316; padding: 8px 14px; border-radius: 10px; z-index: 100; }
.skip-link:focus { left: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* Kopf */
.top { position: sticky; top: 0; z-index: 40; background: rgba(14, 19, 22, 0.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 700 1.05rem var(--font-display); }
.brand img { width: 32px; height: 32px; border-radius: 9px; background: #fff; padding: 3px; }
.brand span small { display: block; font: 500 .72rem var(--font-body); color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }

/* Knöpfe */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px;
  border-radius: 999px; border: 1px solid transparent; font: 600 .95rem var(--font-body); cursor: pointer;
  text-decoration: none; transition: background .15s, scale .1s, opacity .15s;
}
.btn:active { scale: .97; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--lime); color: #10180A; }
.btn-primary:hover:not([disabled]) { background: #A0D656; color: #10180A; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover:not([disabled]) { background: rgba(255,255,255,.06); color: var(--text); }
.btn-danger { background: transparent; color: var(--red); border-color: rgba(255,138,122,.4); }
.btn-small { min-height: 36px; padding: 6px 14px; font-size: .875rem; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* Hero */
.hero { padding: 48px 0 28px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 600 .78rem var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--lime); margin-bottom: 14px; }
.eyebrow svg { width: 16px; height: 16px; }
.hero h1 .accent { color: var(--lime); }
.hero .lead { font-size: 1.1rem; color: var(--muted); max-width: 640px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font: 600 .8rem var(--font-body); background: rgba(140,198,63,.14); color: var(--lime); }
.pill.warn { background: rgba(240,161,75,.15); color: var(--orange); }
.pill.off { background: rgba(255,255,255,.08); color: var(--muted); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 520px; margin: 26px 0 10px; }
.countdown div { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 6px; text-align: center; }
.countdown b { display: block; font: 800 clamp(1.6rem, 6vw, 2.4rem)/1 var(--font-display); color: var(--text); font-variant-numeric: tabular-nums; }
.countdown span { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

/* Karten / Raster */
section { padding: 22px 0; }
.grid { display: grid; gap: 16px; }
@media (min-width: 820px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-main { grid-template-columns: 1.15fr .85fr; align-items: start; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card + .card { margin-top: 16px; }
.grid > .card + .card { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2, .card-head h3 { margin: 0; }
.icon-box { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(140,198,63,.14); color: var(--lime); flex: none; }
.icon-box svg { width: 22px; height: 22px; }

/* Preise */
.prizes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.prize { position: relative; overflow: hidden; background: linear-gradient(150deg, #1F3324, #16231B); border: 1px solid rgba(140,198,63,.25); border-radius: 18px; padding: 20px 16px; }
.prize b { display: block; font: 800 clamp(2rem, 8vw, 2.8rem)/1 var(--font-display); color: var(--lime); }
.prize > span:not([id]) { display: block; color: var(--muted); font-size: .9rem; margin-top: 6px; }
.prize svg { position: absolute; right: -10px; bottom: -14px; width: 84px; height: 84px; color: rgba(140,198,63,.12); }

/* Mein Stand */
.stat-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--card-2); border-radius: 16px; padding: 14px 16px; }
.stat b { display: block; font: 800 2.2rem/1.1 var(--font-display); color: var(--lime); font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .85rem; }
.checkin { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .grow strong { display: block; }
.reward { font: 700 .85rem var(--font-body); color: var(--lime); white-space: nowrap; }
.done { color: var(--green-text); font-weight: 600; font-size: .875rem; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.done svg { width: 16px; height: 16px; }
.task-form { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.task-form input { flex: 1; min-width: 150px; }

/* Formulare */
label { display: block; font-weight: 600; font-size: .9rem; margin: 12px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=datetime-local], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(232,234,235,.22);
  background: var(--bg-2); color: var(--text); font: 16px var(--font-body);
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--lime); outline: none; box-shadow: 0 0 0 3px rgba(140,198,63,.25); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 12px 0; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--lime); flex: none; }
.form-msg { min-height: 1.4em; margin: 10px 0 0; font-size: .9rem; }
.form-msg.err { color: var(--red); }
.form-msg.ok { color: var(--green-text); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Rangliste */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
th { font: 600 .78rem var(--font-body); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-top: 0; }
td.num, th.num { text-align: right; }
tr.me td { background: rgba(140,198,63,.08); }
.rank { font: 700 1rem var(--font-display); color: var(--muted); width: 3.2em; }
.rank.rank-top { color: var(--lime); }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; }
.table-scroll { overflow-x: auto; }

/* Partner / Ergebnis */
.partner { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 16px; background: var(--card-2); margin-top: 10px; }
.avatar { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: rgba(140,198,63,.16); color: var(--lime); font: 800 1.2rem var(--font-display); flex: none; text-transform: uppercase; }
.winner-card { background: linear-gradient(150deg, #203A26, #142019); border-color: rgba(140,198,63,.4); }
.winner-names { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.winner-names .partner { margin: 0; flex: 1; min-width: 200px; }

/* Ablauf */
.steps { counter-reset: s; display: grid; gap: 12px; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.step::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(140,198,63,.14); color: var(--lime); font: 800 1rem var(--font-display); margin-bottom: 10px; }
.step p { color: var(--muted); font-size: .92rem; margin: 0; }

.rules li { margin-bottom: 8px; }
.notice { border-left: 3px solid var(--orange); background: rgba(240,161,75,.08); padding: 12px 14px; border-radius: 10px; margin: 12px 0; }
.notice.ok { border-color: var(--lime); background: rgba(140,198,63,.08); }

/* Werbung Gronau Plus */
.promo { display: grid; gap: 18px; align-items: center; background: linear-gradient(135deg, #1E9B52, #0F7A3E); color: #fff; border-radius: 24px; padding: 26px; }
@media (min-width: 820px) { .promo { grid-template-columns: auto 1fr auto; } }
.promo img { width: 64px; height: 64px; border-radius: 16px; background: #fff; padding: 6px; }
.promo h2 { margin: 0 0 4px; color: #fff; }
.promo p { margin: 0; color: rgba(255,255,255,.88); }
.promo .btn { background: #fff; color: #0F5E30; }
.promo .btn:hover { background: #F0F7EC; color: #0F5E30; }

/* Fuß */
footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 26px 0 40px; color: var(--muted); font-size: .9rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
footer a { color: var(--muted); }
footer a:hover { color: var(--text); }

/* Dialog */
.backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(5, 8, 10, .7); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
@media (min-width: 640px) { .backdrop { align-items: center; } }
.sheet { background: var(--card); border: 1px solid var(--line); width: 100%; max-width: 440px; max-height: 92vh; overflow-y: auto; border-radius: 22px 22px 0 0; padding: 22px; animation: up .2s; }
@media (min-width: 640px) { .sheet { border-radius: 22px; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.sheet-head h2 { margin: 0; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: transparent; color: var(--text); border: 0; cursor: pointer; }
.icon-btn:hover { background: rgba(255,255,255,.06); }
.icon-btn svg { width: 22px; height: 22px; }
.tabs { display: flex; gap: 6px; background: var(--bg-2); padding: 4px; border-radius: 999px; margin: 12px 0 4px; }
.tabs button { flex: 1; min-height: 40px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: 600 .9rem var(--font-body); cursor: pointer; }
.tabs button[aria-selected=true] { background: var(--card-2); color: var(--text); }
.linkish { background: none; border: 0; color: var(--lime); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px 0; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(24px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 20px; translate: -50% 0; z-index: 95; background: var(--card-2); border: 1px solid var(--line); color: var(--text); padding: 12px 18px; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.4); max-width: calc(100% - 32px); animation: up .2s; }
.toast.ok { border-color: rgba(140,198,63,.5); }
.toast.err { border-color: rgba(255,138,122,.5); }

/* Verstecktes Symbol: bewusst unauffällig, aber echte Schaltfläche */
.hidden-symbol { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: rgba(140,198,63,.38); cursor: pointer; vertical-align: middle; }
.hidden-symbol:hover, .hidden-symbol:focus-visible { color: var(--lime); background: rgba(140,198,63,.1); }
.hidden-symbol svg { width: 20px; height: 20px; }

/* Skelett beim Laden */
.skeleton { background: linear-gradient(90deg, var(--card-2), #28343B, var(--card-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 10px; height: 1.2em; margin: 8px 0; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Rechtstexte */
.legal { max-width: 760px; padding-top: 32px; }
.legal h2 { margin-top: 1.6em; font-size: 1.2rem; }
.legal p, .legal li { color: #D5DADC; }
.legal .stand { color: var(--muted); }
.legal table td, .legal table th { border-top: 1px solid var(--line); }

/* Admin */
.admin-grid { display: grid; gap: 16px; }
@media (min-width: 900px) { .admin-grid { grid-template-columns: 1fr 1fr; } .span-2 { grid-column: span 2; } }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.form-grid { display: grid; gap: 0 14px; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .full { grid-column: span 2; } }
.flag { display: inline-block; font-size: .78rem; padding: 2px 8px; border-radius: 999px; background: rgba(240,161,75,.15); color: var(--orange); margin: 2px 4px 2px 0; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.audit { max-height: 420px; overflow-y: auto; font-size: .85rem; }
.audit td { vertical-align: top; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; word-break: break-all; }
.mt { margin-top: 16px; }

.grid > *, .admin-grid > * { min-width: 0; }
.legal h1 { font-size: clamp(1.6rem, 7vw, 2.6rem); overflow-wrap: anywhere; }
.legal { overflow-wrap: anywhere; }
svg.inline { width: 20px; height: 20px; vertical-align: -3px; }
.payout { align-items: flex-start; }
.payout .grow { flex: 1; min-width: 0; }
#prize-note { margin-top: 12px; }

/* ===================== Halloween-Schicht (nur öffentliche Seiten: body.spooky) ===================== */
@font-face { font-family: "Creepster"; font-weight: 400; font-display: swap; src: url(/fonts/creepster.woff2) format("woff2"); }

.spooky {
  --bg: #0B0812;
  --bg-2: #150F20;
  --card: rgba(26, 19, 38, .88);
  --card-2: #241A33;
  --line: rgba(255, 170, 90, .14);
  --text: #F1ECF7;
  --muted: #B8AECB;          /* ≥ 4,5:1 auf --bg/--card */
  --pumpkin: #FF8A1F;
  --pumpkin-2: #FF5F00;
  --slime: #9BE15D;
  --lime: #9BE15D;
  --font-spooky: "Creepster", "Sora", system-ui, sans-serif;
  background:
    radial-gradient(1200px 700px at 50% -200px, #2A1745 0%, transparent 70%),
    radial-gradient(800px 500px at 100% 40%, rgba(255, 110, 20, .07), transparent 70%),
    radial-gradient(700px 500px at 0% 75%, rgba(120, 220, 80, .06), transparent 70%),
    #0B0812;
  background-attachment: fixed;
}
.spooky a { color: var(--pumpkin); }
.spooky a:hover { color: #FFB066; }
.spooky :focus-visible { outline-color: var(--pumpkin); }

/* Kopfleiste mit Schleim-Tropfen */
.spooky .top { background: rgba(11, 8, 18, .86); border-bottom: 0; }
.spooky .top::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 16px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 16'%3E%3Cpath fill='%239BE15D' d='M0 0h120v3c-6 0-7 2-8 6s-2 6-4 6-3-3-3-6-2-5-6-5-6 2-8 4-2 3-4 3-2-2-2-4-3-4-9-4-9 1-11 6-3 8-5 8-3-4-3-7-2-6-8-6-10 1-12 3-2 2-4 2-3-1-4-2-4-1-6 0V0z'/%3E%3C/svg%3E") repeat-x;
  background-size: 120px 16px; opacity: .85; filter: drop-shadow(0 2px 6px rgba(155, 225, 93, .35));
}
.spooky .brand small { color: var(--slime); }

/* Szene oben: Sternenhimmel, Mond, Fledermäuse, Nebel, Friedhof */
.hero-zone { position: relative; overflow: hidden; isolation: isolate; }
.night { position: absolute; inset: 0; z-index: -1; }
.stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff 60%, transparent), radial-gradient(1px 1px at 28% 8%, #fff 60%, transparent),
    radial-gradient(1.5px 1.5px at 44% 26%, #fff 60%, transparent), radial-gradient(1px 1px at 61% 12%, #fff 60%, transparent),
    radial-gradient(1px 1px at 74% 30%, #fff 60%, transparent), radial-gradient(1.5px 1.5px at 88% 6%, #fff 60%, transparent),
    radial-gradient(1px 1px at 6% 42%, #fff 60%, transparent), radial-gradient(1px 1px at 35% 48%, #fff 60%, transparent),
    radial-gradient(1px 1px at 52% 4%, #fff 60%, transparent), radial-gradient(1.5px 1.5px at 94% 38%, #fff 60%, transparent),
    radial-gradient(1px 1px at 19% 60%, #fff 60%, transparent), radial-gradient(1px 1px at 81% 55%, #fff 60%, transparent);
  opacity: .7; animation: twinkle 5s ease-in-out infinite alternate;
}
@keyframes twinkle { to { opacity: .35; } }
.moon {
  position: absolute; top: 18px; right: 12px; width: 70px; height: 70px; border-radius: 50%;
  background:
    radial-gradient(circle at 34% 38%, rgba(190, 160, 90, .35) 0 7%, transparent 8%),
    radial-gradient(circle at 62% 64%, rgba(190, 160, 90, .3) 0 10%, transparent 11%),
    radial-gradient(circle at 66% 28%, rgba(190, 160, 90, .25) 0 5%, transparent 6%),
    radial-gradient(circle at 40% 40%, #FFF8DC, #F5D98B 70%, #E8B957);
  box-shadow: 0 0 40px 10px rgba(255, 214, 120, .35), 0 0 140px 50px rgba(255, 170, 60, .12);
}
@media (min-width: 820px) { .moon { width: 130px; height: 130px; top: 40px; right: 8%; } }
.bats { position: absolute; inset: 0; width: 100%; height: 100%; fill: #05030A; }
.bat { animation: fly 16s linear infinite; }
.bat.b2 { animation-duration: 22s; animation-delay: -8s; }
.bat.b3 { animation-duration: 19s; animation-delay: -14s; }
.wing { transform-box: fill-box; transform-origin: center; animation: flap .35s ease-in-out infinite alternate; }
@keyframes flap { to { transform: scaleY(.35); } }
@keyframes fly {
  0% { transform: translate(-40px, 60px) scale(1.1); }
  25% { transform: translate(90px, 30px) scale(1.1); }
  50% { transform: translate(210px, 70px) scale(.9); }
  75% { transform: translate(320px, 25px) scale(.9); }
  100% { transform: translate(440px, 55px) scale(1); }
}
.bat.b2 { opacity: .8; }
.bat.b3 { opacity: .6; }
.fog { position: absolute; left: -30%; right: -30%; bottom: 40px; height: 160px; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(180, 160, 220, .16), transparent 65%); filter: blur(8px); animation: drift 26s ease-in-out infinite alternate; }
.fog.f2 { bottom: 0; height: 120px; animation-duration: 34s; animation-direction: alternate-reverse; background: radial-gradient(ellipse at 30% 50%, rgba(155, 225, 93, .10), transparent 60%); }
@keyframes drift { to { translate: 12% 0; } }
.graveyard { display: block; width: 100%; height: 110px; margin-top: -10px; }
@media (min-width: 820px) { .graveyard { height: 160px; } }
.graveyard .sil { fill: #05030A; }
.graveyard .tree { fill: none; stroke: #05030A; stroke-width: 6; stroke-linecap: round; }
.graveyard .windows { fill: #FFB347; filter: drop-shadow(0 0 6px #FF8A1F); animation: flicker 4s infinite; }
.graveyard .pumpkin-s { fill: var(--pumpkin); filter: drop-shadow(0 0 8px rgba(255, 138, 31, .8)); }
.graveyard .pumpkin-face { fill: #FFE08A; }
@keyframes flicker { 0%, 100% { opacity: 1; } 42% { opacity: .85; } 45% { opacity: .55; } 48% { opacity: .95; } 70% { opacity: .8; } }

/* Hero-Text */
.spooky .hero { position: relative; padding: 40px 0 6px; }
.spooky .eyebrow { color: var(--slime); max-width: calc(100% - 90px); }
@media (min-width: 820px) { .spooky .eyebrow { max-width: none; } }
.spooky h1 { font-family: var(--font-spooky); font-weight: 400; letter-spacing: .02em; line-height: 1.02; font-size: clamp(2.6rem, 11vw, 5rem); }
.h1-line { display: block; }
.spooky h1 { color: #F6EFFF; text-shadow: 0 3px 0 #3B1D5C, 0 0 24px rgba(160, 100, 255, .25); }
.spooky .hero h1 .accent { color: var(--pumpkin); text-shadow: 0 3px 0 #5A1E00, 0 0 22px rgba(255, 120, 20, .55); }
.spooky .hero .lead { color: #D3CAE2; }
.spooky .pill { background: rgba(155, 225, 93, .14); color: var(--slime); }
.ghost { position: absolute; right: 4%; bottom: 40px; width: 70px; fill: rgba(240, 235, 255, .85); display: none;
  filter: drop-shadow(0 0 16px rgba(220, 210, 255, .5)); animation: hover-ghost 4s ease-in-out infinite; }
.ghost circle, .ghost ellipse { fill: #1A1028; }
@media (min-width: 820px) { .ghost { display: block; } }
@keyframes hover-ghost { 50% { translate: 0 -14px; rotate: -4deg; } }

/* Countdown: glühende Kürbis-Ziffern */
.spooky .countdown div {
  background: linear-gradient(180deg, #2B1A12, #170E14); border: 1px solid rgba(255, 138, 31, .4);
  box-shadow: inset 0 0 18px rgba(255, 110, 20, .18), 0 6px 20px rgba(0, 0, 0, .4);
}
.spooky .countdown b { color: #FFB45C; text-shadow: 0 0 10px rgba(255, 120, 20, .8), 0 0 26px rgba(255, 90, 0, .45); }
.spooky .countdown span { color: #E8C9A8; }
.spooky #cd-s { animation: flicker 3s infinite; }

/* Überschriften der Abschnitte */
.spooky h2 { font-family: var(--font-spooky); font-weight: 400; letter-spacing: .03em; font-size: clamp(1.7rem, 5vw, 2.2rem); color: var(--pumpkin); text-shadow: 0 2px 0 #3A1400; }
.spooky .sheet h2, .spooky .legal h2 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em; font-size: 1.3rem; color: var(--text); text-shadow: none; }
.spooky .legal h1 { font-size: clamp(2rem, 9vw, 3.2rem); }

/* Karten mit Spinnweben-Ecke */
.spooky .card, .spooky .step { position: relative; backdrop-filter: blur(6px); box-shadow: 0 10px 40px rgba(0, 0, 0, .35); }
.spooky .card::after, .spooky .step::after {
  content: ""; position: absolute; top: 0; right: 0; width: 90px; height: 90px; pointer-events: none; border-top-right-radius: inherit;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='none' stroke='%23ffffff' stroke-opacity='.22' stroke-width='.9'%3E%3Cpath d='M100 0L22 0M100 0L38 42M100 0L64 70M100 0L100 82M100 0L78 26'/%3E%3Cpath d='M90 0Q91 7 100 10M78 0Q80 15 100 22M63 0Q67 27 100 37M48 0Q55 40 100 53M34 0Q44 53 100 70'/%3E%3C/svg%3E") no-repeat top right / contain;
}
.spooky .winner-card { background: linear-gradient(150deg, #3A1D06, #1C0F18); border-color: rgba(255, 138, 31, .55); box-shadow: 0 0 40px rgba(255, 110, 20, .25); }
.spooky .icon-box { background: rgba(255, 138, 31, .14); color: var(--pumpkin); }
.spooky .reward { color: var(--slime); }
.spooky .stat b { color: var(--pumpkin); text-shadow: 0 0 14px rgba(255, 120, 20, .45); }
.spooky .rank.rank-top { color: var(--pumpkin); }
.spooky tr.me td { background: rgba(255, 138, 31, .10); }
.spooky .avatar { background: rgba(255, 138, 31, .16); color: var(--pumpkin); }
.spooky .step::before { background: radial-gradient(circle at 40% 35%, #FFB45C, #E25E00); color: #2A0F00; box-shadow: 0 0 14px rgba(255, 120, 20, .5); }

/* Knöpfe: Kürbis-Glühen */
.spooky .btn-primary { background: linear-gradient(180deg, #FF9A33, #FF6A00); color: #200C00; box-shadow: 0 0 0 1px rgba(255, 190, 120, .4) inset, 0 6px 22px rgba(255, 106, 0, .35); }
.spooky .btn-primary:hover:not([disabled]) { background: linear-gradient(180deg, #FFAE57, #FF7A14); color: #200C00; box-shadow: 0 0 0 1px rgba(255, 210, 150, .5) inset, 0 8px 28px rgba(255, 106, 0, .5); }
.spooky .btn-ghost { border-color: rgba(255, 170, 90, .28); }
.spooky input:focus, .spooky select:focus, .spooky textarea:focus { border-color: var(--pumpkin); box-shadow: 0 0 0 3px rgba(255, 138, 31, .25); }
.spooky .check input { accent-color: var(--pumpkin); }
.spooky .tabs button[aria-selected=true] { background: #3A2552; }
.spooky .linkish { color: var(--pumpkin); }

/* Preise: leuchtende Kürbisse */
.spooky .prize { background: radial-gradient(circle at 80% 90%, rgba(255, 120, 20, .35), transparent 60%), linear-gradient(150deg, #2E1608, #170C14); border-color: rgba(255, 138, 31, .45); min-height: 150px; }
.spooky .prize b { font-family: var(--font-spooky); font-weight: 400; color: #FFC071; font-size: clamp(2.6rem, 11vw, 3.6rem); text-shadow: 0 0 18px rgba(255, 120, 20, .7); position: relative; z-index: 1; }
.spooky .prize > span:not([id]) { color: #EAD3BC; position: relative; z-index: 1; }
.lantern { position: absolute; right: -6px; bottom: -8px; width: 92px; height: 92px; filter: drop-shadow(0 0 16px rgba(255, 120, 20, .7)); animation: lantern-glow 3.2s ease-in-out infinite; }
.lantern .pk { fill: #FF7A1A; } .lantern .pk2 { fill: #D9530A; } .lantern .stem { fill: #4E7A2A; }
.lantern .face { fill: #FFE07A; }
@keyframes lantern-glow { 50% { filter: drop-shadow(0 0 26px rgba(255, 150, 40, .95)); } 53% { filter: drop-shadow(0 0 8px rgba(255, 120, 20, .5)); } 56% { filter: drop-shadow(0 0 22px rgba(255, 150, 40, .9)); } }
@media (min-width: 820px) { .lantern { width: 120px; height: 120px; } }

/* Dialoge, Toast, Hinweise im Halloween-Stil */
.spooky .sheet { background: #1A1226; border-color: rgba(255, 170, 90, .2); }
.spooky .toast { background: #241A33; }
.spooky .notice.ok { border-color: var(--slime); background: rgba(155, 225, 93, .08); }
.spooky .hidden-symbol { color: rgba(255, 138, 31, .4); }
.spooky .hidden-symbol:hover, .spooky .hidden-symbol:focus-visible { color: var(--pumpkin); background: rgba(255, 138, 31, .12); }
.spooky footer { border-top-color: rgba(255, 170, 90, .14); }
.spooky .brand { color: var(--text); }
.spooky .bats { fill: #1A0F2B; filter: drop-shadow(0 0 5px rgba(200, 150, 255, .45)); }

/* ===================== Teams, App-Kasten, Animationen ===================== */
.status-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.live-stats { display: inline-flex; gap: 14px; font-size: .9rem; color: var(--muted); }
.live-stats b { color: var(--text); font-family: var(--font-display); }

/* Suche nach Partner */
.searching { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 16px; border: 1px dashed rgba(255, 170, 90, .4); background: rgba(255, 138, 31, .06); }
.cauldron { width: 42px; height: 42px; display: grid; place-items: center; color: var(--pumpkin, var(--orange)); flex: none; animation: bob 1.6s ease-in-out infinite; }
.cauldron svg { width: 34px; height: 34px; filter: drop-shadow(0 0 8px rgba(255, 120, 20, .6)); }
@keyframes bob { 50% { translate: 0 -6px; rotate: 6deg; } }

/* Team-Karte */
.team-card { border-radius: 18px; padding: 16px; background: linear-gradient(160deg, rgba(90, 40, 140, .35), rgba(255, 110, 20, .12)); border: 1px solid rgba(255, 170, 90, .3); }
.team-head { display: flex; justify-content: space-between; align-items: center; }
.team-head .eyebrow { margin: 0; }
.team-no { font: 700 .8rem var(--font-body); color: var(--muted); }
.duo { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 14px 0 10px; }
.duo-person { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; flex: 1; text-align: center; }
.duo-person strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.duo-amp { font: 400 2rem var(--font-spooky, var(--font-display)); color: var(--pumpkin, var(--orange)); text-shadow: 0 0 12px rgba(255, 120, 20, .6); }
.avatar.big { width: 58px; height: 58px; font-size: 1.5rem; }
.avatar.huge { width: 92px; height: 92px; font-size: 2.4rem; }
.avatar.mini { width: 26px; height: 26px; font-size: .75rem; border: 2px solid var(--card-2); }
.avatar.partner-av { background: rgba(155, 225, 93, .18); color: var(--slime, var(--lime)); }
.team-meter { height: 10px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.team-meter-bar { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #9BE15D, #FF8A1F); box-shadow: 0 0 12px rgba(255, 138, 31, .6); transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.team-stats { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 10px 0 0; color: var(--muted); }
.team-stats b { color: var(--text); }

/* Rangliste mit Teams */
.lb-team { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lb-avatars { display: flex; flex: none; }
.lb-avatars .avatar + .avatar { margin-left: -8px; }
.lb-names { display: block; font-weight: 600; overflow-wrap: anywhere; }
.lb-sub { display: block; font-size: .78rem; color: var(--muted); }
td.num b { font-family: var(--font-display); font-size: 1.05rem; }

/* App-Kasten */
.app-box { border-top: 1px solid var(--line); padding-top: 14px; }
.app-box-row { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.app-box-row .grow { flex: 1; min-width: 0; }
.app-box-row strong { display: block; }
.install-steps { padding-left: 1.2em; margin: 8px 0 14px; }
.install-steps li { margin-bottom: 10px; }
.kbd { display: inline-grid; place-items: center; vertical-align: middle; width: 28px; height: 28px; border-radius: 8px; background: rgba(255, 255, 255, .08); margin-left: 4px; }

/* Partner-Enthüllung */
.reveal-backdrop { background: radial-gradient(circle at 50% 35%, rgba(60, 22, 100, .94), rgba(5, 3, 10, .97) 70%); backdrop-filter: blur(6px); align-items: center !important; }
.sheet.reveal { text-align: center; background: transparent; border: 0; overflow: visible; max-width: 420px; border-radius: 22px; }
.reveal-stage { position: relative; height: 150px; margin-bottom: 6px; }
.reveal-glow { position: absolute; left: 50%; top: 50%; width: 160px; height: 160px; translate: -50% -50%; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 150, 40, .7), transparent 65%); opacity: 0; animation: glow-in .6s .85s ease-out forwards, glow-pulse 2s 1.5s ease-in-out infinite; }
.reveal-av { position: absolute; top: 50%; translate: 0 -50%; }
.reveal-av.left { left: 50%; animation: fly-left 1s cubic-bezier(.3, 1.4, .5, 1) both; }
.reveal-av.right { right: 50%; animation: fly-right 1s cubic-bezier(.3, 1.4, .5, 1) both; }
.reveal-av .avatar { box-shadow: 0 0 0 4px #0B0812, 0 0 30px rgba(255, 138, 31, .7); background: #2A1A3D; }
@keyframes fly-left { from { transform: translateX(-60vw) rotate(-30deg); } to { transform: translateX(-96px) rotate(0); } }
@keyframes fly-right { from { transform: translateX(60vw) rotate(30deg); } to { transform: translateX(96px) rotate(0); } }
@keyframes glow-in { to { opacity: 1; } }
@keyframes glow-pulse { 50% { scale: 1.15; opacity: .8; } }
.reveal-burst { position: absolute; left: 50%; top: 50%; }
.reveal-kicker { color: var(--slime, var(--lime)); text-transform: uppercase; letter-spacing: .1em; font: 600 .8rem var(--font-body); margin: 0 0 6px; animation: rise .5s 1s both; }
.sheet.reveal .reveal-title { font: 400 clamp(2.4rem, 11vw, 3.2rem)/1 var(--font-spooky, var(--font-display)); color: var(--pumpkin, var(--orange)); text-shadow: 0 3px 0 #5A1E00, 0 0 24px rgba(255, 120, 20, .6); margin: 0 0 10px; animation: rise .6s 1.1s both; }
.reveal-names { font-size: 1.2rem; margin-bottom: 10px; animation: rise .6s 1.25s both; }
.reveal-names span { color: var(--pumpkin, var(--orange)); margin: 0 6px; }
.sheet.reveal .muted, .sheet.reveal .btn { animation: rise .6s 1.4s both; }
.sheet.reveal .btn { margin-top: 8px; min-width: 180px; }
@keyframes rise { from { opacity: 0; translate: 0 14px; } }

/* Partikel */
.burst-holder { position: fixed; z-index: 96; pointer-events: none; width: 0; height: 0; }
.particle { position: absolute; left: -11px; top: -11px; width: 22px; height: 22px; animation: particle 1.2s cubic-bezier(.15, .7, .3, 1) both; }
.particle svg { width: 100%; height: 100%; }
.particle.p-pumpkin { color: #FF8A1F; } .particle.p-bat { color: #B28CFF; } .particle.p-moon { color: #FFE08A; }
@keyframes particle {
  0% { transform: translate(0, 0) scale(.3) rotate(0); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate(var(--dx), calc(var(--dy) + 40px)) scale(1) rotate(var(--rot)); opacity: 0; }
}
