/* ════════════════════════════════════════════════════════════════════
   OMMRI QUIZ — drop into your <style> block or include as a CSS file
   ════════════════════════════════════════════════════════════════════ */



#quiz-root {
  font-family: 'Urbanist', sans-serif;
  width: 100%;
  max-width: 100%;
  display: block;
}

.quiz-start-card,
.quiz-question-card,
.quiz-result-card {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
/* ─── START SCREEN ─── */
.quiz-start-card {
  background: #fff;
  border: 1px solid #eadfd8;
  border-radius: 20px;
  padding: 28px 22px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
.quiz-hero {
  text-align: center;
  margin-bottom: 24px;
}
.quiz-hero-icon {
  width: 72px; height: 72px;
  margin: 0 auto 14px;
  border-radius: 20px;
  background: linear-gradient(135deg, #dc3f3c, #b32023);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  box-shadow: 0 6px 20px rgba(220,63,60,0.3);
}
.quiz-hero-icon .material-symbols-outlined { font-size: 38px; }
.quiz-hero-title {
  font-size: 22px; font-weight: 800; color: #2a2a2a;
  margin: 0 0 6px;
}
.quiz-hero-sub {
  font-size: 13px; color: #888; margin: 0;
}

/* Best score card */
.quiz-best-card {
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  color: #fff;
  margin-bottom: 24px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  position: relative;
  overflow: hidden;
}
.quiz-best-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.25), transparent 60%);
  pointer-events: none;
}
.quiz-best-label {
  font-size: 11px; font-weight: 700; opacity: 0.9;
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 6px;
  position: relative;
}
.quiz-best-score {
  font-size: 36px; font-weight: 900; line-height: 1;
  margin-bottom: 8px;
  position: relative;
  text-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.quiz-best-pct {
  font-size: 20px; opacity: 0.85;
}
.quiz-best-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.2);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px; font-weight: 700;
  position: relative;
  backdrop-filter: blur(4px);
}
.quiz-best-badge .material-symbols-outlined { font-size: 18px; }

