/* ÖIF B1 — Quiz Page Styles (shared: Übungstest 1 / 2 / 3) */

.container { max-width: 1000px; margin: 0 auto; padding: 18px 14px 64px; }

header { padding: 22px 20px 14px; }
header h1 { font-size: 1.5em; }
nav { background: #263238; }

/* ── Skill section colors ── */
.sec-header { padding: 14px 20px; color: white; display: flex; align-items: center; gap: 12px; }
.sec-header h2 { font-size: 1.12em; font-weight: 600; }
.sec-header .icon { font-size: 1.55em; }
.sec-body { padding: 18px; }

.horen  { border-top: 3px solid #c62828; }
.horen  .sec-header { background: linear-gradient(135deg, #c62828, #b71c1c); }
.lesen  { border-top: 3px solid #1565c0; }
.lesen  .sec-header { background: linear-gradient(135deg, #1565c0, #0d47a1); }
.schreiben { border-top: 3px solid #2e7d32; }
.schreiben .sec-header { background: linear-gradient(135deg, #2e7d32, #1b5e20); }
.sprechen  { border-top: 3px solid #6a1b9a; }
.sprechen  .sec-header { background: linear-gradient(135deg, #6a1b9a, #4a148c); }

/* ── Teil blocks ── */
.teil-block { border: 1px solid #e2e8f0; border-radius: 10px; margin: 14px 0; overflow: hidden; }
.teil-title {
  padding: 10px 16px;
  font-weight: 600;
  font-size: 0.88em;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #374151;
}
.teil-content { padding: 14px 16px; }

/* ── Question cards ── */
.q-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); gap: 12px; margin: 12px 0; }
.q-card { border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; background: white; }
.q-num { background: #1e293b; color: white; padding: 6px 12px; font-size: 0.76em; font-weight: 600; letter-spacing: 0.06em; }
.q-body { padding: 10px 12px; font-size: 0.86em; }
.q-text { color: #111827; margin-bottom: 8px; font-weight: 600; direction: ltr; text-align: left; line-height: 1.45; }

/* ── Multiple choice options ── */
.opts { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.opts li {
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.83em;
  color: #374151;
  border: 1.5px solid #e5e7eb;
  direction: ltr;
  text-align: left;
  cursor: pointer;
  transition: all 0.14s;
  user-select: none;
  font-weight: 500;
  line-height: 1.4;
}
.opts li:hover    { background: #eff6ff; border-color: #93c5fd; color: #1d4ed8; }
.opts li.selected { background: #dbeafe; border-color: #60a5fa; color: #1e40af; font-weight: 600; }
.opts li.correct  { background: #dcfce7 !important; border-color: #4ade80 !important; color: #15803d !important; font-weight: 600; }
.opts li.wrong    { background: #fee2e2 !important; border-color: #f87171 !important; color: #b91c1c !important; text-decoration: line-through; }

/* ── R/F cards ── */
.rf-card {
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin: 8px 0;
  font-size: 0.87em;
  direction: ltr;
  text-align: left;
  color: #111827;
  background: white;
  line-height: 1.55;
}
.rf-label { font-size: 0.75em; color: #9ca3af; margin-bottom: 6px; direction: rtl; text-align: right; font-weight: 500; }
.rf-buttons { display: flex; gap: 8px; margin-top: 10px; }
.rf-btn {
  padding: 6px 22px;
  border-radius: 20px;
  border: 1.5px solid #d1d5db;
  background: white;
  cursor: pointer;
  font-size: 0.83em;
  font-weight: 600;
  transition: all 0.14s;
  direction: ltr;
  color: #374151;
}
.rf-btn:hover     { border-color: #9ca3af; background: #f9fafb; }
.rf-btn.selected  { background: #dbeafe; border-color: #60a5fa; color: #1e40af; }
.rf-btn.correct   { background: #dcfce7 !important; border-color: #4ade80 !important; color: #15803d !important; }
.rf-btn.wrong     { background: #fee2e2 !important; border-color: #f87171 !important; color: #b91c1c !important; text-decoration: line-through; }

/* ── Match buttons ── */
.match-opts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.match-btn {
  padding: 5px 15px;
  border-radius: 16px;
  border: 1.5px solid #d1d5db;
  background: white;
  cursor: pointer;
  font-size: 0.83em;
  font-weight: 600;
  transition: all 0.14s;
  color: #374151;
}
.match-btn:hover    { border-color: #9ca3af; background: #f9fafb; }
.match-btn.selected { background: #dbeafe; border-color: #60a5fa; color: #1e40af; }
.match-btn.correct  { background: #dcfce7 !important; border-color: #4ade80 !important; color: #15803d !important; }
.match-btn.wrong    { background: #fee2e2 !important; border-color: #f87171 !important; color: #b91c1c !important; text-decoration: line-through; }

/* ── Content boxes ── */
.audio-box { background: #fffbeb; border-right: 3px solid #f59e0b; border-radius: 8px; padding: 10px 14px; margin: 10px 0; font-size: 0.87em; }
.audio-box .speaker { font-weight: 600; color: #b45309; margin-bottom: 5px; font-size: 0.85em; }
.text-box { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 12px 14px; margin: 10px 0; font-size: 0.87em; color: #111827; }
.text-box strong { display: block; margin-bottom: 5px; color: #111827; font-size: 0.9em; }
.text-box.de { direction: ltr; text-align: left; }
.letter-box { background: #fafafa; border: 1.5px solid #e2e8f0; border-radius: 8px; padding: 16px; margin: 12px 0; font-size: 0.9em; line-height: 2; direction: ltr; text-align: left; }
.letter-box .note { color: #ea580c; font-size: 0.82em; font-style: italic; direction: rtl; text-align: right; display: block; margin-top: 8px; }
.speak-card { background: #faf5ff; border-radius: 8px; padding: 12px 14px; margin: 10px 0; font-size: 0.87em; border-right: 3px solid #a855f7; }
.speak-card h4 { color: #7e22ce; margin-bottom: 6px; font-size: 0.9em; font-weight: 600; }

/* ── Inline info boxes ── */
.info { background: #eff6ff; border-right: 3px solid #3b82f6; border-radius: 6px; padding: 10px 14px; margin: 10px 0; font-size: 0.87em; color: #1e3a8a; }
.tip  { background: #f0fdf4; border-right: 3px solid #22c55e; border-radius: 6px; padding: 10px 14px; margin: 10px 0; font-size: 0.87em; color: #14532d; }
.warn { background: #fff7ed; border-right: 3px solid #f97316; border-radius: 6px; padding: 10px 14px; margin: 10px 0; font-size: 0.87em; color: #9a3412; }

.badge { background: rgba(0,0,0,0.18); padding: 2px 9px; border-radius: 10px; font-size: 0.75em; font-weight: 600; }

/* ── Answer key ── */
.ans-summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin: 14px 0; }
.ans-block { border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; }
.ans-block-title { background: #1e293b; color: white; padding: 7px 12px; font-size: 0.8em; font-weight: 600; text-align: center; letter-spacing: 0.02em; }
.ans-row { display: flex; justify-content: space-between; padding: 5px 12px; border-bottom: 1px solid #f1f5f9; font-size: 0.85em; }
.ans-row:last-child { border-bottom: none; }
.ans-row .num { color: #9ca3af; font-weight: 500; }
.ans-row .val { font-weight: 700; }
.ans-row .val.r { color: #15803d; }
.ans-row .val.f { color: #b91c1c; }

/* ── Print button ── */
.print-btn {
  position: fixed;
  bottom: 18px;
  left: 18px;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 24px;
  cursor: pointer;
  font-size: 0.84em;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0,0,0,0.22);
  z-index: 999;
  transition: all 0.15s;
  letter-spacing: 0.01em;
}
.print-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,0,0,0.3); }

/* ── Results section ── */
.cta-wrap { text-align: center; padding: 32px 20px 16px; }
.show-results-btn {
  background: linear-gradient(135deg, #e65100, #bf360c);
  color: white;
  border: none;
  padding: 14px 48px;
  border-radius: 32px;
  font-size: 1.05em;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(230,81,0,0.32);
  transition: all 0.2s;
  letter-spacing: 0.01em;
}
.show-results-btn:hover { transform: translateY(-2px); box-shadow: 0 7px 24px rgba(230,81,0,0.45); }

#results-section {
  display: none;
  background: white;
  border-radius: 12px;
  margin: 18px 0;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.09);
  border: 1px solid #e2e8f0;
}
.results-hdr { background: linear-gradient(135deg, #e65100, #bf360c); color: white; padding: 16px 20px; display: flex; align-items: center; gap: 12px; }
.results-hdr h2 { font-size: 1.12em; font-weight: 600; }
.score-big { font-size: 2.8em; font-weight: 700; text-align: center; padding: 22px 20px 8px; color: #e65100; letter-spacing: -0.02em; }
.score-sub { font-size: 0.35em; color: #6b7280; display: block; margin-top: 4px; font-weight: 400; letter-spacing: 0; }
.res-sec-title { font-weight: 600; color: #374151; padding: 12px 16px 4px; font-size: 0.84em; border-top: 1px solid #f1f5f9; }
.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; padding: 8px 16px; }
.res-item { display: flex; justify-content: space-between; align-items: center; padding: 7px 12px; border-radius: 6px; font-size: 0.84em; border: 1px solid #e5e7eb; }
.res-item.ok   { background: #dcfce7; border-color: #86efac; }
.res-item.nok  { background: #fee2e2; border-color: #fca5a5; }
.res-item.skip { background: #fef9c3; border-color: #fde047; }
.res-q { color: #6b7280; font-weight: 600; font-size: 0.88em; }
.res-ans { font-weight: 700; }
.res-item.ok   .res-ans { color: #15803d; }
.res-item.nok  .res-ans { color: #b91c1c; }
.res-item.skip .res-ans { color: #a16207; }

@media print { .container { padding: 0; } }
@media (max-width: 600px) {
  .q-grid { grid-template-columns: 1fr; }
  .ans-summary { grid-template-columns: repeat(2, 1fr); }
}
