/*
  Farbpalette:
  #004581  – Blau      → Buttons, Labels, strukturelle Akzente
  #772144  – Dunkelrot → Fouls, Fehler, Niederlage
  #FAAB19  – Amber     → Highlights, Score, Logo, Hover, CTAs
  #004E42  – Dunkelgrün → Erfolg, Sieg
  #492459  – Lila      → Vorteile, besondere Zustände
*/

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f2f5f8;
  color: #0d1a26;
  min-height: 100vh;
  padding-bottom: 40px;
}

#app {
  max-width: 640px;
  margin: 0 auto;
}

/* ── Gate (Passwortschutz) ──────────────────────────────── */
#gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.gate-box {
  background: #ffffff;
  border: 1px solid #ccdae6;
  border-radius: 14px;
  padding: 40px 32px;
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 24px rgba(0,69,129,0.10);
}
.gate-logo {
  font-size: 32px;
  font-weight: 800;
  color: #FAAB19;
  letter-spacing: -0.02em;
}
.gate-subtitle {
  font-size: 13px;
  color: #7a9ab8;
  margin-top: -8px;
}
.gate-input {
  width: 100%;
  background: #f6f8fa;
  border: 1px solid #ccdae6;
  color: #0d1a26;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 15px;
  outline: none;
  text-align: center;
  letter-spacing: 0.1em;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.gate-input:focus {
  border-color: #004581;
  box-shadow: 0 0 0 2px rgba(0,69,129,0.12);
}
.gate-btn {
  width: 100%;
  background: #004581;
  border: none;
  color: #fff;
  border-radius: 8px;
  padding: 13px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.gate-btn:hover { background: #005aa8; }
.gate-error {
  font-size: 13px;
  color: #772144;
  font-weight: 600;
  min-height: 18px;
}

/* ── Score Bar ──────────────────────────────────────────── */
.score-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border-bottom: 2px solid #004581;
  padding: 10px 16px;
  box-shadow: 0 2px 8px rgba(0,69,129,0.1);
}
.score-label { font-size: 13px; color: #7a90a4; flex: 1; }
.score-value  { font-size: 22px; font-weight: 700; color: #FAAB19; }

.advantage-indicator {
  font-size: 12px; font-weight: 700;
  background: #f0ecf5; color: #492459;
  padding: 3px 8px; border-radius: 12px;
  border: 1px solid #d4c8e0;
}
.foul-indicator {
  font-size: 12px; font-weight: 700;
  background: #f8edf1; color: #772144;
  padding: 3px 8px; border-radius: 12px;
  border: 1px solid #e0c4d0;
}
.timer {
  font-size: 18px; font-weight: 700; color: #8aa0b4;
  font-variant-numeric: tabular-nums; margin-left: auto;
}
.timer.urgent { color: #772144; animation: pulse 1s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* ── Timeline ───────────────────────────────────────────── */
.timeline { padding: 16px; display: flex; flex-direction: column; gap: 0; }

.timeline-arrow {
  text-align: center; color: #c8d4dc;
  font-size: 20px; line-height: 1; padding: 4px 0; user-select: none;
}

/* ── Cards ──────────────────────────────────────────────── */
.tcard {
  border-radius: 10px;
  border: 1px solid #d8e2ea;
  background: #ffffff;
  padding: 16px;
  display: flex; flex-direction: column; gap: 8px;
  box-shadow: 0 1px 4px rgba(0,69,129,0.06);
}

/* Kompakte History-Karte */
.tcard--done { padding: 10px 14px; gap: 4px; opacity: 0.65; box-shadow: none; }
.tcard--done:hover { opacity: 1; }

.tcard__done-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tcard__done-position { font-size: 12px; font-weight: 600; color: #8aa0b4; text-transform: uppercase; letter-spacing: 0.06em; }
.tcard__done-action   { font-size: 13px; color: #b0c0cc; display: flex; align-items: center; gap: 6px; }

.tcard__points-inline           { font-size: 12px; font-weight: 700; }
.tcard__points-inline.positive  { color: #FAAB19; }
.tcard__points-inline.negative  { color: #772144; }

/* Farbkodierung History */
.tcard--done.tcard--success   { border-left: 3px solid #004E42; }
.tcard--done.tcard--fail      { border-left: 3px solid #c8d4dc; }
.tcard--done.tcard--foul      { border-left: 3px solid #772144; }
.tcard--done.tcard--wrong     { border-left: 3px solid #FAAB19; }
.tcard--done.tcard--advantage { border-left: 3px solid #492459; }

/* Aktive Karte */
.tcard--active { border-color: #004581; box-shadow: 0 0 0 2px rgba(0,69,129,0.12); }

/* Ergebnis-Karte */
.tcard--result.tcard--success { background: #eaf4f2; border-color: #004E42; }
.tcard--result.tcard--fail    { background: #f6f8fa; border-color: #c8d4dc; }
.tcard--result.tcard--foul    { background: #f8edf1; border-color: #772144; }
.tcard--result.tcard--wrong   { background: #fff8e8; border-color: #FAAB19; }

/* End-Karte */
.tcard--end { padding: 20px; gap: 14px; }
.tcard--win  { background: #eaf4f2; border-color: #004E42; border-width: 2px; }
.tcard--loss { background: #f8edf1; border-color: #772144; border-width: 2px; }

/* ── Card Content ───────────────────────────────────────── */
.tcard__label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: #004581;
}
.tcard__desc { font-size: 15px; line-height: 1.5; color: #1a2d40; }

.tcard__ibjjf {
  font-size: 12px; color: #8a6000;
  border-left: 3px solid #FAAB19;
  background: #fff8e8;
  padding: 6px 10px;
  border-radius: 0 4px 4px 0;
}
.tcard__question {
  font-size: 13px; font-weight: 600; color: #a0b4c4;
  text-transform: uppercase; letter-spacing: 0.06em; margin-top: 4px;
}
.tcard__options { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }

/* Ergebnis-Badge */
.tcard__result-badge {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; padding: 2px 8px; border-radius: 4px;
  display: inline-block; width: fit-content;
}
.tcard__result-badge--success { background: #d0ece8; color: #004E42; }
.tcard__result-badge--fail    { background: #e8f0f8; color: #004581; }
.tcard__result-badge--foul    { background: #f0d8e2; color: #772144; }
.tcard__result-badge--wrong   { background: #fdeece; color: #8a6000; }

.tcard__action { font-size: 16px; font-weight: 600; color: #0d1a26; }

.tcard__points             { font-size: 22px; font-weight: 700; }
.tcard__points.positive    { color: #FAAB19; }
.tcard__points.negative    { color: #772144; }

.tcard__feedback    { font-size: 14px; line-height: 1.5; color: #2a3f54; }
.tcard__explanation {
  font-size: 12px; line-height: 1.5; color: #a0b4c4;
  border-top: 1px solid #e4ecf2; padding-top: 8px;
}

.tcard__advantage {
  font-size: 13px; font-weight: 600;
  color: #492459; background: #f0ecf5;
  border: 1px solid #d4c8e0;
  border-radius: 6px; padding: 6px 10px;
}
.tcard__tiebreaker {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: #8a6000; margin-bottom: 2px;
}

/* End-Screen */
.tcard__end-title          { font-size: 22px; font-weight: 700; }
.tcard--win .tcard__end-title  { color: #004E42; }
.tcard--loss .tcard__end-title { color: #772144; }

/* ── Buttons ────────────────────────────────────────────── */
.option-btn {
  background: #f6f8fa;
  border: 1px solid #d0dce6;
  color: #0d1a26;
  border-radius: 8px; padding: 10px 14px 8px;
  font-size: 14px; text-align: left; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  display: flex; flex-direction: column; gap: 6px;
}
.option-btn:hover {
  background: #fff8e8;
  border-color: #FAAB19;
  transform: translateX(2px);
}
.option-btn:active { transform: translateX(0); }
.option-btn__text { display: block; }

/* Wahrscheinlichkeitsbalken */
.chance-wrap {
  display: flex; align-items: center; gap: 6px;
}
.chance-bar {
  flex: 1;
  position: relative;
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  overflow: hidden;
}
.chance-bar__fill {
  position: absolute; left: 0; top: 0; height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease;
}
.chance-bar--high  .chance-bar__fill { background: #004E42; }
.chance-bar--mid   .chance-bar__fill { background: #FAAB19; }
.chance-bar--low   .chance-bar__fill { background: #772144; }
.chance-label {
  font-size: 10px; font-weight: 700; color: #8a9bb0;
  min-width: 26px; text-align: right; letter-spacing: 0.02em;
}
.chance-bar--foul {
  font-size: 10px; font-weight: 700; color: #772144;
}
.attr-boost-badge {
  font-size: 9px; font-weight: 700; color: #FAAB19;
  background: rgba(250, 171, 25, 0.12);
  border: 1px solid rgba(250, 171, 25, 0.3);
  border-radius: 3px;
  padding: 1px 4px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.continue-btn {
  background: #004581; border: none; color: #fff;
  border-radius: 8px; padding: 13px;
  font-size: 15px; font-weight: 600; cursor: pointer; margin-top: 4px;
  transition: background 0.15s;
}
.continue-btn:hover { background: #005aa8; }

.restart-btn {
  background: #f6f8fa; border: 1px solid #c8d4dc; color: #2a3f54;
  border-radius: 8px; padding: 13px;
  font-size: 15px; font-weight: 600; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.restart-btn:hover {
  background: #fff8e8; border-color: #FAAB19; color: #0d1a26;
}

/* ── End Stats ──────────────────────────────────────────── */
.end-stats { display: flex; gap: 8px; }
.stat {
  flex: 1; background: rgba(255,255,255,0.8);
  border: 1px solid #d8e8ec; border-radius: 8px;
  padding: 10px; display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.stat-label { font-size: 10px; color: #a0b4c4; text-transform: uppercase; letter-spacing: 0.06em; }
.stat-value      { font-size: 22px; font-weight: 700; color: #0d1a26; }
.stat-value.good { color: #FAAB19; }
.stat-value.bad  { color: #772144; }

.summary-title { font-size: 11px; font-weight: 600; color: #a0b4c4; text-transform: uppercase; letter-spacing: 0.06em; }
.summary-item  { font-size: 13px; color: #8a6000; padding: 2px 0; }
.advantage-item { color: #492459 !important; }

/* ── Start Screen ───────────────────────────────────────── */
.start-screen {
  display: flex; flex-direction: column; align-items: center;
  gap: 24px; padding: 48px 24px 64px; max-width: 480px; margin: 0 auto;
}

.start-logo    { font-size: 36px; font-weight: 800; color: #FAAB19; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; }
.start-logo__icon { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.start-subtitle { font-size: 14px; color: #8aa0b4; text-align: center; margin-top: -12px; }

.start-section-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: #a0b4c4;
  align-self: flex-start; width: 100%;
}

.features-intro {
  font-size: 13px;
  color: #8aa0b4;
  text-align: center;
  line-height: 1.6;
  margin-top: -8px;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

.feature-card {
  background: #ffffff;
  border: 1px solid #ccdae6;
  border-radius: 12px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 1px 3px rgba(0,69,129,0.05);
}

.feature-card__icon  { font-size: 22px; line-height: 1; }
.feature-card__title { font-size: 12px; font-weight: 700; color: #004581; letter-spacing: 0.01em; }
.feature-card__desc  { font-size: 11px; color: #8aa0b4; line-height: 1.5; }

.start-belt-grid { display: flex; gap: 8px; width: 100%; flex-wrap: wrap; }

.belt-btn {
  flex: 1; min-width: 64px;
  background: var(--belt-color); color: var(--belt-text);
  border: 2px solid transparent; border-radius: 8px;
  padding: 12px 8px; font-size: 13px; font-weight: 700;
  cursor: pointer; opacity: 0.65;
  transition: opacity 0.15s, border-color 0.15s, transform 0.1s;
}
.belt-btn:hover { opacity: 0.85; transform: translateY(-2px); }
.belt-btn--selected {
  opacity: 1; border-color: #FAAB19;
  box-shadow: 0 0 0 2px rgba(250,171,25,0.3);
}

.start-belt-info {
  font-size: 13px; color: #8aa0b4; text-align: center;
  min-height: 48px; line-height: 1.6; padding: 0 8px; transition: color 0.15s;
}

.whitebelt-note {
  margin-top: 8px;
  padding: 8px 12px;
  background: #1e2d40;
  border-left: 3px solid #3b82f6;
  border-radius: 6px;
  font-size: 12px;
  color: #93c5fd;
  line-height: 1.5;
}

/* ── Attribut-Section ───────────────────────────────────── */
.attr-section { width: 100%; }

.attr-hint {
  font-size: 11px;
  color: #6b7280;
  margin-bottom: 10px;
  line-height: 1.5;
}

.attr-points-left {
  font-size: 11px;
  font-weight: 600;
  color: #f59e0b;
  margin-left: 8px;
}
.attr-points-left--done { color: #22c55e; }

.attr-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.attr-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1e2130;
  border: 1px solid #2e3248;
  border-radius: 10px;
  padding: 10px 12px;
  gap: 10px;
}

.attr-row__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.attr-row__label {
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
}

.attr-row__desc {
  font-size: 10px;
  color: #6b7280;
  line-height: 1.4;
}

.attr-row__controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.attr-row__val {
  font-size: 16px;
  font-weight: 700;
  color: #f59e0b;
  min-width: 16px;
  text-align: center;
}

.attr-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid #374151;
  background: #111827;
  color: #e2e8f0;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}
.attr-btn:disabled { opacity: 0.25; cursor: default; }
.attr-btn:not(:disabled):hover { background: #1f2937; border-color: #f59e0b; }

.start-btn {
  width: 100%; background: #004581; border: none; color: #fff;
  border-radius: 10px; padding: 16px; font-size: 16px; font-weight: 700;
  cursor: pointer; transition: background 0.15s, opacity 0.15s;
}
.start-btn:hover:not(:disabled) { background: #005aa8; }
.start-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ── Score Bar – Namen ──────────────────────────────────── */
.match-names { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; overflow: hidden; }
.player-name  { font-size: 12px; font-weight: 700; color: #0d1a26; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
.vs-divider   { font-size: 10px; color: #c8d4dc; font-weight: 600; flex-shrink: 0; }
.opponent-name { font-size: 12px; color: #8aa0b4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }

/* ── Belt Pip ───────────────────────────────────────────── */
.belt-pip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  font-size: 11px; font-weight: 800; flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* ── Belt Badges ────────────────────────────────────────── */
.belt-badge {
  display: inline-block; font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 4px;
  vertical-align: middle; margin-left: 6px; letter-spacing: 0.04em;
}
.belt-badge--locked   { background: #f0d8e2; color: #772144; }
.belt-badge--unlocked { background: #d0ece8; color: #004E42; }

.tcard__belt-note {
  font-size: 12px; color: #004581;
  background: #e8f0f8; border: 1px solid #b8d0e8;
  border-radius: 6px; padding: 6px 10px;
}

/* ── Inputs & Nationalität ──────────────────────────────── */
.name-input {
  width: 100%; background: #ffffff; border: 1px solid #ccdae6;
  color: #0d1a26; border-radius: 8px; padding: 12px 14px;
  font-size: 15px; outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.name-input::placeholder { color: #b0c4d4; }
.name-input:focus { border-color: #004581; box-shadow: 0 0 0 2px rgba(0,69,129,0.12); }

.optional-label { font-size: 10px; color: #b0c4d4; font-weight: 400; text-transform: none; letter-spacing: 0; }

/* ── Nationalität Dropdown ──────────────────────────────── */
.nat-select {
  width: 100%;
  background: #ffffff;
  border: 1px solid #ccdae6;
  color: #0d1a26;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 15px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: auto;
}
.nat-select:focus {
  border-color: #004581;
  box-shadow: 0 0 0 2px rgba(0,69,129,0.12);
}

/* ── IBJJF Info Box ─────────────────────────────────────── */
.ibjjf-info-box {
  width: 100%;
  background: #ffffff;
  border: 1px solid #ccdae6;
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 1px 3px rgba(0,69,129,0.05);
}
.ibjjf-info-box__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ibjjf-info-box__title {
  font-size: 13px;
  font-weight: 700;
  color: #004581;
}
.ibjjf-info-box__version {
  font-size: 11px;
  font-weight: 700;
  background: #dceeff;
  color: #004581;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}
.ibjjf-info-box__note {
  font-size: 12px;
  color: #7a9ab8;
  line-height: 1.6;
}

/* ── Accordion ──────────────────────────────────────────── */
.accordion-toggle {
  background: none;
  border: none;
  border-top: 1px solid #e4eef6;
  padding-top: 10px;
  color: #004581;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  letter-spacing: 0.02em;
  transition: color 0.15s;
}
.accordion-toggle:hover { color: #FAAB19; }

.accordion-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 4px;
}
.accordion-entry {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.accordion-entry__year {
  font-size: 11px;
  font-weight: 700;
  color: #FAAB19;
  background: #fff8e8;
  border: 1px solid #f0d060;
  border-radius: 4px;
  padding: 1px 6px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 1px;
}
.accordion-entry__text {
  font-size: 12px;
  color: #4a6080;
  line-height: 1.6;
}

/* ── End Screen ─────────────────────────────────────────── */
.tcard__end-opponent { font-size: 13px; color: #8aa0b4; margin-top: -8px; }

.end-actions { display: flex; gap: 8px; width: 100%; }
.end-actions .restart-btn { flex: 1; }

.restart-btn--secondary {
  background: #f6f8fa !important; border-color: #c8d4dc !important; color: #8aa0b4 !important;
}
.restart-btn--secondary:hover {
  background: #fff8e8 !important; border-color: #FAAB19 !important; color: #0d1a26 !important;
}

/* ── Signature Section ──────────────────────────────────── */
.sig-section { display: flex; flex-direction: column; gap: 12px; width: 100%; }

.sig-counter {
  float: right; font-size: 11px; font-weight: 700;
  color: #a0b4c4; background: #e8f0f8;
  padding: 2px 8px; border-radius: 12px;
  text-transform: none; letter-spacing: 0;
  transition: color 0.2s, background 0.2s;
}
.sig-counter--done { color: #8a6000; background: #fdeece; }

.sig-hint { font-size: 12px; color: #a0b4c4; line-height: 1.6; }

.sig-category { display: flex; flex-direction: column; gap: 6px; }
.sig-category-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #c0d0dc; }
.sig-options { display: flex; flex-wrap: wrap; gap: 6px; }

.sig-btn {
  background: #ffffff; border: 1px solid #ccdae6; color: #4a6074;
  border-radius: 6px; padding: 7px 12px; font-size: 12px; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.sig-btn:hover:not(:disabled) { border-color: #FAAB19; background: #fff8e8; color: #0d1a26; }
.sig-btn--selected { background: #fff8e8; border-color: #FAAB19; color: #8a6000; font-weight: 600; }
.sig-btn--disabled { opacity: 0.28; cursor: not-allowed; }

/* Signature-Badge in Optionen */
.sig-badge { font-size: 12px; margin-left: 4px; vertical-align: middle; }

/* Signature-Note Ergebnis-Karte */
.tcard__signature {
  font-size: 12px; color: #8a6000;
  background: #fff8e8; border: 1px solid #f0d898;
  border-radius: 6px; padding: 6px 10px;
}

/* ── Report-Button (Score-Bar) ──────────────────────────── */
.report-btn {
  background: none;
  border: 1px solid #c0d0e0;
  color: #a0b4c4;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.report-btn:hover {
  background: #f8edf1;
  border-color: #772144;
  color: #772144;
}

/* ── Tester-Box (Startscreen) ───────────────────────────── */
.tester-box {
  width: 100%;
  background: #fff8e8;
  border: 1px solid #f0d060;
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tester-box__title { font-size: 13px; font-weight: 700; color: #8a6000; }
.tester-box__desc  { font-size: 12px; color: #a07800; line-height: 1.6; }

/* ── Report Modal ───────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #ccdae6;
  padding: 24px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 8px 32px rgba(0,69,129,0.15);
}
.modal__title { font-size: 17px; font-weight: 700; color: #772144; }

.modal__state {
  background: #f4f8fc;
  border: 1px solid #d0dce8;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.modal__state-item { font-size: 12px; color: #4a6080; }

.modal__label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: #a0b4c4;
}
.modal__radio-group { display: flex; flex-direction: column; gap: 6px; }
.modal__radio-group--row { flex-direction: row; flex-wrap: wrap; gap: 10px; }
.modal__radio { font-size: 13px; color: #2a3f54; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.modal__radio input { cursor: pointer; accent-color: #004581; }

.modal__textarea {
  width: 100%; background: #f6f8fa; border: 1px solid #ccdae6;
  border-radius: 8px; padding: 10px 12px; font-size: 14px;
  color: #0d1a26; font-family: inherit; resize: vertical;
  outline: none; transition: border-color 0.15s;
}
.modal__textarea:focus { border-color: #004581; }
.modal__textarea::placeholder { color: #b0c4d4; }

.modal__tester { font-size: 12px; color: #4a6080; background: #f0f8ff; border-radius: 6px; padding: 6px 10px; }

.modal__actions { display: flex; gap: 8px; }
.modal__submit-btn {
  flex: 1; background: #772144; border: none; color: #fff;
  border-radius: 8px; padding: 12px; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: background 0.15s;
}
.modal__submit-btn:hover:not(:disabled) { background: #8f2952; }
.modal__submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.modal__cancel-btn {
  background: #f4f8fc; border: 1px solid #c8d4dc; color: #4a6080;
  border-radius: 8px; padding: 12px 16px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: background 0.15s;
}
.modal__cancel-btn:hover { background: #e8f0f8; }

.modal__status { font-size: 13px; text-align: center; min-height: 18px; }
.modal__status--ok    { color: #004E42; font-weight: 600; }
.modal__status--error { color: #772144; font-weight: 600; }

/* ─── Feedback-Animationen ─────────────────────────────── */

/* Vorteil / kleiner Erfolg ohne Punkte – dezentes Grün */
@keyframes kf-advantage {
  0%   { box-shadow: 0 0 0 0 rgba(0,78,66,0.0); }
  30%  { box-shadow: 0 0 18px 6px rgba(0,78,66,0.45); }
  100% { box-shadow: 0 0 0 0 rgba(0,78,66,0.0); }
}
.anim-advantage { animation: kf-advantage 0.7s ease-out forwards; }

/* Erfolg 2 Pkt – mittlerer grüner Glow */
@keyframes kf-success-sm {
  0%   { box-shadow: 0 0 0 0 rgba(0,78,66,0.0); }
  25%  { box-shadow: 0 0 28px 10px rgba(0,78,66,0.6); }
  100% { box-shadow: 0 0 0 0 rgba(0,78,66,0.0); }
}
.anim-success-sm { animation: kf-success-sm 0.9s ease-out forwards; }

/* Erfolg 4 Pkt – goldener Glow, stärker */
@keyframes kf-success-lg {
  0%   { box-shadow: 0 0 0 0 rgba(250,171,25,0.0); }
  20%  { box-shadow: 0 0 42px 16px rgba(250,171,25,0.75); }
  70%  { box-shadow: 0 0 20px 6px rgba(250,171,25,0.3); }
  100% { box-shadow: 0 0 0 0 rgba(250,171,25,0.0); }
}
.anim-success-lg { animation: kf-success-lg 1.1s ease-out forwards; }

/* Misserfolg – dezentes rotes Dimmen */
@keyframes kf-fail {
  0%   { box-shadow: 0 0 0 0 rgba(119,33,68,0.0); }
  35%  { box-shadow: 0 0 16px 5px rgba(119,33,68,0.35); }
  100% { box-shadow: 0 0 0 0 rgba(119,33,68,0.0); }
}
.anim-fail { animation: kf-fail 0.6s ease-out forwards; }

/* Stalling-Warnung: Score-Bar kurz rot aufleuchten */
@keyframes kf-stalling-flash {
  0%   { box-shadow: none; }
  30%  { box-shadow: inset 0 0 0 3px #772144; }
  70%  { box-shadow: inset 0 0 0 3px #772144; }
  100% { box-shadow: none; }
}
.stalling-flash { animation: kf-stalling-flash 0.7s ease-out; }

/* Roll-Animation auf dem angeklickten Button */
@keyframes kf-rolling {
  0%   { transform: translateX(0); }
  20%  { transform: translateX(-3px); }
  40%  { transform: translateX(3px); }
  60%  { transform: translateX(-2px); }
  80%  { transform: translateX(2px); }
  100% { transform: translateX(0); }
}
.option-btn.rolling {
  animation: kf-rolling 0.18s ease-in-out infinite;
  border-color: #FAAB19;
  background: #fffbf0;
  pointer-events: none;
}
.option-btn.rolling .chance-label { color: #FAAB19; }

/* Foul – rotes Aufleuchten + Shake */
@keyframes kf-foul {
  0%   { transform: translateX(0);  box-shadow: 0 0 0 0 rgba(119,33,68,0.0); }
  15%  { transform: translateX(-7px); box-shadow: 0 0 36px 12px rgba(119,33,68,0.7); }
  30%  { transform: translateX(7px); }
  45%  { transform: translateX(-5px); }
  60%  { transform: translateX(5px); }
  75%  { transform: translateX(-2px); box-shadow: 0 0 18px 6px rgba(119,33,68,0.3); }
  100% { transform: translateX(0);  box-shadow: 0 0 0 0 rgba(119,33,68,0.0); }
}
.anim-foul { animation: kf-foul 0.6s ease-out forwards; }

/* Sieg End-Screen – goldener Blitz */
@keyframes kf-win {
  0%   { box-shadow: 0 0 0 0 rgba(250,171,25,0.0); }
  15%  { box-shadow: 0 0 60px 24px rgba(250,171,25,0.85); }
  60%  { box-shadow: 0 0 30px 10px rgba(250,171,25,0.4); }
  100% { box-shadow: 0 0 0 0 rgba(250,171,25,0.0); }
}
.anim-win { animation: kf-win 1.4s ease-out forwards; }

/* Niederlage End-Screen – roter Blitz */
@keyframes kf-loss {
  0%   { box-shadow: 0 0 0 0 rgba(119,33,68,0.0); }
  20%  { box-shadow: 0 0 40px 14px rgba(119,33,68,0.65); }
  100% { box-shadow: 0 0 0 0 rgba(119,33,68,0.0); }
}
.anim-loss { animation: kf-loss 0.9s ease-out forwards; }

/* Konfetti */
.confetti-piece {
  position: absolute;
  top: -8px;
  pointer-events: none;
  z-index: 10;
  animation: kf-confetti linear forwards;
}
@keyframes kf-confetti {
  0%   { transform: translateY(0) rotate(0deg);   opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateY(320px) rotate(540deg); opacity: 0; }
}
.tcard--end { position: relative; overflow: visible; }

/* Header-Bild */
.start-header-img {
  width: 100%; max-width: 680px; border-radius: 12px;
  display: block; margin: 0 auto 20px;
  object-fit: cover;
}

/* Version-Badge im Titel */
.start-version {
  font-size: 14px; font-weight: 500;
  color: #FAAB19; vertical-align: middle;
  opacity: 0.85;
}

/* Topbar mit Zurück-Link */
.start-topbar {
  margin-bottom: 16px;
}
.start-back-link {
  font-size: 13px; font-weight: 600; color: #8a9bb0;
  text-decoration: none; transition: color 0.15s;
}
.start-back-link:hover { color: #004581; }

/* Sprachauswahl */
.lang-hint {
  font-size: 11px; color: #a0aec0; text-align: right;
  margin-top: -6px; margin-bottom: 16px; line-height: 1.4;
}
.lang-selector {
  display: flex; gap: 6px; justify-content: flex-end;
  margin-bottom: 12px; flex-wrap: wrap;
}
.lang-btn {
  background: #f0f4f8; border: 1px solid #c8d4dc; border-radius: 20px;
  padding: 4px 12px; font-size: 13px; cursor: pointer;
  color: #4a6080; transition: all 0.15s;
}
.lang-btn:hover { background: #e2eaf2; border-color: #004581; color: #004581; }
.lang-btn--active {
  background: #004581; border-color: #004581; color: #fff; font-weight: 700;
}
.lang-flag {
  width: 18px; height: 13px; object-fit: cover;
  border-radius: 2px; vertical-align: middle; margin-right: 4px;
}

/* Penalty-Note Ergebnis-Karte */
.tcard__penalty-note {
  font-size: 12px; font-weight: 600;
  color: #772144; background: #f8edf1;
  border: 1px solid #e0c4d0;
  border-radius: 6px; padding: 6px 10px;
}
