/* ═══════════════════════════════════════════════════════════════
   🕌 QURAN WEBSITE — World-Class Islamic Design System
   Premium CSS with Animations, Dark/Light Mode, Glassmorphism
   ═══════════════════════════════════════════════════════════════ */

/* ── Google Fonts ──────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&family=Scheherazade+New:wght@400;700&family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── CSS Variables / Design Tokens ─────────────────────────── */
:root {
  /* Primary – Emerald */
  --primary-50: #ecfdf5;
  --primary-100: #d1fae5;
  --primary-200: #a7f3d0;
  --primary-300: #6ee7b7;
  --primary-400: #34d399;
  --primary-500: #10b981;
  --primary-600: #059669;
  --primary-700: #047857;
  --primary-800: #065f46;
  --primary-900: #064e3b;

  /* Accent – Gold */
  --accent-300: #fcd34d;
  --accent-400: #fbbf24;
  --accent-500: #f59e0b;
  --accent-600: #d97706;
  --accent-700: #b45309;

  /* Neutrals – light mode */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px rgba(0, 0, 0, 0.04);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.5);
  --header-bg: rgba(255, 255, 255, 0.85);
  --verse-bg: #f8fafc;
  --verse-border: #e2e8f0;
  --verse-hover: #f1f5f9;
  --badge-meccan-bg: #fef3c7;
  --badge-meccan-text: #92400e;
  --badge-medinan-bg: #d1fae5;
  --badge-medinan-text: #065f46;
  --input-bg: #ffffff;
  --scrollbar-bg: #f1f5f9;
  --scrollbar-thumb: #cbd5e1;
}

/* ── Dark Mode ─────────────────────────────────────────────── */
[data-theme="dark"] {
  --bg-primary: #0a0f1a;
  --bg-secondary: #111827;
  --bg-tertiary: #1e293b;
  --bg-card: #151c2c;
  --bg-card-hover: #1a2332;
  --border-color: #1e293b;
  --border-light: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.5);
  --glass-bg: rgba(15, 23, 42, 0.75);
  --glass-border: rgba(30, 41, 59, 0.8);
  --header-bg: rgba(10, 15, 26, 0.88);
  --verse-bg: #151c2c;
  --verse-border: #1e293b;
  --verse-hover: #1a2332;
  --badge-meccan-bg: rgba(251, 191, 36, 0.15);
  --badge-meccan-text: #fbbf24;
  --badge-medinan-bg: rgba(16, 185, 129, 0.15);
  --badge-medinan-text: #34d399;
  --input-bg: #151c2c;
  --scrollbar-bg: #1e293b;
  --scrollbar-thumb: #334155;
}

/* ── Reset & Base ──────────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  transition: background 0.4s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--scrollbar-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-600);
}

a {
  color: inherit;
  text-decoration: none;
}

/* ── Typography ────────────────────────────────────────────── */
.arabic {
  font-family: 'Scheherazade New', 'Amiri', 'Traditional Arabic', serif;
  direction: rtl;
}

.arabic-heading {
  font-family: 'Amiri', serif;
  direction: rtl;
  text-align: right;
}

.verse-text {
  font-family: 'Scheherazade New', 'Amiri', serif;
  font-size: var(--verse-font-size, 1.75rem);
  line-height: 2.4;
  direction: rtl;
  text-align: right;
  color: var(--text-primary);
  word-spacing: 6px;
  letter-spacing: 0.5px;
}

/* Font size options */
.font-sm {
  --verse-font-size: 1.4rem;
}

.font-md {
  --verse-font-size: 1.75rem;
}

.font-lg {
  --verse-font-size: 2.2rem;
}

.font-xl {
  --verse-font-size: 2.8rem;
}

h1 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}

h2 {
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

/* ── Container ─────────────────────────────────────────────── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ══════════════════════════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════════════════════════ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.container-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-primary);
  text-decoration: none;
  flex-shrink: 0;
}

.logo:hover {
  opacity: 0.9;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex: 1;
  justify-content: center;
}

.nav-desktop::-webkit-scrollbar {
  display: none;
  /* Chrome/Safari/Webkit */
}

.nav-link {
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  white-space: nowrap;
  display: inline-block;
  text-decoration: none;
}

.nav-link:hover,
.nav-link.active {
  background: var(--bg-tertiary);
  color: var(--primary-600);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Theme Toggle */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  background: var(--primary-50);
  border-color: var(--primary-300);
  color: var(--primary-600);
  transform: rotate(15deg);
}

[data-theme="dark"] .theme-toggle:hover {
  background: var(--bg-tertiary);
  border-color: var(--primary-700);
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.2rem;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.mobile-menu-btn:hover {
  background: var(--bg-tertiary);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-primary);
  z-index: 99;
  padding: 1.5rem;
  animation: slideDown 0.3s ease;
}

