/* ─── QUIZ-spezifisch ─── */

body {
  font-family: var(--body);
  background: var(--ink);
  color: var(--paper);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── HEADER ─── */
.top {
  background: linear-gradient(180deg, #171015, #11080a 70%);
  border-bottom: 1px solid var(--line);
  line-height: 1;
  padding: 2px 0;
}

.topbar {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 20px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.mark {
  font-family: var(--display);
  font-weight: 800;
  font-size: 34px;
  letter-spacing: .5px;
  background: linear-gradient(90deg, var(--feuerrot), var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  padding: 2px 0;
}

.brand .mark em {
  font-style: normal;
  color: var(--amber);
}

.sub {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ─── MAIN ─── */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem 3rem;
  max-width: 700px;
  margin: 0 auto;
  width: 100%;
}

/* ─── PROGRESS BAR ─── */
.progress-bar-wrap {
  width: 100%;
  margin-bottom: 1.5rem;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .5rem;
  font-size: .85rem;
  color: var(--muted);
}

.progress-info .current-q {
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--paper);
}

.progress-track {
  width: 100%;
  height: 6px;
  background: var(--line);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--feuerrot), var(--amber));
  border-radius: 3px;
  transition: width .4s ease;
  width: 0%;
}

/* ─── SCORE ─── */
.score-bar {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--hivis);
  margin-bottom: 1.5rem;
}

.score-bar .score-icon {
  font-size: 1.2rem;
}

/* ─── QUESTION CARD ─── */
.question-card {
  background: var(--steel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0,0,0,.35);
  animation: slideUp .35s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.question-number {
  font-family: var(--display);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--feuerrot);
  margin-bottom: .75rem;
}

.question-text {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--paper);
  margin-bottom: 1.5rem;
}

/* ─── OPTIONS ─── */
.options {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.option-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1rem 1.25rem;
  background: var(--steel);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  color: var(--paper);
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all .2s ease;
  position: relative;
  overflow: hidden;
}

.option-btn:hover:not(.selected):not(.disabled) {
  border-color: var(--feuerrot);
  background: rgba(215,38,61,.08);
}

.option-btn .option-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--line);
  font-family: var(--display);
  font-size: .9rem;
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
  transition: all .2s ease;
}

.option-btn:hover:not(.selected):not(.disabled) .option-letter {
  background: var(--feuerrot);
  color: var(--paper);
}

.option-btn.selected {
  border-color: var(--feuerrot);
  background: rgba(215,38,61,.15);
}

.option-btn.selected .option-letter {
  background: var(--feuerrot);
  color: var(--paper);
}

.option-btn.correct {
  border-color: var(--hivis);
  background: rgba(212,225,87,.12);
}

.option-btn.correct .option-letter {
  background: var(--hivis);
  color: var(--ink);
}

.option-btn.wrong {
  border-color: var(--feuerrot-dk);
  background: rgba(140,14,34,.15);
}

.option-btn.wrong .option-letter {
  background: var(--feuerrot-dk);
  color: var(--paper);
}

.option-btn.disabled {
  cursor: default;
  opacity: .6;
}

.option-btn.correct.disabled,
.option-btn.wrong.disabled {
  opacity: 1;
}

.option-btn .check-icon {
  margin-left: auto;
  font-size: 1.2rem;
  opacity: 0;
  transition: opacity .2s ease;
}

.option-btn.correct .check-icon,
.option-btn.wrong .check-icon {
  opacity: 1;
}

/* ─── FEEDBACK ─── */
.feedback {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  font-size: .95rem;
  font-weight: 500;
  display: none;
  animation: fadeIn .3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.feedback.correct {
  display: block;
  background: rgba(212,225,87,.1);
  border: 1px solid rgba(212,225,87,.3);
  color: var(--hivis);
}

.feedback.wrong {
  display: block;
  background: rgba(140,14,34,.15);
  border: 1px solid rgba(215,38,61,.3);
  color: #ff8a8a;
}

/* ─── NEXT BUTTON ─── */
.next-btn {
  display: none;
  margin-top: 1.5rem;
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, var(--feuerrot), var(--feuerrot-dk));
  border: none;
  border-radius: var(--radius);
  color: var(--paper);
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .25s ease;
  box-shadow: 0 4px 16px rgba(215,38,61,.35);
}

.next-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(215,38,61,.5);
}

.next-btn.visible {
  display: block;
}

/* ─── RESULTS SCREEN ─── */
.results {
  display: none;
  text-align: center;
  animation: slideUp .4s ease;
}

.results.visible {
  display: block;
}

.results-card {
  background: var(--steel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.35);
}

.results-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.results-title {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .5rem;
}

.results-subtitle {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.results-score {
  font-family: var(--display);
  font-size: 3.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--feuerrot), var(--amber));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: .25rem;
}

.results-detail {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

.results-bar {
  width: 100%;
  height: 10px;
  background: var(--line);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 2rem;
}

.results-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--feuerrot), var(--amber));
  border-radius: 5px;
  transition: width 1s ease;
}

.restart-btn {
  display: inline-block;
  padding: .9rem 2.5rem;
  background: linear-gradient(135deg, var(--feuerrot), var(--feuerrot-dk));
  border: none;
  border-radius: var(--radius);
  color: var(--paper);
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .25s ease;
  box-shadow: 0 4px 16px rgba(215,38,61,.35);
}

.restart-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(215,38,61,.5);
}

.back-link {
  display: block;
  margin-top: 1rem;
  font-size: .9rem;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s ease;
}

.back-link:hover {
  color: var(--paper);
}

/* ─── LOADING ─── */
.loading {
  text-align: center;
  padding: 3rem;
  color: var(--muted);
  font-size: 1.1rem;
}

.loading .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--line);
  border-top-color: var(--feuerrot);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 600px) {
  .topbar { padding: 0 1rem; }
  .mark { font-size: 1.2rem; }
  .sub { font-size: .6rem; }
  .main { padding: 1.25rem .75rem 2rem; }
  .question-card { padding: 1.25rem; }
  .question-text { font-size: 1.1rem; }
  .results-score { font-size: 2.5rem; }
  .results-title { font-size: 1.5rem; }
}