/* ══════════════════════════════════════════════════════════
   100 LIEGESTÜTZE · by Geri
   style.css – Gemeinsames Design-System
   Farbpalette: Helles Flieder / Lavendel (aus dem Trainingsplan)
   Version: 1.0 · 2026-05-25
══════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════
   CSS-VARIABLEN – Flieder/Lavendel Palette
   Basiert auf den Dokumentfarben #B39DDB,
   #7358A9, #5E35B1, #EDE7F6
══════════════════════════════════════════ */
:root {
  /* Hintergründe */
  --bg:            #0a0514;
  --bg-card:       rgba(22, 8, 48, 0.92);
  --bg-card-hover: rgba(35, 15, 70, 0.95);

  /* Flieder-Akzente */
  --flieder:       #b39ddb;   /* helles Flieder – Hauptakzent */
  --flieder-bright:#ce93d8;   /* noch heller */
  --flieder-deep:  #7358a9;   /* satt */
  --flieder-glow:  rgba(179, 157, 219, 0.28);
  --flieder-dim:   rgba(179, 157, 219, 0.12);
  --flieder-border:rgba(179, 157, 219, 0.22);

  /* Text */
  --text:          #ede7f6;   /* sehr helles Lavendel */
  --text-dim:      #9575cd;   /* gedimmtes Lavendel */
  --text-muted:    #6a4fa0;   /* sehr gedimmt */

  /* Raster-Hintergrund */
  --grid-line:     rgba(179, 157, 219, 0.04);

  /* Rang-Farben */
  --rang-rohling:  #ff7043;   /* Terrakotta – roh, ungeschliffen */
  --rang-pudding:  #ffe082;
  --rang-holz:     #bcaaa4;
  --rang-stein:    #90a4ae;
  --rang-stahl:    #cfd8dc;
  --rang-diamant:  #80deea;

  /* Timer-Phasen */
  --timer-ok:      #b39ddb;
  --timer-warn:    #ffb74d;
  --timer-crit:    #ef5350;

  /* Touch-Targets – iOS-Mindestgröße 44pt */
  --touch-min:     52px;
}

/* ══════════════════════════════════════════
   RESET & BASIS
══════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, 'SF Pro Display', 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  cursor: default;
  -webkit-font-smoothing: antialiased;
}

/* ══════════════════════════════════════════
   HINTERGRUND: ANIMIERTES GITTER
══════════════════════════════════════════ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  animation: gitterScroll 30s linear infinite;
  z-index: 0;
  pointer-events: none;
}

@keyframes gitterScroll {
  from { background-position: 0 0; }
  to   { background-position: 48px 48px; }
}

/* Scan-Linien */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0,0,0,0.1) 0px, rgba(0,0,0,0.1) 1px,
    transparent 1px, transparent 3px
  );
  z-index: 0;
  pointer-events: none;
}

/* ══════════════════════════════════════════
   HAUPT-WRAPPER
══════════════════════════════════════════ */
.wrapper {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ══════════════════════════════════════════
   HEADER / SEITENTITEL
══════════════════════════════════════════ */
.page-header {
  text-align: center;
  padding: 10px 0 4px;
}

.page-title {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--flieder);
  text-shadow:
    0 0 8px var(--flieder),
    0 0 30px var(--flieder-glow),
    0 0 60px rgba(179,157,219,0.2);
  animation: titelGlow 4s ease-in-out infinite;
  line-height: 1.1;
}

@keyframes titelGlow {
  0%,100% { text-shadow: 0 0 8px var(--flieder), 0 0 30px var(--flieder-glow); }
  50%      { text-shadow: 0 0 14px var(--flieder), 0 0 50px var(--flieder-glow), 0 0 80px rgba(179,157,219,0.25); }
}

.page-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-top: 8px;
}

/* ══════════════════════════════════════════
   HERO-MOTIVATIONSBILD (Übersichtsseite)
══════════════════════════════════════════ */
.hero-bild-wrap {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: 4px auto 0;
  border: 1px solid var(--flieder-border);
  border-radius: 8px;
  background: var(--flieder-dim);
  overflow: hidden;
  box-shadow: 0 0 30px var(--flieder-glow), 0 8px 30px rgba(0,0,0,0.4);
}

