/**
 * Styles: Quran Words (80% du Coran)
 *
 * Feuille de styles pour le module de memorisation des mots du Coran.
 * Design: Deep blue/teal gradient aesthetic for Quranic theme.
 *
 * Note: This module reuses shared flashcard styles from flashcardDashboard.css
 * This file contains only module-specific overrides and theme colors.
 */

/* =============================================================================
 * CSS Variables - Blue/Teal Theme
 * ============================================================================= */

:root {
  /* Quran Word Blue Gradients */
  --qw-blue-gradient: linear-gradient(135deg, #1a5276 0%, #2e86c1 100%);
  --qw-blue-light: linear-gradient(135deg, #2e86c1 0%, #5dade2 100%);
  --qw-blue-dark: linear-gradient(135deg, #1a5276 0%, #0e3347 100%);
  --qw-blue-bg: linear-gradient(135deg, rgba(26, 82, 118, 0.1), rgba(46, 134, 193, 0.1));
  --qw-blue-radial: radial-gradient(circle at 50% 50%, rgba(26, 82, 118, 0.15), rgba(46, 134, 193, 0.05));

  /* Glassmorphism */
  --qw-glass-white: rgba(255, 255, 255, 0.25);
  --qw-glass-white-hover: rgba(255, 255, 255, 0.35);
  --qw-glass-blue: rgba(26, 82, 118, 0.15);
  --qw-glass-blue-hover: rgba(26, 82, 118, 0.25);

  /* Shadows */
  --qw-shadow-blue: 0 8px 20px rgba(26, 82, 118, 0.4);
  --qw-shadow-blue-lg: 0 12px 40px rgba(26, 82, 118, 0.5);
}

/* =============================================================================
 * Landing Page Styling (Theme Selection)
 * ============================================================================= */

#quran-words .arabic-learning-container {
  max-width: 1200px;
}

#quran-words .tabs-nav.tome-header {
  background: var(--qw-blue-bg);
  border: 1px solid rgba(26, 82, 118, 0.15);
  border-radius: 20px;
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
}

#quran-words .back-btn-nav {
  --back-btn-bg: #1a5276;
  --back-btn-hover: #0e3347;
}

#quran-words .back-btn-nav:hover {
  background: var(--back-btn-hover);
}

#quran-words .arabic-learning-title {
  background: var(--qw-blue-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#quran-words .arabic-learning-subtitle {
  color: #1a5276;
  opacity: 0.8;
}

/* Theme Cards - matches Invocations (Dua) pattern with blue theme */
#quran-words .arabic-books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  padding: 0.5rem;
}

#quran-words .arabic-book-card {
  background: linear-gradient(145deg, #ffffff 0%, #eaf2f8 100%);
  border: 1px solid rgba(26, 82, 118, 0.12);
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  min-height: 200px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(26, 82, 118, 0.06);
}

#quran-words .arabic-book-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: var(--qw-blue-gradient);
  opacity: 0;
  transition: opacity 0.35s ease;
}

#quran-words .arabic-book-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(26, 82, 118, 0.18),
              0 4px 12px rgba(26, 82, 118, 0.08);
  border-color: rgba(26, 82, 118, 0.25);
}

#quran-words .arabic-book-card:hover::before {
  opacity: 0.03;
}

#quran-words .arabic-book-card:active {
  transform: translateY(-2px);
}

/* Theme Icon Container */
#quran-words .arabic-book-card .book-icon {
  font-size: 2rem;
  position: relative;
  z-index: 1;
}

#quran-words .arabic-book-card .book-icon.qw-theme-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(26, 82, 118, 0.08), rgba(46, 134, 193, 0.04));
  border: 2px solid rgba(26, 82, 118, 0.12);
  transition: all 0.35s ease;
}

#quran-words .arabic-book-card .book-icon.qw-theme-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--qw-blue-primary, #1a5276);
  stroke-width: 2;
  transition: all 0.3s ease;
}

#quran-words .arabic-book-card:hover .book-icon.qw-theme-icon {
  background: var(--qw-blue-gradient);
  border-color: transparent;
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(26, 82, 118, 0.3);
}

