/* App-ähnliches Design für Pfeilfang */

/* PWA Safe Area Unterstützung für iPhone */
:root {
  /* Safe Area CSS-Variablen für Notch/Dynamic Island */
  --safe-area-inset-top: env(safe-area-inset-top);
  --safe-area-inset-right: env(safe-area-inset-right);
  --safe-area-inset-bottom: env(safe-area-inset-bottom);
  --safe-area-inset-left: env(safe-area-inset-left);
  
  /* Fallback-Werte für ältere Browser */
  --safe-area-inset-top: 0px;
  --safe-area-inset-right: 0px;
  --safe-area-inset-bottom: 0px;
  --safe-area-inset-left: 0px;
}

/* iOS PWA spezifische Anpassungen */
@supports (padding-top: env(safe-area-inset-top)) {
  :root {
    --safe-area-inset-top: env(safe-area-inset-top);
    --safe-area-inset-right: env(safe-area-inset-right);
    --safe-area-inset-bottom: env(safe-area-inset-bottom);
    --safe-area-inset-left: env(safe-area-inset-left);
  }
}

/* Reset und Basis */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-attachment: fixed;
  color: white;
  line-height: 1.5;
}

/* App-Container */
.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 100vw;
  overflow-x: hidden;
}

/* App-Header */
.app-header {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem;
  /* PWA Safe Area: Extra Padding oben für iPhone Notch/Dynamic Island */
  padding-top: calc(1rem + var(--safe-area-inset-top));
  padding-left: calc(1rem + var(--safe-area-inset-left));
  padding-right: calc(1rem + var(--safe-area-inset-right));
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* PWA Status Bar Hintergrund für iOS */
@media (display-mode: standalone) {
  .app-header {
    /* Lila Hintergrund für Status Bar - passt zur App */
    background: linear-gradient(
      to bottom,
      #764ba2 0%,
      #764ba2 var(--safe-area-inset-top),
      rgba(255, 255, 255, 0.1) var(--safe-area-inset-top),
      rgba(255, 255, 255, 0.1) 100%
    );
  }
  
  /* Body Hintergrund für Safe Area auch anpassen */
  body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    /* Extra Padding oben für nahtlosen Übergang */
    padding-top: var(--safe-area-inset-top);
  }
}

.app-header h1 {
  font-size: 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.app-logo {
  height: 1.5rem;
  width: auto;
}

.app-nav {
  display: flex;
  gap: 0.5rem;
}

/* App-Content */
.app-content {
  flex: 1;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
}

/* App-Cards */
.app-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 1.5rem;
  margin: 0.5rem 0;
  width: 100%;
  max-width: 400px; /* Mobile first */
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.1),
    0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-card:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.15),
    0 4px 12px rgba(0, 0, 0, 0.1);
}

/* App-Buttons */
.app-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white !important;
  font-weight: 500;
  border-radius: 16px;
  padding: 14px 24px;
  margin: 4px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  backdrop-filter: blur(10px);
  min-width: 120px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  
  /* Safari-spezifische Fixes */
  -webkit-appearance: none;
  appearance: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  box-sizing: border-box;
}

.app-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.15),
    0 4px 12px rgba(0, 0, 0, 0.1);
}

.app-btn:active {
  transform: translateY(0);
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.1),
    0 2px 8px rgba(0, 0, 0, 0.05);
}

.app-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Checkbox Styling */
.app-checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.app-checkbox {
  margin-right: 0.5rem;
  width: 16px;
  height: 16px;
  accent-color: #60a5fa;
}

.app-checkbox-text {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.9);
}

/* Button Varianten */
.app-btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  border: none !important;
  color: white !important;
  -webkit-text-fill-color: white !important;
}

.app-btn-primary:hover {
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%) !important;
  color: white !important;
  -webkit-text-fill-color: white !important;
}