/* Eckmarkierungen im Flieder-Ton, passend zum restlichen Cyberpunk-Stil */
.hero-bild-wrap::before,
.hero-bild-wrap::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--flieder-bright);
  border-style: solid;
  z-index: 2;
}
.hero-bild-wrap::before { top: -1px;    left: -1px;  border-width: 2px 0 0 2px; }
.hero-bild-wrap::after  { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

.hero-bild-wrap img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 7px;
}

/* ══════════════════════════════════════════
   RANG-PFAD (Übersichts-Header)
══════════════════════════════════════════ */
.rang-pfad {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 10px 16px;
  border: 1px solid var(--flieder-border);
  border-radius: 40px;
  background: var(--flieder-dim);
}

.rang-pfad .rang-item { font-weight: 700; }
.rang-pfad .pfeil     { opacity: 0.4; }

.rang-pfad .rang-item.rohling  { color: var(--rang-rohling); }
.rang-pfad .rang-item.pudding  { color: var(--rang-pudding); }
.rang-pfad .rang-item.holz     { color: var(--rang-holz); }
.rang-pfad .rang-item.stein    { color: var(--rang-stein); }
.rang-pfad .rang-item.stahl    { color: var(--rang-stahl); }
.rang-pfad .rang-item.diamant  { color: var(--rang-diamant); }

/* ══════════════════════════════════════════
   TRENNLINIE
══════════════════════════════════════════ */
.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    var(--flieder-deep),
    var(--flieder),
    var(--flieder-deep),
    transparent
  );
  opacity: 0.5;
}

/* ══════════════════════════════════════════
   TAG-KARTEN (Übersichtsseite)
══════════════════════════════════════════ */
.tage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.tag-karte {
  display: block;
  text-decoration: none;
  background: var(--bg-card);
  border: 1px solid var(--flieder-border);
  border-radius: 12px;
  padding: 18px 20px;
  transition: all 0.22s ease;
  cursor: pointer;
  min-height: var(--touch-min);
  position: relative;
  overflow: hidden;
}

.tag-karte::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--flieder-dim), transparent);
  opacity: 0;
  transition: opacity 0.22s;
}

.tag-karte:hover,
.tag-karte:active {
  border-color: var(--flieder);
  box-shadow: 0 0 24px var(--flieder-glow), 0 4px 20px rgba(0,0,0,0.4);
  transform: translateY(-2px);
}

.tag-karte:hover::before,
.tag-karte:active::before { opacity: 1; }

/* Karte: abgeschlossen ✓ */
.tag-karte.erledigt {
  border-color: rgba(179,157,219,0.15);
  opacity: 0.5;
}

.tag-karte.erledigt::after {
  content: '✓';
  position: absolute;
  top: 8px;
  right: 13px;
  font-size: 1rem;
  color: var(--flieder);
  opacity: 0.9;
}

/* Karte: nächster empfohlener Tag */
.tag-karte.naechster {
  border-color: var(--flieder);
  box-shadow: 0 0 28px var(--flieder-glow), 0 0 60px rgba(179,157,219,0.12);
  animation: naechsterPuls 2.5s ease-in-out infinite;
}

.tag-karte.naechster::after {
  content: '▶ DU BIST HIER';
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 0.52rem;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--flieder);
}

@keyframes naechsterPuls {
  0%, 100% { box-shadow: 0 0 18px var(--flieder-glow); }
  50%       { box-shadow: 0 0 40px var(--flieder-glow), 0 0 80px rgba(179,157,219,0.18); }
}

/* Karte: zuletzt geöffnet (Fallback wenn noch kein Fortschritt) */
.tag-karte.zuletzt {
  border-color: var(--flieder);
  box-shadow: 0 0 18px var(--flieder-glow);
}

.tag-karte.zuletzt::after {
  content: 'ZULETZT GEÖFFNET';
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  color: var(--flieder);
  opacity: 0.7;
}

/* Karte: Testtag */
.tag-karte.pruefung {
  border-color: rgba(255,183,77,0.4);
  background: rgba(30,15,5,0.92);
}

.tag-karte.pruefung:hover {
  border-color: #ffb74d;
  box-shadow: 0 0 24px rgba(255,183,77,0.25);
}