#quran-words .arabic-book-card:hover .book-icon.qw-theme-icon svg {
  stroke: white;
}

/* Card Info Section */
#quran-words .arabic-book-card .book-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
}

#quran-words .arabic-book-card .book-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0e3347;
  margin: 0;
  line-height: 1.3;
  text-align: center;
}

#quran-words .arabic-book-card:hover .book-title {
  background: var(--qw-blue-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#quran-words .arabic-book-card .book-subtitle {
  font-size: 0.85rem;
  color: #2c5f7c;
  margin: 0;
  line-height: 1.4;
  max-width: 200px;
  text-align: center;
}

#quran-words .arabic-book-card .book-count {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: linear-gradient(145deg, rgba(26, 82, 118, 0.1), rgba(46, 134, 193, 0.08));
  color: var(--qw-blue-primary, #1a5276);
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(26, 82, 118, 0.12);
  transition: all 0.3s ease;
}

#quran-words .arabic-book-card:hover .book-count {
  background: var(--qw-blue-gradient);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(26, 82, 118, 0.25);
}

/* Disabled State */
#quran-words .arabic-book-card.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.3);
}

#quran-words .arabic-book-card.disabled:hover {
  transform: none;
  box-shadow: 0 2px 8px rgba(26, 82, 118, 0.06);
}

#quran-words .arabic-book-card.disabled:hover::before {
  opacity: 0;
}

#quran-words .arabic-book-card.disabled:hover .book-icon.qw-theme-icon {
  background: linear-gradient(145deg, rgba(26, 82, 118, 0.08), rgba(46, 134, 193, 0.04));
  transform: none;
  box-shadow: none;
}

#quran-words .arabic-book-card.disabled:hover .book-icon.qw-theme-icon svg {
  stroke: var(--qw-blue-primary, #1a5276);
}

#quran-words .arabic-book-card.disabled:hover .book-title {
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: #0e3347;
  background-clip: unset;
  color: #0e3347;
}

#quran-words .arabic-book-card.disabled:hover .book-count {
  background: linear-gradient(145deg, rgba(26, 82, 118, 0.1), rgba(46, 134, 193, 0.08));
  color: var(--qw-blue-primary, #1a5276);
  border-color: rgba(26, 82, 118, 0.12);
  box-shadow: none;
}

#quran-words .coming-soon-badge {
  display: inline-block;
  background: rgba(26, 82, 118, 0.1);
  color: #1a5276;
  padding: 0.3rem 0.8rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 0.5rem;
}

/* =============================================================================
 * Container Principal
 * ============================================================================= */

.qw-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 1.5rem;
  position: relative;
  min-height: calc(100vh - 100px);
}

/* =============================================================================
 * Page Header
 * ============================================================================= */

.qw-page-header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 2rem 1rem;
  background: var(--qw-blue-bg);
  border-radius: 24px;
  border: 1px solid rgba(26, 82, 118, 0.1);
}

.qw-header-icon {
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: center;
}

.qw-header-icon svg {
  width: 3rem;
  height: 3rem;
  color: #1a5276;
}

/* Landing page header icon */
.qw-landing-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.qw-landing-icon svg {
  width: 2.5rem;
  height: 2.5rem;
  color: #1a5276;
}

.qw-title {
  font-size: 2rem;
  font-weight: 700;
  background: var(--qw-blue-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.qw-subtitle {
  font-size: 1rem;
  color: #666;
}

/* =============================================================================
 * Tabs Navigation
 * ============================================================================= */

#quran-word-review .tabs-nav {
  background: var(--qw-blue-bg);
  border: 1px solid rgba(26, 82, 118, 0.1);
}

#quran-word-review .back-btn-nav {
  --back-btn-bg: #1a5276;
  --back-btn-hover: #0e3347;
  margin-right: 1rem;
}

#quran-word-review .back-btn-nav:hover {
  background: var(--back-btn-hover);
}

