/* ================================================
   AL-QURAN ONLINE — COMPLETE STYLESHEET
   ================================================ */

/* ---- DESIGN TOKENS ---- */
:root {
  --bg-base:       #0b0f1a;
  --bg-card:       #111827;
  --bg-card2:      #161e2e;
  --bg-sidebar:    #0d1220;
  --border:        rgba(255,255,255,0.07);
  --border-hover:  rgba(255,255,255,0.15);

  --gold:          #d4a843;
  --gold-light:    #f0c96a;
  --gold-dark:     #9e7a2a;
  --teal:          #0ea5a0;
  --teal-light:    #2dd4bf;
  --emerald:       #10b981;
  --indigo:        #6366f1;

  --text-primary:  #f1f5f9;
  --text-secondary:#94a3b8;
  --text-muted:    #64748b;

  --sidebar-w:     300px;
  --topbar-h:      64px;

  --shadow-card:   0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow:   0 0 40px rgba(212,168,67,0.15);
  --radius-card:   16px;
  --radius-sm:     8px;
  --transition:    0.25s ease;
}

/* LIGHT THEME */
body.light {
  --bg-base:       #f0f4f8;
  --bg-card:       #ffffff;
  --bg-card2:      #f8fafc;
  --bg-sidebar:    #1a2540;
  --border:        rgba(0,0,0,0.08);
  --border-hover:  rgba(0,0,0,0.18);
  --text-primary:  #1e293b;
  --text-secondary:#475569;
  --text-muted:    #94a3b8;
  --shadow-card:   0 4px 24px rgba(0,0,0,0.1);
  --shadow-glow:   0 0 40px rgba(212,168,67,0.1);
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
}

img { max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select { font-family: inherit; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ================================================
   SIDEBAR
   ================================================ */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transform: translateX(0);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  overflow: hidden;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 18px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(212,168,67,0.12), rgba(14,165,160,0.08));
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  font-size: 28px;
  filter: drop-shadow(0 0 8px rgba(212,168,67,0.6));
  animation: moonGlow 3s ease-in-out infinite alternate;
}

@keyframes moonGlow {
  from { filter: drop-shadow(0 0 6px rgba(212,168,67,0.4)); }
  to   { filter: drop-shadow(0 0 16px rgba(212,168,67,0.9)); }
}

.logo-title {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1.1;
}
.logo-sub {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.sidebar-close {
  color: var(--text-muted);
  font-size: 18px;
  padding: 6px;
  border-radius: 50%;
  transition: color var(--transition), background var(--transition);
  display: none;
}
.sidebar-close:hover { color: var(--text-primary); background: var(--border); }

/* Search */
.search-box {
  margin: 14px 14px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  transition: border-color var(--transition);
}
.search-box:focus-within { border-color: var(--gold); }
.search-icon { font-size: 14px; }
.search-box input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 14px;
  width: 100%;
}
.search-box input::placeholder { color: var(--text-muted); }

/* Sidebar Tabs */
.sidebar-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 14px 4px;
}
.tab-btn {
  flex: 1;
  padding: 7px 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 6px;
  transition: all var(--transition);
}
.tab-btn.active {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #0b0f1a;
  font-weight: 700;
}
.tab-btn:hover:not(.active) { color: var(--text-primary); background: var(--border); }

/* Tab Content */
.tab-content { flex: 1; overflow-y: auto; padding: 6px 0; }
.tab-content::-webkit-scrollbar { width: 4px; }
.tab-content::-webkit-scrollbar-track { background: transparent; }
.tab-content::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 4px; }

/* Surah List Items */
.surah-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  cursor: pointer;
  transition: background var(--transition);
  border-left: 3px solid transparent;
}
.surah-item:hover { background: rgba(212,168,67,0.07); border-left-color: rgba(212,168,67,0.4); }
.surah-item.active { background: rgba(212,168,67,0.1); border-left-color: var(--gold); }