/* Mode selection grid */
.quiz-mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}
@media (max-width: 600px) {
  .quiz-mode-grid { grid-template-columns: 1fr; }
}
.quiz-mode-card {
  background: #faf6f2;
  border: 1.5px solid #eadfd8;
  border-radius: 14px;
  padding: 18px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.quiz-mode-card:hover {
  background: #fff8f7;
  border-color: #fadbd8;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(220,63,60,0.12);
}
.quiz-mode-card.primary {
  background: linear-gradient(135deg, #dc3f3c, #b32023);
  border-color: transparent;
  color: #fff;
}
.quiz-mode-card.primary:hover {
  background: linear-gradient(135deg, #e14a47, #c02428);
}
.quiz-mode-icon {
  width: 44px; height: 44px;
  margin: 0 auto 8px;
  border-radius: 12px;
  background: rgba(220,63,60,0.1);
  color: #dc3f3c;
  display: flex; align-items: center; justify-content: center;
}
.quiz-mode-card.primary .quiz-mode-icon {
  background: rgba(255,255,255,0.2);
  color: #fff;
}
.quiz-mode-icon .material-symbols-outlined { font-size: 24px; }
.quiz-mode-title {
  font-size: 14px; font-weight: 800;
  color: #2a2a2a;
  margin-bottom: 2px;
}
.quiz-mode-card.primary .quiz-mode-title { color: #fff; }
.quiz-mode-desc {
  font-size: 11px;
  color: #000000;
}
.quiz-mode-card.primary .quiz-mode-desc { color: rgba(255,255,255,0.9); }

/* Badges preview */
.quiz-badges-preview {
  border-top: 1px solid #eadfd8;
  padding-top: 18px;
  text-align: center;
}
.quiz-badges-title {
  font-size: 11px; font-weight: 700; color: #888;
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 12px;
}
.quiz-badges-row {
  display: flex; justify-content: center; gap: 10px;
  flex-wrap: wrap;
}
.quiz-badge-mini {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  cursor: help;
}
.quiz-badge-mini .material-symbols-outlined { font-size: 22px; }

/* ─── QUESTION SCREEN ─── */
.quiz-question-card {
  background: #fff;
  border: 1px solid #eadfd8;
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
.quiz-progress-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.quiz-progress-label {
  font-size: 12px; color: #888; font-weight: 600;
}
.quiz-progress-label strong {
  color: #dc3f3c; font-weight: 800; font-size: 16px;
}
.quiz-exit-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #f3f3f3;
  border: none;
  color: #888;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.quiz-exit-btn:hover { background: #e9e9e9; color: #dc3f3c; }
.quiz-exit-btn .material-symbols-outlined { font-size: 18px; }

.quiz-progress-bar {
  height: 6px;
  background: #f3e6e4;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 22px;
}
.quiz-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #dc3f3c, #c9a84c);
  transition: width 0.4s ease;
  border-radius: 999px;
}

.quiz-question-text {
  font-size: 17px; font-weight: 700;
  color: #2a2a2a;
  line-height: 1.5;
  margin-bottom: 20px;
}

.quiz-options {
  display: flex; flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
}
.quiz-option {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: #faf6f2;
  border: 1.5px solid #eadfd8;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all 0.15s;
  width: 100%;
}
.quiz-option:hover {
  background: #fff8f7;
  border-color: #fadbd8;
}
.quiz-option.selected {
  background: linear-gradient(135deg, #fff5f4, #ffe9e7);
  border-color: #dc3f3c;
  box-shadow: 0 2px 8px rgba(220,63,60,0.15);
}
.quiz-option-letter {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid #eadfd8;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px;
  color: #888;
  transition: all 0.15s;
}
.quiz-option.selected .quiz-option-letter {
  background: #dc3f3c;
  border-color: #dc3f3c;
  color: #fff;
}
.quiz-option-text {
  flex: 1;
  font-size: 14px;
  color: #2a2a2a;
  font-weight: 500;
  line-height: 1.4;
}
.quiz-option-check {
  color: #dc3f3c;
  font-size: 22px;
  flex-shrink: 0;
}

.quiz-nav-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.quiz-nav-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  padding: 13px 16px;
  border-radius: 12px;
  border: none;
  font-family: 'Urbanist', sans-serif;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
}
.quiz-nav-btn .material-symbols-outlined { font-size: 18px; }
.quiz-nav-btn.primary {
  background: linear-gradient(135deg, #dc3f3c, #b32023);
  color: #fff;
}
.quiz-nav-btn.primary:hover {
  background: linear-gradient(135deg, #e14a47, #c02428);
  box-shadow: 0 4px 12px rgba(220,63,60,0.3);
}
.quiz-nav-btn.primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: linear-gradient(135deg, #c0c0c0, #999);
  box-shadow: none;
}
.quiz-nav-btn.ghost {
  background: #f3f3f3;
  color: #666;
}
.quiz-nav-btn.ghost:hover { background: #e9e9e9; }
.quiz-nav-btn.ghost:disabled { opacity: 0.4; cursor: not-allowed; }

/* ─── RESULTS SCREEN ─── */
.quiz-result-card {
  background: #fff;
  border: 1px solid #eadfd8;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
.quiz-result-hero {
  padding: 32px 22px 28px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.quiz-result-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255,255,255,0.3), transparent 60%);
  pointer-events: none;
}
.quiz-result-confetti {
  font-size: 28px;
  margin-bottom: 8px;
  position: relative;
  animation: quiz-bounce 1.2s ease infinite;
}
@keyframes quiz-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.quiz-result-badge-icon {
  width: 80px; height: 80px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px);
  position: relative;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.quiz-result-badge-icon .material-symbols-outlined {
  font-size: 44px;
  color: #fff;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}
.quiz-result-badge-label {
  font-size: 18px; font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
  position: relative;
  text-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.quiz-result-score {
  font-weight: 900;
  margin-bottom: 4px;
  position: relative;
}
.quiz-result-score-num {
  font-size: 56px;
  text-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.quiz-result-score-of {
  font-size: 28px;
  opacity: 0.7;
}
.quiz-result-pct {
  font-size: 16px;
  font-weight: 700;
  opacity: 0.95;
  position: relative;
}

.quiz-result-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  padding: 20px;
  background: #faf6f2;
  border-bottom: 1px solid #eadfd8;
}
.quiz-stat {
  text-align: center;
}
.quiz-stat-icon {
  width: 40px; height: 40px;
  margin: 0 auto 6px;
  border-radius: 12px;
  background: #d4edda;
  color: #28a745;
  display: flex; align-items: center; justify-content: center;
}
.quiz-stat-icon .material-symbols-outlined { font-size: 22px; }
.quiz-stat-val {
  font-size: 22px; font-weight: 900;
  color: #2a2a2a;
  line-height: 1;
}
.quiz-stat-label {
  font-size: 10.5px;
  color: #888;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}

.quiz-result-message {
  padding: 18px 22px;
  font-size: 14px;
  color: #555;
  text-align: center;
  line-height: 1.5;
  background: #fff8e1;
  border-bottom: 1px solid #f0e4c8;
}

.quiz-result-actions {
  padding: 18px 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.quiz-perfect-message {
  margin: 0 22px 22px;
  padding: 16px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid #f4d35e;
  border-radius: 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #78350f;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.quiz-perfect-message .material-symbols-outlined {
  color: #c9a84c;
  font-size: 22px;
}

/* Review section */
.quiz-review-section {
  padding: 4px 22px 22px;
}
.quiz-review-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 800;
  color: #2a2a2a;
  margin: 0 0 14px;
}
.quiz-review-title .material-symbols-outlined {
  color: #dc3f3c; font-size: 20px;
}
.quiz-review-count {
  font-size: 12px;
  color: #888;
  font-weight: 600;
  margin-left: auto;
}
.quiz-review-item {
  background: #faf6f2;
  border: 1px solid #eadfd8;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
}
.quiz-review-q {
  font-size: 13.5px;
  font-weight: 700;
  color: #2a2a2a;
  margin-bottom: 10px;
  line-height: 1.4;
}
.quiz-review-row {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 13px;
  padding: 6px 0;
  line-height: 1.4;
}
.quiz-review-row .material-symbols-outlined {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}
.quiz-review-row.wrong {
  color: #991b1b;
}
.quiz-review-row.wrong .material-symbols-outlined { color: #dc2626; }
.quiz-review-row.correct {
  color: #14532d;
}
.quiz-review-row.correct .material-symbols-outlined { color: #16a34a; }
.quiz-review-row strong { font-weight: 700; }
@media (max-width: 767px) {
  #quiz-root {
    width: 100%;
    margin: 0;
    flex-shrink: 0;
  }
  
  .quiz-start-card,
  .quiz-question-card,
  .quiz-result-card {
    padding: 20px 16px;
    border-radius: 16px;
  }
  
  .quiz-mode-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .quiz-mode-card {
    padding: 14px 12px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    text-align: left;
  }
  
  .quiz-mode-icon {
    margin: 0;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
  }
  
  .quiz-mode-card > div:not(.quiz-mode-icon) {
    flex: 1;
  }
}

/* ─── SHARE SECTION (append to existing quiz.css) ─── */

.quiz-share-section {
  padding: 22px;
  border-top: 1px solid #eadfd8;
  border-bottom: 1px solid #eadfd8;
  background: linear-gradient(135deg, #faf6f2, #fff);
}
.quiz-share-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  color: #2a2a2a;
  margin-bottom: 16px;
}
.quiz-share-title .material-symbols-outlined {
  color: #c9a84c;
  font-size: 20px;
}

/* Preview card */
.quiz-share-preview {
  background: #111;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 16px;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.quiz-share-preview img {
  width: 100%;
  display: block;
  border-radius: 14px;
}
.quiz-share-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

/* Share buttons row */
.quiz-share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
}
.quiz-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-family: 'Urbanist', sans-serif;
  font-weight: 700;
  font-size: 13px;
  transition: all 0.15s;
  padding: 10px 14px;
  color: #fff;
  flex-shrink: 0;
}
.quiz-share-btn .material-symbols-outlined {
  font-size: 18px;
}
.quiz-share-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.quiz-share-btn:active {
  transform: translateY(0);
}

/* Platform-specific colors */
.quiz-share-btn.native {
  background: linear-gradient(135deg, #dc3f3c, #b32023);
  padding: 10px 18px;
}
.quiz-share-btn.whatsapp {
  background: #25D366;
  padding: 10px;
}
.quiz-share-btn.twitter {
  background: #000;
  padding: 10px;
}
.quiz-share-btn.facebook {
  background: #1877F2;
  padding: 10px;
}
.quiz-share-btn.telegram {
  background: #0088cc;
  padding: 10px;
}
.quiz-share-btn.copy {
  background: #6b7280;
  padding: 10px;
}
.quiz-share-btn.download {
  background: linear-gradient(135deg, #c9a84c, #a08538);
  padding: 10px 16px;
  flex: 1;
  min-width: 140px;
  max-width: 220px;
}

/* Mobile adjustments */
@media (max-width: 767px) {
  .quiz-share-section {
    padding: 18px 16px;
  }
  .quiz-share-buttons {
    gap: 6px;
  }
  .quiz-share-btn {
    padding: 9px 12px;
    font-size: 12px;
    border-radius: 10px;
  }
  .quiz-share-btn.download {
    width: 100%;
    max-width: 100%;
    margin-top: 4px;
  }
}