.qw-tab-btn {
  padding: 0.75rem 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: #666;
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.qw-tab-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--qw-blue-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.qw-tab-btn:hover {
  color: #1a5276;
  transform: translateY(-3px);
}

.qw-tab-btn:hover::before {
  opacity: 0.1;
}

.qw-tab-btn.active {
  color: white;
  background: var(--qw-blue-gradient);
  box-shadow: var(--qw-shadow-blue);
  transform: translateY(-2px);
}

.qw-tab-btn.active::before {
  opacity: 1;
}

/* Tab Content */
.qw-tab-content {
  display: none;
}

.qw-tab-content.active {
  display: block;
}

/* =============================================================================
 * Flashcard Styles
 * ============================================================================= */

#quran-word-review .flashcard-text {
  box-shadow: var(--qw-shadow-blue-lg),
              0 0 60px rgba(26, 82, 118, 0.2),
              inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

#quran-word-review .flashcard-text::before {
  background: radial-gradient(circle, rgba(26, 82, 118, 0.08) 0%, transparent 70%);
}

/* Texte arabe (RTL) - QW specific with longer text */
#quran-word-review .flashcard-text.arabic {
  font-family: 'Noto Naskh Arabic', 'Scheherazade New', 'Traditional Arabic', serif;
  font-size: 2.4rem;
  direction: rtl;
  line-height: 2.2;
  font-weight: 500;
  background: var(--qw-blue-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  padding: 2rem;
}

/* Texte traduction - QW specific with longer text */
#quran-word-review .flashcard-text.translation {
  font-size: 1.2rem;
  font-weight: 500;
  color: #333;
  line-height: 1.8;
  padding: 2rem;
}

/* Source badge under flashcard */
.qw-metadata {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0.75rem 0 1rem 0;
  padding: 0 1rem;
}

.qw-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1a5276;
  background: rgba(26, 82, 118, 0.1);
  padding: 0.4rem 0.75rem;
  border-radius: 20px;
  border: 1px solid rgba(26, 82, 118, 0.2);
}

.qw-badge-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* =============================================================================
 * Quran Word Flashcard Content Styles
 * ============================================================================= */

/* Front side - Arabic text */
#quran-word-review .flashcard-text.qw-front {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
  gap: 1rem;
}

.qw-arabic-front {
  font-family: 'Noto Naskh Arabic', 'Scheherazade New', 'Traditional Arabic', serif;
  font-size: 3rem;
  font-weight: 700;
  direction: rtl;
  line-height: 1.8;
  background: var(--qw-blue-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.qw-question {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1a5276;
  opacity: 0.9;
}

.qw-topic {
  font-size: 2rem;
  font-weight: 700;
  background: var(--qw-blue-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.4;
}

/* Back side - Translation */
#quran-word-review .flashcard-text.qw-back {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  padding: 1.5rem;
  gap: 1.5rem;
}

/* Rating buttons - more spacing from card */
#quran-word-review .rating-buttons {
  margin-top: 1.5rem;
}

.qw-translation-back {
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
  line-height: 1.6;
  text-align: center;
}

.qw-arabic-back {
  font-family: 'Noto Naskh Arabic', 'Scheherazade New', 'Traditional Arabic', serif;
  font-size: 2.25rem;
  direction: rtl;
  line-height: 2;
  font-weight: 500;
  background: var(--qw-blue-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: right;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(26, 82, 118, 0.2);
}

/* QW Metadata on Flashcard Back */
#quran-word-review .flashcard-text .qw-metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(26, 82, 118, 0.2);
}

#quran-word-review .flashcard-text .qw-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(26, 82, 118, 0.1);
  color: #1a5276;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

#quran-word-review .flashcard-text .qw-badge-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* QW number badge - special highlight */
#quran-word-review .flashcard-text .qw-badge-number {
  background: var(--qw-blue-gradient);
  color: white;
  font-weight: 600;
}

#quran-word-review .flashcard-text .qw-badge-number .qw-badge-icon {
  stroke: white;
}

/* =============================================================================
 * KPI Cards - Blue Theme Override
 * ============================================================================= */

#quran-word-review .kpi-card {
  border: 1px solid rgba(26, 82, 118, 0.1);
}

#quran-word-review .kpi-card::before {
  background: var(--qw-blue-radial);
}

#quran-word-review .kpi-card:hover {
  border-color: rgba(26, 82, 118, 0.2);
}

