/**
 * Tikrar Module Styles
 * Quran Memorization - Medina Method
 *
 * Sections:
 * 1. Container & Layout
 * 2. Header & Progress Bar
 * 3. Tab Navigation
 * 4. Today Overview
 * 5. Hifdh 7-Step Wizard
 * 6. Yesterday & Liaison Components
 * 7. Progress Dashboard
 * 8. Modal & Overlays
 * 9. Quran Text Display
 * 10. Responsive Breakpoints
 * 11. Animations
 */

/* =============================================================================
   1. Container & Layout
   ============================================================================= */

.tikrar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
  min-height: calc(100vh - 80px);
}

.tikrar-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  gap: 1rem;
  color: var(--text-secondary, #6b7280);
}

.tikrar-loading .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color, #e5e7eb);
  border-top-color: var(--primary-color, #274c77);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.tikrar-error-container,
.tikrar-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  gap: 1rem;
  text-align: center;
  padding: 2rem;
}

.tikrar-error-container .error-icon {
  font-size: 3rem;
}

.tikrar-placeholder {
  text-align: center;
  padding: 3rem;
  color: var(--text-secondary);
}

/* =============================================================================
   2. Header & Progress Bar (DuaTime-aligned)
   ============================================================================= */

.tikrar-header {
  text-align: center;
  margin-bottom: 2.5rem;
  padding: 1rem 0;
}

.tikrar-header-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, var(--primary-color, #274c77) 0%, var(--secondary-color, #6096ba) 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(39, 76, 119, 0.25);
}

.tikrar-header-icon svg {
  width: 32px;
  height: 32px;
  stroke: white;
}

.tikrar-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-color, #274c77);
  margin: 0;
  letter-spacing: -0.02em;
}

.tikrar-subtitle {
  margin: 0.75rem 0 0;
  font-size: 1.1rem;
  color: rgba(39, 76, 119, 0.7);
  font-weight: 400;
}