.surah-item-num {
  width: 34px;
  height: 34px;
  background: rgba(212,168,67,0.12);
  border: 1px solid rgba(212,168,67,0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  flex-shrink: 0;
}

.surah-item-info { flex: 1; min-width: 0; }
.surah-item-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.surah-item-sub { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.surah-item-ar { font-family: 'Scheherazade New', serif; font-size: 18px; color: var(--gold-light); }

.loading-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 30px;
  color: var(--text-muted);
  font-size: 13px;
}

/* Juz List */
.juz-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background var(--transition);
  border-left: 3px solid transparent;
}
.juz-item:hover { background: rgba(14,165,160,0.07); border-left-color: rgba(14,165,160,0.4); }
.juz-item-num {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--teal), var(--teal-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #0b0f1a;
  flex-shrink: 0;
}
.juz-item-info p { font-size: 14px; font-weight: 500; color: var(--text-primary); }
.juz-item-info span { font-size: 11px; color: var(--text-muted); }

/* ================================================
   OVERLAY
   ================================================ */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(3px);
}
.overlay.show { opacity: 1; pointer-events: all; }

/* ================================================
   MAIN CONTENT
   ================================================ */
.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  transition: margin-left 0.3s cubic-bezier(0.4,0,0.2,1);
}

/* ---- TOPBAR ---- */
.topbar {
  position: sticky;
  top: 0;
  height: var(--topbar-h);
  background: rgba(11,15,26,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
  z-index: 100;
  transition: background var(--transition);
}
body.light .topbar { background: rgba(240,244,248,0.88); }

.menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border-radius: 8px;
  transition: background var(--transition);
}
.menu-btn:hover { background: var(--border); }
.menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--gold-light);
}
.brand-icon { font-size: 20px; }

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: background var(--transition), transform var(--transition);
  border: 1px solid var(--border);
}
.icon-btn:hover { background: var(--border); transform: scale(1.08); }

/* ================================================
   HERO BANNER
   ================================================ */