#quran-word-review .kpi-value {
  background: var(--qw-blue-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#quran-word-review .kpi-icon {
  color: #1a5276;
}

#quran-word-review .tooltip-trigger {
  background: #1a5276;
}

#quran-word-review .tooltip-trigger:hover {
  background: #2e86c1;
}

#quran-word-review .tooltip-content {
  background: linear-gradient(135deg, #1a5276 0%, #2e86c1 100%);
}

#quran-word-review .tooltip-content::after {
  border-bottom-color: #1a5276;
}

/* =============================================================================
 * Heatmap & Grid Section - Blue Theme
 * ============================================================================= */

#quran-word-review .heatmap-section,
#quran-word-review .names-grid-section,
#quran-word-review .names-grid-fixed-section {
  border: 1px solid rgba(26, 82, 118, 0.1);
}

#quran-word-review .heatmap-section h3,
#quran-word-review .names-grid-section h3,
#quran-word-review .names-grid-fixed-section h3 {
  color: #1a5276;
}

#quran-word-review .names-grid {
  background: rgba(26, 82, 118, 0.05);
}

#quran-word-review .names-grid-legend {
  background: rgba(26, 82, 118, 0.05);
}

/* =============================================================================
 * Button Overrides - Blue Theme
 * ============================================================================= */

#quran-word-review .btn-primary,
#quran-word-review .btn-start-review {
  background: var(--qw-blue-gradient);
  box-shadow: var(--qw-shadow-blue);
}

#quran-word-review .btn-primary:hover,
#quran-word-review .btn-start-review:hover {
  background: var(--qw-blue-dark);
  box-shadow: var(--qw-shadow-blue-lg);
}

/* Config toggle button */
#quran-word-review .config-icon-toggle:hover {
  background: rgba(26, 82, 118, 0.1);
}

/* Language selector */
#quran-word-review .flashcard-lang-btn.active {
  background: linear-gradient(135deg, rgba(26, 82, 118, 0.25), rgba(26, 82, 118, 0.25));
  box-shadow: 0 0 0 2px rgba(26, 82, 118, 0.4);
}

#quran-word-review .flashcard-lang-selector {
  background: rgba(26, 82, 118, 0.08);
  border: 1px solid rgba(26, 82, 118, 0.15);
}

/* Direction selector */
#quran-word-review .direction-selector input[type="radio"]:hover {
  border-color: #1a5276;
}

#quran-word-review .direction-selector input[type="radio"]:checked {
  background: var(--qw-blue-gradient);
  border-color: #1a5276;
  box-shadow: var(--qw-shadow-blue);
}

#quran-word-review .direction-selector input[type="radio"]:checked ~ span {
  color: #1a5276;
}

#quran-word-review .direction-selector label:has(input[type="radio"]:checked) {
  background: rgba(26, 82, 118, 0.15);
  border-color: rgba(26, 82, 118, 0.3);
}

#quran-word-review .direction-selector label {
  background: rgba(26, 82, 118, 0.05);
}

#quran-word-review .direction-selector label:hover {
  background: rgba(26, 82, 118, 0.12);
}

/* =============================================================================
 * Success Modal - Blue Theme
 * ============================================================================= */

#quran-word-review .success-modal {
  background: var(--qw-blue-gradient);
}

#quran-word-review .success-modal-btn.primary {
  background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
}

/* =============================================================================
 * Accordion - Blue Theme
 * ============================================================================= */

#quran-word-review .accordion-item {
  border: 1px solid rgba(26, 82, 118, 0.1);
}

#quran-word-review .accordion-header {
  background: rgba(26, 82, 118, 0.05);
}

#quran-word-review .accordion-header:hover {
  background: rgba(26, 82, 118, 0.1);
}

#quran-word-review .accordion-chevron {
  color: #1a5276;
}

/* =============================================================================
 * Metrics & Objectives - Blue Theme
 * ============================================================================= */

#quran-word-review .kpi-cards-section,
#quran-word-review .objectives-section {
  border: 1px solid rgba(26, 82, 118, 0.1);
}

