/* DUOLINGO AUTHENTIC QUIZ MODAL */
#sacredQuizModal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 12px;
  backdrop-filter: blur(5px);
  box-sizing: border-box;
}

.duolingo-quiz-dialog, .quiz-modal-dialog {
  background: white;
  border-radius: 28px;
  max-width: 560px;
  width: 100%;
  max-height: 94vh;
  max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 20px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  position: relative;
  border: 3px solid #EAE0D5;
  animation: duoModalPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin: auto;
  -webkit-overflow-scrolling: touch;
}

@keyframes duoModalPop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.duolingo-quiz-header {
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 2px solid #F0E6D8;
  background: #FFFDF9;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.duo-close-btn, .close-quiz-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #E0D4C5;
  background: #FAF6EF;
  color: #777;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}

.duo-close-btn:hover, .close-quiz-btn:hover {
  background: #EAE0D5;
  color: #333;
}

.quiz-progress-bar-bg {
  flex: 1;
  height: 14px;
  background: #E5E5E5;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  min-width: 80px;
}

.quiz-progress-bar-fill {
  height: 100%;
  background: linear-gradient(180deg, #FFD700 0%, #D4AF37 100%);
  border-radius: 12px;
  width: 10%;
  transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.4);
}

.quiz-hearts-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 900;
  color: #FF4B4B;
  font-size: 14.5px;
  background: #FFF0F0;
  border: 1.5px solid #FFD0D0;
  padding: 4px 9px;
  border-radius: 20px;
  flex-shrink: 0;
}

.quiz-streak-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 900;
  color: #E65100;
  font-size: 14.5px;
  background: #FFF6E6;
  border: 1.5px solid #FFE0B2;
  padding: 4px 9px;
  border-radius: 20px;
  flex-shrink: 0;
}

.quiz-xp-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 900;
  color: #1976D2;
  font-size: 14.5px;
  background: #E3F2FD;
  border: 1.5px solid #BBDEFB;
  padding: 4px 9px;
  border-radius: 20px;
  flex-shrink: 0;
}

.duo-quiz-body, .duolingo-quiz-body {
  padding: 16px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.sacred-opts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.sacred-opt-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #FFFFFF;
  border: 2.5px solid #E5E5E5;
  border-bottom: 3.5px solid #D0D0D0;
  border-radius: 18px;
  padding: 14px 18px;
  font-size: 16px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: all 0.12s ease;
  color: #333;
  user-select: none;
}

.sacred-opt-btn:hover {
  background: #F9F9F9;
  border-color: #D6D6D6;
}

.sacred-opt-btn:active {
  transform: translateY(2.5px);
  border-bottom-width: 2.5px;
}

.sacred-opt-btn.selected {
  background: #FFF9E6 !important;
  border-color: var(--gold-primary) !important;
  border-bottom: 5px solid var(--gold-dark) !important;
  color: var(--primary-crimson) !important;
}

.sacred-opt-btn.correct-choice {
  background: #FFF9E6 !important;
  border-color: var(--gold-primary) !important;
  border-bottom: 5px solid var(--gold-dark) !important;
  color: var(--primary-crimson) !important;
}

.sacred-opt-btn.wrong-choice {
  background: #FFDFE0 !important;
  border-color: #FF4B4B !important;
  border-bottom: 5px solid #EA2B2B !important;
  color: #D32F2F !important;
}

.opt-keycap {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #F7F7F7;
  border: 2px solid #E5E5E5;
  border-bottom: 3px solid #D0D0D0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 14px;
  color: #666;
  flex-shrink: 0;
}

.sacred-opt-btn.selected .opt-keycap {
  background: var(--gold-light);
  border-color: var(--gold-primary);
  border-bottom-color: var(--gold-dark);
  color: var(--primary-crimson);
}

.sacred-bottom-sheet {
  padding: 16px 22px max(16px, calc(12px + env(safe-area-inset-bottom))) 22px;
  border-top: 2.5px solid #E5E5E5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  gap: 12px;
  min-height: 85px;
  flex-shrink: 0;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.sacred-bottom-sheet.correct {
  background: #FFF9E6;
  border-top-color: var(--gold-primary);
  color: var(--primary-crimson);
}

.sacred-bottom-sheet.wrong {
  background: #FFDFE0;
  border-top-color: #EA2B2B;
  color: #D32F2F;
}

.duo-action-btn {
  background: var(--primary-crimson);
  border: none;
  border-bottom: 5px solid var(--primary-dark);
  border-radius: 18px;
  color: white;
  font-size: 16px;
  font-weight: 900;
  padding: 14px 30px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  transition: all 0.12s ease;
  box-shadow: 0 4px 12px rgba(128,0,32,0.3);
  white-space: nowrap;
}

.duo-action-btn:hover {
  background: #9A0027;
}

.duo-action-btn:active {
  transform: translateY(2.5px);
  border-bottom-width: 2.5px;
}

.duo-action-btn:disabled {
  background: #E5E5E5;
  border-bottom: 5px solid #D0D0D0;
  color: #AFAFAF;
  cursor: not-allowed;
  box-shadow: none;
}

.sacred-bottom-sheet.wrong .duo-action-btn {
  background: #FF4B4B;
  border-bottom-color: #EA2B2B;
  box-shadow: 0 4px 12px rgba(255,75,75,0.3);
}

.sacred-bottom-sheet.wrong .duo-action-btn:hover {
  background: #FF5E5E;
}

/* DUOLINGO STEPPING STONES JOURNEY MAP (TAB 2) */
.duo-journey-path {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  position: relative;
}

.duo-path-node {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 480px;
  background: white;
  border: 2px solid #E8DCCB;
  border-bottom: 5px solid #D4C3AC;
  border-radius: 20px;
  padding: 14px 18px;
  transition: all 0.15s ease;
  cursor: pointer;
}

.duo-path-node:hover {
  transform: translateY(-2px);
  border-color: var(--primary-crimson);
}

.duo-node-icon-box {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: #FFF3E0;
  border: 2px solid #FFE0B2;
  border-bottom: 4px solid #FFCC80;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}

.duo-path-node.locked {
  opacity: 0.65;
  background: #F9F9F9;
  border-color: #E0E0E0;
  border-bottom-color: #CCCCCC;
}

.duo-path-node.locked .duo-node-icon-box {
  background: #EEEEEE;
  border-color: #E0E0E0;
  border-bottom-color: #CCCCCC;
  filter: grayscale(1);
}
