/* Haupt-Stylesheet für FLY3LC */ 
#map {
  width: 100vw;
  height: 100vh;
  min-height: unset;
  max-width: 100vw;
  margin: 0 auto;
  border-radius: 0.5em;
  box-shadow: 0 1px 6px rgba(0,0,0,0.07);
  position: relative;
  z-index: 1;
}

@media (max-width: 1200px) {
  #map {
    height: 100vh;
    min-height: unset;
  }
}
@media (max-width: 900px) {
  #map {
    height: 100vh;
    min-height: unset;
  }
}
@media (max-width: 600px) {
  #map {
    height: 100vh;
    min-height: unset;
    border-radius: 0.2em;
  }
}

.marker-correct {
  stroke: #2ecc40 !important;
  fill: #2ecc40 !important;
  animation: markerPulseGreen 0.7s;
}
.marker-wrong {
  stroke: #ff4136 !important;
  fill: #ff4136 !important;
  animation: markerPulseRed 0.7s;
}
@keyframes markerPulseGreen {
  0% { r: 8; opacity: 1; }
  50% { r: 14; opacity: 0.7; }
  100% { r: 8; opacity: 1; }
}
@keyframes markerPulseRed {
  0% { r: 8; opacity: 1; }
  50% { r: 14; opacity: 0.7; }
  100% { r: 8; opacity: 1; }
} 

.marker-start-blink {
  stroke: #ffdc00 !important;
  fill: #ffdc00 !important;
  r: 12 !important;
}

/* --- Dezente Toast-Benachrichtigung --- */
#global-feedback {
  position: fixed;
  top: 1.2em;
  right: 1.2em;
  left: auto;
  transform: none;
  background: #f8fafc;
  color: #005fa3;
  font-weight: 500;
  font-size: 0.98em;
  padding: 0.3em 1em;
  border-radius: 0.5em;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
  border: 1px solid #e0e6ef;
  z-index: 3000;
  opacity: 0.97;
  pointer-events: none;
  min-width: 120px;
  max-width: 60vw;
  text-align: left;
}

/* --- Responsive HUD --- */
#hud {
  position: absolute;
  top: 0.7em;
  left: 50%;
  transform: translateX(-50%);
  background: #f8f9fa;
  border-radius: 0.5em;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  padding: 0.5em 1.2em;
  font-size: 0.97em;
  z-index: 1000;
  min-width: 280px;
  max-width: 95vw;
  min-height: 4.2em;
  text-align: center;
  border: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  gap: 0.2em;
  align-items: center;
  justify-content: flex-start;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
  background: rgba(248, 249, 250, 0.95);
}

/* Tablet Landscape */
@media (max-width: 1024px) and (orientation: landscape) {
  #hud {
    min-width: 260px;
    font-size: 0.95em;
    padding: 0.4em 1em;
  }
}

/* Tablet Portrait */
@media (max-width: 768px) {
  #hud {
    min-width: 240px;
    font-size: 0.94em;
    padding: 0.4em 1em;
    top: 0.5em;
  }
}
/* Button-Zeile: Immer separate erste Zeile für alle Buttons */
.hud-buttons-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.3em;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 2.2em;
  margin-bottom: 0.1em;
  overflow: visible;
}

/* Fluginfo-Zeilen: Getrennt von Buttons */
.hud-row, .hud-row-flightinfo {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3em;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 1.3em;
  overflow: hidden;
}

.hud-row-flightinfo {
  margin-top: 0.1em;
}
.hud-row-flightinfo {
  font-size: 0.97em;
  min-height: 1.3em;
  margin-bottom: 0.1em;
  /* Hintergrund und Rahmen entfernt für dezente Darstellung */
  background: none;
  border-radius: 0;
  padding: 0;
  border: none;
}

.hud-row-european {
  font-size: 0.95em;
  min-height: 1.2em;
  margin-bottom: 0.1em;
  background: rgba(255, 107, 53, 0.1);
  border-radius: 0.3em;
  padding: 0.1em 0.3em;
  border: 1px solid rgba(255, 107, 53, 0.3);
  color: #ff6b35;
}