#quran-word-review .objectives-section h3 {
  color: #1a5276;
}

/* =============================================================================
 * Search Input - Blue Theme
 * ============================================================================= */

#quran-word-review .search-input-wrapper {
  border: 2px solid rgba(26, 82, 118, 0.2);
}

#quran-word-review .search-input-wrapper:focus-within {
  border-color: #1a5276;
  box-shadow: 0 0 0 3px rgba(26, 82, 118, 0.1);
}

#quran-word-review .search-input-wrapper i[data-feather="search"] {
  color: rgba(26, 82, 118, 0.5);
}

#quran-words .names-search-input::placeholder {
  color: rgba(26, 82, 118, 0.4);
}

#quran-word-review .clear-search-btn {
  background: rgba(26, 82, 118, 0.1);
}

#quran-word-review .clear-search-btn:hover {
  background: rgba(26, 82, 118, 0.2);
}

#quran-word-review .clear-search-btn i {
  color: rgba(26, 82, 118, 0.7);
}

/* =============================================================================
 * Session Limit Config - Blue Theme
 * ============================================================================= */

#quran-word-review .session-limit-radio-option:hover {
  border-color: #2e86c1;
  box-shadow: 0 4px 12px rgba(46, 134, 193, 0.2);
}

#quran-word-review .session-limit-radio-option.active {
  border-color: #1a5276;
  background: linear-gradient(135deg, rgba(26, 82, 118, 0.1), rgba(46, 134, 193, 0.05));
  box-shadow: 0 4px 12px rgba(26, 82, 118, 0.3);
}

#quran-word-review .radio-label {
  color: #1a5276;
}

#quran-word-review .custom-input-wrapper input[type="number"]:focus,
#quran-word-review .custom-session-input:focus {
  border-color: #1a5276;
  box-shadow: 0 0 0 3px rgba(26, 82, 118, 0.15);
}

#quran-word-review .custom-input-wrapper button,
#quran-word-review .save-custom-btn {
  background: linear-gradient(135deg, #1a5276, #2e86c1);
}

#quran-word-review .custom-input-wrapper button:hover,
#quran-word-review .save-custom-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #0e3347, #1a5276);
  box-shadow: 0 4px 12px rgba(26, 82, 118, 0.3);
}

/* =============================================================================
 * Settings Button - Blue Theme Override
 * ============================================================================= */

#quran-word-review .config-icon-toggle {
  background: rgba(26, 82, 118, 0.15) !important;
  border: 1px solid rgba(26, 82, 118, 0.3) !important;
  color: #1a5276 !important;
}

#quran-word-review .config-icon-toggle:hover {
  background: rgba(26, 82, 118, 0.25) !important;
  border-color: rgba(26, 82, 118, 0.4) !important;
  color: #0e3347 !important;
}

#quran-word-review .config-icon-toggle svg {
  stroke: #1a5276 !important;
}

/* =============================================================================
 * Section Titles - Blue Gradient Override
 * ============================================================================= */

#quran-word-review .kpi-cards-section h3,
#quran-word-review .objectives-section h3,
#quran-word-review .names-grid-fixed-section h3,
#quran-word-review .section-title,
#quran-word-review .dashboard-section-title {
  background: var(--qw-blue-gradient) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

/* =============================================================================
 * Accordion Titles - Blue Theme Override
 * ============================================================================= */

#quran-word-review .accordion-title {
  background: var(--qw-blue-gradient) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

#quran-word-review .accordion-icon svg {
  stroke: #1a5276 !important;
}

/* =============================================================================
 * Review Info Bar - Blue Theme Override
 * ============================================================================= */

#quran-word-review .review-info-bar {
  background: rgba(26, 82, 118, 0.05);
  border: 1px solid rgba(26, 82, 118, 0.1);
}

#quran-word-review .last-review-label,
#quran-word-review .due-count-label {
  color: #1a5276 !important;
}

#quran-word-review .last-review-value,
#quran-word-review .last-review-value strong,
#quran-word-review .review-info-bar strong,
#qw-last-review-time {
  background: var(--qw-blue-gradient) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

/* =============================================================================
 * Study Time Widget - Blue Theme Override
 * ============================================================================= */

