:root {
  --accent: #4facfe; /* Haupt-Akzentfarbe */
  --accent-dark: #00f2fe; /* Zweite Akzentfarbe für Verläufe */
  --bg-card: rgba(30, 41, 59, 0.8); /* Hintergrund für Karten */
  --text-white: #ffffff; /* Standard-Textfarbe */
  --border-light: rgba(255, 255, 255, 0.1); /* Heller Rand */
  --bg-soft: rgba(255, 255, 255, 0.05); /* Leichter Hintergrund */
  --focus-bg: rgba(79, 172, 254, 0.2); /* Fokus-Hintergrund */
}

*,
*::before,
*::after {
  box-sizing: border-box; /* Padding und Border werden in die Breite mit eingerechnet */
}

html {
  scroll-behavior: smooth; /* Sanftes Scrollen bei Ankerlinks */
}

body {
  margin: 0; /* Entfernt Standard-Aussenabstand */
  font-family: "Segoe UI", sans-serif; /* Schriftart */
  line-height: 1.5; /* Zeilenhöhe für bessere Lesbarkeit */
  color: var(--text-white); /* Textfarbe */
  background:
    linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
    /* Dunkler Overlay-Verlauf */ url("img/stadium.jpg") center / cover fixed; /* Hintergrundbild */
}

/* HINTERGRUND / LAYOUT */
.overlay {
  min-height: 100vh; /* Mindestens volle Bildschirmhöhe */
  padding: 20px; /* Innenabstand */
}

.container {
  max-width: 850px; /* Maximale Breite */
  margin: 0 auto; /* Zentriert den Container */
}

/* HEADER */
.main-header {
  display: flex; /* Flexbox aktivieren */
  align-items: center; /* Vertikale Zentrierung */
  gap: 20px; /* Abstand zwischen Logo und Text */
  margin-bottom: 40px; /* Abstand nach unten */
}

.header-info h1 {
  margin: 0; /* Entfernt Standardabstand */
  font-size: 2rem; /* Schriftgrösse */
}

.author-info {
  margin: 5px 0 0; /* Nur Abstand oben */
  opacity: 0.85; /* Leicht transparenter Text */
}

/* LOGO */
.logo-box {
  position: relative; /* Für absolute Positionierung des Balles */
  width: 80px; /* Breite */
  height: 80px; /* Höhe */
  flex-shrink: 0; /* Verhindert Schrumpfen */
  border-radius: 15px; /* Abgerundete Ecken */
  display: flex; /* Flexbox */
  align-items: center; /* Vertikale Zentrierung */
  justify-content: center; /* Horizontale Zentrierung */
  background: linear-gradient(
    135deg,
    var(--accent),
    var(--accent-dark)
  ); /* Farbverlauf */
}