.hud-label, .hud-code {
  display: inline-block;
  min-width: 2.7em;
  max-width: 5.5em;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.95em;
  line-height: 1.2;
}
.hud-code {
  font-family: 'Fira Mono', 'Consolas', monospace;
  font-weight: bold;
  font-size: 1em;
  color: #222;
  letter-spacing: 0.08em;
  white-space: nowrap;
  overflow: visible;
  text-overflow: unset;
}

/* Neue HUD-Elemente für bessere Mobile-Darstellung */
.hud-route-item, .hud-stat-item, .hud-flight-data, .hud-flight-route, .hud-epoch-status {
  display: inline-block;
  font-family: 'Fira Mono', 'Consolas', monospace;
  font-weight: 600;
  font-size: 0.95em;
  color: #222;
  white-space: nowrap;
  margin: 0 0.3em;
  line-height: 1.3;
}

.hud-route-item {
  min-width: 4em;
  text-align: center;
}

.hud-stat-item {
  min-width: 3.5em;
  text-align: center;
  font-size: 0.93em;
}

.hud-flight-data {
  min-width: 5em;
  text-align: center;
  color: #005fa3;
  font-size: 0.92em;
}

.hud-flight-route {
  font-size: 0.94em;
  color: #222;
  text-align: center;
}

.hud-epoch-status {
  font-size: 0.95em;
  color: #ff6b35;
  font-weight: bold;
  text-align: center;
}

.hud-target {
  color: #005fa3;
  text-shadow: none;
} 

