.trivia-layout {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
  align-items: start;
}

@media (max-width: 640px) {
  .trivia-layout { grid-template-columns: 1fr; }
}

.trivia-layout .panel h2 { margin: 0 0 4px; font-family: var(--font-head); font-size: 20px; }

.category-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}

@media (max-width: 480px) {
  .category-cards { grid-template-columns: 1fr; }
}

.cat-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 20px 10px;
  color: var(--text);
  font-size: 14px;
  line-height: 2;
  cursor: pointer;
  text-align: center;
}

.cat-card:hover { border-color: var(--gold-dim); }

.quiz-header { display: flex; justify-content: space-between; margin-bottom: 10px; }

.timer-bar-wrap {
  width: 100%;
  height: 5px;
  background: var(--surface-2);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 18px;
}

.timer-bar {
  height: 100%;
  background: var(--gold);
  width: 100%;
  transition: width 0.1s linear;
}

.question-text {
  font-family: var(--font-head);
  font-size: 18px;
  margin: 0 0 18px;
  line-height: 1.5;
}

.answers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 480px) {
  .answers-grid { grid-template-columns: 1fr; }
}

.answer-btn {
  padding: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font-size: 14.5px;
  cursor: pointer;
  text-align: right;
  font-family: inherit;
}

.answer-btn:hover:not(:disabled) { border-color: var(--gold-dim); }
.answer-btn:disabled { cursor: default; }

.answer-btn.correct { border-color: var(--teal); background: rgba(79, 176, 174, 0.15); color: var(--teal); }
.answer-btn.wrong { border-color: var(--admin); background: rgba(180, 67, 47, 0.15); color: #e0897a; }

.feedback-msg { margin-top: 14px; font-size: 14px; color: var(--muted); }

.result-score { font-size: 26px; color: var(--gold); font-family: monospace; margin: 14px 0 20px; }

.leaderboard-panel h3 { margin: 0 0 12px; font-size: 15px; }
.leaderboard-list { display: flex; flex-direction: column; gap: 6px; }

.leader-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--surface-2);
  border-radius: 5px;
  font-size: 13px;
}

.leader-rank { width: 20px; text-align: center; color: var(--gold); font-weight: 700; }
.leader-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leader-time { font-family: monospace; color: var(--teal); }
.leader-row.is-me { border: 1px solid var(--gold-dim); }