.app-btn-secondary {
  background: linear-gradient(135deg, #6e5db4 0%, #5a4a9a 100%) !important;
  border: none !important;
  color: white !important;
  -webkit-text-fill-color: white !important;
}

.app-btn-secondary:hover {
  background: linear-gradient(135deg, #5a4a9a 0%, #4a3a85 100%) !important;
  color: white !important;
  -webkit-text-fill-color: white !important;
}

.app-btn-success {
  background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%) !important;
  border: none !important;
  color: white !important;
  -webkit-text-fill-color: white !important;
}

.app-btn-success:hover {
  background: linear-gradient(135deg, #3dd070 0%, #1ea54a 100%) !important;
  color: white !important;
  -webkit-text-fill-color: white !important;
}

.app-btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  border: none !important;
  color: white !important;
  -webkit-text-fill-color: white !important;
}

.app-btn-danger:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
  color: white !important;
  -webkit-text-fill-color: white !important;
}

.app-btn-warning {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
  border: none !important;
  color: white !important;
  -webkit-text-fill-color: white !important;
}

.app-btn-warning:hover {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: white !important;
  -webkit-text-fill-color: white !important;
}

/* App-Inputs */
.app-input {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white !important;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 1rem;
  width: 100%;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  
  /* Safari-spezifische Fixes */
  -webkit-appearance: none;
  appearance: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  box-sizing: border-box;
  -webkit-text-fill-color: white;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
}

.app-input::placeholder {
  color: rgba(255, 255, 255, 0.6) !important;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.6);
}

.app-input::-webkit-input-placeholder {
  color: rgba(255, 255, 255, 0.6) !important;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.6);
}

.app-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
  -webkit-text-fill-color: white !important;
}

/* Passwort-Toggle */
.password-input-container {
  position: relative;
  display: flex;
  align-items: center;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 2;
}

.password-toggle:hover {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.1);
}

.password-toggle:active {
  transform: translateY(-50%) scale(0.95);
}

/* App-Form */
.app-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 400px;
}

.app-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.app-form-group label {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
}

/* App-Text */
.app-text {
  color: white;
  font-weight: 400;
}

.app-text-light {
  color: rgba(255, 255, 255, 0.8);
}

.app-text-center {
  text-align: center;
}

/* App-Target */
.app-target-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1rem 0;
}

/* Target Wrap - KRITISCH für Arrow-Point Positionierung */
#targetWrap {
  position: relative;
  display: inline-block;
}

/* Final Arrow Points - sichtbare graue Punkte */
.final-arrow-point {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #CCCCCC;
  border: 1px solid #FFFFFF;
  border-radius: 50%;
  z-index: 1000;
  pointer-events: none;
  transform: translate(-50%, -50%);
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.app-target {
  width: 280px;
  height: 280px;
  object-fit: contain;
  cursor: crosshair;
  user-select: none;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Tracking-Punkte */
.tracking-dot-container {
  position: absolute;
  z-index: 20;
  transition: all 0.2s ease;
}

.tracking-dot-container:hover {
  transform: translate(-50%, -50%) scale(1.05);
}

.tracking-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
  cursor: pointer;
}

.tracking-dot:hover {
  transform: scale(1.1);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.4),
    0 0 0 2px rgba(255, 255, 255, 0.9);
}

.points-display {
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  white-space: nowrap;
  pointer-events: none;
  transition: all 0.2s ease;
  opacity: 0.9;
}

.tracking-dot-container:hover .points-display {
  opacity: 1;
  transform: translateX(-50%) scale(1.1);
}

.delete-icon {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 16px;
  height: 16px;
  background: #ef4444;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  border: 1px solid white;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
  opacity: 0.8;
}

.tracking-dot-container:hover .delete-icon {
  opacity: 1;
}

.delete-icon:hover {
  transform: scale(1.2) !important;
  background: #dc2626 !important;
}

/* App-Dialog */
.app-dialog {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 20px;
  padding: 1.5rem;
  margin: 1rem auto;
  max-width: 400px; /* Mobile first */
  width: calc(100% - 2rem);
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.3),
    0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Desktop: Moderate Vergrößerung */
@media (min-width: 769px) {
  .app-dialog {
    margin: 2rem auto;
    max-width: 600px; /* Moderat größer */
  }
}

.app-dialog h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-align: center;
}

.app-dialog h4 {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

/* App-List */
.app-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1rem 0;
}

.app-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.app-list-item:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.app-list-info {
  flex: 1;
}

