﻿/* ==========================================================================
   quiz-concursos.css — Quiz para Concursos (Estudo Direcionado F5)
   Design System Oficial F5 com Resposta Imediata, Streak e Comentários
   ========================================================================== */

:root {
  --qc-bg: #07111e;
  --qc-surface: #0b1a2d;
  --qc-cyan: #38bdf8;
  --qc-cyan-glow: rgba(56, 189, 248, 0.4);
  --qc-yellow: #facc15;
  --qc-yellow-glow: rgba(250, 204, 21, 0.4);
  --qc-green: #4ade80;
  --qc-red: #ef4444;
  --qc-text: #f8fafc;
  --qc-text-muted: #94a3b8;
  --qc-font: 'Barlow', -apple-system, sans-serif;
  --qc-font-cond: 'Barlow Condensed', sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--qc-bg);
  font-family: var(--qc-font);
  color: var(--qc-text);
  user-select: none;
  -webkit-user-select: none;
}

.qc-wrapper {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  position: relative;
  background: radial-gradient(circle at 50% 15%, #0e223d 0%, #050d18 100%);
}

/* ── Topbar ── */
.qc-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1.2rem;
  background: rgba(7, 17, 30, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(56, 189, 248, 0.18);
  z-index: 20;
}

.qc-back-btn {
  color: var(--qc-cyan);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  transition: all 0.2s ease;
}
.qc-back-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  color: #fff;
  transform: translateX(-2px);
}

.qc-top-title {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.qc-top-title span:first-child {
  font-family: var(--qc-font-cond);
  font-size: 1.15rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
}
.qc-top-badge {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--qc-yellow);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.qc-top-controls { display: flex; gap: 0.5rem; }
.qc-btn-icon {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--qc-text-muted);
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.qc-btn-icon:hover {
  background: rgba(56, 189, 248, 0.15);
  color: var(--qc-cyan);
  border-color: rgba(56, 189, 248, 0.4);
}
.qc-btn-icon svg { width: 16px; height: 16px; }

/* ── Palco Principal ── */
.qc-main-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.5rem 1.2rem 0.6rem;
  overflow: hidden;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  gap: 0.5rem;
}

/* ── Barra de Filtros de Banca & Streak ── */
.qc-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  background: rgba(11, 26, 45, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 12px;
  padding: 0.4rem 0.8rem;
  flex-wrap: wrap;
}

.qc-filter-lbl {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--qc-text-muted);
  letter-spacing: 0.06em;
}

.qc-filters { display: flex; gap: 0.35rem; }
.qc-filter-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--qc-text-muted);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.qc-filter-btn:hover { color: #fff; border-color: var(--qc-cyan); }
.qc-filter-btn.active {
  background: var(--qc-cyan);
  color: #08111e;
  border-color: var(--qc-cyan);
  box-shadow: 0 0 10px var(--qc-cyan-glow);
}

.qc-streak-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(250, 204, 21, 0.15);
  border: 1px solid var(--qc-yellow);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}
.qc-streak-badge span { font-size: 0.58rem; font-weight: 800; color: var(--qc-text-muted); }
.qc-streak-badge strong { font-family: var(--qc-font-cond); font-size: 0.95rem; color: var(--qc-yellow); }

/* ── Card do Quiz ── */
.qc-quiz-card {
  flex: 1;
  background: linear-gradient(180deg, #0e223d 0%, #081628 100%);
  border: 2px solid rgba(56, 189, 248, 0.3);
  border-radius: 14px;
  padding: 0.9rem 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  overflow-y: auto;
  gap: 0.6rem;
  min-height: 0;
}

.qc-q-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.4rem;
}
.qc-badge-row { display: flex; gap: 0.4rem; }
.qc-tag-board {
  font-size: 0.62rem;
  font-weight: 800;
  background: rgba(250, 204, 21, 0.15);
  color: var(--qc-yellow);
  border: 1px solid rgba(250, 204, 21, 0.35);
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
}
.qc-tag-subject {
  font-size: 0.62rem;
  font-weight: 800;
  background: rgba(56, 189, 248, 0.15);
  color: var(--qc-cyan);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
}
.qc-score-info {
  font-family: var(--qc-font-cond);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--qc-text-muted);
}

.qc-enunciation {
  font-size: 0.92rem;
  line-height: 1.45;
  color: #fff;
  user-select: text;
  -webkit-user-select: text;
}
.qc-enunciation strong { color: var(--qc-yellow); }