/* --- Trivia-Panel als Slide-in --- */
#trivia-panel {
  position: fixed;
  left: 50%;
  bottom: 0.7em;
  top: auto;
  right: auto;
  transform: translateX(-50%);
  z-index: 2000;
  background: rgba(255,255,255,0.98);
  border-radius: 0.5em;
  box-shadow: 0 1px 8px rgba(0,0,0,0.07);
  border: 1px solid #e0e0e0;
  min-width: 220px;
  max-width: 95vw;
  padding: 0.7em 1.2em 0.7em 1.2em;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: triviaSlideIn 0.3s;
}
@keyframes triviaSlideIn {
  from { opacity: 0; transform: translateX(-50%) translateY(30px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
#trivia-panel.hidden {
  display: none;
}
.trivia-modal {
  background: none;
  box-shadow: none;
  border: none;
  padding: 0;
  min-width: unset;
  max-width: unset;
}
@media (max-width: 900px) {
  .trivia-modal {
    min-width: 180px;
    padding: 0.8em 0.7em 0.7em 0.7em;
  }
}
@media (max-width: 600px) {
  .trivia-modal {
    min-width: 120px;
    max-width: 99vw;
    padding: 0.5em 0.2em 0.5em 0.2em;
    font-size: 0.97em;
  }
}
@keyframes triviaFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}
.trivia-header {
  font-size: 1em;
  font-weight: 600;
  margin-bottom: 0.3em;
  padding: 0.2em 0;
  border-radius: 0.3em;
  width: 100%;
}
.trivia-correct {
  background: #eaffea;
  color: #2ecc40;
  border: 1.2px solid #2ecc40;
}
.trivia-wrong {
  background: #ffeaea;
  color: #ff4136;
  border: 1.2px solid #ff4136;
}
.trivia-title {
  font-size: 1em;
  font-weight: 600;
  margin-bottom: 0.4em;
}
.trivia-list {
  text-align: left;
  margin: 0.5em 0 1em 0;
  padding-left: 1em;
  color: #444;
  width: 100%;
  max-width: 350px;
}
.trivia-list li {
  margin-bottom: 0.2em;
  font-size: 0.98em;
}
.trivia-next-btn {
  margin-top: 0.7em;
  padding: 0.3em 1.2em;
  font-size: 1em;
  border-radius: 0.4em;
  border: 1px solid #b0c4d8;
  background: #f8faff;
  color: #005fa3;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}
.trivia-next-btn:active {
  transform: scale(0.97);
}
.trivia-next-btn:hover {
  background: #e6f0fa;
} 

.trivia-streak {
  font-size: 1.1em;
  font-weight: bold;
  color: #ffb700;
  margin-bottom: 0.5em;
  animation: streakPop 0.5s;
}
@keyframes streakPop {
  0% { transform: scale(0.7); opacity: 0; }
  60% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
} 

.highscore-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.7em 0 1em 0;
  font-size: 0.98em;
}
.highscore-table th, .highscore-table td {
  border: 1px solid #eee;
  padding: 0.3em 0.5em;
  text-align: center;
}
.highscore-table th {
  background: #f8f8f8;
  color: #005fa3;
  font-weight: 600;
}

/* Touch-Optimierung für Marker und Plane-Icon */
.leaflet-marker-icon, .plane-icon {
  touch-action: manipulation;
}
@media (max-width: 600px) {
  .leaflet-marker-icon, .plane-icon {
    width: 40px !important;
    height: 40px !important;
  }
  .fly3lc-marker {
    r: 12 !important;
  }
}

/* Allgemeine Schriftgrößen und Abstände */
body {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  font-size: 1.08em;
  background: #f6f8fa;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  color: #222;
  overflow: hidden;
  -webkit-text-size-adjust: 100%;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

/* Responsive Basis-Schriftgrößen */
@media (max-width: 1024px) and (orientation: landscape) {
  body { font-size: 1.05em; }
}

@media (max-width: 768px) {
  body { font-size: 1.02em; }
}

@media (max-width: 600px) {
  body { font-size: 0.98em; }
}

@media (max-width: 480px) {
  body { font-size: 0.95em; }
}

@media (max-width: 320px) {
  body { font-size: 0.92em; }
}

/* Responsive HUD Buttons */
.hud-highscore-btn, .hud-sound-btn, .hud-player-btn, .hud-feedback-btn {
  background: #f8fafc;
  border: 1px solid #e0e6ef;
  border-radius: 50%;
  width: 2.2em;
  height: 2.2em;
  font-size: 1.1em;
  margin-left: 0.3em;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.hud-highscore-btn:active, .hud-sound-btn:active, .hud-player-btn:active, .hud-feedback-btn:active {
  transform: scale(0.95);
}

.hud-highscore-btn:hover, .hud-sound-btn:hover, .hud-player-btn:hover, .hud-feedback-btn:hover {
  background: #e6f0fa;
  border-color: #b0c4d8;
}

/* Touch-optimierte Button-Größen */
@media (max-width: 768px) {
  .hud-highscore-btn, .hud-sound-btn, .hud-player-btn, .hud-feedback-btn {
    width: 2.2em;
    height: 2.2em;
    font-size: 1.1em;
    margin-left: 0.15em;
    flex-shrink: 0;
  }
  
  .hud-row:first-of-type {
    gap: 0.1em;
    padding: 0 0.2em;
  }
}

@media (max-width: 480px) {
  .hud-highscore-btn, .hud-sound-btn, .hud-player-btn, .hud-feedback-btn {
    width: 2.0em;
    height: 2.0em;
    font-size: 1.05em;
    margin-left: 0.1em;
    flex-shrink: 0;
  }
  
  .hud-row:first-of-type {
    gap: 0.05em;
    padding: 0 0.1em;
    justify-content: space-evenly;
  }
  
  #hud {
    padding: 0.3em 0.8em;
    min-width: 260px;
  }
}

@media (max-width: 320px) {
  .hud-highscore-btn, .hud-sound-btn, .hud-player-btn, .hud-feedback-btn {
    width: 1.8em;
    height: 1.8em;
    font-size: 1em;
    margin-left: 0.05em;
    flex-shrink: 0;
  }
  
  .hud-row:first-of-type {
    gap: 0.02em;
    padding: 0;
    justify-content: space-evenly;
  }
  
  #hud {
    padding: 0.2em 0.6em;
    min-width: 240px;
    font-size: 0.9em;
  }
}

/* Plane-Icon Touch-Optimierung */
.plane-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
@media (max-width: 600px) {
  .plane-icon {
    width: 40px;
    height: 40px;
  }
} 

#flight-overlay {
  position: fixed;
  top: 2em;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.85);
  color: #005fa3;
  font-weight: 500;
  font-size: 1.05em;
  padding: 0.35em 1.1em;
  border-radius: 0.5em;
  box-shadow: 0 1px 8px rgba(0,0,0,0.07);
  border: 1px solid #b0c4d8;
  z-index: 3500;
  pointer-events: none;
  display: none;
  text-align: center;
  min-width: 120px;
  max-width: 90vw;
  opacity: 0.97;
}
#flight-overlay b {
  font-weight: 600;
}
@media (max-width: 900px) {
  #flight-overlay {
    font-size: 0.97em;
    padding: 0.25em 0.7em;
    border-radius: 0.4em;
    top: 1.2em;
  }
}
@media (max-width: 600px) {
  #flight-overlay {
    font-size: 0.93em;
    padding: 0.18em 0.3em;
    border-radius: 0.3em;
    top: 0.7em;
  }
} 