.mobile-menu.active {
  display: block;
}

.mobile-menu a {
  display: block;
  padding: 1rem;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  transition: background 0.2s;
}

.mobile-menu a:hover {
  background: var(--bg-tertiary);
}

/* ══════════════════════════════════════════════════════════════
   HERO SECTION
   ══════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  padding: 5rem 0 4rem;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-bismillah {
  font-family: 'Amiri', serif;
  font-size: 3.5rem;
  color: var(--primary-600);
  margin-bottom: 1.25rem;
  direction: rtl;
  animation: fadeInUp 0.8s ease;
}

[data-theme="dark"] .hero-bismillah {
  color: var(--primary-400);
}

.hero-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  animation: fadeInUp 0.8s ease 0.1s both;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  animation: fadeInUp 0.8s ease 0.2s both;
}

/* ══════════════════════════════════════════════════════════════
   CARDS
   ══════════════════════════════════════════════════════════════ */
.grid {
  display: grid;
  gap: 1.25rem;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.75rem;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-300);
}

[data-theme="dark"] .card:hover {
  border-color: var(--primary-700);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  background: var(--primary-50);
  color: var(--primary-600);
}

[data-theme="dark"] .card-icon {
  background: rgba(16, 185, 129, 0.12);
  color: var(--primary-400);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.375rem;
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  font-size: 0.825rem;
  color: var(--text-tertiary);
}

/* Feature Card (Home page) */
.feature-card {
  text-align: center;
  padding: 2.5rem 1.5rem;
}

.feature-card .card-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.25rem;
  font-size: 1.75rem;
}

/* Surah Card */
.surah-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: 12px;
  cursor: pointer;
}

.surah-number {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary-50);
  color: var(--primary-700);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

[data-theme="dark"] .surah-number {
  background: rgba(16, 185, 129, 0.12);
  color: var(--primary-400);
}

.surah-info {
  flex: 1;
  min-width: 0;
}

.surah-name-ar {
  font-family: 'Amiri', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  direction: rtl;
}

.surah-name-en {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.125rem;
}

.surah-meta {
  text-align: right;
  flex-shrink: 0;
}

.surah-verses {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

/* ══════════════════════════════════════════════════════════════
   BADGES
   ══════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.625rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.025em;
}

.badge-meccan {
  background: var(--badge-meccan-bg);
  color: var(--badge-meccan-text);
}

.badge-medinan {
  background: var(--badge-medinan-bg);
  color: var(--badge-medinan-text);
}

.badge-sahih {
  background: rgba(16, 185, 129, 0.1);
  color: var(--primary-600);
}

.badge-hasan {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

/* ══════════════════════════════════════════════════════════════
   SEARCH
   ══════════════════════════════════════════════════════════════ */
.search-container {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  font-size: 1.1rem;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 2.75rem;
  font-size: 1rem;
  font-family: inherit;
  border: 2px solid var(--border-color);
  border-radius: 14px;
  background: var(--input-bg);
  color: var(--text-primary);
  transition: all 0.25s ease;
  outline: none;
}

.search-input:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.search-input::placeholder {
  color: var(--text-tertiary);
}

/* ══════════════════════════════════════════════════════════════
   VERSE DISPLAY
   ══════════════════════════════════════════════════════════════ */
.verse-card {
  background: var(--verse-bg);
  border: 1px solid var(--verse-border);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 1rem;
  transition: all 0.25s ease;
  position: relative;
}

.verse-card:hover {
  background: var(--verse-hover);
  border-color: var(--primary-200);
}

[data-theme="dark"] .verse-card:hover {
  border-color: var(--primary-800);
}

.verse-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.verse-num {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  color: white;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.3);
}

.verse-actions {
  display: flex;
  gap: 0.375rem;
}

.verse-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-tertiary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.verse-btn:hover {
  background: var(--primary-50);
  color: var(--primary-600);
  border-color: var(--primary-200);
}

.verse-btn.bookmarked {
  background: var(--accent-400);
  color: white;
  border-color: var(--accent-400);
}

.verse-translation {
  padding-top: 1.25rem;
  margin-top: 1.25rem;
  border-top: 1px solid var(--verse-border);
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.8;
}

/* Bismillah */
.bismillah {
  text-align: center;
  padding: 2.5rem 0;
  font-family: 'Amiri', serif;
  font-size: 2.75rem;
  color: var(--primary-600);
  opacity: 0.9;
}

[data-theme="dark"] .bismillah {
  color: var(--primary-400);
}

