/* screens.css — Landing, Score, Heavy-Fail + Screen-System. */

.screen { display: none; min-height: 100dvh; }
.screen.is-active { display: block; }
.screen:not(.screen--game) { animation: screenIn .5s var(--ease); }
@keyframes screenIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.eyebrow {
  font-size: .8rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 14px;
}
.text-link {
  display: inline-block; background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: .95rem; padding: 8px 4px; margin-top: 8px;
  border-bottom: 1px solid transparent; transition: color .2s var(--ease), border-color .2s var(--ease);
}
.text-link:hover { color: var(--gold); border-color: var(--line-gold); }

/* ===== Landing ===== */
.screen--landing { position: relative; display: none; overflow: hidden; }
.screen--landing.is-active { display: grid; place-items: center; }
.landing-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.landing-spot {
  position: absolute; top: -18%; left: 50%; transform: translateX(-50%);
  width: 120%; height: 90%;
  background: radial-gradient(48% 60% at 50% 0%, rgba(249,197,0,.16), rgba(249,197,0,.08) 24%, rgba(249,197,0,.03) 48%, transparent 72%);
}
.landing-floor {
  position: absolute; left: 0; right: 0; bottom: 0; height: 34%;
  background: radial-gradient(70% 120% at 50% 100%, rgba(249,197,0,.08), transparent 62%),
              linear-gradient(180deg, transparent, #050509);
}
.landing-inner {
  position: relative; z-index: 1; text-align: center;
  max-width: 660px; padding: clamp(40px, 8vh, 90px) 22px;
}
.landing-title {
  font-size: clamp(2.8rem, 9vw, 5rem); line-height: 1.02; letter-spacing: -.02em; margin-bottom: 20px;
}
.landing-pitch {
  color: var(--text-muted); font-size: clamp(1rem, 2.4vw, 1.16rem); line-height: 1.6;
  max-width: 560px; margin: 0 auto 30px; text-wrap: pretty;
}
.landing-facts {
  display: flex; justify-content: center; gap: clamp(18px, 5vw, 44px); margin-bottom: 34px; flex-wrap: wrap;
}
.fact { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.fact-num { font-family: var(--serif); font-weight: 600; font-size: 1.9rem; color: var(--gold); }
.fact-lbl { font-size: .78rem; color: var(--text-faint); letter-spacing: .02em; }
.landing-cta { font-size: 1.1rem; padding: 16px 40px; }
.landing-note { margin-top: 22px; color: var(--text-faint); font-size: .86rem; }
.landing-note a { color: var(--text-muted); text-decoration: underline; text-underline-offset: 2px; }
.landing-note a:hover { color: var(--gold); }

/* ===== Schwierigkeitswahl (Segmented Control) ===== */
.diff-label {
  font-size: .8rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 10px;
}
.difficulty-select {
  display: flex; gap: 8px; justify-content: center;
  max-width: 480px; margin: 10px auto 26px;
}
.diff-opt {
  position: relative; flex: 1 1 0; cursor: pointer;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}
.diff-opt input {
  position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none;
}
.diff-opt-inner {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 12px 14px;
}
.diff-name { font-weight: 700; font-size: .98rem; color: var(--text); }
.diff-hint { font-size: .72rem; color: var(--text-faint); }
.diff-opt:hover { border-color: var(--line-gold); }
.diff-opt:has(input:checked) {
  border-color: var(--line-gold);
  background: linear-gradient(150deg, rgba(249,197,0,.14), rgba(249,197,0,.03));
  box-shadow: 0 6px 20px -12px rgba(249,197,0,.6);
}
.diff-opt:has(input:checked) .diff-name { color: var(--gold); }
.diff-opt:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }

@media (max-width: 560px) {
  .difficulty-select { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .diff-opt { transition: none; }
}

/* ===== Score ===== */
.screen--score { display: none; }
.screen--score.is-active { display: block; }
.score-inner {
  max-width: 640px; margin: 0 auto; padding: clamp(30px, 6vh, 64px) 20px 74px; text-align: center;
}
.score-hero {
  display: flex; align-items: center; justify-content: center; gap: clamp(18px, 5vw, 40px);
  flex-wrap: wrap; margin-bottom: 30px;
}
.score-big { display: flex; align-items: baseline; }
.score-value {
  font-family: var(--serif); font-weight: 600; font-size: clamp(4.4rem, 16vw, 7.5rem);
  line-height: .9; color: var(--gold);
  background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.score-max { font-family: var(--serif); font-size: 1.6rem; color: var(--text-faint); margin-left: 6px; }
.score-verdict { text-align: left; }
.score-rating { font-family: var(--serif); font-weight: 600; font-size: clamp(1.6rem, 5vw, 2.2rem); color: var(--text); display: block; }
.score-sub { color: var(--text-muted); font-size: .96rem; margin-top: 4px; max-width: 240px; }

/* Wunschkunden-Ergebnis auf dem Score-Screen: eigener Akzent, kein weiterer Balken. */
.wk-score {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 auto 30px; padding: 10px 18px; border-radius: 999px;
  background: linear-gradient(150deg, rgba(249,197,0,.14), rgba(249,197,0,.03));
  border: 1px solid var(--line-gold);
}
.wk-score-figs { display: flex; gap: 2px; }
.wk-score-figs svg { width: 9px; height: 11px; }
.wk-score-figs svg circle, .wk-score-figs svg path { fill: rgba(249,197,0,.28); }
.wk-score-figs svg.lit circle, .wk-score-figs svg.lit path { fill: var(--gold); }
.wk-score-text { font-size: .92rem; color: var(--text-muted); }
.wk-score-text strong { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; color: var(--gold); margin-right: 3px; }

/* Score-Rechnung: macht sichtbar, wie aus Auftritt + Wunschkunden-Pipeline der
   Leaderboard-Punktwert entsteht. Ruhig, ein Fliesstext, gold/serif nur auf Zahlen. */
.score-calc {
  margin: 0 auto 30px; max-width: 480px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 14px 20px; text-align: center;
  font-size: .92rem; line-height: 1.8; color: var(--text-muted);
}
.score-calc strong {
  font-family: var(--serif); font-weight: 600; color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.score-calc .calc-total { color: var(--gold-bright); font-size: 1.08rem; }
.score-calc .calc-op { color: var(--text-faint); margin: 0 3px; }
.score-calc .calc-detail { color: var(--text-faint); font-size: .84rem; margin: 0 2px; }
.score-calc .calc-comma { color: var(--text-faint); margin-right: 3px; }
.score-calc .calc-diff { color: var(--text); }

@media (max-width: 480px) {
  .score-calc { font-size: .84rem; padding: 12px 14px; line-height: 1.75; }
}

.score-dims { display: grid; gap: 14px; margin: 0 auto 30px; max-width: 460px; text-align: left; }
.sdim { }
.sdim-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.sdim-label { font-size: .92rem; color: var(--text-muted); }
.sdim-val { font-family: var(--serif); font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.sdim-bar { height: 9px; background: rgba(255,255,255,.08); border-radius: 5px; overflow: hidden; }
.sdim-fill {
  display: block;
  height: 100%; width: 0; border-radius: 5px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright));
  transition: width 1s var(--ease);
}
.sdim-fill.low { background: linear-gradient(90deg, var(--danger-deep), var(--danger)); }

.score-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 34px; }

.panel {
  text-align: left; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: clamp(18px, 3vw, 26px); margin-bottom: 22px;
}
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.panel-head h2 { font-size: 1.25rem; }
.panel-sub { font-size: .82rem; color: var(--text-faint); }

/* Leaderboard */
.lb-list { display: grid; gap: 2px; margin: 0 0 16px; padding: 0; list-style: none; }
.lb-item {
  display: grid; grid-template-columns: 30px 1fr auto auto; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--radius-sm); font-size: .95rem;
}
.lb-item:nth-child(odd) { background: rgba(255,255,255,.02); }
.lb-item.me { background: rgba(249,197,0,.1); border: 1px solid var(--line-gold); }
.lb-rank { font-family: var(--serif); font-weight: 600; color: var(--gold); font-variant-numeric: tabular-nums; }
.lb-item.top1 .lb-rank { color: var(--gold-bright); }
.lb-nick { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.lb-score { font-variant-numeric: tabular-nums; color: var(--text-muted); font-weight: 700; }

/* Stufen-Badge im Leaderboard */
.lb-badge {
  font-size: .64rem; letter-spacing: .03em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border);
  color: var(--text-faint); white-space: nowrap;
}
.lb-badge--lightning { color: var(--text-muted); border-color: var(--border); }
.lb-badge--breakout { color: var(--text-muted); border-color: var(--line-gold); }
.lb-badge--keynote { color: var(--gold); border-color: var(--line-gold); background: rgba(249,197,0,.08); }

@media (max-width: 400px) {
  .lb-badge { font-size: .58rem; padding: 2px 6px; }
}
.lb-empty, .lb-error { color: var(--text-faint); font-size: .9rem; padding: 10px; text-align: center; }
.lb-error { color: var(--danger); }

.lb-label { display: block; font-size: .82rem; color: var(--text-muted); margin-bottom: 8px; }
.lb-row { display: flex; gap: 10px; }
.lb-input {
  flex: 1 1 auto; min-width: 0; background: var(--ink); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); padding: 12px 14px; font-family: var(--sans); font-size: 1rem;
  transition: border-color .2s var(--ease);
}
.lb-input:focus { outline: none; border-color: var(--line-gold); }
.lb-status { font-size: .86rem; margin-top: 10px; color: var(--text-muted); min-height: 1.1em; }
.lb-status.ok { color: var(--ok); }
.lb-status.err { color: var(--danger); }
.lb-submit.done { opacity: .6; }