.hero-banner {
  position: relative;
  background: linear-gradient(135deg, #0d1b38 0%, #0f2a3a 50%, #1a0d2e 100%);
  padding: 60px 30px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 50%, rgba(212,168,67,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 30%, rgba(14,165,160,0.1) 0%, transparent 60%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-decor {
  position: absolute;
  right: -60px;
  top: 50%;
  transform: translateY(-50%);
  width: 350px;
  height: 350px;
  border-radius: 50%;
  border: 1px solid rgba(212,168,67,0.15);
  box-shadow: inset 0 0 80px rgba(212,168,67,0.05), 0 0 80px rgba(212,168,67,0.08);
}
.hero-decor::before {
  content: '';
  position: absolute;
  inset: 30px;
  border-radius: 50%;
  border: 1px solid rgba(212,168,67,0.1);
}
.hero-decor::after {
  content: '☽';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 120px;
  color: rgba(212,168,67,0.08);
}

.hero-content { position: relative; z-index: 1; max-width: 600px; }

.hero-greeting {
  font-family: 'Scheherazade New', serif;
  font-size: 26px;
  color: var(--gold-light);
  margin-bottom: 12px;
  text-shadow: 0 0 30px rgba(212,168,67,0.4);
  direction: rtl;
  animation: fadeSlideUp 0.8s ease both;
}

.hero-title {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800;
  background: linear-gradient(135deg, #fff 30%, var(--gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin-bottom: 10px;
  animation: fadeSlideUp 0.8s 0.1s ease both;
}

.hero-sub {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  animation: fadeSlideUp 0.8s 0.2s ease both;
}

.hero-stats {
  display: flex;
  gap: 24px;
  animation: fadeSlideUp 0.8s 0.3s ease both;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(212,168,67,0.2);
  border-radius: 12px;
  padding: 12px 20px;
  backdrop-filter: blur(8px);
}
.stat-num { font-size: 22px; font-weight: 800; color: var(--gold-light); }
.stat-lbl { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

/* ================================================
   SURAH HEADER
   ================================================ */
.surah-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 24px 24px 0;
  animation: fadeSlideUp 0.5s ease both;
}

.surah-info-card {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.surah-number-badge {
  width: 56px;
  height: 56px;
  min-width: 56px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: #0b0f1a;
  box-shadow: 0 4px 16px rgba(212,168,67,0.4);
}

.surah-details { flex: 1; }
.surah-name-ar {
  font-family: 'Scheherazade New', serif;
  font-size: 26px;
  color: var(--gold-light);
  line-height: 1.3;
}
.surah-name-id { font-size: 14px; color: var(--text-secondary); margin-top: 3px; }
.surah-meta-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

.pill {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}
.pill-green { background: rgba(16,185,129,0.15); color: var(--emerald); border: 1px solid rgba(16,185,129,0.3); }
.pill-blue  { background: rgba(99,102,241,0.15); color: #818cf8; border: 1px solid rgba(99,102,241,0.3); }
.pill-gold  { background: rgba(212,168,67,0.15); color: var(--gold); border: 1px solid rgba(212,168,67,0.3); }
.pill-red   { background: rgba(239,68,68,0.15); color: #f87171; border: 1px solid rgba(239,68,68,0.3); }

.surah-bismillah {
  width: 100%;
  font-family: 'Scheherazade New', serif;
  font-size: 28px;
  color: var(--text-primary);
  text-align: center;
  direction: rtl;
  margin-top: 16px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(212,168,67,0.08), rgba(14,165,160,0.05));
  border-radius: 12px;
  border: 1px solid rgba(212,168,67,0.15);
}

/* Ayah Nav */
.ayah-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
}
.ayah-nav-center { flex: 1; display: flex; justify-content: center; }

.nav-pill {
  padding: 9px 18px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  background: var(--bg-card2);
  transition: all var(--transition);
  white-space: nowrap;
}
.nav-pill:hover { color: var(--gold); border-color: var(--gold); background: rgba(212,168,67,0.08); }
.nav-pill:disabled { opacity: 0.3; cursor: not-allowed; }

.ayah-select {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  max-width: 200px;
  transition: border-color var(--transition);
}
.ayah-select:focus { border-color: var(--gold); }

/* ================================================
   VERSE CARD WRAPPER
   ================================================ */
.verse-card-wrapper {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: fadeSlideUp 0.5s ease both;
}

/* ---- BASE CARD ---- */
.verse-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 22px;
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition);
}
.verse-card:hover { border-color: var(--border-hover); }

.card-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.verse-tag {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  background: rgba(212,168,67,0.12);
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid rgba(212,168,67,0.25);
}

/* ---- ARABIC TEXT ---- */
.arabic-card {
  background: linear-gradient(135deg, var(--bg-card), #0f1d35);
  border-color: rgba(212,168,67,0.2);
}

.arabic-text {
  font-family: 'Amiri Quran', 'Scheherazade New', serif;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 2.2;
  color: var(--text-primary);
  text-align: right;
  direction: rtl;
  letter-spacing: 0.02em;
  text-shadow: 0 0 20px rgba(212,168,67,0.15);
}

/* Audio Row */
.audio-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.audio-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #0b0f1a;
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 700;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 14px rgba(212,168,67,0.35);
}
.audio-btn:hover { transform: scale(1.04); box-shadow: 0 6px 20px rgba(212,168,67,0.5); }
.audio-btn.playing { background: linear-gradient(135deg, var(--teal), var(--teal-light)); }
.audio-icon { font-size: 16px; }

.audio-wave {
  display: flex;
  align-items: center;
  gap: 3px;
  opacity: 0;
  transition: opacity 0.3s;
}
.audio-wave.active { opacity: 1; }
.audio-wave span {
  display: block;
  width: 3px;
  background: var(--gold);
  border-radius: 3px;
  animation: wave 1s ease-in-out infinite;
}
.audio-wave span:nth-child(1) { height: 12px; animation-delay: 0s; }
.audio-wave span:nth-child(2) { height: 20px; animation-delay: 0.15s; }
.audio-wave span:nth-child(3) { height: 28px; animation-delay: 0.3s; }
.audio-wave span:nth-child(4) { height: 20px; animation-delay: 0.45s; }
.audio-wave span:nth-child(5) { height: 12px; animation-delay: 0.6s; }

@keyframes wave {
  0%, 100% { transform: scaleY(1); }
  50%       { transform: scaleY(0.4); }
}

/* ---- LATIN ---- */
.latin-text {
  font-size: 18px;
  line-height: 1.9;
  color: var(--teal-light);
  font-style: italic;
  font-weight: 400;
}

/* ---- WORD GRID ---- */
.word-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  direction: rtl;
}

.word-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  min-width: 80px;
  cursor: default;
  transition: all var(--transition);
}
.word-item:hover {
  border-color: var(--gold);
  background: rgba(212,168,67,0.07);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212,168,67,0.15);
}
.word-arabic {
  font-family: 'Scheherazade New', serif;
  font-size: 22px;
  color: var(--text-primary);
  direction: rtl;
}
.word-latin { font-size: 11px; color: var(--teal-light); font-style: italic; }
.word-trans { font-size: 11px; color: var(--text-muted); direction: ltr; text-align: center; }

