* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0f172a;
  color: #e5e7eb;
}

/* Topbar / Header */
.topbar {
  background: #111827;
  padding: 1.5rem;
  text-align: center;
  border-bottom: 1px solid #1f2933;
}

.topbar h1 {
  margin: 0 0 0.5rem;
  font-size: 1.4rem;
}

.topbar p {
  margin: 0;
  font-size: 0.95rem;
  color: #9ca3af;
}

/* Layout */
.container {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.2rem;
  justify-items: center;
  width: 100%;
}

/* Karten */
.card {
  background: #111827;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
  border: 1px solid #1f2937;
  width: 100%;
  max-width: 480px;
}

.card h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
}

.card h3 {
  margin-top: 1.1rem;
  margin-bottom: 0.4rem;
  font-size: 1rem;
  color: #e5e7eb;
}

.card p {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: #9ca3af;
}

/* Vollbreite-Karten (FAQ, Troubleshooting etc.) */
.card-full {
  grid-column: 1 / -1;
  max-width: 1020px;
  width: 100%;
  margin: 0 auto;
}

.card-full p,
.card-full ul,
.card-full ol {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
button {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  background: #2563eb;
  color: #f9fafb;
  box-shadow: 0 8px 20px rgba(37,99,235,0.4);
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.2s ease;
}

button:hover {
  background: #1d4ed8;
  box-shadow: 0 10px 25px rgba(37,99,235,0.6);
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
  box-shadow: 0 5px 14px rgba(37,99,235,0.4);
}

/* Primary-Buttons */
.btn-main {
  margin-bottom: 0.8rem;
  padding: 0.55rem 1rem;
}

/* Sekundäre kleine STOP-Buttons */
.btn-stop {
  display: block;
  margin: 0.6rem auto 0.4rem;
  font-size: 0.8rem;
  padding: 0.35rem 0.7rem;
  background: transparent;
  border: 1px solid #4b5563;
  color: #d1d5db;
  border-radius: 4px;
  cursor: pointer;
}

.btn-stop:hover {
  background: #111827;
}

/* Lautstärke-Meter */
.meter-wrapper {
  width: 100%;
  height: 16px;
  background: #1f2937;
  border-radius: 999px;
  overflow: hidden;
  margin: 0.7rem auto 0.4rem;
  border: 1px solid #374151;
}

.meter-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #22c55e, #eab308, #ef4444);
  transition: width 0.05s linear;
}

/* Status-Meldungen */
.status {
  font-size: 0.85rem;
  color: #9ca3af;
}

.status.ok {
  color: #22c55e;
}

.status.error {
  color: #ef4444;
}

/* Video */
.video-wrapper {
  margin: 0.7rem auto 0.4rem;
  border-radius: 12px;
  overflow: hidden;
  background: #020617;
  border: 1px solid #1f2937;
}

.video-wrapper video {
  width: 100%;
  max-width: 360px;
  display: block;
  margin: 0 auto;
  border-radius: 6px;
  background: #000;
}

/* Footer */
.footer {
  margin-top: 2rem;
  padding: 1rem 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: #6b7280;
  border-top: 1px solid #1f2937;
}

.footer-note {
  margin-top: 0.3rem;
  font-size: 0.75rem;
  color: #6b7280;
}

/* Texte / Listen */
.version {
  margin-top: 0.3rem;
  font-size: 0.85rem;
  color: #6b7280;
}

.os-note {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: #9ca3af;
}

.note {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: #e5e7eb;
}

.steps-list,
.checklist,
.hint-list,
.faq-list {
  margin: 0.5rem 0 0.75rem;
  padding-left: 1.1rem;
  font-size: 0.9rem;
  color: #9ca3af;
}

.steps-list li,
.checklist li,
.hint-list li,
.faq-list li {
  margin-bottom: 0.35rem;
}

/* Disabled Link */
.disabled-link {
  color: #6b7280;
  text-decoration: underline dotted;
  cursor: default;
}

/* Sprachumschalter */
.lang-switch {
  margin: 0 auto 1.2rem auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative; /* für Afrika-Overlay */
}

.lang-switch a {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  text-decoration: none;
  background: #1f2937;
  color: #d1d5db;
  border: 1px solid #374151;
  transition: 0.2s;
  cursor: pointer;
  

}

.lang-switch a:hover {
  background: #111827;
}

.lang-switch a.active {
  background: #4b5563;
  border-color: #6b7280;
  font-weight: bold;
}

/* Links allgemein */
a {
  color: #d1d5db;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

a:hover {
  color: #f3f4f6;
}

a:active {
  color: #fbbf24;
}

a:visited {
  color: #d1d5db;
}

/* RTL-Unterstützung für arabische Version */
html[dir="rtl"] body {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .card,
html[dir="rtl"] .card-full {
  text-align: right;
}

html[dir="rtl"] ul,
html[dir="rtl"] ol {
  padding-right: 1.1rem;
  padding-left: 0;
}

/* Utility zum Verstecken (wird vom JS verwendet) */
.hidden {
  display: none !important;
}

/* 🌍 AFRIKA-OVERLAY (einheitlich, Dark Theme, gut lesbar) */

/* Vollbild-Overlay */
.africa-dropdown {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 4rem;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.85); /* halbtransparenter dunkler Hintergrund */
}

/* Innenbox */
.africa-dropdown-inner {
  background: #020617;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.6);
  width: 90%;
  max-width: 360px;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.africa-dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  color: #e5e7eb;
}

.africa-close {
  background: transparent;
  border: none;
  color: #e5e7eb;
  font-size: 1.1rem;
  cursor: pointer;
}

/* Liste der Länder */
.africa-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  overflow-y: auto;
  padding-top: 0.25rem;
}

/* Länderschaltflächen (Dark Theme) */
.country-option {
  width: 100%;
  text-align: left;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  border: 1px solid #374151;
  background: #020617;
  color: #e5e7eb;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.country-option:hover,
.country-option:focus-visible {
  background: #111827;
  border-color: #fbbf24;
}

.country-option.active {
  background: #fbbf24;
  color: #000;
  border-color: #fbbf24;
  font-weight: 600;
}

/* Button im Sprachswitch */
.africa-toggle {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #444;
  background: #111827;
  color: #e5e7eb;
  cursor: pointer;
  font-size: 14px;
}

.africa-toggle:hover {
  background: #1f2937;
}

/* RTL-Anpassung für das Overlay */
html[dir="rtl"] .africa-dropdown-inner {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .country-option {
  text-align: right;
}

/* Kleinere Screens */
@media (max-width: 600px) {
  .africa-dropdown-inner {
    width: 95%;
    max-width: 95%;
  }
}
/* Arabische Version: Länder-Liste linksbündig */
html[dir="rtl"] .africa-list .country-option {
  direction: ltr !important;   /* Textfluss links → rechts */
  text-align: left !important; /* echte Linksbündigkeit */
  unicode-bidi: plaintext;     /* Flags + Text korrekt anzeigen */
}