.app-list-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.app-list-name {
  font-weight: 500;
  color: #fff;
}

.app-list-date {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
}

.app-list-details {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
}

.app-list-actions {
  display: flex;
  gap: 0.5rem;
}

/* App-Counter */
.app-counter {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 1rem;
  text-align: center;
  margin: 1rem 0;
}

.app-counter span {
  font-weight: 700;
  font-size: 1.25rem;
}

/* App-Help */
.app-help {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 1rem;
  margin: 1rem 0;
  text-align: center;
}

.app-help h4 {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.app-help p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  line-height: 1.4;
  margin-bottom: 0.25rem;
}

/* Utility Classes */
.hidden {
  display: none !important;
}

.app-full-width {
  width: 100%;
}

.app-text-center {
  text-align: center;
}

.app-mb-1 {
  margin-bottom: 0.5rem;
}

.app-mb-2 {
  margin-bottom: 1rem;
}

.app-mt-1 {
  margin-top: 0.5rem;
}

.app-mt-2 {
  margin-top: 1rem;
}

/* Mobile Optimizations - Verbessert */
@media (max-width: 480px) {
  /* Bessere Breitenkontrolle */
  .app-container {
    max-width: 100vw;
    overflow-x: hidden;
  }
  
  .app-content {
    padding: 0.5rem;
    width: 100%;
    max-width: 100%;
  }
  
  /* Analysis-Seite: Noch weniger Padding für mehr Platz */
  .analysis-page .app-content {
    padding: 0.25rem;
  }
  
  .app-card {
    padding: 1rem;
    margin: 0.25rem 0; /* Schon reduziert für Mobile */
    max-width: none;
    width: 100%;
  }
  
  /* Analysis-Seite auf Mobile noch dichter */
  .analysis-page .app-card {
    margin: 0.15rem 0; /* Noch dichter für Analysis */
  }
  
  /* Touch-freundliche Buttons */
  .app-btn {
    padding: 12px 20px;
    font-size: 0.9rem;
    min-width: 100px;
    min-height: 48px; /* Touch-Standards */
  }
  
  /* Touch-freundliche Inputs */
  .app-input {
    min-height: 44px;
    font-size: 16px; /* Verhindert Zoom auf iOS */
    padding: 12px 16px;
  }
  
  .app-target {
    width: 240px;
    height: 240px;
  }
  
  .app-header {
    padding: 0.75rem;
  }
  
  .app-header h1 {
    font-size: 1.1rem;
  }
  
  .app-logo {
    height: 1.25rem;
  }
  
  /* Kompakte Arrow-Liste für Mobile */
  .app-arrow-item {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem;
    font-size: 0.8rem;
  }
  
  .app-arrow-info {
    flex: 1;
    min-width: 0; /* Ermöglicht text-overflow */
  }
  
  .app-arrow-number {
    font-size: 0.8rem;
    white-space: nowrap;
  }
  
  .app-arrow-score {
    margin: 0;
    min-width: 45px;
    text-align: center;
  }
  
  .app-arrow-ring {
    font-size: 0.75rem;
    font-weight: 600;
  }
  
  .app-arrow-flag {
    width: 6px;
    height: 20px;
  }
}

/* Tablet Optimizations */
@media (min-width: 481px) and (max-width: 768px) {
  .app-target {
    width: 320px;
    height: 320px;
  }
  
  .app-card {
    max-width: 500px;
  }
}