.logo-text {
  font-family: "Arial Black", sans-serif; /* Kräftige Schrift */
  font-size: 40px; /* Schriftgrösse */
  font-weight: 900; /* Sehr fett */
  letter-spacing: -2px; /* Zeichen enger zusammen */
  transform: skewX(-5deg); /* Leicht schräg */
  background: linear-gradient(to bottom, #ffffff, #888888); /* Textverlauf */
  background-clip: text; /* Verlauf nur im Text */
  -webkit-background-clip: text; /* Safari/Chrome Unterstützung */
  color: transparent; /* Text durchsichtig */
  -webkit-text-fill-color: transparent; /* Chrome/Safari durchsichtig */
}

.logo-ball {
  position: absolute; /* Frei positionierbar */
  right: -8px; /* Etwas nach rechts */
  bottom: -8px; /* Etwas nach unten */
  font-size: 30px; /* Grösse vom Ball */
  animation: spin 4s linear infinite; /* Rotationsanimation */
}

@keyframes spin {
  from {
    transform: rotate(0deg); /* Startposition */
  }

  to {
    transform: rotate(360deg); /* Volle Drehung */
  }
}

/* HERO / BUTTON */
.btn {
  display: inline-block; /* Damit Padding und Grösse sauber wirken */
  padding: 10px 20px; /* Innenabstand */
  border-radius: 8px; /* Abgerundete Ecken */
  font-weight: 700; /* Fett */
  text-decoration: none; /* Unterstreichung entfernen */
  color: white; /* Textfarbe */
  background: var(--accent); /* Hintergrundfarbe */
  transition:
    transform 0.2s ease,
    opacity 0.2s ease,
    background 0.2s ease; /* Sanfte Übergänge */
}

.btn:hover {
  opacity: 0.9; /* Leicht transparenter */
  transform: translateY(-1px); /* Minimal nach oben */
}

.btn:focus-visible {
  outline: 2px solid white; /* Fokus-Rahmen */
  outline-offset: 2px; /* Abstand vom Rand */
}

/* CARDS */
.card {
  margin-top: 20px; /* Abstand oben */
  margin-bottom: 25px; /* Abstand unten */
  padding: 25px; /* Innenabstand */
  border: 1px solid var(--border-light); /* Feiner Rand */
  border-radius: 15px; /* Runde Ecken */
  background: var(--bg-card); /* Hintergrund */
}

.status-footer-box {
  display: flex; /* Flexbox */
  justify-content: space-between; /* Inhalt auseinander */
  align-items: center; /* Vertikal zentriert */
  gap: 20px; /* Abstand */
  background: rgba(79, 172, 254, 0.1); /* Leichter blauer Hintergrund */
}

.status-info p {
  margin: 5px 0; /* Abstand bei Absätzen */
  font-size: 0.95rem; /* Leicht kleinere Schrift */
}

/* ÜBUNGEN */
.group-label {
  margin: 30px 0 10px; /* Abstand oben/unten */
  font-size: 1.2rem; /* Schriftgrösse */
  color: var(--accent); /* Akzentfarbe */
}

.exercise-card {
  margin-bottom: 10px; /* Abstand nach unten */
  border: 1px solid var(--border-light); /* Rand */
  border-radius: 10px; /* Runde Ecken */
  overflow: hidden; /* Überlauf abschneiden */
  background: var(--bg-soft); /* Leichter Hintergrund */
}

.exercise-card:focus-within,
.exercise-card:focus {
  outline: 3px solid var(--accent); /* Fokus-Rahmen */
  outline-offset: 0; /* Kein Abstand nach aussen */
  background: var(--focus-bg); /* Leichter Fokus-Hintergrund */
}

.exercise-header {
  width: 100%; /* Volle Breite */
  padding: 15px; /* Innenabstand */
  border: none; /* Kein Standardrahmen */
  display: flex; /* Flexbox */
  justify-content: space-between; /* Text links, Symbol rechts */
  align-items: center; /* Vertikale Zentrierung */
  background: transparent; /* Kein Hintergrund */
  color: white; /* Schriftfarbe */
  text-align: left; /* Text links */
  font-size: 1.1rem; /* Schriftgrösse */
  cursor: pointer; /* Hand-Cursor */
  transition: background 0.2s ease; /* Hover-Übergang */
}

.exercise-header:hover {
  background: rgba(255, 255, 255, 0.06); /* Leicht heller bei Hover */
}

.exercise-header:focus-visible {
  outline: 2px solid white; /* Fokus-Rahmen */
  outline-offset: -2px; /* Nach innen */
}

.exercise-content {
  display: none; /* Anfangs versteckt */
  padding: 15px; /* Innenabstand */
  border-top: 1px solid var(--border-light); /* Trennlinie oben */
}

.exercise-content.is-open {
  display: block; /* Sichtbar, wenn offen */
}

/* GALLERY */
.gallery {
  display: flex; /* Bilder nebeneinander */
  gap: 10px; /* Abstand zwischen Bildern */
  overflow-x: auto; /* Horizontal scrollen falls nötig */
  padding: 10px 0; /* Innenabstand oben/unten */
  scrollbar-width: thin; /* Dünne Scrollbar in Firefox */
}

.gallery img {
  display: block; /* Verhindert unsauberen Inline-Abstand */
  height: 80px; /* Einheitliche Bildhöhe */
  width: auto; /* Breite automatisch */
  border-radius: 6px; /* Runde Ecken */
  cursor: pointer; /* Klickbar */
  transition:
    transform 0.2s ease,
    opacity 0.2s ease; /* Hover-Effekt */
}

.gallery img:hover {
  opacity: 0.9; /* Leicht transparenter */
  transform: scale(1.03); /* Minimal grösser */
}

.gallery img:focus-visible {
  outline: 2px solid white; /* Fokus-Rahmen */
  outline-offset: 2px; /* Abstand */
}

/* MODAL */
.modal {
  position: fixed; /* Immer über dem Bildschirm */
  inset: 0; /* Deckt alles ab */
  z-index: 1000; /* Ganz vorne */
  display: none; /* Anfangs unsichtbar */
  align-items: center; /* Vertikal zentriert */
  justify-content: center; /* Horizontal zentriert */
  padding: 20px; /* Innenabstand */
  background: rgba(0, 0, 0, 0.9); /* Dunkler Hintergrund */
}

.modal-nav {
  display: flex; /* Pfeile und Bild nebeneinander */
  align-items: center; /* Vertikal zentriert */
  justify-content: center; /* Horizontal zentriert */
  gap: 20px; /* Abstand */
  width: 100%; /* Volle Breite */
  height: 100%; /* Volle Höhe */
}

.modal-content {
  display: block; /* Saubere Bilddarstellung */
  max-width: 75vw; /* Maximal 75% der Bildschirmbreite */
  max-height: 75vh; /* Maximal 75% der Bildschirmhöhe */
  border: 3px solid var(--accent); /* Rahmen */
  border-radius: 10px; /* Runde Ecken */
}

.nav-btn,
.close-modal {
  border: none; /* Kein Standardrahmen */
  color: white; /* Textfarbe */
  background: transparent; /* Kein Hintergrund */
  cursor: pointer; /* Hand-Cursor */
}

.nav-btn {
  font-size: 50px; /* Grösse der Pfeile */
  line-height: 1; /* Enge Zeilenhöhe */
}

.close-modal {
  position: absolute; /* Frei positionieren */
  top: 20px; /* Abstand von oben */
  right: 20px; /* Abstand von rechts */
  font-size: 40px; /* Grösse des X */
  line-height: 1; /* Enge Zeilenhöhe */
}

.nav-btn:hover,
.close-modal:hover {
  opacity: 0.8; /* Hover-Effekt */
}

.nav-btn:focus-visible,
.close-modal:focus-visible {
  outline: 2px solid white; /* Fokus sichtbar */
  outline-offset: 2px; /* Abstand */
  border-radius: 5px; /* Runde Ecken */
}

/* FOOTER */
.main-footer {
  margin-top: 50px; /* Abstand nach oben */
  padding: 30px; /* Innenabstand */
  border-radius: 15px 15px 0 0; /* Nur oben rund */
  background: rgba(0, 0, 0, 0.5); /* Dunkler Hintergrund */
}

.footer-grid {
  display: flex; /* Zwei Bereiche nebeneinander */
  justify-content: space-between; /* Auseinanderziehen */
  gap: 20px; /* Abstand */
}

.footer-section {
  flex: 1; /* Gleichmässige Verteilung */
}

.logo-box-small {
  width: 40px; /* Breite */
  height: 40px; /* Höhe */
  margin-bottom: 10px; /* Abstand unten */
  border-radius: 8px; /* Runde Ecken */
  display: flex; /* Flexbox */
  align-items: center; /* Zentriert vertikal */
  justify-content: center; /* Zentriert horizontal */
  background: var(--accent); /* Hintergrundfarbe */
  font-weight: bold; /* Fettschrift */
}

/* MOBILE */
@media (max-width: 600px) {
  .overlay {
    padding: 15px; /* Weniger Rand auf kleinen Geräten */
  }

  .main-header {
    flex-direction: column; /* Logo und Text untereinander */
    text-align: center; /* Zentrierter Text */
  }

  .header-info {
    margin-top: 10px; /* Abstand nach oben */
  }

  .header-info h1 {
    font-size: 1.5rem; /* Kleinere Überschrift */
  }

  .card {
    padding: 15px; /* Kompaktere Karten */
  }

  .status-footer-box {
    flex-direction: column; /* Inhalt untereinander */
    text-align: center; /* Zentriert */
  }

  .footer-grid {
    flex-direction: column; /* Footer-Spalten untereinander */
    text-align: center; /* Zentriert */
  }

  .logo-box-small {
    margin: 0 auto 10px; /* Kleines Logo zentrieren */
  }

  .modal-nav {
    gap: 10px; /* Weniger Abstand im Modal */
  }

  .modal-content {
    max-width: 68vw; /* Etwas kleiner auf Mobile */
    max-height: 65vh; /* Etwas kleiner auf Mobile */
  }

  .nav-btn {
    font-size: 36px; /* Kleinere Pfeile */
  }

  .close-modal {
    top: 12px; /* Weniger Abstand oben */
    right: 12px; /* Weniger Abstand rechts */
    font-size: 34px; /* Kleineres X */
  }

  body {
    background-attachment: scroll; /* Auf Handy oft stabiler als fixed */
  }
}