/* CTA */
.cta-panel {
  background: linear-gradient(150deg, rgba(249,197,0,.1), rgba(249,197,0,.02));
  border-color: var(--line-gold); text-align: center;
}
.cta-title { font-size: clamp(1.2rem, 3.4vw, 1.5rem); line-height: 1.25; margin-bottom: 10px; text-wrap: balance; }
.cta-text { color: var(--text-muted); font-size: .98rem; line-height: 1.5; margin-bottom: 18px; max-width: 460px; margin-inline: auto; }
.cta-btn { font-size: 1.02rem; }
.cta-touch { margin-top: 12px; font-size: .82rem; color: var(--text-faint); }

/* Prominente Rabatt-Box (Lead-Magnet am Ende) */
.discount-box {
  display: flex; align-items: center; gap: 16px; text-align: left;
  background: linear-gradient(135deg, rgba(249,197,0,.18), rgba(249,197,0,.04));
  border: 1px solid var(--line-gold); border-radius: var(--radius-md);
  padding: 15px 18px; margin-bottom: 18px;
  transition: background .3s var(--ease), border-color .3s var(--ease);
}
.discount-badge-big {
  flex: none; display: grid; place-items: center; text-align: center;
  min-width: 104px; padding: 12px 14px; border-radius: 12px; white-space: nowrap;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep));
  color: var(--ink); font-weight: 800; font-size: 1.4rem; line-height: 1;
  box-shadow: 0 10px 26px -10px rgba(249,197,0,.7);
}
.discount-head { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; color: var(--text); margin-bottom: 3px; }
.discount-sub { color: var(--text-muted); font-size: .9rem; line-height: 1.45; }
.discount-box.secured {
  background: linear-gradient(135deg, rgba(70,177,123,.2), rgba(70,177,123,.05));
  border-color: rgba(70,177,123,.45);
}
.discount-box.secured .discount-badge-big {
  background: linear-gradient(180deg, #63cf97, #2f9e6a); color: #04140c;
  box-shadow: 0 10px 26px -10px rgba(70,177,123,.7);
}

/* CTA-Schritte (Rabatt einloesen in 3 Schritten) */
.cta-steps {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 16px;
  counter-reset: step; margin: 0 0 20px; padding: 0; list-style: none;
}
.cta-steps li { display: flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--text-muted); }
.cta-steps li::before {
  counter-increment: step; content: counter(step);
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(249,197,0,.14); border: 1px solid var(--line-gold);
  color: var(--gold); font-weight: 800; font-size: .74rem; display: grid; place-items: center;
}

