/* ============================================================
   MIKA Academy — Deen Review CSS
   نظام مراجعة التربية الإسلامية
   ============================================================ */

/* Container */
.deen-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 0 80px;
  font-family: 'Cairo', sans-serif;
  direction: rtl;
}

/* Header */
.deen-header {
  background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
  color: white;
  padding: 28px 20px 20px;
  text-align: center;
  border-radius: 0 0 24px 24px;
  margin-bottom: 20px;
}
.deen-header-icon { font-size: 3rem; margin-bottom: 8px; }
.deen-title { font-size: 1.6rem; font-weight: 900; margin: 0 0 4px; }
.deen-subtitle { font-size: 0.9rem; opacity: 0.85; margin: 0 0 16px; }

.deen-progress-bar-wrap {
  background: rgba(255,255,255,0.2);
  border-radius: 10px;
  height: 8px;
  margin: 0 auto 8px;
  max-width: 300px;
  overflow: hidden;
}
.deen-progress-bar {
  height: 100%;
  background: #FFD700;
  border-radius: 10px;
  transition: width 0.5s ease;
}
.deen-progress-text { font-size: 0.85rem; opacity: 0.9; margin: 0; }

/* Mode Buttons */
.deen-modes-row {
  display: flex;
  gap: 8px;
  padding: 0 16px;
  margin-bottom: 16px;
  overflow-x: auto;
}
.deen-mode-btn {
  flex: 1;
  min-width: 100px;
  padding: 10px 8px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  background: white;
  font-family: 'Cairo', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  color: #555;
}
.deen-mode-btn.active {
  border-color: #1a237e;
  background: #1a237e;
  color: white;
}

/* Units Grid */
.deen-units-grid {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.deen-unit-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: white;
  border-radius: 16px;
  padding: 16px;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  border-right: 5px solid var(--unit-color, #1a237e);
  transition: transform 0.15s, box-shadow 0.15s;
}
.deen-unit-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.12); }
.deen-unit-icon { font-size: 2rem; flex-shrink: 0; }
.deen-unit-info { flex: 1; }
.deen-unit-info h3 { margin: 0 0 2px; font-size: 1rem; font-weight: 800; color: #1a1a2e; }
.deen-unit-info p { margin: 0 0 8px; font-size: 0.8rem; color: #888; }
.deen-unit-progress {
  background: #f0f0f0;
  border-radius: 6px;
  height: 6px;
  overflow: hidden;
  margin-bottom: 4px;
}
.deen-unit-bar { height: 100%; border-radius: 6px; transition: width 0.5s; }
.deen-unit-pct { font-size: 0.75rem; color: #666; }
.deen-unit-arrow { font-size: 1.2rem; color: #ccc; }

/* Challenge Button */
.deen-challenge-btn-wrap { padding: 16px; margin-top: 8px; }
.deen-big-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #FF8C42, #ff6b00);
  color: white;
  border: none;
  border-radius: 16px;
  font-family: 'Cairo', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255,107,0,0.3);
  transition: transform 0.15s;
  margin-bottom: 10px;
}
.deen-big-btn:hover { transform: scale(1.02); }
.deen-big-btn.secondary {
  background: linear-gradient(135deg, #1a237e, #283593);
  box-shadow: 0 4px 15px rgba(26,35,126,0.3);
}

/* Card Header */
.deen-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  color: white;
  border-radius: 0 0 20px 20px;
  margin-bottom: 0;
}
.deen-back-btn {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Cairo', sans-serif;
  font-size: 0.85rem;
}
.deen-unit-label { font-weight: 700; font-size: 0.9rem; }
.deen-card-counter, .deen-score-badge {
  background: rgba(255,255,255,0.2);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
}

/* Progress Strip */
.deen-progress-strip {
  height: 6px;
  background: #f0f0f0;
  overflow: hidden;
  margin-bottom: 20px;
}
.deen-progress-fill {
  height: 100%;
  transition: width 0.4s ease;
}

/* Flashcard */
.deen-flashcard {
  perspective: 1000px;
  cursor: pointer;
  margin: 0 16px 16px;
  height: 220px;
}
.deen-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.5s;
  transform-style: preserve-3d;
}
.deen-card-inner.flipped { transform: rotateY(180deg); }
.deen-card-front, .deen-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.deen-card-front {
  background: white;
  border: 3px solid #e8eaf6;
}
.deen-card-back {
  background: #f8f9ff;
  border: 3px solid #1a237e;
  transform: rotateY(180deg);
}
.deen-card-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #888;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.deen-card-question {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.6;
}
.deen-card-answer {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a237e;
  line-height: 1.7;
}
.deen-tap-hint {
  margin-top: 16px;
  font-size: 0.8rem;
  color: #aaa;
}