/* Progress Overview Card (Allah Names Style) */
.tikrar-progress-overview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding: 1.25rem 2rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(39, 76, 119, 0.1);
  border: 1px solid rgba(39, 76, 119, 0.1);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.tikrar-progress-overview .progress-bar-container {
  width: 100%;
  height: 12px;
  background: #e8e8e8;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.tikrar-progress-overview .progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #4caf50, #66bb6a);
  border-radius: 6px;
  transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.tikrar-progress-overview .progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.tikrar-progress-overview .progress-text {
  font-size: 1rem;
  font-weight: 700;
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

/* =============================================================================
   3. Tab Navigation (Allah Names Style)
   ============================================================================= */

.tikrar-tabs {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 24px;
  box-shadow: 0 4px 12px rgba(39, 76, 119, 0.1);
  border: 1px solid rgba(39, 76, 119, 0.1);
  flex-wrap: wrap;
}

.tikrar-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border: 2px solid transparent;
  background: transparent;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-size: 0.9rem;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tikrar-tab:hover {
  background: rgba(39, 76, 119, 0.08);
  color: #274c77;
  border-color: rgba(39, 76, 119, 0.15);
}

.tikrar-tab.active {
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(39, 76, 119, 0.3);
}

.tikrar-tab.active:hover {
  box-shadow: 0 6px 16px rgba(39, 76, 119, 0.4);
  transform: translateY(-2px);
}

.tikrar-tab.completed.disabled {
  background: rgba(76, 175, 80, 0.1);
  color: #4caf50;
  border-color: rgba(76, 175, 80, 0.3);
  cursor: not-allowed;
  opacity: 0.8;
}

.tikrar-tab.completed.disabled:hover {
  transform: none;
  box-shadow: none;
}

.tikrar-tab .tab-check {
  color: #4caf50;
  font-weight: bold;
  margin-left: 0.25rem;
}

.tikrar-tab .tab-icon {
  font-size: 1rem;
  display: flex;
  align-items: center;
}

.tikrar-tab .tab-icon svg {
  width: 18px;
  height: 18px;
}

.tikrar-tab.active .tab-icon svg {
  stroke: white;
}

.tikrar-tab .tab-label {
  display: none;
}

@media (min-width: 768px) {
  .tikrar-tab .tab-label {
    display: inline;
  }

  .tikrar-tabs {
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .tikrar-tabs {
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }

  .tikrar-tab {
    padding: 0.625rem 1rem;
    font-size: 0.8rem;
  }
}

/* =============================================================================
   4. Today Overview (Allah Names Style)
   ============================================================================= */

.tikrar-today {
  padding: 1rem 0;
}

/* Section Title (italic blue like Allah Names) */
.tikrar-today .section-title {
  font-size: 1.4rem;
  font-weight: 700;
  font-style: italic;
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
  text-align: center;
}

/* Task Cards Grid */
.daily-tasks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.task-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 24px;
  overflow: visible;
  box-shadow: 0 4px 12px rgba(39, 76, 119, 0.1);
  border: 1px solid rgba(39, 76, 119, 0.1);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  padding: 1.5rem;
}

.task-card:hover {
  box-shadow: 0 8px 24px rgba(39, 76, 119, 0.15);
  transform: translateY(-3px);
  border-color: rgba(39, 76, 119, 0.2);
}

.task-card.completed {
  border: 2px solid var(--primary-color, #274c77);
}

.task-card.pending {
  border-left: 4px solid var(--warning-color, #f59e0b);
}

.task-card.empty {
  opacity: 0.6;
  cursor: default;
}

.task-card.empty:hover {
  transform: none;
  box-shadow: 0 4px 20px rgba(39, 76, 119, 0.1);
}

/* Completed task cards - reduced opacity, not clickable */
.task-card.task-revision.completed,
.task-card.task-hifdh.completed,
.task-card.task-yesterday.completed,
.task-card.task-liaison.completed {
  cursor: default;
  opacity: 0.75;
}

.task-card.task-revision.completed:hover,
.task-card.task-hifdh.completed:hover,
.task-card.task-yesterday.completed:hover,
.task-card.task-liaison.completed:hover {
  transform: none;
  box-shadow: 0 4px 12px rgba(39, 76, 119, 0.1);
}

.task-card .task-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 0.75rem;
  color: var(--primary-color, #274c77);
}

.task-card .task-icon svg {
  width: 100%;
  height: 100%;
}

.task-card .task-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: var(--primary-color, #274c77);
}

.task-card .task-content {
  font-size: 1.05rem;
  color: rgba(39, 76, 119, 0.7);
  margin: 0 0 0.5rem 0;
  line-height: 1.5;
}

.task-card .task-reps,
.task-card .task-ayat {
  font-size: 0.9rem;
  color: rgba(39, 76, 119, 0.5);
  margin: 0 0 0.75rem 0;
}

.task-card .task-status {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.task-card .task-status.completed {
  background: linear-gradient(135deg, var(--primary-color, #274c77) 0%, var(--secondary-color, #6096ba) 100%);
  color: #fff;
}

.task-card .task-status.pending {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
}

.task-card .task-status.empty {
  background: #f8f9fa;
  color: rgba(39, 76, 119, 0.5);
}

.task-card .btn-start-task {
  margin-top: 1rem;
  width: 100%;
  padding: 0.875rem 1.25rem;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #f8f9fa;
  color: var(--primary-color, #274c77);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.task-card .btn-start-task:hover {
  background: linear-gradient(135deg, var(--primary-color, #274c77) 0%, var(--secondary-color, #6096ba) 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(39, 76, 119, 0.2);
}

.task-card .btn-start-task.btn-primary {
  background: linear-gradient(135deg, var(--primary-color, #274c77) 0%, var(--secondary-color, #6096ba) 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(39, 76, 119, 0.2);
}

.task-card .btn-start-task.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(39, 76, 119, 0.3);
  transform: translateY(-1px);
}

/* Order Badge - Takrār Method recommended order */
.task-order-badge {
  position: absolute;
  top: -8px;
  left: -8px;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary-color, #274c77) 0%, var(--secondary-color, #6096ba) 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(39, 76, 119, 0.3);
  z-index: 10;
  border: 2px solid #fff;
}

.task-card {
  position: relative;
}

/* Order Hint - Takrār method reminder with badges */
.tikrar-order-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, rgba(39, 76, 119, 0.08) 0%, rgba(96, 150, 186, 0.08) 100%);
  border-radius: 12px;
  border: 1px solid rgba(39, 76, 119, 0.15);
}

.tikrar-order-hint .order-hint-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary, #6b7280);
}

.tikrar-order-hint .order-hint-badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tikrar-order-hint .order-hint-badge {
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, var(--primary-color, #274c77) 0%, var(--secondary-color, #6096ba) 100%);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(39, 76, 119, 0.25);
}

.tikrar-order-hint .order-hint-arrow {
  color: var(--text-secondary, #6b7280);
  font-size: 0.9rem;
  font-weight: 500;
}

/* Config Summary (Allah Names Style) */
.tikrar-config-summary {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(39, 76, 119, 0.1);
  border: 1px solid rgba(39, 76, 119, 0.1);
}

.tikrar-config-summary h3 {
  font-size: 1.3rem;
  font-weight: 700;
  font-style: italic;
  margin: 0 0 1rem 0;
  text-align: center;
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.config-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.config-pill {
  font-size: 1rem;
  font-weight: 500;
  padding: 0.625rem 1rem;
  background: rgba(39, 76, 119, 0.08);
  border-radius: 50px;
  color: #274c77;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.config-pill:hover {
  background: rgba(39, 76, 119, 0.15);
}

.config-pill svg {
  width: 16px;
  height: 16px;
}

/* =============================================================================
   5. Hifdh 7-Step Wizard
   ============================================================================= */

.tikrar-hifdh {
  padding: 1rem 0;
}

.hifdh-header {
  text-align: center;
  margin-bottom: 2rem;
}

.hifdh-header h2 {
  font-size: 1.6rem;
  font-weight: 700;
  font-style: italic;
  margin: 0 0 0.75rem 0;
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.unit-info {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.unit-range {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color, #274c77);
  font-family: 'Amiri', serif;
}

.unit-ayat {
  font-size: 1rem;
  color: rgba(39, 76, 119, 0.6);
  font-weight: 500;
}

.no-unit {
  color: var(--text-secondary);
  padding: 2rem;
}

/* Progress Steps Indicator */
.hifdh-progress {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(39, 76, 119, 0.1);
  border: 1px solid rgba(39, 76, 119, 0.1);
}

.step-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.75rem 1.25rem;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  background: rgba(39, 76, 119, 0.05);
}

.step-indicator::after {
  content: '';
  position: absolute;
  right: -0.5rem;
  top: 50%;
  width: 0.5rem;
  height: 2px;
  background: var(--border-color);
}

.step-indicator:last-child::after {
  display: none;
}

.step-indicator .step-icon {
  font-size: 1.35rem;
  opacity: 0.6;
  color: #274c77;
}

.step-indicator .step-number {
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(39, 76, 119, 0.5);
}

.step-indicator.active {
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  box-shadow: 0 4px 12px rgba(39, 76, 119, 0.3);
  transform: scale(1.05);
}

.step-indicator.active .step-icon {
  opacity: 1;
  color: #fff;
}

.step-indicator.active .step-number {
  color: #fff;
}

.step-indicator.completed {
  background: var(--tertiary-color, #a3cef1);
}

.step-indicator.completed .step-icon {
  opacity: 1;
}

.step-indicator.completed .step-number {
  color: var(--primary-color, #274c77);
}

/* Step Content Area */
.hifdh-content {
  position: relative;
  background: var(--bg-primary, #fff);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  min-height: 400px;
}

.hifdh-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
}

.step-instruction {
  color: var(--text-secondary);
  margin: 0 0 1.5rem 0;
  font-size: 0.9375rem;
}

.step-timer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.875rem;
  color: var(--text-tertiary);
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.step-timer .timer-value {
  font-weight: 600;
  color: var(--text-secondary);
}

/* Countdown Timer - Top Right Position */
.step-timer-countdown {
  position: absolute;
  top: 0;
  right: 0;
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(39, 76, 119, 0.08), rgba(96, 150, 186, 0.08));
  border: 1px solid rgba(39, 76, 119, 0.15);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9375rem;
  transition: all 0.3s ease;
  z-index: 10;
}

.step-timer-countdown svg {
  width: 20px;
  height: 20px;
  stroke: var(--primary-color, #274c77);
  flex-shrink: 0;
}

.step-timer-countdown .timer-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.step-timer-countdown .timer-countdown {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color, #274c77);
  min-width: 70px;
  text-align: center;
}

/* Warning state (< 1 minute) */
.step-timer-countdown.warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(251, 191, 36, 0.1));
  border-color: rgba(245, 158, 11, 0.3);
}

.step-timer-countdown.warning svg {
  stroke: #f59e0b;
}

.step-timer-countdown.warning .timer-countdown {
  color: #f59e0b;
  animation: pulse-warning 1s ease-in-out infinite;
}

/* Time up state */
.step-timer-countdown.time-up {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(248, 113, 113, 0.08));
  border-color: rgba(239, 68, 68, 0.2);
}

.step-timer-countdown.time-up svg {
  stroke: #ef4444;
}

.step-timer-countdown.time-up .timer-countdown {
  color: #ef4444;
}

@keyframes pulse-warning {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Navigation */
.hifdh-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.btn-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-primary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-nav:hover:not(:disabled) {
  background: var(--bg-secondary);
}

.btn-nav:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-nav.btn-next {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

.btn-nav.btn-next:hover:not(:disabled) {
  background: var(--secondary-color, #6096ba);
}

.step-info {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Repetitions Counter */
.reps-section {
  margin: 1.5rem 0;
}

.reps-section h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.reps-progress {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.reps-bar {
  flex: 1;
  height: 12px;
  background: var(--bg-secondary);
  border-radius: 6px;
  overflow: hidden;
}

.reps-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color, #274c77), var(--secondary-color, #6096ba));
  border-radius: 6px;
  transition: width 0.3s ease;
}

.reps-count {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 80px;
  text-align: right;
}

.reps-controls {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-rep {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-rep.btn-large {
  background: var(--primary-color);
  color: #fff;
  font-size: 1rem;
}

.btn-rep.btn-large:hover {
  background: var(--secondary-color, #6096ba);
  transform: scale(1.02);
}

.btn-rep.btn-small {
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.875rem;
}

.btn-rep.btn-small:hover {
  background: var(--bg-tertiary);
}

.reps-complete {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--tertiary-color, #a3cef1);
  border-radius: 8px;
  text-align: center;
  color: var(--primary-color, #274c77);
  font-weight: 500;
}

/* Audio Controls */
.audio-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.btn-audio {
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--primary-color);
  color: #fff;
}

.btn-audio:hover {
  background: var(--secondary-color, #6096ba);
}

.reciter-select {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.875rem;
  background: var(--bg-primary);
  cursor: pointer;
}

/* Recording Controls */
.recording-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.btn-record {
  padding: 0.875rem 1.5rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--bg-primary);
}

.btn-record:hover:not(:disabled) {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.btn-record:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.recording-privacy-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--primary-color, #274c77);
  background: rgba(39, 76, 119, 0.08);
  padding: 0.75rem 1rem;
}

.recording-privacy-notice svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.recording-tip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-tertiary);
  margin-top: 1rem;
}

.recording-tip svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke: var(--primary-color, #274c77);
}

/* Recording Dot - Pulsing Animation */
.record-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: #fff;
  border-radius: 50%;
  margin-right: 0.4rem;
  vertical-align: middle;
}

.record-dot.recording {
  animation: record-pulse 1.5s ease-in-out infinite;
}

@keyframes record-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.5);
  }
  50% {
    transform: scale(1.2);
    opacity: 0.8;
    box-shadow: 0 0 0 8px rgba(220, 38, 38, 0);
  }
}

/* Recording Button Active State */
.btn-record.recording {
  border-color: #dc2626;
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

.btn-record.recording:hover {
  background: rgba(220, 38, 38, 0.15);
  border-color: #b91c1c;
}

/* Confirmation Modal */
.tikrar-confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  animation: fadeIn 0.2s ease;
}

.tikrar-confirm-box {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tikrar-confirm-message {
  font-size: 1rem;
  color: var(--primary-color, #274c77);
  text-align: center;
  margin: 0 0 1.5rem 0;
  line-height: 1.5;
}

.tikrar-confirm-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.tikrar-confirm-buttons .tikrar-btn {
  min-width: 100px;
}

/* Memorization Tools */
.memorization-mode {
  text-align: center;
}

.ayat-focus {
  margin: 2rem 0;
}

.ayat-focus .current-ayat {
  padding: 2rem;
  background: var(--bg-secondary);
  border-radius: 12px;
  margin-bottom: 1rem;
}

.ayat-focus .ayat-text.large {
  font-size: 2rem;
  line-height: 2;
}

.ayat-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.btn-ayat-nav {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-ayat-nav:hover:not(:disabled) {
  background: var(--bg-secondary);
}

.btn-ayat-nav:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ayat-counter {
  font-weight: 600;
  color: var(--text-secondary);
}

.memorization-tools {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.btn-tool {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-primary);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-tool svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-tool:hover {
  background: var(--bg-secondary);
}

.btn-tool.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* Memorization Tools - Text Effects */
.ayat-text.text-hidden {
  color: var(--text-secondary);
  opacity: 0.5;
  letter-spacing: 2px;
  user-select: none;
  transition: all 0.3s ease;
}

.ayat-text.first-words-mode {
  color: var(--primary-color);
  font-style: italic;
}

/* Memorization Counter (Step 3) */
.memorization-counter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 12px;
}

.counter-label {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.counter-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-counter {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-primary);
  font-size: 1.25rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-counter:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.btn-counter:active {
  transform: scale(0.95);
}

.counter-value {
  min-width: 40px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

/* Connection Step */
.connection-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.previous-unit,
.current-unit-display {
  flex: 1;
  min-width: 200px;
  padding: 1.25rem;
  background: var(--bg-secondary);
  border-radius: 12px;
  text-align: center;
}

.previous-unit h4,
.current-unit-display h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 0.75rem 0;
  color: var(--text-secondary);
}

.unit-ref {
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.arrow-connector {
  font-size: 1.5rem;
  color: var(--text-tertiary);
}

.connection-tip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-tertiary);
  max-width: 500px;
  margin: 0 auto;
}

.connection-tip svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke: var(--primary-color, #274c77);
}

/* Validation Step */
.step-validation {
  text-align: center;
}

.session-summary {
  max-width: 500px;
  margin: 0 auto;
}

.session-summary h4 {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.summary-stats .stat {
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 12px;
}

.summary-stats .stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.summary-stats .stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.time-breakdown {
  text-align: left;
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 2rem;
}

.time-breakdown h5 {
  font-size: 0.875rem;
  margin: 0 0 0.75rem 0;
  color: var(--text-secondary);
}

.time-breakdown ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.time-breakdown li {
  display: flex;
  justify-content: space-between;
  padding: 0.375rem 0;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border-color);
}

.time-breakdown li:last-child {
  border-bottom: none;
}

.validation-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.validation-actions .btn-primary,
.validation-actions .btn-secondary {
  padding: 1rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.validation-actions .btn-primary {
  background: var(--primary-color);
  color: #fff;
}

.validation-actions .btn-primary:hover {
  background: var(--secondary-color, #6096ba);
}

.validation-actions .btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.validation-actions .btn-secondary:hover {
  background: var(--bg-tertiary);
}

/* =============================================================================
   6. Yesterday & Liaison Components
   ============================================================================= */

.tikrar-yesterday,
.tikrar-liaison {
  padding: 1rem 0;
}

/* Yesterday Section - Matching Liaison Style */
.yesterday-section {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(39, 76, 119, 0.1);
  border: 1px solid rgba(39, 76, 119, 0.1);
}

.yesterday-unit-info {
  text-align: center;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(39, 76, 119, 0.05);
  border-radius: 12px;
}

.yesterday-unit-info .unit-range {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color, #274c77);
}

.yesterday-unit-info .unit-ayat {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.9rem;
  color: var(--text-secondary, #6b7280);
}

.tikrar-yesterday .quran-display {
  background: #ffffff;
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: inset 0 2px 8px rgba(39, 76, 119, 0.05);
  border: 1px solid rgba(39, 76, 119, 0.08);
}

.tikrar-yesterday .reps-section {
  background: rgba(39, 76, 119, 0.03);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.tikrar-yesterday .reps-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-color, #274c77);
  margin: 0 0 1rem 0;
}

.tikrar-yesterday .reps-progress {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.tikrar-yesterday .reps-bar {
  flex: 1;
  height: 12px;
  background: #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
}

.tikrar-yesterday .reps-fill {
  height: 100%;
  background: linear-gradient(90deg, #4caf50, #66bb6a);
  border-radius: 6px;
  transition: width 0.3s ease;
}

.tikrar-yesterday .reps-count {
  font-weight: 700;
  color: var(--primary-color, #274c77);
  min-width: 50px;
  text-align: right;
}

.tikrar-yesterday .reps-controls {
  display: flex;
  justify-content: center;
}

.tikrar-yesterday .btn-rep {
  background: var(--primary-color, #274c77);
  color: #fff;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tikrar-yesterday .btn-rep:hover {
  background: var(--secondary-color, #6096ba);
  transform: translateY(-2px);
}

.tikrar-yesterday .actions {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.tikrar-yesterday .btn-complete {
  background: var(--primary-color, #274c77);
  color: #fff;
  border: none;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tikrar-yesterday .btn-complete:hover:not(:disabled) {
  background: var(--secondary-color, #6096ba);
  transform: translateY(-2px);
}

.tikrar-yesterday .btn-complete:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.liaison-section {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(39, 76, 119, 0.1);
  border: 1px solid rgba(39, 76, 119, 0.1);
  margin-bottom: 1.5rem;
}

/* Liaison Summary */
.liaison-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, rgba(39, 76, 119, 0.08), rgba(96, 150, 186, 0.08));
  border-radius: 12px;
  border: 1px solid rgba(39, 76, 119, 0.1);
}

.liaison-summary .summary-count,
.liaison-summary .summary-ayat {
  font-weight: 600;
  color: var(--primary-color, #274c77);
  font-size: 1rem;
}

.liaison-summary .summary-separator {
  color: rgba(39, 76, 119, 0.4);
  font-size: 0.875rem;
}

/* Liaison/Revision/Yesterday Quran Display */
.liaison-display,
.revision-display,
.yesterday-display {
  background: linear-gradient(135deg, rgba(251, 248, 239, 0.95), rgba(255, 255, 255, 0.95));
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid rgba(139, 90, 43, 0.1);
  max-height: 500px;
  overflow-y: auto;
  margin-bottom: 1.5rem;
}

.liaison-display .ayat-line,
.revision-display .ayat-line,
.yesterday-display .ayat-line {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(139, 90, 43, 0.1);
}

.liaison-display .ayat-line:last-child,
.revision-display .ayat-line:last-child,
.yesterday-display .ayat-line:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

/* Unit separator between different units */
.unit-separator {
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(39, 76, 119, 0.3), transparent);
  margin: 1.5rem 0;
  position: relative;
}

.unit-separator::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: rgba(39, 76, 119, 0.3);
  border-radius: 50%;
}

/* Liaison complete button */
.tikrar-liaison .btn-complete {
  width: 100%;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--primary-color, #274c77) 0%, var(--secondary-color, #6096ba) 100%);
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tikrar-liaison .btn-complete:hover {
  background: var(--secondary-color, #6096ba);
  transform: translateY(-2px);
}

.section-header {
  margin-bottom: 1.5rem;
}

.section-header h2 {
  font-size: 1.6rem;
  font-weight: 700;
  font-style: italic;
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-header h2 .section-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  stroke: #274c77;
}

.section-desc {
  color: var(--text-secondary);
  margin: 0;
}

.empty-state,
.completed-state {
  text-align: center;
  padding: 3rem 2rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 24px;
  box-shadow: 0 4px 12px rgba(39, 76, 119, 0.1);
  border: 1px solid rgba(39, 76, 119, 0.1);
}

.empty-state .empty-icon,
.completed-state .completed-icon {
  margin-bottom: 1rem;
}

.empty-state .empty-icon svg,
.completed-state .completed-icon svg {
  width: 64px;
  height: 64px;
  stroke: rgba(39, 76, 119, 0.4);
}

.completed-state .completed-icon svg {
  stroke: #22c55e;
}

.empty-state h3,
.completed-state h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: #274c77;
}

.empty-state p,
.completed-state p {
  color: rgba(39, 76, 119, 0.6);
  margin: 0;
  font-size: 1rem;
}

.completed-state {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(163, 206, 241, 0.3));
}

.completed-state .unit-summary {
  margin-top: 1rem;
}

/* Units List */
.units-list {
  margin-bottom: 1.5rem;
}

.units-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.units-count {
  font-weight: 600;
  color: var(--text-primary);
}

.units-progress {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.units-grid {
  display: grid;
  gap: 0.75rem;
}

.units-grid.compact {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.unit-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-secondary, #f8f9fa);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.unit-card:hover {
  border-color: var(--primary-color, #274c77);
  box-shadow: 0 2px 8px rgba(39, 76, 119, 0.1);
}

.unit-card.completed {
  background: linear-gradient(135deg, rgba(163, 206, 241, 0.2), rgba(39, 76, 119, 0.1));
  border-color: var(--primary-color, #274c77);
}

.unit-card.completed .unit-number {
  background: var(--primary-color, #274c77);
  color: white;
}

.unit-number {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.unit-details {
  flex: 1;
}

.unit-details .unit-range {
  display: block;
  font-weight: 500;
  font-size: 0.9375rem;
}

.unit-details .unit-ayat {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.unit-actions {
  display: flex;
  gap: 0.5rem;
}

.unit-check {
  font-size: 1.25rem;
}

.btn-unit-view,
.btn-unit-done {
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--bg-primary);
}

.btn-unit-view:hover {
  background: var(--bg-secondary);
}

.btn-unit-done:hover {
  background: var(--tertiary-color, #a3cef1);
  border-color: var(--primary-color, #274c77);
}

/* Revision Section */
.revision-section {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(39, 76, 119, 0.1);
  border: 1px solid rgba(39, 76, 119, 0.1);
  margin-top: 1.5rem;
}

.revision-section.not-due {
  opacity: 0.8;
  background: rgba(255, 255, 255, 0.7);
}

.not-due-state {
  text-align: center;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border-radius: 12px;
}

.not-due-state p {
  margin: 0 0 0.5rem 0;
}

.next-revision {
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

/* Actions */
.actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn-complete {
  padding: 0.875rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-complete:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary-color, #274c77);
  color: #fff;
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary:hover:not(:disabled) {
  background: var(--secondary-color, #6096ba);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-tertiary);
}

/* =============================================================================
   7. Progress Dashboard
   ============================================================================= */

.tikrar-progress {
  padding: 1rem 0;
}

/* KPI Grid (DuaTime results style) */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.kpi-card {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  border: 1px solid rgba(39, 76, 119, 0.05);
}

.kpi-card:hover {
  background: #f0f4f8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(39, 76, 119, 0.08);
}

.kpi-icon {
  color: var(--primary-color, #274c77);
  margin-bottom: 0.25rem;
}

.kpi-icon svg {
  width: 28px;
  height: 28px;
}

.kpi-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary-color, #274c77);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.kpi-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(39, 76, 119, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.kpi-detail {
  font-size: 0.65rem;
  color: rgba(39, 76, 119, 0.5);
}

/* Progress Section */
.progress-section {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px rgba(39, 76, 119, 0.1);
  border: 1px solid rgba(39, 76, 119, 0.08);
}

.progress-section h3 {
  font-size: 0.85rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  color: var(--primary-color, #274c77);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.quran-progress {
  position: relative;
}

.progress-bar-large {
  height: 24px;
  background: var(--bg-secondary);
  border-radius: 12px;
  overflow: visible;
  position: relative;
}

.progress-bar-large .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color, #274c77), var(--secondary-color, #6096ba));
  border-radius: 12px;
  transition: width 0.5s ease;
}

.progress-marker {
  position: absolute;
  top: 100%;
  transform: translateX(-50%);
  font-size: 0.625rem;
  color: var(--text-tertiary);
  padding-top: 0.5rem;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* Heatmap */
.heatmap-section {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  box-shadow: 0 4px 20px rgba(39, 76, 119, 0.1);
  border: 1px solid rgba(39, 76, 119, 0.08);
}

.heatmap-section h3 {
  font-size: 0.85rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  color: var(--primary-color, #274c77);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.heatmap-container {
  min-width: 700px;
}

.heatmap-grid {
  display: flex;
  gap: 3px;
}

.heatmap-week {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.heatmap-cell {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  cursor: pointer;
  transition: transform 0.1s ease;
}

.heatmap-cell:hover {
  transform: scale(1.3);
}

.heatmap-cell.level-0 {
  background: var(--bg-tertiary, #e5e7eb);
}

.heatmap-cell.level-1 {
  background: var(--tertiary-color, #a3cef1);
}

.heatmap-cell.level-2 {
  background: var(--secondary-color, #6096ba);
}

.heatmap-cell.level-3 {
  background: #4a7ea8;
}

.heatmap-cell.level-4 {
  background: var(--primary-color, #274c77);
}

.heatmap-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  margin-top: 0.75rem;
}

.legend-label {
  font-size: 0.625rem;
  color: var(--text-tertiary);
  margin: 0 0.25rem;
}

.legend-cell {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

/* Times Section */
.times-section {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px rgba(39, 76, 119, 0.1);
  border: 1px solid rgba(39, 76, 119, 0.08);
}

.times-section h3 {
  font-size: 0.85rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  color: var(--primary-color, #274c77);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.times-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.75rem;
}

.time-card {
  text-align: center;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid rgba(39, 76, 119, 0.05);
  transition: all 0.2s ease;
}

.time-card:hover {
  background: #f0f4f8;
  transform: translateY(-2px);
}

.time-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 0.5rem;
  color: var(--primary-color, #274c77);
}

.time-icon svg {
  width: 24px;
  height: 24px;
}

.time-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary-color, #274c77);
  display: inline;
}

.time-label {
  font-size: 0.7rem;
  color: rgba(39, 76, 119, 0.6);
  display: block;
  margin-top: 0.25rem;
}

/* Distribution Section */
.distribution-section {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(39, 76, 119, 0.1);
  border: 1px solid rgba(39, 76, 119, 0.08);
}

.distribution-section h3 {
  font-size: 0.85rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  color: var(--primary-color, #274c77);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.distribution-bars {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dist-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dist-label {
  width: 100px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.dist-bar {
  flex: 1;
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 4px;
  overflow: hidden;
}

.dist-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.dist-value {
  width: 30px;
  text-align: right;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.no-data {
  text-align: center;
  color: var(--text-tertiary);
  padding: 1rem;
}

/* =============================================================================
   8. Modal & Overlays
   ============================================================================= */

/* Settings Button - Style matching Allah Names */
.tikrar-settings-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  border: none;
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(39, 76, 119, 0.4);
  transition: all 0.3s ease;
  color: white;
}

.tikrar-settings-btn:hover {
  background: linear-gradient(135deg, #6096ba 0%, #274c77 100%);
  box-shadow: 0 4px 12px rgba(39, 76, 119, 0.5);
  transform: scale(1.1);
}

.tikrar-settings-btn svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
}

.tikrar-settings-btn:hover svg {
  animation: tikrar-rotate-settings 0.5s ease;
}

@keyframes tikrar-rotate-settings {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(90deg); }
}

/* Make header relative for settings button positioning */
.tikrar-header {
  position: relative;
}

/* Settings Modal Overlay */
.tikrar-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}

/* Settings Modal Container */
.tikrar-modal-overlay .tikrar-modal {
  position: relative;
  background: white;
  border-radius: 24px;
  max-width: 500px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.tikrar-modal-header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid rgba(39, 76, 119, 0.1);
  background: rgba(39, 76, 119, 0.03);
}

.tikrar-modal-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tikrar-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(39, 76, 119, 0.08);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: var(--primary-color, #274c77);
}

.tikrar-modal-close:hover {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}

.tikrar-modal-close svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.5;
}

.tikrar-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.tikrar-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid rgba(39, 76, 119, 0.1);
  background: rgba(39, 76, 119, 0.03);
}

/* Form Groups */
.tikrar-form-group {
  margin-bottom: 1.5rem;
}

.tikrar-form-group:last-child {
  margin-bottom: 0;
}

.tikrar-form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-color, #274c77);
  margin-bottom: 0.5rem;
}

.tikrar-input-with-info {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.tikrar-form-group input[type="number"] {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid rgba(39, 76, 119, 0.15);
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-color, #274c77);
  background: rgba(39, 76, 119, 0.03);
  transition: all 0.2s ease;
}

.tikrar-form-group input[type="number"]:focus {
  outline: none;
  border-color: var(--primary-color, #274c77);
  background: white;
  box-shadow: 0 0 0 4px rgba(39, 76, 119, 0.1);
}

.tikrar-form-group input[type="number"]::-webkit-inner-spin-button,
.tikrar-form-group input[type="number"]::-webkit-outer-spin-button {
  opacity: 1;
  height: 36px;
}

.tikrar-input-hint {
  font-size: 0.75rem;
  color: rgba(39, 76, 119, 0.5);
  font-style: italic;
}

/* Compact modal variant */
.tikrar-modal-compact {
  max-width: 420px;
}

/* Method info section (read-only) */
.tikrar-method-info {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: linear-gradient(135deg, rgba(39, 76, 119, 0.04) 0%, rgba(96, 150, 186, 0.06) 100%);
  border-radius: 16px;
  border: 1px solid rgba(39, 76, 119, 0.1);
}

.tikrar-method-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.75rem;
}

.tikrar-method-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary-color, #274c77) 0%, #6096ba 100%);
  border-radius: 8px;
  color: white;
  flex-shrink: 0;
}

.tikrar-method-icon svg {
  width: 18px;
  height: 18px;
}

.tikrar-method-info h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-color, #274c77);
  margin: 0;
}

.tikrar-method-desc {
  font-size: 0.8rem;
  color: rgba(39, 76, 119, 0.65);
  margin: 0 0 1rem 0;
  line-height: 1.5;
  padding-left: 42px;
}

.tikrar-method-params {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.tikrar-method-params li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  background: white;
  border-radius: 10px;
  border: 1px solid rgba(39, 76, 119, 0.08);
  transition: all 0.2s ease;
}

.tikrar-method-params li:hover {
  border-color: rgba(39, 76, 119, 0.15);
  box-shadow: 0 2px 8px rgba(39, 76, 119, 0.06);
}

.tikrar-method-params .param-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(39, 76, 119, 0.08);
  border-radius: 6px;
  color: var(--primary-color, #274c77);
  flex-shrink: 0;
}

.tikrar-method-params .param-icon svg {
  width: 14px;
  height: 14px;
}

.tikrar-method-params .param-text {
  font-size: 0.825rem;
  color: rgba(39, 76, 119, 0.75);
  line-height: 1.3;
}

.tikrar-method-params strong {
  color: var(--primary-color, #274c77);
  font-weight: 700;
}

/* Modal Buttons */
.tikrar-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tikrar-btn-secondary {
  background: rgba(39, 76, 119, 0.08);
  color: var(--primary-color, #274c77);
}

.tikrar-btn-secondary:hover {
  background: rgba(39, 76, 119, 0.15);
}

.tikrar-btn-primary {
  background: linear-gradient(135deg, #274c77 0%, #6096ba 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(39, 76, 119, 0.25);
}

.tikrar-btn-primary:hover {
  box-shadow: 0 6px 16px rgba(39, 76, 119, 0.35);
  transform: translateY(-1px);
}

.tikrar-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Large button variant */
.tikrar-btn-lg {
  padding: 1rem 2rem;
  font-size: 1rem;
  border-radius: 12px;
  width: 100%;
}

/* =============================================================================
   Next Day Button & Modal Styles
   ============================================================================= */

/* Today header with title and practice day badge */
.tikrar-today-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.tikrar-today-header .section-title {
  margin-bottom: 0;
}

.practice-day-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, rgba(39, 76, 119, 0.1) 0%, rgba(96, 150, 186, 0.1) 100%);
  border: 1px solid rgba(39, 76, 119, 0.2);
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-color, #274c77);
}

.practice-day-badge svg {
  width: 16px;
  height: 16px;
}

/* Container for new session button - harmonized with order-hint */
.tikrar-new-session-container {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
}

/* New session button - matches order-hint style */
.tikrar-btn-new-session {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, var(--primary-color, #274c77) 0%, var(--secondary-color, #6096ba) 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(39, 76, 119, 0.25);
}

.tikrar-btn-new-session:hover {
  box-shadow: 0 6px 16px rgba(39, 76, 119, 0.35);
  transform: translateY(-1px);
}

.tikrar-btn-new-session svg {
  width: 18px;
  height: 18px;
}

/* Next day warning content in modal */
.tikrar-nextday-warning {
  text-align: center;
  padding: 1rem;
}

.tikrar-nextday-warning .warning-icon {
  color: var(--warning-color, #f59e0b);
  margin-bottom: 1rem;
}

.tikrar-nextday-warning .warning-icon svg {
  width: 48px;
  height: 48px;
}

.tikrar-nextday-warning p {
  font-size: 1rem;
  color: var(--text-primary, #1a1a1a);
  margin-bottom: 1rem;
}

.tikrar-nextday-list {
  text-align: left;
  padding-left: 1.5rem;
  margin: 0;
  color: var(--text-secondary, #666);
}

.tikrar-nextday-list li {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.tikrar-nextday-list li:last-child {
  margin-bottom: 0;
}

/* =============================================================================
   Onboarding Modal Styles
   ============================================================================= */

/* Onboarding modal variant */
.tikrar-modal-onboarding {
  max-width: 520px;
}

.tikrar-modal-onboarding .tikrar-modal-header {
  justify-content: center;
  padding: 1.75rem;
}

.tikrar-modal-onboarding .tikrar-modal-header h2 {
  font-size: 1.5rem;
}

/* Welcome message */
.tikrar-onboarding-welcome {
  text-align: center;
  padding: 1rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, rgba(39, 76, 119, 0.08) 0%, rgba(96, 150, 186, 0.08) 100%);
  border-radius: 12px;
}

.tikrar-onboarding-welcome p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--primary-color, #274c77);
  line-height: 1.5;
}

/* Direction options - Radio card style */
.tikrar-direction-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tikrar-radio-option {
  display: flex;
  align-items: flex-start;
  padding: 1rem;
  border: 2px solid rgba(39, 76, 119, 0.15);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(39, 76, 119, 0.02);
}

.tikrar-radio-option:hover {
  border-color: rgba(39, 76, 119, 0.3);
  background: rgba(39, 76, 119, 0.05);
}

.tikrar-radio-option:has(input:checked) {
  border-color: var(--primary-color, #274c77);
  background: rgba(39, 76, 119, 0.08);
  box-shadow: 0 2px 8px rgba(39, 76, 119, 0.15);
}

.tikrar-radio-option input[type="radio"] {
  margin-right: 0.75rem;
  margin-top: 0.25rem;
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color, #274c77);
  cursor: pointer;
}

.tikrar-radio-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.tikrar-radio-title {
  font-weight: 600;
  color: var(--primary-color, #274c77);
  font-size: 0.95rem;
}

.tikrar-radio-desc {
  font-size: 0.8rem;
  color: rgba(39, 76, 119, 0.6);
}

/* Custom start surah section */
.tikrar-custom-start {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(39, 76, 119, 0.05);
  border-radius: 12px;
  animation: slideDown 0.2s ease;
}

/* Custom direction inline radios */
.tikrar-custom-direction-options {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.tikrar-radio-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  border: 2px solid rgba(39, 76, 119, 0.15);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--primary-color, #274c77);
}

.tikrar-radio-inline:hover {
  border-color: rgba(39, 76, 119, 0.3);
  background: rgba(39, 76, 119, 0.03);
}

.tikrar-radio-inline:has(input:checked) {
  border-color: var(--primary-color, #274c77);
  background: rgba(39, 76, 119, 0.1);
}

.tikrar-radio-inline input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary-color, #274c77);
  cursor: pointer;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Select dropdown */
.tikrar-select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid rgba(39, 76, 119, 0.15);
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--primary-color, #274c77);
  background: white;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23274c77' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  transition: all 0.2s ease;
}

.tikrar-select:focus {
  outline: none;
  border-color: var(--primary-color, #274c77);
  box-shadow: 0 0 0 4px rgba(39, 76, 119, 0.1);
}

.tikrar-select:hover {
  border-color: rgba(39, 76, 119, 0.3);
}

/* Onboarding footer centered button */
.tikrar-modal-onboarding .tikrar-modal-footer {
  justify-content: center;
  padding: 1.5rem;
}

/* Generic tikrar-modal (legacy support) */
.tikrar-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
}

.modal-content {
  position: relative;
  background: var(--bg-primary, #ffffff);
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  animation: modalIn 0.2s ease;
  z-index: 1001;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
  background: var(--bg-primary, #ffffff);
  border-radius: 16px 16px 0 0;
}

.modal-header h3 {
  font-size: 1.125rem;
  margin: 0;
  color: var(--text-primary, #1f2937);
}

.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg-secondary, #f3f4f6);
  border-radius: 8px;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: var(--text-secondary, #6b7280);
}

.modal-close:hover {
  background: var(--bg-tertiary, #e5e7eb);
  color: var(--text-primary, #1f2937);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
  background: var(--bg-primary, #ffffff);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-color, #e5e7eb);
  background: var(--bg-primary, #ffffff);
  border-radius: 0 0 16px 16px;
}

.modal-close-btn,
.modal-done-btn {
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close-btn {
  background: var(--bg-secondary, #f3f4f6);
  color: var(--text-primary, #1f2937);
}

.modal-done-btn {
  background: var(--primary-color, #274c77);
  color: #fff;
}

/* =============================================================================
   9. Quran Text Display
   ============================================================================= */

.quran-display {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1rem 0;
}

.quran-display.compact {
  padding: 1rem;
}

.quran-display.mini {
  padding: 0.75rem;
  font-size: 0.9375rem;
}

.ayat-line {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.ayat-line:last-child {
  border-bottom: none;
}

/* Bismillah - displayed separately at top */
.bismillah-line {
  text-align: center;
  padding: 1rem 0;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.bismillah-text {
  font-family: 'Amiri', 'Traditional Arabic', serif;
  font-size: 1.25rem;
  color: var(--primary-color, #274c77);
  font-weight: 500;
}

/* Playing state - highlights current ayah */
.ayat-line.playing,
.ayat-block.playing {
  background: linear-gradient(135deg, rgba(39, 76, 119, 0.1) 0%, rgba(96, 150, 186, 0.15) 100%);
  border-radius: 8px;
  border-left: 3px solid var(--primary-color, #274c77);
  padding-left: 1rem;
  animation: pulse-ayah 2s ease-in-out infinite;
}

@keyframes pulse-ayah {
  0%, 100% {
    background: linear-gradient(135deg, rgba(39, 76, 119, 0.1) 0%, rgba(96, 150, 186, 0.15) 100%);
  }
  50% {
    background: linear-gradient(135deg, rgba(39, 76, 119, 0.15) 0%, rgba(96, 150, 186, 0.2) 100%);
  }
}

.ayat-text {
  flex: 1;
  text-align: right;
  direction: rtl;
}

.arabic-text {
  font-family: 'Amiri', 'Traditional Arabic', serif;
  font-size: 1.5rem;
  line-height: 2;
  color: var(--text-primary);
}

.arabic-text.large {
  font-size: 2rem;
  line-height: 2.2;
}

.ayat-number {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  padding: 0.25rem 0.5rem;
  background: var(--bg-tertiary);
  border-radius: 4px;
  white-space: nowrap;
}

.ayat-block {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
}

.ayat-block:last-child {
  border-bottom: none;
}

.ayat-arabic {
  text-align: right;
  direction: rtl;
  font-family: 'Amiri', serif;
  font-size: 1.375rem;
  line-height: 2;
  margin-bottom: 0.5rem;
}

.ayat-translation {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  font-style: italic;
}

.ayat-inline {
  font-family: 'Amiri', serif;
  font-size: 1.25rem;
  line-height: 2.2;
  direction: rtl;
}

.ayat-mini {
  font-family: 'Amiri', serif;
  font-size: 1rem;
  direction: rtl;
}

/* Tafsir Links */
.tafsir-links {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.btn-tafsir {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.btn-tafsir:hover {
  background: var(--bg-secondary);
  border-color: var(--primary-color);
}

.btn-tafsir svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* =============================================================================
   10. Responsive Breakpoints
   ============================================================================= */

/* Tablet */
@media (max-width: 1024px) {
  .tikrar-container {
    padding: 1rem;
  }

  .tikrar-title {
    font-size: 1.5rem;
  }

  .hifdh-content {
    padding: 1.5rem;
  }

  .summary-stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Mobile Landscape */
@media (max-width: 768px) {
  .tikrar-header {
    padding-bottom: 1rem;
  }

  .tikrar-progress-overview {
    flex-direction: column;
    gap: 0.5rem;
  }

  .tikrar-progress-overview .progress-bar-container {
    width: 100%;
    max-width: none;
  }

  .tikrar-tabs {
    padding: 0.375rem;
    gap: 0.25rem;
  }

  .tikrar-tab {
    padding: 0.625rem 0.875rem;
    font-size: 0.8125rem;
  }

  .daily-tasks-grid {
    grid-template-columns: 1fr;
  }

  .hifdh-progress {
    padding: 0.5rem 0;
  }

  .step-indicator {
    padding: 0.375rem 0.625rem;
  }

  .hifdh-content {
    padding: 1rem;
  }

  .arabic-text {
    font-size: 1.25rem;
  }

  .arabic-text.large {
    font-size: 1.5rem;
  }

  .hifdh-navigation {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .btn-nav {
    flex: 1;
    justify-content: center;
    min-width: 120px;
  }

  .step-info {
    order: -1;
    width: 100%;
    text-align: center;
    margin-bottom: 0.5rem;
  }

  .connection-info {
    flex-direction: column;
  }

  .arrow-connector {
    transform: rotate(90deg);
  }

  .summary-stats {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .times-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .modal-content {
    max-height: 90vh;
    margin: 0.5rem;
  }
}

/* Mobile Portrait */
@media (max-width: 480px) {
  .tikrar-container {
    padding: 0.75rem;
  }

  .tikrar-title {
    font-size: 1.25rem;
  }

  .tikrar-tab .tab-icon {
    font-size: 1rem;
  }

  .task-card {
    padding: 1rem;
  }

  .hifdh-progress {
    gap: 0.125rem;
  }

  .step-indicator .step-icon {
    font-size: 1rem;
  }

  .arabic-text {
    font-size: 1.125rem;
  }

  .arabic-text.large {
    font-size: 1.375rem;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .kpi-card {
    padding: 1rem;
  }

  .kpi-value {
    font-size: 1.5rem;
  }

  .times-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dist-label {
    width: 80px;
    font-size: 0.75rem;
  }
}

/* =============================================================================
   11. Animations
   ============================================================================= */

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

/* Apply animations */
.tikrar-today,
.tikrar-hifdh,
.tikrar-yesterday,
.tikrar-liaison,
.tikrar-progress {
  animation: fadeIn 0.3s ease;
}

.task-card {
  animation: slideUp 0.3s ease;
}

.task-card:nth-child(2) {
  animation-delay: 0.05s;
}

.task-card:nth-child(3) {
  animation-delay: 0.1s;
}

.task-card:nth-child(4) {
  animation-delay: 0.15s;
}

.kpi-card {
  animation: slideUp 0.3s ease;
}

.kpi-card:nth-child(2) {
  animation-delay: 0.05s;
}

.kpi-card:nth-child(3) {
  animation-delay: 0.1s;
}

.kpi-card:nth-child(4) {
  animation-delay: 0.15s;
}

/* =============================================================================
   STEP CARD - App-like UI for Hifdh Steps
   ============================================================================= */

/* Step Card Container */
.step-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0;
}

/* Step Card Header */
.step-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.step-card-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.step-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-color, #274c77) 0%, var(--secondary-color, #6096ba) 100%);
  border-radius: 12px;
  color: #fff;
}

.step-card-icon svg {
  width: 20px;
  height: 20px;
  stroke: #fff;
}

.step-card-title h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-primary);
}

/* Timer Badge - Compact */
.step-timer-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  background: rgba(39, 76, 119, 0.08);
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-color, #274c77);
  white-space: nowrap;
}

.step-timer-badge svg {
  width: 16px;
  height: 16px;
  stroke: var(--primary-color, #274c77);
}

.step-timer-badge.warning {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}

.step-timer-badge.warning svg {
  stroke: #d97706;
}

.step-timer-badge.time-up {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
}

/* Step Instruction */
.step-card-instruction {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* Step Card Actions */
.step-card-actions {
  display: flex;
  justify-content: center;
  margin-top: 0.5rem;
}

.step-card-actions .btn-complete {
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
}

/* Quran Display Card - Enhanced */
.quran-display-card {
  background: linear-gradient(180deg, rgba(39, 76, 119, 0.03) 0%, rgba(163, 206, 241, 0.08) 100%);
  border: 1px solid rgba(39, 76, 119, 0.1);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
}

.quran-display-card .bismillah-line {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed rgba(39, 76, 119, 0.2);
}

.quran-display-card .bismillah-text {
  font-size: 1.5rem;
  color: var(--primary-color, #274c77);
}

.quran-display-card .ayat-line {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.quran-display-card .ayat-text {
  font-size: 1.75rem;
  line-height: 2;
  color: var(--text-primary);
}

.quran-display-card .ayat-number {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* Audio Player Bar - App Style */
.audio-player-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: linear-gradient(135deg, var(--primary-color, #274c77) 0%, var(--secondary-color, #6096ba) 100%);
  border-radius: 16px;
  margin-top: auto;
}

.audio-player-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.audio-player-btn svg {
  width: 20px;
  height: 20px;
  fill: var(--primary-color, #274c77);
}

.audio-player-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.audio-player-btn.playing {
  background: rgba(255, 255, 255, 0.9);
  animation: pulse-play 1.5s ease-in-out infinite;
}

@keyframes pulse-play {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); }
}

.audio-player-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 0;
}

.audio-player-status {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #fff;
}

/* Override global select styles from app-styles.css */
.audio-player-bar select.audio-player-reciter {
  width: auto;
  margin-bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  padding: 0.375rem 1.5rem 0.375rem 0.75rem;
  font-size: 0.8125rem;
  color: #fff;
  cursor: pointer;
  max-width: 150px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M2 4l4 4 4-4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.4rem center;
  background-size: 12px;
}

.audio-player-reciter option {
  background: var(--bg-primary);
  color: var(--text-primary);
}

.audio-player-bar select.audio-player-reciter:hover {
  background-color: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Responsive adjustments for step cards */
@media (max-width: 640px) {
  .step-card-header {
    flex-direction: column;
    gap: 0.75rem;
  }

  .step-timer-badge {
    align-self: flex-end;
  }

  .quran-display-card .ayat-text {
    font-size: 1.5rem;
  }

  .audio-player-bar {
    flex-wrap: wrap;
  }

  .audio-player-info {
    order: 1;
    flex-basis: calc(100% - 60px);
  }
}

/* =============================================================================
   Step-Specific Components - App Style
   ============================================================================= */

/* Step 2: Tafsir */
.quran-display-card.with-translation {
  gap: 1.25rem;
  text-align: right;
}

.quran-display-card.with-translation .ayat-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed rgba(39, 76, 119, 0.1);
}

.quran-display-card.with-translation .ayat-block:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.quran-display-card.with-translation .ayat-arabic {
  font-size: 1.5rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.quran-display-card.with-translation .ayat-translation {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  text-align: left;
  line-height: 1.6;
  font-style: italic;
}

.tafsir-action-bar {
  display: flex;
  justify-content: center;
}

.btn-tafsir-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: rgba(39, 76, 119, 0.08);
  border-radius: 12px;
  color: var(--primary-color, #274c77);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-tafsir-link:hover {
  background: rgba(39, 76, 119, 0.15);
  transform: translateY(-2px);
}

.btn-tafsir-link svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

/* Step 3: Memorization */
.memorization-focus-card {
  background: linear-gradient(180deg, rgba(39, 76, 119, 0.05) 0%, rgba(163, 206, 241, 0.1) 100%);
  border: 1px solid rgba(39, 76, 119, 0.15);
  border-radius: 20px;
  padding: 2rem 1.5rem;
  text-align: center;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
}

.memorization-focus-card .current-ayat {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.memorization-focus-card .ayat-text {
  font-size: 2rem;
  line-height: 2;
  color: var(--text-primary);
}

.ayat-nav-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.ayat-nav-bar .btn-ayat-nav {
  width: 40px;
  height: 40px;
  border: 2px solid rgba(39, 76, 119, 0.2);
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  color: var(--primary-color, #274c77);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ayat-nav-bar .btn-ayat-nav:hover:not(:disabled) {
  border-color: var(--primary-color, #274c77);
  background: rgba(39, 76, 119, 0.05);
}

.ayat-nav-bar .btn-ayat-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ayat-nav-bar .ayat-counter {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.memorization-tools-bar {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-tool-compact {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: #fff;
  border: 1px solid rgba(39, 76, 119, 0.15);
  border-radius: 10px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-tool-compact:hover {
  border-color: var(--primary-color, #274c77);
  color: var(--primary-color, #274c77);
  background: rgba(39, 76, 119, 0.03);
}

.btn-tool-compact svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
}

.memorization-counter-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.875rem 1.25rem;
  background: rgba(39, 76, 119, 0.05);
  border-radius: 12px;
}

.memorization-counter-bar .counter-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.memorization-counter-bar .counter-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.memorization-counter-bar .btn-counter {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(39, 76, 119, 0.2);
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--primary-color, #274c77);
  transition: all 0.2s ease;
}

.memorization-counter-bar .btn-counter:hover {
  background: var(--primary-color, #274c77);
  color: #fff;
  border-color: var(--primary-color, #274c77);
}

.memorization-counter-bar .counter-value {
  min-width: 36px;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color, #274c77);
}

/* Step 4: Recording */
.recording-controls-bar {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-record-main {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  background: #dc2626;
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-record-main:hover {
  background: #b91c1c;
  transform: scale(1.02);
}

.btn-record-main.recording {
  animation: pulse-record 1.5s ease-in-out infinite;
}

@keyframes pulse-record {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(220, 38, 38, 0); }
}

.btn-record-secondary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.25rem;
  background: #fff;
  border: 1px solid rgba(39, 76, 119, 0.2);
  border-radius: 12px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-record-secondary:hover {
  border-color: var(--primary-color, #274c77);
  color: var(--primary-color, #274c77);
}

.btn-record-secondary:not(.has-recording) {
  opacity: 0.6;
}

.btn-record-secondary.has-recording {
  opacity: 1;
  border-color: var(--primary-color, #274c77);
  color: var(--primary-color, #274c77);
}

.btn-record-secondary svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* Three columns layout for recording controls */
.recording-controls-bar.three-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

/* Reciter button - contains play icon + select dropdown */
.btn-record-reciter {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0;
  padding-left: 0.4rem;
  background: var(--primary-color, #274c77);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
}

.btn-record-reciter:hover {
  background: #1e3a5f;
}

/* Play button part */
.btn-record-reciter .reciter-play-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
}

.btn-record-reciter svg {
  width: 14px;
  height: 14px;
  fill: #fff;
  flex-shrink: 0;
}

/* Select dropdown part - full width (override global select styles) */
.btn-record-reciter select.audio-player-reciter.compact {
  flex: 1;
  display: flex;
  align-items: center;
  width: auto;
  margin-bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 0 4px 4px 0;
  color: #fff;
  padding: 0 1.4rem 0 0.5rem;
  margin: 0.25rem 0.3rem 0.25rem 0.35rem;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M2 4l4 4 4-4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.4rem center;
  background-size: 10px;
}

.btn-record-reciter select.audio-player-reciter.compact:hover {
  background-color: rgba(255, 255, 255, 0.25);
}

.btn-record-reciter select.audio-player-reciter.compact option {
  background: var(--primary-color, #274c77);
  color: #fff;
}

.audio-player-bar.secondary {
  background: rgba(39, 76, 119, 0.08);
}

.audio-player-bar.secondary .audio-player-btn {
  background: var(--primary-color, #274c77);
}

.audio-player-bar.secondary .audio-player-btn svg {
  fill: #fff;
}

.audio-player-bar.secondary .audio-player-status {
  color: var(--text-primary);
}

.audio-player-bar.secondary select.audio-player-reciter {
  background-color: #fff;
  border-color: rgba(39, 76, 119, 0.15);
  color: var(--text-primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23274c77' d='M2 4l4 4 4-4z'/%3E%3C/svg%3E");
}

/* Fix: secondary mode with compact reciter select */
.audio-player-bar.secondary .btn-record-reciter select.audio-player-reciter.compact {
  background-color: #fff;
  color: var(--text-primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%23274c77' d='M2 4l4 4 4-4z'/%3E%3C/svg%3E");
}

.audio-player-bar.secondary .btn-record-reciter select.audio-player-reciter.compact option {
  background: #fff;
  color: var(--text-primary);
}

/* Step 5: Repetitions - Redesigned Layout */

/* Header badges container (counter + timer) */
.step-header-badges {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Simple counter badge (no target, e.g., Step 3) */
.simple-counter-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.375rem 0.75rem;
  background: linear-gradient(135deg, rgba(39, 76, 119, 0.15) 0%, rgba(96, 150, 186, 0.2) 100%);
  border: 2px solid rgba(39, 76, 119, 0.3);
  border-radius: 20px;
  font-size: 0.9375rem;
  font-weight: 700;
  min-width: 40px;
}

.simple-counter-badge .counter-value {
  color: var(--primary-color, #274c77);
  font-weight: 800;
  font-size: 1rem;
}

/* Counter badge with integrated progress (color changes based on progress) */
.reps-counter-badge {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  padding: 0.5rem 0.875rem;
  background: linear-gradient(135deg, rgba(255, 152, 0, 0.2) 0%, rgba(255, 193, 7, 0.25) 100%);
  border: 2px solid rgba(255, 152, 0, 0.4);
  border-radius: 20px;
  font-size: 0.9375rem;
  font-weight: 700;
  transition: all 0.3s ease;
}

.reps-counter-badge .reps-current {
  color: #e65100;
  font-weight: 800;
  font-size: 1rem;
}

.reps-counter-badge .reps-separator {
  color: var(--text-tertiary);
}

.reps-counter-badge .reps-target-num {
  color: var(--text-secondary);
}

/* Progress states: Orange (0-25%) → Yellow (25-75%) → Green (75-100%) */
.reps-counter-badge.progress-low {
  background: linear-gradient(135deg, rgba(255, 152, 0, 0.2) 0%, rgba(255, 193, 7, 0.25) 100%);
  border-color: rgba(255, 152, 0, 0.5);
}

.reps-counter-badge.progress-low .reps-current {
  color: #e65100;
}

.reps-counter-badge.progress-mid {
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.25) 0%, rgba(205, 220, 57, 0.3) 100%);
  border-color: rgba(255, 193, 7, 0.5);
}

.reps-counter-badge.progress-mid .reps-current {
  color: #f9a825;
}

.reps-counter-badge.progress-high {
  background: linear-gradient(135deg, rgba(139, 195, 74, 0.25) 0%, rgba(76, 175, 80, 0.3) 100%);
  border-color: rgba(76, 175, 80, 0.5);
}

.reps-counter-badge.progress-high .reps-current {
  color: #558b2f;
}

.reps-counter-badge.complete {
  background: linear-gradient(135deg, #4caf50 0%, #81c784 100%);
  border-color: #4caf50;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.4);
}

.reps-counter-badge.complete .reps-current,
.reps-counter-badge.complete .reps-separator,
.reps-counter-badge.complete .reps-target-num {
  color: #fff;
}

/* Prominent Quran display (most important element) */
.quran-display-card.prominent {
  padding: 1rem 0.75rem;
  min-height: auto;
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
  border: 2px solid rgba(39, 76, 119, 0.12);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(39, 76, 119, 0.08);
  margin-bottom: 0.75rem;
}

.quran-display-card.prominent .ayat-inline {
  display: inline;
  font-size: 2.1rem; /* Arabic text (30% smaller than 3rem) */
  line-height: 2;
}

/* Liaison/Revision/Yesterday display within prominent card */
.quran-display-card.prominent.liaison-display,
.quran-display-card.prominent.revision-display,
.quran-display-card.prominent.yesterday-display {
  max-height: 400px;
  overflow-y: auto;
  text-align: right;
  padding: 0.75rem;
  justify-content: flex-start; /* Override parent's center - fixes first ayat visibility */
}

.quran-display-card.prominent.liaison-display .ayat-line,
.quran-display-card.prominent.revision-display .ayat-line,
.quran-display-card.prominent.yesterday-display .ayat-line {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 0.35rem;
  margin-bottom: 0.25rem;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid rgba(139, 90, 43, 0.06);
}

.quran-display-card.prominent.liaison-display .ayat-line:last-child,
.quran-display-card.prominent.revision-display .ayat-line:last-child,
.quran-display-card.prominent.yesterday-display .ayat-line:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.quran-display-card.prominent.liaison-display .ayat-text,
.quran-display-card.prominent.revision-display .ayat-text,
.quran-display-card.prominent.yesterday-display .ayat-text {
  font-size: 1.25rem;
  line-height: 1.2;
  color: var(--text-primary);
}

.quran-display-card.prominent.liaison-display .ayat-number,
.quran-display-card.prominent.revision-display .ayat-number,
.quran-display-card.prominent.yesterday-display .ayat-number {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  font-weight: 500;
  flex-shrink: 0;
}

/* Sequential counter showing position in review (1, 2, 3...) */
.quran-display-card.prominent.liaison-display .ayat-sequence,
.quran-display-card.prominent.revision-display .ayat-sequence,
.quran-display-card.prominent.yesterday-display .ayat-sequence {
  font-size: 0.7rem;
  color: var(--primary-color, #274c77);
  font-weight: 600;
  min-width: 1.5rem;
  text-align: left;
  flex-shrink: 0;
  opacity: 0.6;
}

/* Unit separator in liaison/revision */
.quran-display-card.prominent .unit-separator {
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(39, 76, 119, 0.3), transparent);
  margin: 0.35rem 0;
  position: relative;
}

.quran-display-card.prominent .unit-separator::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: rgba(39, 76, 119, 0.3);
  border-radius: 50%;
}

/* Compact progress bar (below verse) */
.reps-progress-bar-container {
  margin-bottom: 1rem;
}

.reps-progress-bar-container .reps-bar,
.reps-progress-bar-container .reps-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.reps-progress-bar-container .reps-fill {
  height: 100%;
  background: linear-gradient(90deg, #4caf50, #81c784);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.reps-progress-bar-container .reps-fill.complete {
  background: linear-gradient(90deg, #2e7d32, #4caf50);
}

/* Uniform buttons bar */
.reps-buttons-bar.uniform {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.reps-buttons-bar.uniform .btn-rep {
  width: 60px;
  height: 60px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color, #274c77) 0%, var(--secondary-color, #6096ba) 100%);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(39, 76, 119, 0.3);
  /* Center text in button */
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}

.reps-buttons-bar.uniform .btn-rep:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(39, 76, 119, 0.4);
}

.reps-buttons-bar.uniform .btn-rep:active {
  transform: scale(0.95);
}

/* Legacy button styles (kept for compatibility) */
.reps-buttons-bar:not(.uniform) {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.btn-rep-main {
  width: 64px;
  height: 64px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color, #274c77) 0%, var(--secondary-color, #6096ba) 100%);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(39, 76, 119, 0.3);
}

.btn-rep-main:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(39, 76, 119, 0.4);
}

.btn-rep-secondary {
  width: 48px;
  height: 48px;
  border: 2px solid rgba(39, 76, 119, 0.2);
  border-radius: 50%;
  background: #fff;
  color: var(--primary-color, #274c77);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-rep-secondary:hover {
  border-color: var(--primary-color, #274c77);
  background: rgba(39, 76, 119, 0.05);
}

/* Completion banner */
.reps-complete-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem;
  margin-top: 1rem;
  background: linear-gradient(135deg, #4caf50 0%, #81c784 100%);
  border-radius: 12px;
  color: #fff;
  font-weight: 600;
  font-size: 0.9375rem;
  animation: slideIn 0.3s ease;
}

.reps-complete-banner svg {
  width: 18px;
  height: 18px;
  stroke: #fff;
}

/* Legacy reps-progress-card (kept for compatibility) */
.reps-progress-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.08) 0%, rgba(129, 199, 132, 0.12) 100%);
  border: 1px solid rgba(76, 175, 80, 0.2);
  border-radius: 16px;
}

.quran-display-card.compact {
  padding: 1rem;
  min-height: auto;
  text-align: center;
  font-size: 1.25rem;
  line-height: 2;
}

.quran-display-card.compact .ayat-inline {
  display: inline;
}

/* Step 6: Connection */
.connection-cards {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
}

.connection-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  background: #fff;
  border: 1px solid rgba(39, 76, 119, 0.1);
  border-radius: 12px;
  min-height: 120px;
}

.connection-card.previous {
  background: rgba(39, 76, 119, 0.03);
}

.connection-card.current {
  background: linear-gradient(180deg, rgba(163, 206, 241, 0.15) 0%, rgba(163, 206, 241, 0.05) 100%);
  border-color: rgba(39, 76, 119, 0.2);
}

.connection-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-tertiary);
}

.connection-card-ref {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--primary-color, #274c77);
}

.connection-card-text {
  font-size: 1.7rem;
  line-height: 1.8;
  color: var(--text-primary);
  text-align: right;
  flex: 1;
}

.connection-card-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  color: var(--text-tertiary);
  font-size: 0.875rem;
  font-style: italic;
}

.connection-arrow {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  color: var(--primary-color, #274c77);
  padding: 0 0.25rem;
}

.connection-counter-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.875rem 1.25rem;
  background: rgba(39, 76, 119, 0.05);
  border-radius: 12px;
}

.connection-counter-bar .counter-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.connection-counter-bar .counter-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.connection-counter-bar .btn-counter {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(39, 76, 119, 0.2);
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--primary-color, #274c77);
  transition: all 0.2s ease;
}

.connection-counter-bar .btn-counter:hover {
  background: var(--primary-color, #274c77);
  color: #fff;
  border-color: var(--primary-color, #274c77);
}

.connection-counter-bar .counter-value {
  min-width: 36px;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color, #274c77);
  transition: all 0.3s ease;
}

.connection-counter-bar .counter-value.goal-reached {
  color: #4caf50;
}

.connection-counter-bar .counter-goal {
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

/* Step 7: Validation */
.step-card-icon.success {
  background: linear-gradient(135deg, #4caf50 0%, #81c784 100%);
}

.validation-summary-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.5rem;
  background: linear-gradient(180deg, rgba(76, 175, 80, 0.08) 0%, rgba(129, 199, 132, 0.05) 100%);
  border: 1px solid rgba(76, 175, 80, 0.2);
  border-radius: 16px;
}

.summary-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.summary-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.summary-stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-color, #274c77);
  line-height: 1;
}

.summary-stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.time-breakdown-compact {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-top: 1rem;
  border-top: 1px dashed rgba(39, 76, 119, 0.15);
}

.time-breakdown-compact .time-row {
  display: grid;
  grid-template-columns: 20px 1fr auto auto;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: rgba(39, 76, 119, 0.05);
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
}

.time-breakdown-compact .time-row svg {
  width: 16px;
  height: 16px;
  stroke: var(--primary-color, #274c77);
  justify-self: center;
}

.time-breakdown-compact .icon-placeholder {
  width: 16px;
  height: 16px;
}

.time-breakdown-compact .time-label {
  color: var(--text-secondary);
}

.time-breakdown-compact .time-value,
.time-breakdown-compact .time-header {
  font-weight: 600;
  color: var(--primary-color, #274c77);
  text-align: right;
  min-width: 2.5rem;
}

.time-breakdown-compact .reps-value,
.time-breakdown-compact .reps-header {
  font-weight: 600;
  color: var(--primary-color, #274c77);
  text-align: center;
  min-width: 2.5rem;
}

.time-breakdown-compact .header-row {
  background: transparent;
  padding-top: 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(39, 76, 119, 0.15);
  border-radius: 0;
}

.time-breakdown-compact .time-header,
.time-breakdown-compact .reps-header {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.time-breakdown-compact .time-header {
  text-align: right;
}

.time-breakdown-compact .reps-header {
  text-align: center;
}

.validation-actions-bar {
  display: flex;
  justify-content: center;
}

.btn-validation-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
  border: none;
  border-radius: 16px;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-validation-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
}

.btn-validation-main svg {
  width: 20px;
  height: 20px;
  stroke: #fff;
}

/* Shared: Step Tip Box */
.step-tip-box {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  background: rgba(245, 158, 11, 0.08);
  border-radius: 12px;
  font-size: 0.875rem;
  color: #92400e;
  line-height: 1.5;
}

.step-tip-box svg {
  width: 16px;
  height: 16px;
  stroke: #d97706;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Responsive for new step components */
@media (max-width: 640px) {
  .memorization-focus-card {
    padding: 1.5rem 1rem;
    min-height: 150px;
  }

  .memorization-focus-card .ayat-text {
    font-size: 1.5rem;
  }

  .connection-cards {
    flex-direction: column;
  }

  .connection-arrow {
    transform: rotate(90deg);
    justify-content: center;
  }

  .summary-stats-grid {
    gap: 0.5rem;
  }

  .summary-stat-value {
    font-size: 1.5rem;
  }

  .btn-rep-main {
    width: 56px;
    height: 56px;
    font-size: 1.25rem;
  }

  .btn-rep-secondary {
    width: 44px;
    height: 44px;
    font-size: 0.9rem;
  }

  .time-breakdown-compact {
    gap: 0.5rem;
  }

  .time-breakdown-compact .time-row {
    font-size: 0.75rem;
  }
}

/* Dark Mode Support - Disabled to match DuaTime light theme */
/* TODO: Re-enable when TalibHub has proper dark mode support */