/* Skeleton loading shimmer for word items */
.loading-word {
  opacity: 0.6;
  pointer-events: none;
  animation: wordPulse 1.2s ease-in-out infinite;
}
.loading-word .word-latin,
.loading-word .word-trans {
  background: var(--border-hover);
  color: transparent;
  border-radius: 4px;
  min-width: 40px;
}
@keyframes wordPulse {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 0.9; }
}

/* ---- TRANSLATION ---- */
.trans-text {
  font-size: 18px;
  line-height: 1.85;
  color: var(--text-primary);
  font-weight: 400;
  border-left: 4px solid var(--emerald);
  padding-left: 18px;
}

/* ---- INFO GRID ---- */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.info-list { display: flex; flex-direction: column; gap: 12px; }
.info-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  background: var(--bg-card2);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--gold);
  transition: border-color var(--transition);
}
.info-row:hover { border-left-color: var(--teal); }
.info-row-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
.info-row-value { font-size: 14px; font-weight: 500; color: var(--text-primary); }

/* ---- TAFSIR ---- */
.tafsir-content {
  font-size: 15px;
  line-height: 1.85;
  color: var(--text-secondary);
}
.tafsir-content p { margin-bottom: 12px; }
.tafsir-content strong { color: var(--gold-light); }

/* ---- BOTTOM NAV ---- */
.bottom-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 0 8px;
}