/* Desktop Optimizations - Vernünftig breiter */
@media (min-width: 769px) {
  .app-content {
    padding: 2rem;
    max-width: 1000px; /* Vernünftig breiter */
    margin: 0 auto;
  }
  
  .app-card {
    max-width: 800px; /* Vernünftig breiter für mittlere Desktop-Größen */
  }
  
  .app-target {
    width: 400px;
    height: 400px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   DESKTOP LAYOUT OPTIMIERUNG - PROGRESSIVE ENHANCEMENT
   ═══════════════════════════════════════════════════════════════ */

/* Tablet - Erste Erweiterung */
@media (min-width: 768px) {
  .app-card {
    max-width: 650px; /* Moderat breiter ab Tablet */
    padding: 2rem;
  }
  
  .app-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem 2rem;
  }
}

/* Large Desktop - Angemessen breitere Nutzung */
@media (min-width: 1024px) {
  .app-card {
    max-width: 1000px; /* Angemessen breiter für Desktop */
    padding: 2.5rem 3rem;
  }
  
  .app-content {
    max-width: 1200px; /* Vernünftiger Container */
    padding: 1rem 3rem;
  }
  
  /* Analysis-Seite braucht mehr Platz */
  .app-content.analysis-page {
    max-width: 1700px; /* Breiter für Analysis-Grid */
  }
  
  /* Dialogs vernünftig breiter auf Desktop */
  .app-dialog {
    max-width: 750px; /* Vernünftig breiter, nicht übertrieben */
    padding: 2.5rem;
  }
  
  /* Kleinere Dialoge bleiben kompakt */
  .app-dialog#dlg-start,
  .app-dialog#dlg-date,
  .app-dialog#dlg-no-templates {
    max-width: 500px; /* Kompakter für einfache Dialoge */
    padding: 2rem;
  }
  
  /* Bessere Zentrierung für Dialog-Inhalte */
  .app-dialog#dlg-start .app-form,
  .app-dialog#dlg-date .app-form,
  .app-dialog#dlg-no-templates .app-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: none !important; /* Überschreibe die normale app-form Begrenzung */
  }
  
  /* Training-Liste zentriert aber vollbreit */
  .app-dialog#dlg-start .app-list {
    width: 100%;
    max-width: none;
    align-self: stretch; /* Vollbreit innerhalb des zentrierten Containers */
  }
  
  .app-dialog#dlg-start .app-loading,
  .app-dialog#dlg-start .app-empty {
    width: 100%;
    max-width: none;
    text-align: center;
  }
  
  /* Button-Container auch zentriert - spezifischer Selektor */
  .app-dialog#dlg-start .app-form[style*="margin-top"] {
    flex-direction: row !important;
    justify-content: center;
    align-items: center;
    gap: 1rem;
  }
  
  /* Analysis Page: Grid Layout - DEUTLICH breiter für Desktop */
  .analysis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem; /* Halbierter Abstand für dichtere Darstellung */
    width: 100%;
    max-width: 1600px; /* VIEL breiter für bessere Datenvisualisierung */
    margin: 0 auto;
    padding: 0 3rem;
  }
  
  .analysis-grid .app-card {
    margin: 0;
    max-width: none;
    padding: 2rem; /* Reduziertes Padding für dichtere Darstellung */
  }
  
  /* Filter und Übersicht vollbreit */
  .analysis-grid .filter-card,
  .analysis-grid .overview-card {
    grid-column: 1 / -1;
  }
  
  /* Charts übereinander (vollbreit) */
  .analysis-grid .chart-card {
    grid-column: 1 / -1;
  }
  
  /* Letzte Trainings vollbreit */
  .analysis-grid .recent-card {
    grid-column: 1 / -1;
  }
  
  /* Index Page: Bessere Button-Anordnung */
  .main-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    max-width: 800px;
  }
  
  .main-actions .primary-action {
    grid-column: 1 / -1;
  }
  
  /* Record Page: Nebeneinander-Layout */
  .record-layout {
    display: grid;
    grid-template-columns: 2fr 400px;
    gap: 2rem;
    max-width: 1800px; /* Deutlich breiter */
    width: 100%;
    margin: 0 auto;
  }
  
  .record-layout .target-section {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .record-layout .controls-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  
  /* Target größer auf Desktop */
  .record-layout .app-target {
    width: min(600px, 70vw);
    height: min(600px, 70vw);
    max-width: 600px;
    max-height: 600px;
  }
}

