/* ===== RESET & BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0f0f1a;
  --surface: #1a1a2e;
  --surface2: #222240;
  --primary: #6c63ff;
  --primary-light: #8b83ff;
  --accent: #00d4aa;
  --danger: #ff4757;
  --success: #2ed573;
  --warning: #ffa502;
  --text: #e8e8f0;
  --text-muted: #8888aa;
  --radius: 16px;
  --shadow: 0 8px 32px rgba(0,0,0,0.3);
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== SCREENS ===== */
.screen { display: none; min-height: 100vh; animation: fadeIn 0.4s ease; }
.screen.active { display: block; }

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

@keyframes slideIn {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes scoreReveal {
  from { stroke-dashoffset: 440; }
}

/* ===== HERO ===== */
.hero {
  text-align: center;
  padding: 60px 20px 40px;
  background: linear-gradient(135deg, #1a1a3e 0%, #2d1b69 50%, #1a1a2e 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(108,99,255,0.1) 0%, transparent 60%);
  animation: pulse 4s ease-in-out infinite;
}

.logo {
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: 4px;
  color: var(--text);
  position: relative;
}

.logo span {
  color: var(--primary);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero h1 {
  font-size: 1.5rem;
  font-weight: 300;
  margin-top: 8px;
  color: var(--text-muted);
}

.subtitle {
  font-size: 1.1rem;
  color: var(--accent);
  margin-top: 4px;
  font-weight: 600;
}

.countdown {
  margin-top: 20px;
  font-size: 1rem;
  color: var(--warning);
  font-weight: 600;
  background: rgba(255,165,2,0.1);
  display: inline-block;
  padding: 8px 24px;
  border-radius: 50px;
  border: 1px solid rgba(255,165,2,0.3);
}

/* ===== MENU CARDS ===== */
.menu-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  padding: 40px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.menu-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 32px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.menu-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.card-exam::before { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
.card-modules::before { background: linear-gradient(90deg, #1e90ff, #00bfff); }
.card-reales::before { background: linear-gradient(90deg, #ff6348, #ff7f50); }
.card-transversal::before { background: linear-gradient(90deg, #e056a0, #ff79b0); }
.card-content::before { background: linear-gradient(90deg, var(--accent), #00e6b8); }
.card-concepts::before { background: linear-gradient(90deg, var(--warning), #ffbe33); }

.menu-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
  border-color: var(--surface2);
}

.card-exam:hover { border-color: var(--primary); }
.card-modules:hover { border-color: #1e90ff; }
.card-reales:hover { border-color: #ff6348; }
.card-transversal:hover { border-color: #e056a0; }
.card-content:hover { border-color: var(--accent); }
.card-concepts:hover { border-color: var(--warning); }

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.menu-card h2 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.menu-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ===== CONTAINER ===== */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px;
}

/* ===== BUTTONS ===== */
.btn-back {
  background: none;
  border: 1px solid var(--surface2);
  color: var(--text-muted);
  padding: 10px 20px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s;
  margin-bottom: 24px;
}

.btn-back:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-start {
  display: block;
  width: 100%;
  max-width: 400px;
  margin: 32px auto 0;
  padding: 16px 32px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  letter-spacing: 1px;
}

.btn-start:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(108,99,255,0.4);
}

.btn-next {
  display: block;
  margin: 20px auto 0;
  padding: 14px 40px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-next:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

/* ===== EXAM SETUP ===== */
.setup-desc {
  color: var(--text-muted);
  margin-bottom: 32px;
}

.setup-areas {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.area-check {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--surface);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.area-check:hover {
  border-color: var(--primary);
}

.area-check input { display: none; }

.checkmark {
  width: 24px;
  height: 24px;
  border: 2px solid var(--text-muted);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.area-check input:checked ~ .checkmark {
  background: var(--primary);
  border-color: var(--primary);
}

.area-check input:checked ~ .checkmark::after {
  content: '\2713';
  color: white;
  font-size: 14px;
  font-weight: bold;
}

.area-label { font-size: 0.95rem; }

.questions-per-area {
  margin-top: 32px;
  text-align: center;
}

.questions-per-area label {
  display: block;
  margin-bottom: 12px;
  color: var(--text-muted);
}

.qty-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.qty-selector button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: transparent;
  color: var(--primary);
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
}

.qty-selector button:hover {
  background: var(--primary);
  color: white;
}

#qty-display {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  min-width: 60px;
  text-align: center;
}

/* ===== EXAM ===== */
.exam-header {
  background: var(--surface);
  padding: 16px 24px;
  border-bottom: 1px solid var(--surface2);
  position: sticky;
  top: 0;
  z-index: 10;
}

.exam-progress {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.progress-bar {
  height: 6px;
  background: var(--surface2);
  border-radius: 3px;
  overflow: hidden;
}

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

.exam-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 24px;
}

.question-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 32px;
  animation: slideIn 0.3s ease;
}

.question-card h2 {
  font-size: 1.15rem;
  line-height: 1.6;
  margin-bottom: 24px;
  font-weight: 500;
}

.options-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-btn {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  background: var(--surface2);
  border: 2px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.5;
  width: 100%;
}

.option-btn:hover:not(.disabled) {
  border-color: var(--primary);
  background: rgba(108,99,255,0.1);
}

.option-letter {
  background: var(--surface);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  text-transform: uppercase;
}

.option-btn.correct {
  border-color: var(--success);
  background: rgba(46,213,115,0.12);
}

.option-btn.correct .option-letter {
  background: var(--success);
  color: white;
}

.option-btn.incorrect {
  border-color: var(--danger);
  background: rgba(255,71,87,0.12);
}

.option-btn.incorrect .option-letter {
  background: var(--danger);
  color: white;
}

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

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

/* ===== FEEDBACK ===== */
.feedback {
  margin-top: 20px;
  padding: 20px;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.6;
  animation: slideIn 0.3s ease;
}

.feedback.hidden { display: none; }

.feedback.correct-feedback {
  background: rgba(46,213,115,0.1);
  border-left: 4px solid var(--success);
  color: var(--success);
}

.feedback.incorrect-feedback {
  background: rgba(255,71,87,0.1);
  border-left: 4px solid var(--danger);
  color: var(--danger);
}

.feedback .feedback-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 6px;
}

/* ===== RESULTS ===== */
.results-container {
  text-align: center;
  padding-top: 40px;
}

.score-circle {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 32px auto;
  position: relative;
  background: var(--surface);
  border: 6px solid var(--surface2);
}

.score-circle.excellent { border-color: var(--success); box-shadow: 0 0 40px rgba(46,213,115,0.3); }
.score-circle.good { border-color: var(--primary); box-shadow: 0 0 40px rgba(108,99,255,0.3); }
.score-circle.average { border-color: var(--warning); box-shadow: 0 0 40px rgba(255,165,2,0.3); }
.score-circle.poor { border-color: var(--danger); box-shadow: 0 0 40px rgba(255,71,87,0.3); }

#score-percent {
  font-size: 3rem;
  font-weight: 900;
}

.score-circle.excellent #score-percent { color: var(--success); }
.score-circle.good #score-percent { color: var(--primary); }
.score-circle.average #score-percent { color: var(--warning); }
.score-circle.poor #score-percent { color: var(--danger); }

.score-message {
  font-size: 1.2rem;
  margin-bottom: 32px;
  color: var(--text-muted);
}

.area-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  text-align: left;
  margin-bottom: 32px;
}

.area-result-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 20px;
  border-left: 4px solid var(--surface2);
}

.area-result-card.excellent { border-left-color: var(--success); }
.area-result-card.good { border-left-color: var(--primary); }
.area-result-card.average { border-left-color: var(--warning); }
.area-result-card.poor { border-left-color: var(--danger); }

.area-result-card h3 {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.area-result-card .area-score {
  font-size: 2rem;
  font-weight: 900;
}

.area-result-card.excellent .area-score { color: var(--success); }
.area-result-card.good .area-score { color: var(--primary); }
.area-result-card.average .area-score { color: var(--warning); }
.area-result-card.poor .area-score { color: var(--danger); }

.area-result-card .area-detail {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.area-bar {
  height: 8px;
  background: var(--surface2);
  border-radius: 4px;
  margin-top: 12px;
  overflow: hidden;
}

.area-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1s ease;
}

.area-result-card.excellent .area-bar-fill { background: var(--success); }
.area-result-card.good .area-bar-fill { background: var(--primary); }
.area-result-card.average .area-bar-fill { background: var(--warning); }
.area-result-card.poor .area-bar-fill { background: var(--danger); }

.improvement-tips {
  background: var(--surface);
  border-radius: 12px;
  padding: 24px;
  text-align: left;
  margin-bottom: 24px;
}

.improvement-tips h2 {
  color: var(--warning);
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.improvement-tips ul {
  list-style: none;
  padding: 0;
}

.improvement-tips li {
  padding: 8px 0;
  border-bottom: 1px solid var(--surface2);
  color: var(--text-muted);
  font-size: 0.95rem;
}

.improvement-tips li:last-child { border-bottom: none; }

.improvement-tips li::before {
  content: '\26A0';
  margin-right: 8px;
}

/* ===== RESOURCES ===== */
.resource-area {
  margin-bottom: 32px;
}

.resource-area h2 {
  font-size: 1.15rem;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}

.resource-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.resource-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  background: var(--surface);
  border-radius: 12px;
  transition: all 0.2s;
  text-decoration: none;
  color: var(--text);
  border: 1px solid transparent;
}

.resource-item:hover {
  border-color: var(--primary);
  transform: translateX(4px);
}

.resource-item .resource-info h3 { font-size: 0.95rem; margin-bottom: 4px; }
.resource-item .resource-type {
  background: var(--surface2);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ===== CONCEPTS ===== */
.concepts-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.concept-tab {
  padding: 10px 20px;
  border-radius: 50px;
  border: 1px solid var(--surface2);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.concept-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.concept-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.concepts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.concept-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 24px;
  border-top: 3px solid var(--primary);
  transition: all 0.2s;
}

.concept-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.concept-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.concept-header .btn-tts {
  margin-left: 0;
  flex-shrink: 0;
}

.concept-card h3 {
  font-size: 1rem;
  margin-bottom: 10px;
  color: var(--accent);
}

.concept-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .logo { font-size: 2.2rem; }
  .hero h1 { font-size: 1.2rem; }
  .menu-cards { padding: 24px 16px; gap: 16px; }
  .menu-card { padding: 24px; }
  .question-card { padding: 24px 18px; }
  .question-card h2 { font-size: 1rem; }
  .score-circle { width: 140px; height: 140px; }
  #score-percent { font-size: 2.2rem; }
  .concepts-tabs { gap: 6px; }
  .concept-tab { padding: 8px 14px; font-size: 0.8rem; }
}

/* ===== MODULES GRID ===== */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.module-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  border-top: 3px solid #1e90ff;
  position: relative;
}

.module-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: #1e90ff;
}

.module-card.selected {
  border-color: #00c853;
  background: rgba(0, 200, 83, 0.08);
  border-top-color: #00c853;
}

.module-check-icon {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: transparent;
  transition: all 0.2s ease;
}

.module-card.selected .module-check-icon {
  background: #00c853;
  border-color: #00c853;
  color: white;
}

#modules-start-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.module-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
  color: var(--accent);
}

.module-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.module-card .module-count {
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--primary-light);
  font-weight: 600;
}

/* ===== FEEDBACK / RETROALIMENTACIÓN ===== */
.card-feedback::before { background: linear-gradient(90deg, var(--danger), #ff6b81); }
.card-feedback:hover { border-color: var(--danger); }

.badge {
  display: inline-block;
  background: var(--danger);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 50px;
  margin-left: 6px;
  vertical-align: middle;
}

.feedback-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.feedback-empty h2 {
  color: var(--success);
  margin-bottom: 8px;
}

.fb-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
  border-left: 4px solid var(--danger);
  animation: slideIn 0.3s ease;
}

.fb-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.fb-area {
  background: var(--surface2);
  color: var(--primary-light);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.fb-date {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.fb-question {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 16px;
  font-weight: 500;
}

.fb-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.fb-option {
  padding: 10px 14px;
  background: var(--surface2);
  border-radius: 8px;
  font-size: 0.9rem;
  border: 1px solid transparent;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.fb-option.fb-correct {
  border-color: var(--success);
  background: rgba(46,213,115,0.1);
}

.fb-option.fb-wrong {
  border-color: var(--danger);
  background: rgba(255,71,87,0.1);
  text-decoration: line-through;
  opacity: 0.7;
}

.fb-letter {
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  min-width: 18px;
}

.fb-correct .fb-letter { color: var(--success); }
.fb-wrong .fb-letter { color: var(--danger); }

.fb-explanation {
  background: rgba(108,99,255,0.08);
  border-left: 3px solid var(--primary);
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.btn-tts {
  background: var(--surface2);
  border: 1px solid var(--primary);
  color: var(--primary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  vertical-align: middle;
  flex-shrink: 0;
}

.btn-tts:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.1);
}

.fb-explanation {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.fb-explanation .btn-tts {
  margin-left: auto;
  margin-top: 0;
}

.btn-entendido {
  display: block;
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 2px solid var(--success);
  color: var(--success);
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-entendido:hover {
  background: var(--success);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(46,213,115,0.3);
}

.btn-clear-all {
  background: transparent;
  border: 1px solid var(--text-muted);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-clear-all:hover {
  border-color: var(--danger);
  color: var(--danger);
}

/* ===== FEEDBACK MODAL ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.hidden {
  display: none;
}

.modal-content {
  background: var(--surface);
  border-radius: 16px;
  width: 100%;
  max-width: 800px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.3rem;
  color: var(--text);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--text);
}

.modal-body {
  overflow-y: auto;
  padding: 20px 24px;
  flex: 1;
}

.modal-body .fb-card {
  margin-bottom: 16px;
}

.fb-status-correct {
  color: var(--success);
  font-weight: 600;
  font-size: 0.85rem;
}

.fb-status-wrong {
  color: var(--danger);
  font-weight: 600;
  font-size: 0.85rem;
}

.btn-feedback-modal {
  background: linear-gradient(135deg, #7c4dff, #651fff) !important;
}

.btn-feedback-modal:hover {
  background: linear-gradient(135deg, #b388ff, #7c4dff) !important;
}

/* ===== RESULTS ACTIONS ===== */
.results-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

.btn-retry {
  background: linear-gradient(135deg, #ff9800, #f57c00) !important;
}

.btn-retry:hover {
  background: linear-gradient(135deg, #ffb74d, #ff9800) !important;
}

/* ===== CODE IN OPTIONS ===== */
.option-code {
  margin: 0;
  padding: 4px 0;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.82rem;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
  text-align: left;
}

.option-btn:has(.option-code) {
  align-items: flex-start;
  text-align: left;
}

/* ===== QUESTION TABLES & IMAGES ===== */
.q-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 0.9rem;
  background: var(--surface2);
  border-radius: 8px;
  overflow: hidden;
}

.q-table th, .q-table td {
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,0.1);
  text-align: center;
}

.q-table th {
  background: var(--primary);
  color: white;
  font-weight: 600;
}

.q-table td {
  color: var(--text);
}

.q-table tr:nth-child(even) td {
  background: rgba(255,255,255,0.03);
}

.q-image {
  max-width: 100%;
  margin: 12px auto;
  display: block;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15);
}

/* ===== HIDDEN ===== */
.hidden { display: none !important; }