/* Persistenter, globaler Footer (Impressum/Datenschutz auf allen Screens) */
.app-footer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 7px 14px; font-size: .78rem;
  background: linear-gradient(180deg, transparent, rgba(6,6,11,.85) 55%);
  pointer-events: none;
}
.app-footer a {
  color: var(--text-faint); text-decoration: none; pointer-events: auto;
  padding: 4px 6px; border-radius: 4px; transition: color .2s var(--ease);
}
.app-footer a:hover { color: var(--gold); }
.app-footer-sep { color: var(--text-faint); opacity: .55; }

/* ===== Heavy Fail ===== */
.screen--fail { position: relative; display: none; overflow: hidden; }
.screen--fail.is-active { display: grid; place-items: center; }
.fail-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(70% 55% at 50% 0%, rgba(229,72,77,.16), rgba(229,72,77,.07) 32%, transparent 62%),
    radial-gradient(90% 60% at 50% 110%, rgba(229,72,77,.08), rgba(229,72,77,.03) 34%, transparent 62%),
    linear-gradient(180deg, #0c0709, #08060a);
}
.fail-inner {
  position: relative; z-index: 1; max-width: 620px; padding: clamp(40px, 8vh, 90px) 22px; text-align: center;
}
.fail-kicker {
  font-size: .82rem; letter-spacing: .16em; text-transform: uppercase; color: var(--danger);
  margin-bottom: 16px;
}
.fail-title { font-size: clamp(2.1rem, 7vw, 3.4rem); line-height: 1.08; margin-bottom: 18px; text-wrap: balance; }
.fail-text {
  color: var(--text-muted); font-size: clamp(1rem, 2.4vw, 1.12rem); line-height: 1.6;
  max-width: 500px; margin: 0 auto 30px; text-wrap: pretty;
}
.cta-panel--fail { background: linear-gradient(150deg, rgba(229,72,77,.12), rgba(229,72,77,.02)); border-color: rgba(229,72,77,.35); }
/* Schlanke CTA-Panel-Variante: nur der Button, ohne eigene Ueberschrift (Fail/Pitch-Kollaps
   tragen Titel + Text bereits im fail-title/fail-text darueber). */