/* Ultra-Wide Displays - Optimale Platznutzung */
@media (min-width: 1440px) {
  .app-card {
    max-width: 1200px; /* Optimale Breite für große Bildschirme */
    padding: 3rem 4rem;
  }
  
  .app-content {
    max-width: 1400px; /* Vernünftige Breite */
    padding: 1rem 4rem;
  }
  
  /* Analysis-Seite MAXIMAL breit für Ultra-Wide */
  .app-content.analysis-page {
    max-width: 1900px; /* MAXIMALE Breite für Analysis */
  }
  
  .app-dialog {
    max-width: 850px; /* Angemessen breiter für Ultra-Wide */
    padding: 3rem;
  }
  
  /* Kleinere Dialoge auch auf Ultra-Wide kompakt halten */
  .app-dialog#dlg-start,
  .app-dialog#dlg-date,
  .app-dialog#dlg-no-templates {
    max-width: 550px; /* Etwas größer auf Ultra-Wide, aber noch kompakt */
    padding: 2.5rem;
  }
  
  /* Zentrierung bleibt auch auf Ultra-Wide erhalten */
  .app-dialog#dlg-start .app-form,
  .app-dialog#dlg-date .app-form,
  .app-dialog#dlg-no-templates .app-form {
    align-items: center;
  }
  
  /* Training-Liste auch auf Ultra-Wide optimal */
  .app-dialog#dlg-start .app-list {
    align-self: stretch;
  }
  
  .app-dialog#dlg-start .app-form[style*="margin-top"] {
    justify-content: center;
    flex-direction: row !important;
  }
  
  /* Analysis Grid MAXIMAL breit für Ultra-Wide */
  .analysis-grid {
    max-width: 1800px; /* MAXIMALE Breite für Ultra-Wide */
    grid-template-columns: 1fr 1fr; /* 2 Spalten bleiben lesbar */
    gap: 2rem; /* Halbierter Abstand auch für Ultra-Wide */
    padding: 0 4rem;
  }
  
  /* Charts bekommen mehr Platz */
  .analysis-grid .chart-card {
    grid-column: 1 / -1; /* Vollbreit für Charts */
  }
  
  /* Record Page: Optimierte Proportionen */
  .record-layout {
    max-width: 1600px; /* Moderate Breite für bessere UX */
    grid-template-columns: 2fr 400px; /* Ausgewogene Proportionen */
    gap: 3rem;
    padding: 0 3rem;
  }
  
  .record-layout .app-target {
    width: min(800px, 60vw);
    height: min(800px, 60vw);
    max-width: 800px;
    max-height: 800px;
  }
}

/* Focus Styles */
*:focus {
  outline: none;
}

.app-btn:focus,
.app-input:focus {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE SCROLL-KONFLIKT LÖSUNG
   ═══════════════════════════════════════════════════════════════ */

/* Verhindert Body-Scrolling bei offenen Dialogs */
body.dialog-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  /* Speichere die aktuelle Scroll-Position */
  top: var(--scroll-y, 0);
}

/* Dialog-Container mit eigenem Scroll-Kontext */
.app-dialog {
  /* Existierende Styles bleiben... */
  /* Scroll-Isolation für Mobile */
  touch-action: pan-y;
  overscroll-behavior: contain;
  /* Verhindert Bounce-Scrolling */
  -webkit-overflow-scrolling: touch;
}

/* Scroll-Container in Dialogs */
.dialog-scroll-container {
  max-height: 60vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  /* Klare Scroll-Bereiche definieren */
  touch-action: pan-y;
}

/* Spezifische Scroll-Container */
.setup-detail-sections,
.app-arrow-list,
.sight-marks-list {
  overscroll-behavior: contain;
  touch-action: pan-y;
}

/* Loading States */
.app-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.app-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Empty States */
.app-empty {
  text-align: center;
  padding: 2rem;
  color: rgba(255, 255, 255, 0.7);
}

.app-empty svg {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  opacity: 0.5;
}

/* Arrow List */
.app-arrow-list {
  max-height: 200px;
  overflow-y: auto;
  padding: 0.5rem;
  -webkit-overflow-scrolling: touch;
  /* Verhindert Parent-Scroll während Scroll in dieser Liste */
  overscroll-behavior: contain;
}

.app-arrow-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
  font-size: 0.875rem;
  gap: 0.75rem;
  min-height: auto;
  flex-wrap: nowrap; /* Verhindert Umbruch */
}

.app-arrow-flag {
  width: 8px;
  height: 30px;
  border-radius: 2px;
  flex-shrink: 0;
}

.app-arrow-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.app-arrow-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 0; /* Ermöglicht text-overflow bei langen Texten */
}