#quran-word-review .study-time-accordion .accordion-title,
#quran-word-review [data-accordion="study-time"] .accordion-title {
  background: var(--qw-blue-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#quran-word-review .study-time-stat-icon svg {
  stroke: #1a5276;
}

#quran-word-review .study-time-stat-value {
  color: #1a5276;
}

#quran-word-review .study-time-chart-bar {
  background: var(--qw-blue-gradient);
}

#quran-word-review .study-time-bar-fill,
#quran-word-review .study-time-bar.is-today .study-time-bar-fill {
  background: linear-gradient(180deg, #1a5276 0%, #2e86c1 100%);
}

#quran-word-review .progress-fill {
  background: var(--qw-blue-gradient);
}

/* Grid status cells - blue palette */
#quran-word-review .name-grid-cell.good {
  background-color: #2e86c1;
}

#quran-word-review .name-grid-cell.strong {
  background-color: #1a5276;
  color: #fff;
}

/* Legend dots - blue palette */
#quran-word-review .color-dot.good {
  background-color: #2e86c1;
}

#quran-word-review .color-dot.strong {
  background-color: #1a5276;
}

/* Rating buttons - blue palette */
#quran-word-review .rating-btn.strong {
  background: #1a5276;
}

#quran-word-review .rating-btn.good {
  background: #2471a3;
}

#quran-word-review .study-time-toggle-btn.active {
  background: var(--qw-blue-gradient);
  color: white;
}

#quran-word-review .study-time-toggle-btn:not(.active) {
  color: #1a5276;
}

#quran-word-review .study-time-toggle-btn:not(.active):hover {
  background: rgba(26, 82, 118, 0.1);
}

/* =============================================================================
 * Landing Page Tabs - Blue Theme Override
 * ============================================================================= */

.qw-landing-tabs .qw-landing-tab-btn {
  color: #2c5f7c;
}

.qw-landing-tabs .qw-landing-tab-btn:hover:not(.active) {
  color: #1a5276;
  background: rgba(26, 82, 118, 0.05);
}

.qw-landing-tabs .qw-landing-tab-btn.active {
  color: #1a5276;
  border-color: rgba(26, 82, 118, 0.15);
  border-bottom-color: white;
}

/* =============================================================================
 * Statistics - Blue Theme (CSS variables override)
 * ============================================================================= */

#qw-landing-stats {
  --stats-primary: #1a5276;
  --stats-secondary: #2e86c1;
  --stats-text-muted: #2c5f7c;
  --stats-text-dark: #0e3347;
  --stats-border-rgb: 26, 82, 118;
  --stats-bg-card: linear-gradient(145deg, #ffffff, #eaf2f8);
  --stats-gradient: linear-gradient(135deg, #1a5276 0%, #2e86c1 100%);
}

/* =============================================================================
 * Shared Header Override - Blue for all quran-word pages
 * ============================================================================= */

#quran-word-theme-choice .tabs-nav.tome-header,
#quran-word-learning .tabs-nav.tome-header {
  background: var(--qw-blue-bg);
  border: 1px solid rgba(26, 82, 118, 0.15);
}

#quran-word-theme-choice .back-btn-nav,
#quran-word-learning .back-btn-nav {
  --back-btn-bg: #1a5276;
  --back-btn-hover: #0e3347;
  background: #1a5276;
}

#quran-word-theme-choice .back-btn-nav:hover,
#quran-word-learning .back-btn-nav:hover {
  background: #0e3347;
}

#quran-word-theme-choice h1,
#quran-word-learning .arabic-learning-title,
#quran-word-review .qw-title {
  background: var(--qw-blue-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* =============================================================================
 * Theme Choice - Blue Theme Override
 * ============================================================================= */

#quran-word-theme-choice .dua-choice-card:hover {
  border-color: rgba(26, 82, 118, 0.3);
  box-shadow: 0 8px 25px rgba(26, 82, 118, 0.15);
}

#quran-word-theme-choice .dua-choice-icon {
  background: var(--qw-blue-gradient);
  color: #1a5276;
}