/* Karten-Inhalt */
.karte-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.karte-tag-nr {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.rang-badge {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 20px;
  border: 1px solid;
}

.rang-badge.rohling { color: var(--rang-rohling); border-color: rgba(255,112,67,0.3);  background: rgba(255,112,67,0.07);  }
.rang-badge.pudding { color: var(--rang-pudding); border-color: rgba(255,224,130,0.3); background: rgba(255,224,130,0.07); }
.rang-badge.holz    { color: var(--rang-holz);    border-color: rgba(188,170,164,0.3); background: rgba(188,170,164,0.07); }
.rang-badge.stein   { color: var(--rang-stein);   border-color: rgba(144,164,174,0.3); background: rgba(144,164,174,0.07); }
.rang-badge.stahl   { color: var(--rang-stahl);   border-color: rgba(207,216,220,0.3); background: rgba(207,216,220,0.07); }
.rang-badge.diamant { color: var(--rang-diamant); border-color: rgba(128,222,234,0.3); background: rgba(128,222,234,0.07); }

.karte-woche {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--flieder);
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.karte-training {
  font-size: 0.78rem;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
}

.karte-pause {
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

/* Prüfungs-Karte Sonderstil */
.pruefung-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffb74d;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.pruefung-ziel {
  font-size: 1rem;
  font-weight: 800;
  color: #ffb74d;
}

/* ══════════════════════════════════════════
   WOCHEN-TRENNZEILE
══════════════════════════════════════════ */
.wochen-trenner {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

.wochen-trenner-linie {
  flex: 1;
  height: 1px;
  background: var(--flieder-border);
}

.wochen-trenner-text {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--flieder-deep);
  white-space: nowrap;
}

/* ══════════════════════════════════════════
   ZURÜCK-LINK
══════════════════════════════════════════ */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  padding: 10px 0;
  transition: color 0.2s;
  min-height: var(--touch-min);
}

.back-link:hover { color: var(--flieder); }
.back-link::before { content: '←'; }

/* ══════════════════════════════════════════
   TRAININGSTAG-SEITE – DETAIL-KOPF
══════════════════════════════════════════ */
.detail-kopf {
  text-align: center;
}

.detail-woche {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.detail-titel {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--flieder);
  text-shadow: 0 0 20px var(--flieder-glow);
  margin-bottom: 6px;
}

.detail-tagnr {
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* Fortschritts-Punkte (11 Wochen) */
.fortschritt-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 8px 0;
  flex-wrap: wrap;
}

.fdot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid var(--flieder-border);
  background: transparent;
  transition: all 0.3s;
}

.fdot.aktiv {
  background: var(--flieder);
  border-color: var(--flieder);
  box-shadow: 0 0 8px var(--flieder);
}

/* ══════════════════════════════════════════
   SÄTZE-TABELLE
══════════════════════════════════════════ */
.saetze-wrap {
  background: var(--bg-card);
  border: 1px solid var(--flieder-border);
  border-radius: 12px;
  padding: 16px 20px;
}

.saetze-label {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-align: center;
}

.saetze-tabelle {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.satz-zelle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: var(--flieder-dim);
  border: 1px solid var(--flieder-border);
  border-radius: 8px;
  padding: 10px 14px;
  min-width: 60px;
  transition: all 0.25s;
}

.satz-zelle.aktiv-satz {
  border-color: var(--flieder);
  background: rgba(179,157,219,0.18);
  box-shadow: 0 0 12px var(--flieder-glow);
}

.satz-zelle.erledigt {
  border-color: rgba(179,157,219,0.08);
  opacity: 0.45;
}

.satz-zelle.erledigt .satz-wdh::after {
  content: ' ✓';
  font-size: 0.7rem;
  color: var(--flieder);
}

.satz-nr {
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.satz-wdh {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--flieder);
  line-height: 1;
}