.app-arrow-number {
  font-weight: 600;
  color: #fff;
  font-size: 0.875rem;
}

.app-arrow-position {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
}

.app-arrow-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  margin: 0 0.5rem;
  min-width: 60px;
  flex-shrink: 0; /* Verhindert Schrumpfung */
}

.app-arrow-ring {
  font-weight: 600;
  color: #fff;
  font-size: 0.875rem;
}

.app-arrow-points {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
}

.app-btn-small {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  min-width: auto;
}

/* Zoom Overlay */
#zoomOverlay {
  backdrop-filter: blur(2px);
}

/* Training List Styles */
.app-list-date-bold {
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
}

.app-list-time {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  margin-left: 0.5rem;
}

.app-list-date-sub {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
}

.app-list-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Responsive Button Handling */
@media (max-width: 480px) {
  .app-list-actions {
    gap: 0.25rem;
  }
  
  .app-arrow-item {
    padding: 0.3rem 0.4rem;
    gap: 0.4rem;
    font-size: 0.75rem;
  }
  
  .app-arrow-number {
    font-size: 0.75rem;
  }
  
  /* Mobile Scroll-Optimierung */
  .app-dialog {
    max-height: 85vh;
    margin: 2rem auto;
  }
  
  .app-arrow-list {
    max-height: 150px; /* Reduziert auf Mobile */
  }
  
  /* Verhindert Bounce-Scrolling am Ende von Listen */
  .app-content,
  .app-arrow-list,
  .app-dialog {
    overscroll-behavior: contain;
  }
  }
  
  .app-arrow-score {
    margin: 0;
    min-width: 40px;
  }
  
  .app-arrow-ring {
    font-size: 0.7rem;
  }
  
  .app-arrow-flag {
    width: 5px;
    height: 18px;
  }
  
  /* Löschen-Button kompakter */
  .app-arrow-item .app-btn {
    padding: 0.2rem 0.3rem;
  }
  
  .app-arrow-item .app-btn svg {
    width: 10px;
    height: 10px;
  }
  
  /* Record-Seite: Target und Arrow-Boxen volle Breite */
  #graphicPanel .app-card {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }
  
  .zoom-container {
    width: 100%;
    max-width: none;
  }
  
  /* Allgemein: SVG-Container und Listen volle Breite auf mobil */
  .zoom-container,
  .app-arrow-list,
  #targetWrap,
  #arrowList {
    width: 100%;
    max-width: none;
  }
  
  /* Parent-Cards von SVG und Listen auch volle Breite */
  .app-card {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }
  
  /* Spezifisch für Record-Seite: Alle Container volle Breite */
  #graphicPanel,
  #graphicPanel .app-card,
  #graphicPanel .zoom-container,
  #targetWrap {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

/* Training Detail Overlay */
.training-detail-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
  backdrop-filter: blur(20px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  overflow-y: auto;
}

.training-detail-content {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  color: white;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.2),
    0 2px 8px rgba(0, 0, 0, 0.1);
}

.training-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.training-detail-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.training-detail-close {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.training-detail-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.training-detail-body {
  padding: 1.5rem;
}

.training-detail-section {
  margin-bottom: 2rem;
}

.training-detail-section:last-child {
  margin-bottom: 0;
}

.training-detail-section h3 {
  margin: 0 0 1rem 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
}

/* Training Target Container */
.training-target-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  margin-bottom: 1rem;
}

.training-target-container svg {
  max-width: 400px;
  max-height: 400px;
  width: 100%;
  height: auto;
}

.training-target-fallback {
  text-align: center;
  padding: 2rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Training Statistics Grid */
.training-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
}

.training-stat {
  text-align: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.training-stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.25rem;
}