.nav-btn-lg {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  color: var(--text-primary);
  font-size: 22px;
  transition: all var(--transition);
  flex: 1;
  max-width: 200px;
}
.nav-btn-lg:hover { border-color: var(--gold); background: rgba(212,168,67,0.07); }
.nav-btn-lg:disabled { opacity: 0.3; cursor: not-allowed; }
.nb-label { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
.nb-sub   { display: block; font-size: 13px; font-weight: 600; color: var(--text-primary); margin-top: 2px; }
#nextAyahBtnBottom { justify-content: flex-end; text-align: right; }
#nextAyahBtnBottom div { text-align: right; }

.back-to-surah {
  padding: 12px 18px;
  background: rgba(14,165,160,0.1);
  border: 1px solid rgba(14,165,160,0.3);
  border-radius: 12px;
  color: var(--teal-light);
  font-size: 13px;
  font-weight: 600;
  transition: all var(--transition);
}
.back-to-surah:hover { background: rgba(14,165,160,0.2); transform: scale(1.02); }

/* ================================================
   AYAH LIST SECTION
   ================================================ */
.ayah-list-section {
  padding: 24px;
  animation: fadeSlideUp 0.5s ease both;
}

.ayah-list { display: flex; flex-direction: column; gap: 12px; }

.ayah-list-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 18px 20px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.ayah-list-item:hover {
  border-color: rgba(212,168,67,0.4);
  background: rgba(212,168,67,0.04);
  transform: translateX(4px);
  box-shadow: var(--shadow-card);
}

.ayah-num-badge {
  width: 38px;
  height: 38px;
  min-width: 38px;
  background: rgba(212,168,67,0.12);
  border: 1px solid rgba(212,168,67,0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
}

.ayah-list-content { flex: 1; min-width: 0; }
.ayah-list-arabic {
  font-family: 'Scheherazade New', serif;
  font-size: 22px;
  line-height: 1.9;
  color: var(--text-primary);
  direction: rtl;
  text-align: right;
  margin-bottom: 8px;
}
.ayah-list-trans { font-size: 13px; color: var(--text-muted); line-height: 1.6; }
.ayah-list-arrow {
  font-size: 20px;
  color: var(--text-muted);
  transition: color var(--transition), transform var(--transition);
}
.ayah-list-item:hover .ayah-list-arrow { color: var(--gold); transform: translateX(4px); }

.load-more-wrap { display: flex; justify-content: center; margin-top: 20px; }
.load-more-btn {
  padding: 12px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition);
}
.load-more-btn:hover { border-color: var(--gold); color: var(--gold); }

/* ================================================
   PAGE LOADING
   ================================================ */
.page-loading {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(11,15,26,0.88);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
}
body.light .page-loading { background: rgba(240,244,248,0.88); }

.loader-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.loader-arabic {
  font-family: 'Scheherazade New', serif;
  font-size: 42px;
  color: var(--gold-light);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.06); }
}

.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}
.spinner-sm {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loader-wrap p { font-size: 14px; color: var(--text-muted); }

/* ================================================
   ANIMATIONS
   ================================================ */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ================================================
   RESPONSIVE — TABLET
   ================================================ */
@media (max-width: 900px) {
  .info-grid { grid-template-columns: 1fr; }
}

/* ================================================
   RESPONSIVE — MOBILE (sidebar hidden by default)
   ================================================ */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-close { display: flex; }
  .menu-btn { display: flex; }
  .main-content { margin-left: 0; }

  .hero-decor { display: none; }
  .hero-banner { padding: 40px 20px; }
  .hero-stats { gap: 12px; }
  .stat { padding: 10px 14px; }

  .surah-header { padding: 16px 16px 0; }
  .surah-bismillah { font-size: 22px; }

  .ayah-nav { flex-wrap: wrap; }
  .ayah-nav-center { order: -1; width: 100%; }
  .ayah-select { max-width: 100%; width: 100%; }

  .verse-card-wrapper { padding: 16px; gap: 14px; }
  .verse-card { padding: 16px; }
  .arabic-text { font-size: 26px; }

  .bottom-nav { flex-wrap: wrap; }
  .nav-btn-lg { max-width: none; flex: 1; min-width: 120px; }

  .ayah-list-section { padding: 16px; }
  .ayah-list-arabic { font-size: 19px; }

  .word-grid { justify-content: center; direction: ltr; }
}

@media (max-width: 480px) {
  .topbar-brand span:last-child { display: none; }
  .arabic-text { font-size: 22px; line-height: 2; }
  .hero-title { font-size: 26px; }
  .surah-name-ar { font-size: 20px; }
}

/* ================================================
   BOOKMARK TOAST
   ================================================ */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-card);
  border: 1px solid var(--gold);
  border-radius: 12px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 9998;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.toast.show { transform: translateY(0); opacity: 1; }