.plane-label {
  background: #fffbe6 !important;
  color: #b88600 !important;
  font-weight: 600;
  font-size: 0.98em;
  border-radius: 0.4em;
  border: 1px solid #ffe066;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  padding: 0.1em 0.7em;
  margin-top: 0.2em;
  opacity: 0.97;
} 

.flight-info-label {
  background: #f8faff !important;
  color: #005fa3 !important;
  font-weight: 500;
  font-size: 0.93em;
  border-radius: 0.4em;
  border: 1px solid #b0c4d8;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  padding: 0.08em 0.5em;
  opacity: 0.97;
  min-width: 70px;
  max-width: 120px;
  text-align: left;
}
@media (max-width: 900px) {
  .flight-info-label { font-size: 0.91em; min-width: 50px; max-width: 90px; }
}
@media (max-width: 600px) {
  .flight-info-label { font-size: 0.89em; min-width: 30px; max-width: 60px; }
} 

/* --- Zoom-Buttons --- */
#zoom-controls {
  position: absolute;
  right: 1.2em;
  bottom: 1.2em;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}
.zoom-btn {
  background: #f8fafc;
  border: 1px solid #e0e6ef;
  border-radius: 50%;
  width: 2.3em;
  height: 2.3em;
  font-size: 1.3em;
  color: #005fa3;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.zoom-btn:hover {
  background: #e6f0fa;
}
/* Mobile Large (600-900px) */
@media (max-width: 900px) and (min-width: 601px) {
  #hud { 
    font-size: 0.93em; 
    padding: 0.4em 0.8em; 
    min-width: 220px;
  }
  .flight-info-label { font-size: 0.91em; min-width: 60px; max-width: 110px; }
  #trivia-panel { min-width: 200px; padding: 0.5em 0.7em; }
  .trivia-header { font-size: 0.97em; }
  .trivia-next-btn { font-size: 0.97em; padding: 0.3em 0.8em; }
  #zoom-controls { right: 0.8em; bottom: 0.8em; }
  .zoom-btn { width: 2.2em; height: 2.2em; font-size: 1.2em; }
}

/* Mobile Standard (480-600px) */
@media (max-width: 600px) and (min-width: 481px) {
  #hud { 
    font-size: 0.91em; 
    min-width: 200px; 
    padding: 0.3em 0.6em;
    top: 0.4em;
  }
  .hud-route-item, .hud-stat-item, .hud-flight-data, .hud-flight-route, .hud-epoch-status {
    font-size: 0.89em;
    margin: 0 0.2em;
  }
  .hud-route-item { min-width: 3.5em; }
  .hud-stat-item { min-width: 3em; }
  .hud-flight-data { min-width: 4.5em; }
  .flight-info-label { font-size: 0.89em; min-width: 50px; max-width: 90px; }
  #trivia-panel { min-width: 180px; padding: 0.4em 0.5em; }
  .trivia-header { font-size: 0.95em; }
  .trivia-next-btn { font-size: 0.95em; padding: 0.25em 0.6em; }
  #zoom-controls { right: 0.6em; bottom: 0.6em; }
  .zoom-btn { width: 2em; height: 2em; font-size: 1.1em; }
}