.saetze-gesamt {
  text-align: center;
  margin-top: 12px;
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

/* ══════════════════════════════════════════
   ANWEISUNG
══════════════════════════════════════════ */
.anweisung {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  line-height: 1.5;
  padding: 0 8px;
}

/* ══════════════════════════════════════════
   TIMER-BEREICH
══════════════════════════════════════════ */
.timer-bereich {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 16px;
  padding: 10px 0;
}

/* Satz-Fortschrittsanzeige */
.satz-fortschritt {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
}

/* Runder Timer-Button */
.timer-btn {
  position: relative;
  width: clamp(180px, 38vw, 260px);
  height: clamp(180px, 38vw, 260px);
  border-radius: 50%;
  background: var(--flieder-dim);
  border: 3px solid var(--flieder);
  box-shadow:
    0 0 30px var(--flieder-glow),
    0 0 60px rgba(179,157,219,0.12),
    inset 0 0 30px rgba(179,157,219,0.06);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.25s ease;
  animation: btnPuls 3s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

@keyframes btnPuls {
  0%,100% { box-shadow: 0 0 30px var(--flieder-glow), 0 0 60px rgba(179,157,219,0.12), inset 0 0 30px rgba(179,157,219,0.06); }
  50%      { box-shadow: 0 0 50px var(--flieder-glow), 0 0 100px rgba(179,157,219,0.2), inset 0 0 40px rgba(179,157,219,0.1); }
}

.timer-btn:active {
  transform: scale(0.94);
  box-shadow: 0 0 20px var(--flieder-glow);
}

.timer-btn-zahl {
  font-size: clamp(3.5rem, 12vw, 5.5rem);
  font-weight: 900;
  color: var(--flieder);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.timer-btn-label {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.timer-btn-icon {
  font-size: 1.1rem;
  line-height: 1;
  opacity: 0.7;
}

/* Countdown-Anzeige (übernimmt den ganzen Bereich) */
.countdown-anzeige {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.countdown-anzeige.aktiv { display: flex; }

.countdown-zahl {
  font-size: clamp(5rem, 22vw, 14rem);
  font-weight: 900;
  line-height: 0.85;
  color: var(--timer-ok);
  text-shadow: 0 0 30px var(--flieder-glow);
  transition: color 0.4s, text-shadow 0.4s;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.countdown-zahl.warn {
  color: var(--timer-warn);
  text-shadow: 0 0 30px rgba(255,183,77,0.4);
  animation: zahlWackeln 0.5s ease-in-out infinite;
}

.countdown-zahl.crit {
  color: var(--timer-crit);
  text-shadow: 0 0 30px rgba(239,83,80,0.5);
  animation: zahlPuls 0.3s ease-in-out infinite;
}

@keyframes zahlWackeln {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.04); }
}

@keyframes zahlPuls {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}

/* Fortschritts-Ring */
.countdown-ring-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.countdown-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-90deg);
}

.countdown-ring-bg {
  fill: none;
  stroke: var(--flieder-dim);
  stroke-width: 4;
}

.countdown-ring-prog {
  fill: none;
  stroke: var(--flieder);
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear, stroke 0.4s;
}

.countdown-info {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
}

/* LOS!-Flash nach Countdown */
.los-flash {
  display: none;
  font-size: clamp(3rem, 14vw, 8rem);
  font-weight: 900;
  color: var(--flieder-bright);
  text-shadow: 0 0 40px rgba(206,147,216,0.6);
  letter-spacing: 0.1em;
  animation: losAuftauchen 0.4s ease-out;
}

.los-flash.sichtbar { display: block; }

@keyframes losAuftauchen {
  from { opacity: 0; transform: scale(0.6); }
  to   { opacity: 1; transform: scale(1); }
}

/* Letzter Satz – Fertig-Button */
.fertig-btn {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.fertig-btn.sichtbar { display: flex; }

.fertig-btn-text {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--flieder);
  text-align: center;
}

.fertig-btn-gross {
  padding: 20px 48px;
  background: var(--flieder-dim);
  border: 2px solid var(--flieder);
  border-radius: 50px;
  color: var(--flieder);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 0 20px var(--flieder-glow);
  animation: btnPuls 2s ease-in-out infinite;
  min-height: var(--touch-min);
}

.fertig-btn-gross:active {
  transform: scale(0.96);
}

/* ══════════════════════════════════════════
   MOTIVATIONS-ZITAT
══════════════════════════════════════════ */
.zitat {
  text-align: center;
  font-size: 0.82rem;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.6;
  padding: 12px 16px;
  border-left: 2px solid var(--flieder-border);
  margin: 0 auto;
  max-width: 520px;
}

/* ══════════════════════════════════════════
   ABSCHLUSS-ANIMATION
══════════════════════════════════════════ */
.abschluss-screen {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 5, 20, 0.96);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  text-align: center;
  padding: 32px;
}

.abschluss-screen.sichtbar { display: flex; }

.abschluss-emoji {
  font-size: clamp(3.5rem, 12vw, 7rem);
  animation: emojiHuepfen 0.6s ease-out both;
}

@keyframes emojiHuepfen {
  0%   { transform: scale(0.3) rotate(-20deg); opacity: 0; }
  70%  { transform: scale(1.2) rotate(5deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

.abschluss-titel {
  font-size: clamp(1.8rem, 6vw, 3.5rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  color: var(--flieder);
  text-shadow: 0 0 30px var(--flieder-glow);
  animation: abschlussTitel 0.6s ease-out 0.3s both;
}

@keyframes abschlussTitel {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.abschluss-rang {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  animation: abschlussTitel 0.6s ease-out 0.5s both;
}

.abschluss-gesamt {
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  animation: abschlussTitel 0.6s ease-out 0.7s both;
}

.abschluss-zurueck {
  margin-top: 12px;
  padding: 16px 40px;
  background: var(--flieder-dim);
  border: 2px solid var(--flieder);
  border-radius: 50px;
  color: var(--flieder);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.2s;
  animation: abschlussTitel 0.6s ease-out 0.9s both;
  min-height: var(--touch-min);
  display: inline-flex;
  align-items: center;
}

.abschluss-zurueck:active {
  transform: scale(0.96);
}

/* Konfetti-Canvas – initial versteckt, wird per JS aktiviert */
#konfetti-canvas {
  display: none;
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99;
}

/* ══════════════════════════════════════════
   TESTTAG-BEREICH
══════════════════════════════════════════ */
.test-karte {
  background: rgba(30, 15, 5, 0.92);
  border: 2px solid rgba(255,183,77,0.35);
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 0 30px rgba(255,183,77,0.08);
}

.test-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #ffb74d;
  border: 1px solid rgba(255,183,77,0.4);
  border-radius: 20px;
  padding: 4px 14px;
  margin-bottom: 16px;
}

.test-anweisung {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  margin-bottom: 20px;
}

.test-ziel-box {
  display: inline-block;
  background: rgba(255,183,77,0.08);
  border: 2px solid rgba(255,183,77,0.4);
  border-radius: 12px;
  padding: 16px 32px;
  margin-bottom: 16px;
}

.test-ziel-label {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,183,77,0.6);
  margin-bottom: 6px;
}

.test-ziel-zahl {
  font-size: 2.4rem;
  font-weight: 900;
  color: #ffb74d;
  line-height: 1;
}

.test-ziel-einheit {
  font-size: 0.75rem;
  color: rgba(255,183,77,0.7);
  letter-spacing: 0.1em;
  margin-top: 4px;
}

.test-rang-info {
  font-size: 0.78rem;
  color: rgba(255,183,77,0.8);
  font-style: italic;
  margin-top: 8px;
}

/* ══════════════════════════════════════════
   PDF DOWNLOAD BUTTON – fixiert rechts oben
══════════════════════════════════════════ */
.pdf-download-btn {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--flieder-border);
  border-radius: 12px;
  padding: 10px 16px;
  text-decoration: none;
  color: var(--text-dim);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  line-height: 1.35;
  transition: all 0.22s ease;
  box-shadow: 0 2px 16px rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  min-height: var(--touch-min);
}

.pdf-download-btn:hover,
.pdf-download-btn:active {
  border-color: var(--flieder);
  color: var(--flieder);
  box-shadow: 0 0 20px var(--flieder-glow), 0 4px 20px rgba(0,0,0,0.5);
  transform: translateY(-1px);
}

.pdf-btn-icon {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
}

.pdf-btn-text {
  text-transform: uppercase;
  font-weight: 500;
}

.pdf-btn-text strong {
  display: block;
  color: var(--flieder);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  font-weight: 800;
}

/* Auf kleinen Bildschirmen: nur Icon + PDF anzeigen */
@media (max-width: 480px) {
  .pdf-download-btn { padding: 10px 12px; gap: 6px; }
  .pdf-btn-text { display: none; }
  .pdf-btn-icon { font-size: 1.6rem; }
}

/* ══════════════════════════════════════════
   FOOTER
══════════════════════════════════════════ */
.footer {
  text-align: center;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-top: 16px;
  border-top: 1px solid var(--flieder-border);
  opacity: 0.6;
}

/* ══════════════════════════════════════════
   RESPONSIVE – Breiten-Breakpoints
══════════════════════════════════════════ */
@media (max-width: 640px) {
  .wrapper { padding: 16px 14px 48px; gap: 14px; }
  .tage-grid { grid-template-columns: 1fr; }
  .saetze-tabelle { gap: 6px; }
  .satz-zelle { min-width: 52px; padding: 8px 10px; }
}

@media (min-width: 768px) and (max-width: 1024px) {
  /* iPad-spezifische Optimierungen */
  .tage-grid { grid-template-columns: repeat(2, 1fr); }

  /* Timer-Kreis für iPad */
  .timer-btn {
    width: 220px;
    height: 220px;
  }
}

@media (min-width: 1024px) {
  .tage-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ══════════════════════════════════════════
   PC-SKALIERUNG: Basis-Schriftgröße erhöhen
   22px ≈ 137% von default 16px (≈ Zoom 140%)
   Alle rem-Werte skalieren automatisch mit.
   Feste px-Werte werden manuell angepasst.
   Betrifft nur Bildschirme ab 1025px Breite
   (iPad max. 1024px → nicht betroffen).
══════════════════════════════════════════ */
@media (min-width: 1025px) {
  /* Basis-Schriftgröße: alle rem-Werte skalieren automatisch */
  html { font-size: 22px; }

  /* Timer-Kreis: fixer px-Wert manuell hochskaliert (260 × 1.37 ≈ 360px) */
  .timer-btn {
    width: 360px;
    height: 360px;
  }

  /* Fortschritts-Dots: 8px → 11px */
  .fdot {
    width: 11px;
    height: 11px;
  }

  /* Satz-Zellen in der Tabelle: min-width 60px → 82px */
  .satz-zelle {
    min-width: 82px;
  }
}

/* ══════════════════════════════════════════
   HÖHEN-RESPONSIVE – Kompaktmodus
   Greift bei iPad Landscape und kleinen
   Bildschirmen (Höhe unter 850px)
   Ziel: alles auf einen Blick ohne Scrollen
══════════════════════════════════════════ */
@media (max-height: 850px) {
  /* Kopfbereich komprimieren */
  .detail-woche    { margin-bottom: 2px; }
  .detail-titel    { font-size: clamp(1.3rem, 3.5vw, 2rem); }
  .detail-tagnr    { font-size: 0.68rem; margin-bottom: 4px; }
  .fortschritt-dots { margin: 4px 0; gap: 5px; }
  .fdot { width: 7px; height: 7px; }

  /* Sätze-Karte komprimieren */
  .saetze-wrap     { padding: 10px 16px; }
  .saetze-label    { margin-bottom: 6px; }
  .saetze-gesamt   { margin-top: 6px; }
  .satz-zelle      { padding: 6px 10px; }
  .satz-wdh        { font-size: 1.2rem; }

  /* Anweisung ausblenden – spart ~45px, Info steht im Trainingsplan */
  .anweisung { display: none; }

  /* Timer-Kreis kleiner */
  .timer-btn {
    width: clamp(140px, 28vw, 190px);
    height: clamp(140px, 28vw, 190px);
  }

  /* Zitat kompakter */
  .zitat { font-size: 0.7rem; }
}

/* Noch kompakter für Landscape auf kleinen iPads / iPhone Landscape */
@media (max-height: 700px) {
  .detail-titel    { font-size: clamp(1.1rem, 3vw, 1.6rem); }
  .fortschritt-dots { display: none; } /* Dots weglassen bei extrem wenig Platz */
  .saetze-wrap     { padding: 8px 12px; }
  .timer-btn {
    width: clamp(120px, 25vw, 160px);
    height: clamp(120px, 25vw, 160px);
  }
  .zitat { display: none; }
}