/* Learn Actions */
.deen-learn-actions {
  display: flex;
  gap: 12px;
  padding: 0 16px;
  margin-bottom: 16px;
}
.deen-btn-wrong, .deen-btn-correct {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: 14px;
  font-family: 'Cairo', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s;
}
.deen-btn-wrong { background: #ffebee; color: #c62828; }
.deen-btn-correct { background: #e8f5e9; color: #2e7d32; }
.deen-btn-wrong:hover, .deen-btn-correct:hover { transform: scale(1.03); }

/* Nav Row */
.deen-nav-row {
  display: flex;
  gap: 12px;
  padding: 0 16px;
}
.deen-nav-btn {
  flex: 1;
  padding: 14px;
  border: 2px solid #e0e0e0;
  border-radius: 14px;
  background: white;
  font-family: 'Cairo', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  color: #555;
  transition: all 0.15s;
}
.deen-nav-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.deen-nav-btn.primary {
  background: #1a237e;
  color: white;
  border-color: #1a237e;
}

/* Quiz Card */
.deen-quiz-card {
  background: white;
  border-radius: 20px;
  padding: 24px 20px;
  margin: 0 16px 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.deen-q-number {
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 12px;
  font-weight: 600;
}
.deen-q-text {
  font-size: 1.1rem;
  font-weight: 800;
  color: #1a1a2e;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Options */
.deen-options-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.deen-option-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 2px solid #e8eaf6;
  border-radius: 12px;
  background: white;
  cursor: pointer;
  font-family: 'Cairo', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: right;
  transition: all 0.2s;
  color: #333;
}
.deen-option-btn:hover:not(:disabled) { border-color: #1a237e; background: #f0f4ff; }
.deen-option-btn.correct { background: #e8f5e9 !important; border-color: #4caf50 !important; color: #2e7d32 !important; }
.deen-option-btn.wrong { background: #ffebee !important; border-color: #f44336 !important; color: #c62828 !important; }
.deen-opt-letter {
  width: 32px;
  height: 32px;
  background: #f0f4ff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
  color: #1a237e;
}
.deen-option-btn.correct .deen-opt-letter { background: #4caf50; color: white; }
.deen-option-btn.wrong .deen-opt-letter { background: #f44336; color: white; }

/* True/False */
.deen-tf-row { display: flex; flex-direction: column; gap: 10px; }
.deen-tf-btn {
  padding: 16px;
  border: 2px solid #e8eaf6;
  border-radius: 12px;
  background: white;
  cursor: pointer;
  font-family: 'Cairo', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: right;
  transition: all 0.2s;
  color: #333;
}
.deen-tf-btn.correct { background: #e8f5e9; border-color: #4caf50; color: #2e7d32; }
.deen-tf-btn.wrong { background: #ffebee; border-color: #f44336; color: #c62828; }

/* Fill */
.deen-fill-wrap { display: flex; flex-direction: column; gap: 10px; }
.deen-fill-input {
  width: 100%;
  padding: 14px;
  border: 2px solid #e8eaf6;
  border-radius: 12px;
  font-family: 'Cairo', sans-serif;
  font-size: 0.95rem;
  resize: none;
  direction: rtl;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.deen-fill-input:focus { outline: none; border-color: #1a237e; }
.deen-submit-btn {
  padding: 12px;
  background: #1a237e;
  color: white;
  border: none;
  border-radius: 12px;
  font-family: 'Cairo', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}
.deen-fill-hint {
  background: #e8f5e9;
  border-radius: 10px;
  padding: 12px;
  font-size: 0.9rem;
  color: #2e7d32;
  margin-top: 8px;
}

/* Feedback */
.deen-feedback { margin-top: 14px; padding: 10px 14px; border-radius: 10px; font-size: 0.95rem; }
.deen-fb-correct { color: #2e7d32; font-weight: 700; }
.deen-fb-wrong { color: #c62828; font-weight: 600; }

/* Next Button */
.deen-next-quiz-btn {
  width: 100%;
  margin-top: 16px;
  padding: 14px;
  background: linear-gradient(135deg, #FF8C42, #ff6b00);
  color: white;
  border: none;
  border-radius: 14px;
  font-family: 'Cairo', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s;
}
.deen-next-quiz-btn:hover { transform: scale(1.02); }

/* Streak Bar */
.deen-streak-bar {
  text-align: center;
  padding: 10px;
  font-size: 0.9rem;
  color: #666;
  font-weight: 600;
}

/* Result Screen */
.deen-result-header {
  padding: 32px 20px;
  text-align: center;
  color: white;
  border-radius: 0 0 28px 28px;
  margin-bottom: 24px;
}
.deen-result-stars { font-size: 2rem; margin-bottom: 8px; }
.deen-result-score { font-size: 3rem; font-weight: 900; }
.deen-result-pct { font-size: 1.2rem; opacity: 0.9; margin-bottom: 8px; }
.deen-result-msg { font-size: 1.1rem; font-weight: 700; }

.deen-result-actions {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

/* Wrong Section */
.deen-wrong-section {
  padding: 0 16px;
}
.deen-wrong-section h3 {
  font-size: 1rem;
  font-weight: 800;
  color: #c62828;
  margin-bottom: 12px;
}
.deen-wrong-item {
  background: white;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 10px;
  border-right: 4px solid #f44336;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.deen-wrong-q { font-size: 0.9rem; font-weight: 700; color: #333; margin-bottom: 8px; }
.deen-wrong-a { font-size: 0.88rem; color: #2e7d32; font-weight: 600; }
