@keyframes blink { 50% { opacity: 0.6; } }
.blinking { animation: blink 1s infinite; }

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: url("../images/d1.jpg") no-repeat center center fixed;
    background-size: cover;
    position: relative;
}
body::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 0;
}

.top-controls {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 2;
}
.home-btn {
    background: rgba(255,255,255,0.45);
    backdrop-filter: blur(6px);
    color: #000;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 15px;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.home-btn:hover {
    background: rgba(255,255,255,0.65);
}

.card {
    position: relative;
    z-index: 1;
    width: 90%;
    max-width: 820px;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(8px);
    border-radius: 18px;
    padding: 30px 25px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    margin-top: 120px;
}

.progress-container {
    width: 100%;
    height: 18px;
    background: #ddd;
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg,#007BFF,#00c6ff);
    transition: width .4s;
}

h2 {
    margin: 0;
    font-size: 22px;
}
.translation {
    color: #444;
    font-style: italic;
    margin: 8px 0;
}

p {
    font-size: 18px;
    line-height: 1.9;
    margin: 10px 0;
    font-weight: bold;
    color: #333;
}

.audio-btn {
    font-size: 26px;
    background: #007BFF;
    color: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    transition: transform .2s, background .2s;
}
.audio-btn:hover {
    transform: scale(1.15);
    background: #0056b3;
}
.audio-btn:active {
    background: #0069d9;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

button {
    padding: 12px 18px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    color: #000;
    opacity: 0.9;
    transition: .2s;
}
button:hover {
    opacity: 1;
}

button#backBtn,
button#endBackBtn,
button#nextBtn {
    background: #ffc107;
}

button#restartBtn {
    background: #28a745;
    color: white;
}

.end-screen {
    text-align: center;
    display: none;
    margin-top: 20px;
}

.end-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

@media (min-width: 768px) {
    .controls {
        flex-direction: row;
        justify-content: space-between;
    }
    .end-controls {
        flex-direction: row;
        justify-content: center;
    }
}

html[lang="ar"] body {
    direction: rtl;
    text-align: right;
    font-family: 'Tajawal', sans-serif;
}
html[lang="ar"] .card {
    text-align: right;
}

html[lang="fa"] body {
    direction: rtl;
    text-align: right;
    font-family: 'Vazirmatn', sans-serif;
}
html[lang="fa"] .card {
    text-align: right;
}

html[lang="ku"] body {
    direction: rtl;
    text-align: right;
    font-family: 'Vazirmatn','Noto Sans Arabic',sans-serif;
}
html[lang="ku"] .card {
    text-align: right;
}

html[lang="af"] body {
    direction: rtl;
    text-align: right;
    font-family: 'Vazirmatn','Noto Sans Arabic',sans-serif;
}
html[lang="af"] .card {
    text-align: right;
}

html[lang="uk"] body {
    direction: ltr;
    text-align: left;
    font-family: 'Roboto','Arial',sans-serif;
}
html[lang="uk"] .card {
    text-align: left;
}

html[lang="de"] body {
    direction: ltr;
    text-align: left;
    font-family: 'Roboto',sans-serif;
}
html[lang="de"] .card {
    text-align: left;
}

.footer {
    position: fixed;
    bottom: 10px;
    left: 0;
    right: 0;
    text-align: center;
    padding: 8px 16px;
    background: rgba(0,0,0,0.55);
    color: #eee;
    font-size: 14px;
    border-radius: 10px;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    z-index: 9999;
}


/* ============================= */
/* Quiz – Scoped Styles only     */
/* ============================= */

.card #question {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.8;
  margin-bottom: 18px;
}

/* Antworten untereinander */
.card #answers {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 10px;
}

/* Antwort Button – nur im Quiz */
.card .answer-btn {
  width: 100%;
  text-align: left;
  padding: 16px 18px;
  border-radius: 12px;
  border: 2px solid transparent;
  background: rgba(255, 255, 255, 0.92);
  font-size: 16px;
  line-height: 1.7;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

/* Hover */
.card .answer-btn:hover {
  background: #f1f7ff;
  transform: translateY(-2px);
}

/* Richtige Antwort */
.card .answer-btn.correct {
  background: #d4edda;
  border-color: #28a745;
  color: #155724;
}

/* Falsche Antwort */
.card .answer-btn.wrong {
  background: #f8d7da;
  border-color: #dc3545;
  color: #721c24;
}

/* Nach Auswahl */
.card .answer-btn:disabled {
  cursor: default;
  opacity: 0.96;
}

/* Mobile */
@media (max-width: 600px) {
  .card #question {
    font-size: 18px;
  }
  .card .answer-btn {
    font-size: 15px;
    padding: 14px;
  }
}