.qc-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.qc-opt-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  background: rgba(7, 17, 31, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.qc-opt-item:hover:not(.locked) {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.45);
}
.qc-opt-item.correct {
  background: rgba(34, 197, 94, 0.2) !important;
  border-color: #22c55e !important;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.4);
}
.qc-opt-item.wrong {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: #ef4444 !important;
}

.qc-opt-letter {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--qc-cyan);
  font-family: var(--qc-font-cond);
  font-size: 0.9rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.qc-opt-item.correct .qc-opt-letter { background: #22c55e; color: #08111e; }
.qc-opt-item.wrong .qc-opt-letter { background: #ef4444; color: #fff; }

.qc-opt-text {
  font-size: 0.82rem;
  line-height: 1.35;
  color: #e2e8f0;
  user-select: text;
  -webkit-user-select: text;
}

/* ── Caixa de Explicação Imediata ── */
.qc-explanation-box {
  background: rgba(7, 17, 31, 0.95);
  border: 1px solid var(--qc-cyan);
  border-radius: 10px;
  padding: 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  animation: fadeIn 0.3s ease;
}
.qc-explanation-box.hidden { display: none !important; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.qc-expl-status {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.qc-expl-status.correct { color: #4ade80; }
.qc-expl-status.wrong { color: #ef4444; }

.qc-expl-text {
  font-size: 0.78rem;
  line-height: 1.4;
  color: #cbd5e1;
  user-select: text;
  -webkit-user-select: text;
}
.qc-expl-text strong { color: var(--qc-yellow); }

.qc-btn-next-quest {
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, #fde047 0%, #facc15 50%, #eab308 100%);
  color: #08111e;
  border: 1px solid rgba(254, 240, 138, 0.7);
  font-family: var(--qc-font);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(250, 204, 21, 0.3);
  transition: all 0.2s ease;
}
.qc-btn-next-quest:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(250, 204, 21, 0.5); }

/* ── Modal Final ── */
.qc-overlay {
  position: absolute;
  inset: 0;
  background: rgba(4, 10, 19, 0.88);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 50;
}
.qc-overlay.hidden { display: none !important; }

.qc-card-modal {
  background: linear-gradient(145deg, #0e223d 0%, #081628 100%);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 20px;
  max-width: 480px;
  width: 100%;
  padding: 1.4rem;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 35px var(--qc-cyan-glow);
}
.qc-modal-icon { font-size: 2.2rem; margin-bottom: 0.2rem; }
.qc-eyebrow {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--qc-cyan);
  display: inline-block;
  margin-bottom: 0.2rem;
}
.qc-title {
  font-size: clamp(1.3rem, 3.5vw, 1.6rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 0.8rem;
  color: #fff;
}

.qc-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.qc-stat-box {
  background: rgba(7, 17, 31, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.5rem;
}
.qc-stat-box span { font-size: 0.58rem; color: var(--qc-text-muted); font-weight: 700; text-transform: uppercase; }
.qc-stat-box strong { display: block; font-family: var(--qc-font-cond); font-size: 1.2rem; }
.qc-stat-box strong.green { color: #4ade80; }
.qc-stat-box strong.gold { color: var(--qc-yellow); }
.qc-stat-box strong.cyan { color: #38bdf8; }

.qc-modal-actions { display: flex; flex-direction: column; gap: 0.5rem; }
.qc-btn-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 42px;
  background: linear-gradient(135deg, #fde047 0%, #facc15 50%, #eab308 100%);
  color: #08111e;
  border: 1px solid rgba(254, 240, 138, 0.6);
  border-radius: 10px;
  font-family: var(--qc-font);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(250, 204, 21, 0.35);
  transition: all 0.2s ease;
}
.qc-btn-play:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(250, 204, 21, 0.5); }

.qc-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 38px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.qc-btn-secondary:hover { background: rgba(255, 255, 255, 0.12); }

/* ── Toast ── */
.qc-toast {
  position: absolute;
  top: 65px;
  right: 25px;
  background: rgba(14, 34, 61, 0.95);
  border: 1px solid var(--qc-yellow);
  color: #fff;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px var(--qc-yellow-glow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-15px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 60;
}
.qc-toast.show { opacity: 1; transform: translateY(0); }