/* Mobile Small (320-480px) */
@media (max-width: 480px) {
  #hud { 
    font-size: 0.89em; 
    min-width: 160px; 
    max-width: 92vw;
    padding: 0.25em 0.4em;
    top: 0.3em;
  }
  .hud-row {
    flex-wrap: wrap;
    gap: 0.3em;
  }
  .hud-label, .hud-code {
    min-width: 2em;
    max-width: 4em;
    font-size: 0.92em;
  }
  .hud-route-item, .hud-stat-item, .hud-flight-data, .hud-flight-route, .hud-epoch-status {
    font-size: 0.87em;
    margin: 0 0.15em;
  }
  .hud-route-item { min-width: 3em; }
  .hud-stat-item { min-width: 2.8em; }
  .hud-flight-data { min-width: 4em; }
  .flight-info-label { font-size: 0.87em; min-width: 40px; max-width: 70px; }
  #trivia-panel { min-width: 140px; max-width: 92vw; padding: 0.3em 0.4em; }
  .trivia-header { font-size: 0.93em; }
  .trivia-next-btn { font-size: 0.93em; padding: 0.2em 0.5em; }
  #zoom-controls { right: 0.4em; bottom: 0.4em; }
  .zoom-btn { width: 1.8em; height: 1.8em; font-size: 1em; }
}

/* Mobile Extra Small (unter 320px) */
@media (max-width: 320px) {
  #hud { 
    font-size: 0.87em; 
    min-width: 140px; 
    max-width: 90vw;
    padding: 0.2em 0.3em;
    top: 0.2em;
  }
  .hud-label, .hud-code {
    min-width: 1.8em;
    max-width: 3.5em;
    font-size: 0.9em;
  }
  .hud-route-item, .hud-stat-item, .hud-flight-data, .hud-flight-route, .hud-epoch-status {
    font-size: 0.85em;
    margin: 0 0.1em;
  }
  .hud-route-item { min-width: 2.5em; }
  .hud-stat-item { min-width: 2.5em; }
  .hud-flight-data { min-width: 3.5em; }
  .zoom-btn { width: 1.6em; height: 1.6em; font-size: 0.9em; }
} 

/* === TARGET AIRPORT MARKER (Normal-Modus) === */
.target-airport-marker {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.target-marker-container {
  position: relative;
  width: 60px;
  height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.target-marker-pulse {
  position: absolute;
  width: 50px;
  height: 50px;
  border: 3px solid #ff4444;
  border-radius: 50%;
  top: 5px;
  left: 5px;
  animation: pulse-target 2s infinite;
  opacity: 0.7;
}

.target-marker-icon {
  font-size: 24px;
  z-index: 2;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
  margin-bottom: 2px;
}

.target-marker-code {
  background: rgba(255, 68, 68, 0.9);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: bold;
  z-index: 2;
  text-shadow: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

@keyframes pulse-target {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.3;
  }
  100% {
    transform: scale(1);
    opacity: 0.7;
  }
} 

/* === SETTINGS PANEL === */
.settings-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 15, 30, 0.98);
  border: 2px solid #4CAF50;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.8);
  z-index: 10000;
  min-width: 350px;
  max-width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
}

.settings-content {
  padding: 20px;
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #333;
}

.settings-header h3 {
  margin: 0;
  color: #4CAF50;
  font-size: 18px;
}

.settings-close-btn {
  background: transparent;
  border: 1px solid #666;
  color: #ccc;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.settings-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #999;
}

.setting-group {
  margin-bottom: 25px;
}

.setting-group h4 {
  margin: 0 0 15px 0;
  color: #FFD700;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.setting-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border: 1px solid #333;
  border-radius: 8px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.setting-option:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: #555;
}

.setting-option input[type="radio"],
.setting-option input[type="checkbox"] {
  margin: 0;
  accent-color: #4CAF50;
}

.radio-label,
.checkbox-label {
  flex: 1;
  color: #ccc;
  line-height: 1.4;
}

.radio-label strong,
.checkbox-label strong {
  color: #fff;
  display: block;
  margin-bottom: 4px;
}

.radio-label small {
  color: #999;
  font-size: 13px;
}

/* Settings Button im HUD */
#settings-btn {
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid #FFD700;
  color: #FFD700;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  margin-left: 5px;
  transition: all 0.2s;
}

#settings-btn:hover {
  background: rgba(255, 215, 0, 0.2);
  transform: scale(1.05);
}

/* Mobile Anpassungen für Settings */
@media (max-width: 480px) {
  .settings-panel {
    min-width: 300px;
    margin: 10px;
  }
  
  .settings-content {
    padding: 15px;
  }
  
  .setting-option {
    padding: 10px;
  }
  
  .radio-label small {
    font-size: 12px;
  }
} 