/* Surah Header */
.surah-header {
  text-align: center;
  padding: 3rem 0 2rem;
  position: relative;
}

.surah-header h1 {
  font-family: 'Amiri', serif;
  font-size: 3rem;
  direction: rtl;
  margin-bottom: 0.5rem;
}

.surah-header-meta {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 0.75rem;
}

/* ══════════════════════════════════════════════════════════════
   AUDIO PLAYER
   ══════════════════════════════════════════════════════════════ */
.audio-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: var(--header-bg);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-color);
  padding: 0.875rem 1.5rem;
  display: none;
  animation: slideUp 0.4s ease;
}

.audio-player.active {
  display: block;
}

.audio-player-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.audio-info {
  flex: 1;
  min-width: 0;
}

.audio-info-title {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audio-info-sub {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.audio-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.audio-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}

.audio-btn:hover {
  transform: scale(1.08);
}

.audio-btn-sm {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.audio-btn-sm:hover {
  background: var(--bg-tertiary);
}

.audio-progress {
  flex: 2;
  max-width: 400px;
}

.audio-progress input[type="range"] {
  width: 100%;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--border-color);
  border-radius: 4px;
  outline: none;
}

.audio-progress input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  background: var(--primary-500);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* ══════════════════════════════════════════════════════════════
   SIDEBAR / SETTINGS
   ══════════════════════════════════════════════════════════════ */
.settings-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.settings-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.settings-group {
  margin-bottom: 1.25rem;
}

.settings-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  display: block;
}

.select-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.9rem;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--input-bg);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
  cursor: pointer;
  font-family: inherit;
}

.select-input:focus {
  border-color: var(--primary-500);
}

/* Font Size Slider */
.font-slider {
  width: 100%;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--border-color);
  border-radius: 4px;
  outline: none;
}

.font-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: var(--primary-500);
  border-radius: 50%;
  cursor: pointer;
}

/* ══════════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
  line-height: 1;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary-300);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 0.5rem 0.875rem;
}

.btn-ghost:hover {
  background: var(--bg-tertiary);
}

/* ══════════════════════════════════════════════════════════════
   PAGE HEADER
   ══════════════════════════════════════════════════════════════ */
.page-header {
  padding: 2.5rem 0 2rem;
  text-align: center;
}

.page-header h1 {
  margin-bottom: 0.5rem;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 500px;
  margin: 0 auto;
}

/* ══════════════════════════════════════════════════════════════
   HADITH
   ══════════════════════════════════════════════════════════════ */
.hadith-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.75rem;
  margin-bottom: 1rem;
  transition: all 0.25s;
}

.hadith-card:hover {
  border-color: var(--primary-200);
}

.hadith-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.hadith-number {
  font-weight: 700;
  color: var(--primary-600);
  font-size: 0.9rem;
}

.hadith-text {
  font-family: 'Scheherazade New', 'Amiri', serif;
  font-size: 1.4rem;
  line-height: 2.2;
  direction: rtl;
  color: var(--text-primary);
}

/* ══════════════════════════════════════════════════════════════
   PRAYER TIMES
   ══════════════════════════════════════════════════════════════ */
.prayer-grid {
  display: grid;
  gap: 0.75rem;
}

.prayer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.125rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  transition: all 0.2s;
}

.prayer-row:hover {
  border-color: var(--primary-300);
}

.prayer-row.next {
  border-color: var(--primary-500);
  background: var(--primary-50);
}

[data-theme="dark"] .prayer-row.next {
  background: rgba(16, 185, 129, 0.1);
}

.prayer-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1rem;
}

.prayer-time-value {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary-600);
  font-variant-numeric: tabular-nums;
}

/* ══════════════════════════════════════════════════════════════
   99 NAMES GRID
   ══════════════════════════════════════════════════════════════ */
.name-card {
  text-align: center;
  padding: 2rem 1rem;
}

.name-arabic {
  font-family: 'Amiri', serif;
  font-size: 2rem;
  color: var(--primary-600);
  margin-bottom: 0.5rem;
  direction: rtl;
}

[data-theme="dark"] .name-arabic {
  color: var(--primary-400);
}

.name-transliteration {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  font-style: italic;
}

.name-meaning {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

/* ══════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════ */
.footer {
  margin-top: 5rem;
  padding: 3rem 0;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.875rem;
}

.footer p {
  margin-bottom: 0.5rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.footer-links a {
  color: var(--text-secondary);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--primary-600);
}

/* ══════════════════════════════════════════════════════════════
   PAGINATION
   ══════════════════════════════════════════════════════════════ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem 0;
}

.page-btn {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.page-btn:hover {
  border-color: var(--primary-500);
}

.page-btn.active {
  background: var(--primary-600);
  color: white;
  border-color: var(--primary-600);
}

/* ══════════════════════════════════════════════════════════════
   LOADING
   ══════════════════════════════════════════════════════════════ */
.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 0;
  color: var(--text-tertiary);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary-500);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 1rem;
}