#quran-word-theme-choice .dua-choice-card:hover .dua-choice-icon {
  color: #2e86c1;
  box-shadow: 0 8px 24px rgba(26, 82, 118, 0.35);
}

#quran-word-theme-choice .dua-choice-card-title {
  color: #0e3347;
}

#quran-word-theme-choice .dua-choice-card-desc {
  color: #2c5f7c;
}

#quran-word-theme-choice .dua-choice-learned-count {
  color: #1a5276;
  background: rgba(26, 82, 118, 0.1);
}

/* =============================================================================
 * Learning Mode - Quran Word Module Theming
 * Shared structural styles in learning-shared.css
 * ============================================================================= */

#quran-word-learning .qw-learning-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem;
  /* Learning Mode CSS Variables - blue override */
  --lm-primary: #1a5276;
  --lm-secondary: #2471a3;
  --lm-gradient: linear-gradient(135deg, #1a5276 0%, #2e86c1 100%);
  --lm-text-dark: #0e3347;
  --lm-text-muted: #2c5f7c;
  --lm-bg-tint: #eaf2f8;
  --lm-bg-card: linear-gradient(135deg, rgba(26, 82, 118, 0.04) 0%, rgba(46, 134, 193, 0.06) 100%);
  --lm-a06: rgba(26, 82, 118, 0.06);
  --lm-a08: rgba(26, 82, 118, 0.08);
  --lm-a10: rgba(26, 82, 118, 0.1);
  --lm-b12: rgba(26, 82, 118, 0.12);
  --lm-b15: rgba(26, 82, 118, 0.15);
  --lm-b18: rgba(26, 82, 118, 0.18);
  --lm-s25: rgba(26, 82, 118, 0.25);
  --lm-s30: rgba(26, 82, 118, 0.3);
  --lm-s35: rgba(26, 82, 118, 0.35);
  --lm-audio-shadow: 0 4px 14px rgba(26, 82, 118, 0.35);
  --lm-audio-shadow-lg: 0 8px 24px rgba(26, 82, 118, 0.45);
  --lm-ring-low: #5dade2;
  --lm-ring-mid: #2e86c1;
  --lm-ring-high: #1a5276;
  --lm-ring-complete: #0e3347;
}

/* List Number - Rounded Rect (QW-specific) */
.qw-learning-list-number {
  background: var(--lm-gradient);
  color: white;
  min-width: 2rem;
  height: 2rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* Audio Button - QW Review (blue theme) */
#quran-word-review .audio-btn {
  background: var(--qw-blue-gradient);
  box-shadow: var(--qw-shadow-blue);
}

#quran-word-review .audio-btn:hover {
  box-shadow: var(--qw-shadow-blue-lg);
}

#quran-word-review .audio-btn.playing {
  background: var(--qw-blue-light);
  animation: qw-review-audio-pulse 1s ease-in-out infinite;
}

@keyframes qw-review-audio-pulse {
  0%, 100% {
    box-shadow: var(--qw-shadow-blue), 0 0 0 0 rgba(26, 82, 118, 0.4);
  }
  50% {
    box-shadow: var(--qw-shadow-blue-lg), 0 0 0 12px rgba(26, 82, 118, 0);
  }
}

/* Word Audio - QW Learning (clickable words) */
.qw-word {
  padding: 0.25rem 0.5rem;
  padding-top: 1.4rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-block;
  position: relative;
}

.qw-word::before {
  content: '';
  position: absolute;
  top: 0.1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231a5276' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='11 5 6 9 2 9 2 15 6 15 11 19 11 5'/%3E%3Cpath d='M15.54 8.46a5 5 0 0 1 0 7.07'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 1;
}

.qw-word:hover {
  background: rgba(26, 82, 118, 0.1);
}

.qw-word.qw-word-active {
  background: var(--qw-blue-gradient);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(26, 82, 118, 0.3);
}

.qw-word.qw-word-playing {
  background: var(--qw-blue-light);
  color: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(26, 82, 118, 0.25);
}

/* Audio - QW-specific animation */
.qw-learning-audio-btn.playing {
  animation: qw-audio-pulse 1s ease-in-out infinite;
}