.cta-panel--lean { display: flex; justify-content: center; padding: clamp(20px, 3.4vw, 28px); }
.cta-panel--lean .cta-btn { font-size: 1.02rem; }

@media (max-width: 560px) {
  .score-hero { flex-direction: column; gap: 12px; }
  .score-verdict { text-align: center; }
  .score-sub { max-width: none; }
  .score-actions .sp-btn { flex: 1 1 100%; }
  .discount-box { flex-direction: column; text-align: center; gap: 12px; }
  .cta-steps { flex-direction: column; align-items: flex-start; text-align: left; gap: 8px; max-width: 280px; margin-inline: auto; }
}
.fail-inner { padding-bottom: clamp(56px, 8vh, 90px); }

/* Stufen-Umschalter fuer den naechsten Versuch (End-Screens) */
.replay-controls {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  margin: 0 auto 10px;
}
.replay-diff-label {
  font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint);
}
.replay-diff {
  display: inline-flex; gap: 3px; padding: 3px;
  border: 1px solid var(--border); border-radius: 999px; background: rgba(255,255,255,.03);
}
.rdiff-opt { position: relative; display: inline-flex; }
.rdiff-opt input {
  position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer;
}
.rdiff-opt span {
  display: block; padding: 10px 14px; border-radius: 999px; white-space: nowrap;
  font-size: .82rem; color: var(--text-muted); transition: background .2s var(--ease), color .2s var(--ease);
}
.rdiff-opt input:hover + span { color: var(--text); }
.rdiff-opt input:checked + span { background: var(--gold); color: #12100a; font-weight: 600; }
.rdiff-opt input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (max-width: 420px) {
  .rdiff-opt span { padding: 9px 11px; font-size: .78rem; }
}
