/* Global Reset & Layout */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  min-height: 100%;
  background: #f0f0f3;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: #333;
}

/* Sprachumschalter-Icons */
.language-selector {
  position: fixed; /* immer sichtbar, oben rechts */
  top: 5px;
  right: 10px;
  z-index: 9999;
}

.language-selector img {
  width: 24px;
  height: auto;
  cursor: pointer;
  margin-left: 5px;
  border: 1px solid transparent;
}

.language-selector img:hover {
  border-color: #007bff;
}

/* Haupt-Container */
.container {
  max-width: 650px;
  margin: 2rem auto;
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

/* Form-Bereiche */
.form-section {
  margin-bottom: 2rem;
}
label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #444;
}
textarea {
  width: 100%;
  min-height: 120px;
  padding: 0.8rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  resize: vertical;
}

/* Buttons */
button {
  background-color: #007bff;
  color: #fff;
  padding: 0.7rem 1.2rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
}
button:hover {
  background-color: #0056b3;
}
.btn-red {
  background-color: #dc3545;
}
.btn-red:hover {
  background-color: #b21f2d;
}

/* Ergebnisbereich */
#results {
  background: #fffaf0;
  border: 1px solid #f0de99;
  border-radius: 4px;
  padding: 1rem;
  margin-top: 1rem;
  word-wrap: break-word;
  display: none;
}

/* Footer-Info */
.footer-info {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.9rem;
  color: #777;
}

/* Lade-Overlay */
#loadingOverlay {
  display: none;
  position: fixed; 
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  color: #fff;
}

#loaderIcon {
  border: 6px solid #f3f3f3;
  border-top: 6px solid #007bff;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Header, Titel, Beschreibung */
header {
position: relative;
  top: 15px;
  text-align: center;
  margin-bottom: 2rem;
}
header h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}
header .description {
  font-size: 1rem;
  color: #555;
  max-width: 600px;
  margin: 0 auto 2rem auto;
}

/* Analyse-Ergebnis Layout (Boxen, Scores) */
.analysis-container {
  border: 1px solid #ddd;
  background: #fafafa;
  border-radius: 6px;
  padding: 1rem 1.2rem;
  margin-bottom: 2rem;
}
.analysis-title {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
  color: #333;
  border-bottom: 2px solid #007bff;
  display: inline-block;
  padding-bottom: 0.2rem;
}
.analysis-overall-score {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 1.4rem;
}
.analysis-label {
  color: #555;
}
.analysis-value {
  color: #007bff;
}
.analysis-overall-text {
  font-style: italic;
  color: #444;
  margin-left: 1.8rem;
  margin-bottom: 1rem;
}
.analysis-scores {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}
.score-box {
  flex: 1 1 220px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 4px;
  padding: 0.6rem;
  min-width: 180px;
}
.score-title {
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: #444;
}
.score-value {
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.score-text {
  font-size: 0.9rem;
  color: #666;
}
.analysis-time,
.analysis-summary {
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
  color: #333;
}
.analysis-excerpts {
  font-size: 0.95rem;
  color: #333;
}
.analysis-excerpts ul {
  list-style: disc;
  margin-left: 1.5rem;
  margin-top: 0.3rem;
  margin-bottom: 0.3rem;
}

/* Farbklassen für Scores */
.green-dark {
  color: #006400; 
}
.green-light {
  color: #4CAF50; 
}
.orange-light {
  color: #FFA500; 
}
.orange {
  color: #FF8000; 
}
.red {
  color: #dc3545; 
}

/* Responsive Anpassungen */
@media (max-width: 600px) {
  body {
    margin: 1rem;
  }
  .container {
    margin: 1rem auto;
    padding: 1rem;
  }
  header h1 {
    font-size: 1.8rem;
  }
  .analysis-scores {
    flex-direction: column;
  }
}