.training-stat-label {
  display: block;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Training Configuration */
.training-config {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.training-config-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.training-config-label {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
}

.training-config-value {
  font-weight: 600;
  color: #fff;
}

/* Training Ends */
.training-ends {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.training-end {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.training-end-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.training-end-number {
  font-weight: 600;
  font-size: 1rem;
  color: #fff;
}

.training-end-score {
  font-weight: 700;
  font-size: 1.125rem;
  color: #fff;
}

.training-end-details {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Training Score Distribution */
.training-score-distribution {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0.75rem;
}

.training-ring-count {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.training-ring-label {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
}

.training-ring-value {
  font-weight: 700;
  color: #fff;
  font-size: 1rem;
}

/* Mobile Optimizations für Training Detail */
@media (max-width: 768px) {
  .training-detail-overlay {
    padding: 0.5rem;
  }
  
  .training-detail-content {
    max-height: 95vh;
    border-radius: 16px;
  }
  
  .training-detail-header {
    padding: 1rem;
  }
  
  .training-detail-header h2 {
    font-size: 1.25rem;
  }
  
  .training-detail-body {
    padding: 1rem;
  }
  
  .training-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .training-config {
    grid-template-columns: 1fr;
  }
  
  .training-ends {
    grid-template-columns: 1fr;
  }
  
  .training-score-distribution {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .training-target-container svg {
    max-width: 500px;
    max-height: 500px;
  }
}

/* Template Dialog Close Button Hover */
.app-dialog button[onclick*="closeCreateTemplateDialog"]:hover {
  background: rgba(255, 255, 255, 0.3) !important;
  transform: scale(1.1);
}

/* Setup Management Styles */
.app-form-section {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.app-form-section h4 {
  color: white;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  margin-top: 0;
}

.setup-detail-sections {
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.setup-detail-section {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.setup-detail-section h4 {
  color: white;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  margin-top: 0;
}

.setup-detail-grid {
  display: grid;
  gap: 0.5rem;
}

.setup-detail-grid > div {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 0.5rem;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.setup-detail-grid > div > span:first-child {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

.setup-detail-grid > div > span:last-child {
  color: white;
}

.sight-mark-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  margin-bottom: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.sight-mark-distance {
  font-weight: 600;
  color: white;
  font-size: 1rem;
}

.sight-mark-values {
  display: flex;
  gap: 1rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
}

.sight-mark-actions {
  display: flex;
  gap: 0.2rem;
  justify-content: flex-end;
}

.app-btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  min-height: auto;
}

.sight-mark-btn {
  padding: 0.2rem 0.3rem;
  min-width: auto;
  width: auto;
  font-size: 0.7rem;
}

.training-item {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  margin-bottom: 0.75rem;
  transition: all 0.2s ease;
}

.training-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.training-item-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
}

.training-item-main {
  flex: 1;
  min-width: 0;
}

.training-date {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.training-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.training-details {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.training-item-actions {
  display: flex;
  gap: 0.5rem;
  margin-left: 1rem;
}

.training-item-actions .app-btn {
  min-width: auto;
  padding: 0.5rem;
  border-radius: 8px;
}

@media (max-width: 768px) {
  .training-item-content {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .training-item-actions {
    margin-left: 0;
    justify-content: center;
  }
  
  .training-details {
    white-space: normal;
  }
  
  .setup-detail-grid > div {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
  
  .sight-mark-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    text-align: center;
  }
  
  .sight-mark-distance {
    font-size: 1.1rem;
  }
  
  .sight-mark-values {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .sight-mark-actions {
    justify-content: center;
  }
  
  .sight-mark-btn {
    padding: 0.25rem 0.4rem;
  }
}

/* Sight Mark Preview Styles */
.sight-marks-preview {
  margin-top: 0.5rem;
}

.sight-mark-tag {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  padding: 0.125rem 0.375rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
  display: inline-block;
}

.sight-mark-tag:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.sight-marks-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}

@media (max-width: 768px) {
  .sight-marks-list {
    gap: 0.2rem;
  }
  
  .sight-mark-tag {
    font-size: 0.65rem;
    padding: 0.1rem 0.3rem;
  }
}

/* Responsive Chart Heights */
.chart-responsive {
  height: 300px !important;
}

@media (min-width: 768px) {
  .chart-responsive {
    height: 400px !important;
    min-height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
  }
}

/* Alle Boxen auf der Analysis-Seite gleich breit und perfekt zentriert */
@media (min-width: 768px) {
  /* Analysis-Container zentrieren ohne Abstände zu ändern */
  .analysis-page .app-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: none !important;
    width: 100%;
  }
  
  .analysis-page .analysis-grid {
    max-width: none !important;
    width: 100%;
    display: block; /* Normales Block-Layout beibehalten */
  }
  
  .analysis-page .app-card {
    width: calc(100vw - 1.5rem) !important; /* Mobile-freundliche Breite mit Rändern */
    max-width: calc(100vw - 1.5rem) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-bottom: calc(2rem + 5px) !important; /* 5px mehr horizontaler Abstand */
    padding: 1rem !important; /* Weniger Padding auf Mobile */
    box-sizing: border-box !important;
    /* Vertikale Margins unverändert lassen */
  }
  
  /* KI-Assessment-Box: Text-Umbruch forcieren */
  .analysis-page .assessment-card,
  .analysis-page .assessment-card * {
    word-wrap: break-word !important;
    word-break: break-word !important;
    hyphens: auto !important;
    overflow-wrap: break-word !important;
  }
  
  /* Extra-kleine Bildschirme (unter 400px) */
  @media (max-width: 400px) {
    .analysis-page .app-card {
      width: calc(100vw - 1rem) !important; /* Noch schmalere Ränder */
      max-width: calc(100vw - 1rem) !important;
      padding: 0.75rem !important; /* Noch weniger Padding */
    }
  }
  
  .chart-wide .chart-responsive {
    width: 100% !important;
    max-width: none !important;
  }
}

@media (min-width: 1200px) {
  .analysis-page .app-card {
    width: 900px !important; /* Etwas breiter auf großen Bildschirmen */
    max-width: 900px !important;
    margin-bottom: calc(2rem + 5px) !important; /* 5px mehr horizontaler Abstand auch auf großen Bildschirmen */
  }
}

/* Radardiagramm auf Mobile jetzt sichtbar - Safari-kompatibel */

/* (Entfernt) Schwarzer-Text-Block für Safari – wir behalten lila Verlauf + weiße Typo */

/* Basis Button-Fixes (nur Appearance) */
button,
input[type="button"],
input[type="submit"],
input[type="reset"],
.app-btn {
  -webkit-appearance: none !important;
  appearance: none !important;
}

/* Button-AutoFill */
button:-webkit-autofill,
button:-webkit-autofill:hover,
button:-webkit-autofill:focus,
button:-webkit-autofill:active,
input[type="button"]:-webkit-autofill,
input[type="submit"]:-webkit-autofill {
  -webkit-box-shadow: none !important;
  -webkit-text-fill-color: white !important;
  color: white !important;
  background: transparent !important;
}

/* Safari: nur Appearance normalisieren, Inhalt bleibt im App-Design (weiß auf lila) */
@supports (-webkit-appearance: none) {
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea,
  button,
  .app-btn {
    -webkit-appearance: none;
    appearance: none;
  }
}

/* Chrome/Safari Autofill: Glas-Look beibehalten, weiße Typo */
.app-input:-webkit-autofill,
.app-input:-webkit-autofill:hover,
.app-input:-webkit-autofill:focus,
.app-input:-webkit-autofill:active {
  -webkit-text-fill-color: white !important;
  color: white !important;
  -webkit-box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.12) inset !important;
  box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.12) inset !important;
  transition: background-color 600000s ease-in-out 0s !important;
}

/* Safari-spezifischer Feinschliff via Body-Klasse */
body.is-safari .app-input,
body.is-safari select,
body.is-safari textarea {
  color: white !important;
  -webkit-text-fill-color: white !important;
  background: rgba(255, 255, 255, 0.12) !important;
  -webkit-box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.12) inset !important;
  box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.12) inset !important;
}

/* Safari: Glas-Hintergründe für Karten/Listen/Overlays erzwingen */
body.is-safari .app-card,
body.is-safari .app-dialog,
body.is-safari .app-list-item,
body.is-safari .training-item {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: white !important;
}

/* Safari: Filter/Selects auf der Analysis-Seite lesbar halten */
body.is-safari .analysis-page select,
body.is-safari .analysis-page .app-input select {
  color: white !important;
  -webkit-text-fill-color: white !important;
  background: rgba(255, 255, 255, 0.12) !important;
}