/* ══════════════════════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════════════════════ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.animate-in {
  animation: fadeInUp 0.5s ease both;
}

.delay-1 {
  animation-delay: 0.1s;
}

.delay-2 {
  animation-delay: 0.2s;
}

.delay-3 {
  animation-delay: 0.3s;
}

/* ══════════════════════════════════════════════════════════════
   UTILITIES
   ══════════════════════════════════════════════════════════════ */
.text-center {
  text-align: center;
}

.text-primary {
  color: var(--text-primary);
}

.text-secondary {
  color: var(--text-secondary);
}

.text-tertiary {
  color: var(--text-tertiary);
}

.text-accent {
  color: var(--accent-500);
}

.text-emerald {
  color: var(--primary-600);
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.gap-1 {
  gap: 0.5rem;
}

.gap-2 {
  gap: 1rem;
}

.gap-3 {
  gap: 1.5rem;
}

.mt-1 {
  margin-top: 0.5rem;
}

.mt-2 {
  margin-top: 1rem;
}

.mt-3 {
  margin-top: 1.5rem;
}

.mt-4 {
  margin-top: 2rem;
}

.mb-1 {
  margin-bottom: 0.5rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

.mb-3 {
  margin-bottom: 1.5rem;
}

.mb-4 {
  margin-bottom: 2rem;
}

.py-2 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.py-4 {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden {
  display: none !important;
}

/* ── Missing Utility Classes ────────────────────────────────── */
.header-spacer {
  height: 64px;
  /* Match header height */
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="dark"] .gradient-text {
  background: linear-gradient(135deg, var(--primary-300), var(--primary-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.container-sm {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.px-4 {
  padding-left: 2rem;
  padding-right: 2rem;
}

.mb-5 {
  margin-bottom: 3rem;
}

.py-5 {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.text-xs {
  font-size: 0.75rem;
}

.text-sm {
  font-size: 0.875rem;
}

.text-lg {
  font-size: 1.125rem;
}

/* Feature Icon (Home page cards) */
.feature-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: var(--primary-50);
  border-radius: 16px;
  color: var(--primary-600);
  transition: transform 0.3s ease;
}

[data-theme="dark"] .feature-icon {
  background: rgba(16, 185, 129, 0.12);
  color: var(--primary-400);
}

.feature-card:hover .feature-icon {
  transform: scale(1.1) rotate(5deg);
}

/* Completion state */
.completion-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: bounce 0.6s ease;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-20px);
  }
}

/* Mobile grid-2 override */
.mobile-grid-2 {
  /* Default: same as current grid, overridden in media queries */
  display: grid;
}

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* ══════════════════════════════════════════════════════════════
   BREADCRUMB
   ══════════════════════════════════════════════════════════════ */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  color: var(--text-tertiary);
  font-size: 0.9rem;
}

.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--primary-600);
}

.breadcrumb .separator {
  color: var(--text-tertiary);
  opacity: 0.5;
}

.breadcrumb .current {
  color: var(--text-primary);
  font-weight: 500;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-bismillah {
    font-size: 2.25rem;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .surah-header h1 {
    font-size: 2.25rem;
  }

  .verse-text {
    font-size: 1.4rem !important;
  }

  h1 {
    font-size: 1.625rem;
  }

  h2 {
    font-size: 1.375rem;
  }

  .audio-player-inner {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .audio-progress {
    flex: auto;
    max-width: none;
    order: 3;
    width: 100%;
  }
}

@media (max-width: 480px) {

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 0 1rem;
  }

  .card {
    padding: 1.25rem;
  }

  .verse-card {
    padding: 1.25rem;
  }
}

/* ══════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════ */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0 1.5rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 4rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-bottom: 1rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--primary-500);
}

.footer-social a {
  transition: color 0.2s;
}

.footer-social a:hover {
  color: var(--primary-500);
}

.footer p {
  margin: 0.3rem 0;
}

/* ── Utility classes ──────────────────────────────────────────── */
.py-4 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.mb-1 {
  margin-bottom: 0.25rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-3 {
  margin-bottom: 0.75rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-3 {
  margin-top: 0.75rem;
}

.hidden {
  display: none;
}

.text-center {
  text-align: center;
}

.text-secondary {
  color: var(--text-secondary);
}

.text-xs {
  font-size: 0.75rem;
}

.text-tertiary {
  color: var(--text-tertiary);
}