@keyframes qw-audio-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* =============================================================================
 * Learning Gate Message (Quran Word-specific)
 * ============================================================================= */

.qw-learning-gate {
  text-align: center;
  padding: 3rem 1.5rem;
}

.qw-learning-gate svg {
  width: 48px;
  height: 48px;
  color: #2e86c1;
  margin-bottom: 1rem;
}

.qw-learning-gate p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 1.5rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.qw-learning-gate-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--qw-blue-gradient);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}

.qw-learning-gate-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.qw-learning-gate-btn svg {
  width: 18px;
  height: 18px;
  color: white;
  margin-bottom: 0;
}

/* =============================================================================
 * Responsive Design
 * ============================================================================= */

@media (max-width: 768px) {
  #quran-word-review .flashcard-text.arabic {
    font-size: 1.4rem;
    padding: 1.5rem;
  }

  #quran-word-review .flashcard-text.translation {
    font-size: 1rem;
    padding: 1.5rem;
  }

  .qw-metadata {
    gap: 0.5rem;
  }

  .qw-badge {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
  }

  .qw-arabic-front {
    font-size: 2rem;
  }

  .qw-translation-back {
    font-size: 1.2rem;
  }

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

  .qw-subtitle {
    font-size: 0.9rem;
  }

  #quran-words .arabic-books-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
  }

  #quran-words .arabic-book-card {
    padding: 1.5rem 1.25rem;
    min-height: 180px;
    gap: 0.6rem;
  }

  #quran-words .arabic-book-card .book-icon.qw-theme-icon {
    width: 56px;
    height: 56px;
  }

  #quran-words .arabic-book-card .book-icon.qw-theme-icon svg {
    width: 24px;
    height: 24px;
  }

  #quran-words .arabic-book-card .book-title {
    font-size: 1.05rem;
  }

  #quran-words .arabic-book-card .book-subtitle {
    font-size: 0.8rem;
  }

  #quran-words .arabic-book-card .book-count {
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
  }
}

@media (max-width: 480px) {
  .qw-container {
    padding: 1rem;
  }

  .qw-page-header {
    padding: 1.5rem 1rem;
  }

  .qw-header-icon svg {
    width: 2.5rem;
    height: 2.5rem;
  }

  .qw-arabic-front {
    font-size: 1.8rem;
  }

  .qw-translation-back {
    font-size: 1.1rem;
  }

  #quran-word-review .flashcard-text.arabic {
    font-size: 1.2rem;
    line-height: 1.8;
  }

  #quran-word-review .flashcard-text.translation {
    font-size: 0.95rem;
    line-height: 1.7;
  }

  #quran-words .arabic-books-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 0.25rem;
  }

  #quran-words .arabic-book-card {
    padding: 1.25rem 1rem;
    min-height: 160px;
    border-radius: 14px;
    gap: 0.5rem;
  }

  #quran-words .arabic-book-card .book-icon.qw-theme-icon {
    width: 48px;
    height: 48px;
  }

  #quran-words .arabic-book-card .book-icon.qw-theme-icon svg {
    width: 22px;
    height: 22px;
  }

  #quran-words .arabic-book-card .book-title {
    font-size: 0.95rem;
    line-height: 1.25;
  }

  #quran-words .arabic-book-card .book-subtitle {
    display: none;
  }

  #quran-words .arabic-book-card .book-count {
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
  }

  #quran-words .arabic-book-card:hover {
    transform: translateY(-3px);
  }

  .qw-learning-container {
    padding: 0.5rem;
  }

  .qw-learning-gate {
    padding: 2rem 1rem;
  }
}

@media (max-width: 360px) {
  #quran-words .arabic-books-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  #quran-words .arabic-book-card {
    flex-direction: row;
    min-height: auto;
    padding: 1rem;
    gap: 1rem;
    text-align: left;
  }

  #quran-words .arabic-book-card .book-icon.qw-theme-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
  }

  #quran-words .arabic-book-card .book-info {
    align-items: flex-start;
    text-align: left;
  }

  #quran-words .arabic-book-card .book-subtitle {
    display: block;
    font-size: 0.75rem;
  }
}
