:root {
  /* Parchment (Light) Theme */
  --bg-primary: #FAF8F5;
  --bg-card: #FFFFFF;
  --bg-subtle: #F4EFEB;
  --ink-primary: #1C1E21;
  --ink-secondary: #4A5056;
  --ink-muted: #7A8288;
  --teal-primary: #194C44;
  --teal-deep: #10342E;
  --teal-light: #E7F0ED;
  --teal-glow: rgba(25, 76, 68, 0.12);
  --gold-primary: #B28038;
  --gold-deep: #8E6225;
  --gold-soft: #D4A86A;
  --gold-glow: rgba(178, 128, 56, 0.15);
  --line-color: rgba(45, 36, 22, 0.12);
  --line-subtle: rgba(45, 36, 22, 0.06);
  --card-shadow: 0 4px 20px -2px rgba(35, 45, 40, 0.06), 0 2px 6px -1px rgba(35, 45, 40, 0.04);
  --active-ayah-bg: rgba(25, 76, 68, 0.06);
  --active-ayah-border: #B28038;
  --zoom-level: 1;
  --arabic-size: 2.1rem;
  --trans-size: 1.12rem;
  --nav-height: 64px;
}

[data-theme="night"] {
  /* Obsidian (Night / Qiyam) Theme */
  --bg-primary: #111615;
  --bg-card: #18201E;
  --bg-subtle: #202A27;
  --ink-primary: #EDECE8;
  --ink-secondary: #A6AFA9;
  --ink-muted: #79857E;
  --teal-primary: #388A7D;
  --teal-deep: #256157;
  --teal-light: #1F302D;
  --teal-glow: rgba(56, 138, 125, 0.25);
  --gold-primary: #DCB16A;
  --gold-deep: #BF9549;
  --gold-soft: #EFD09B;
  --gold-glow: rgba(220, 177, 106, 0.22);
  --line-color: rgba(220, 177, 106, 0.18);
  --line-subtle: rgba(255, 255, 255, 0.08);
  --card-shadow: 0 4px 24px -2px rgba(0, 0, 0, 0.5);
  --active-ayah-bg: rgba(56, 138, 125, 0.14);
  --active-ayah-border: #DCB16A;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-primary);
  color: var(--ink-primary);
  font-family: 'Cormorant Garamond', Georgia, serif;
  min-height: 100vh;
  line-height: 1.6;
  padding-bottom: 120px;
  zoom: var(--zoom-level);
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* Base Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  color: var(--ink-primary);
}

button, input, select, textarea {
  font-family: inherit;
}

/* Top Navigation Bar */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-card);
  border-bottom: 1px solid var(--line-color);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.nav-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  cursor: pointer;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--teal-primary);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Amiri', serif;
  font-size: 1.25rem;
  box-shadow: 0 2px 8px var(--teal-glow);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--teal-deep);
  line-height: 1.1;
}

[data-theme="night"] .brand-title {
  color: var(--gold-soft);
}

.brand-subtitle {
  font-size: 0.8rem;
  color: var(--ink-muted);
  letter-spacing: 0.3px;
  font-family: system-ui, -apple-system, sans-serif;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--line-color);
  color: var(--ink-primary);
  font-size: 0.88rem;
  font-family: system-ui, -apple-system, sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-btn:hover {
  background: var(--teal-light);
  color: var(--teal-primary);
  border-color: var(--teal-primary);
}

.nav-btn.active {
  background: var(--teal-primary);
  color: #FFFFFF;
  border-color: var(--teal-primary);
}

.nav-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.badge {
  background: var(--gold-primary);
  color: #FFFFFF;
  font-size: 0.72rem;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: bold;
}

/* Main Layout Wrapper */
.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 20px;
}

/* Surah Hero Header */
.surah-hero {
  position: relative;
  text-align: center;
  padding: 36px 24px 28px;
  background: var(--bg-card);
  border: 1px solid var(--line-color);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  margin-bottom: 24px;
  overflow: hidden;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.surah-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--teal-primary) 0%, var(--gold-primary) 50%, var(--teal-primary) 100%);
}

.surah-hero-ornament {
  width: 64px;
  height: 14px;
  margin: 0 auto 12px;
  opacity: 0.75;
  color: var(--gold-primary);
}

.surah-arabic-title {
  font-family: 'Amiri', serif;
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 700;
  margin: 0;
  color: var(--teal-deep);
  direction: rtl;
  line-height: 1.35;
  text-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

[data-theme="night"] .surah-arabic-title {
  color: var(--gold-soft);
}

.surah-translit-title {
  font-size: 1.45rem;
  color: var(--ink-primary);
  margin-top: 4px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.surah-meaning-title {
  font-size: 1.1rem;
  color: var(--gold-deep);
  font-style: italic;
  margin-top: 4px;
}

[data-theme="night"] .surah-meaning-title {
  color: var(--gold-primary);
}

.surah-tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.surah-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg-subtle);
  border: 1px solid var(--line-color);
  color: var(--ink-secondary);
}

/* Surah Quick Selector Row */
.surah-nav-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.nav-arrow-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--line-color);
  color: var(--ink-primary);
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-arrow-btn:hover:not(:disabled) {
  background: var(--teal-primary);
  color: #FFFFFF;
  border-color: var(--teal-primary);
}

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

.surah-picker-select {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.15rem;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--line-color);
  background: var(--bg-card);
  color: var(--ink-primary);
  min-width: 260px;
  max-width: 100%;
  cursor: pointer;
  font-weight: 500;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

/* Bismillah Banner */
.bismillah-wrap {
  text-align: center;
  margin: 28px 0 20px;
  padding: 20px 16px;
  border-top: 1px solid var(--line-color);
  border-bottom: 1px solid var(--line-color);
  background: var(--bg-card);
  border-radius: 8px;
}

.bismillah-arabic {
  font-family: 'Amiri', serif;
  font-size: clamp(1.8rem, 4.5vw, 2.5rem);
  direction: rtl;
  color: var(--teal-deep);
  line-height: 1.6;
}

[data-theme="night"] .bismillah-arabic {
  color: var(--gold-soft);
}

.bismillah-translit {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--ink-muted);
  margin-top: 4px;
}

/* Reader Controls Toolbar */
.controls-panel {
  background: var(--bg-card);
  border: 1px solid var(--line-color);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  padding: 16px 20px;
  margin-bottom: 24px;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.controls-row + .controls-row {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line-color);
}

/* Button Component Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--teal-primary);
  color: #FFFFFF;
  border: 1px solid var(--teal-primary);
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.btn:hover {
  background: var(--teal-deep);
  border-color: var(--teal-deep);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn.gold {
  background: var(--gold-primary);
  border-color: var(--gold-primary);
  color: #FFFFFF;
}

.btn.gold:hover {
  background: var(--gold-deep);
  border-color: var(--gold-deep);
}

.btn.secondary {
  background: var(--bg-card);
  color: var(--teal-deep);
  border-color: var(--line-color);
}

[data-theme="night"] .btn.secondary {
  color: var(--ink-primary);
  background: var(--bg-subtle);
}

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

.btn.active {
  background: var(--gold-primary) !important;
  color: #FFFFFF !important;
  border-color: var(--gold-primary) !important;
}

.btn-icon-only {
  padding: 8px 10px;
}

.btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Control Selects & Inputs */
.control-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.control-label {
  font-size: 0.85rem;
  color: var(--ink-muted);
  font-family: system-ui, -apple-system, sans-serif;
  white-space: nowrap;
}

.custom-select {
  padding: 7px 12px;
  border-radius: 6px;
  border: 1px solid var(--line-color);
  background: var(--bg-card);
  color: var(--ink-primary);
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.88rem;
  cursor: pointer;
  transition: border-color 0.2s;
  max-width: 100%;
}

.custom-select:focus {
  outline: none;
  border-color: var(--teal-primary);
  box-shadow: 0 0 0 2px var(--teal-glow);
}

/* Zoom Controls */
.zoom-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.zoom-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--line-color);
  color: var(--ink-primary);
  font-weight: 600;
  border-radius: 4px;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: system-ui, -apple-system, sans-serif;
  transition: all 0.2s ease;
}

.zoom-btn:hover {
  background: var(--teal-primary);
  color: #FFFFFF;
  border-color: var(--teal-primary);
}

.now-playing-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--gold-deep);
  font-style: italic;
  margin-left: auto;
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--gold-glow);
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid var(--line-color);
}

[data-theme="night"] .now-playing-pill {
  color: var(--gold-soft);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--gold-primary);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

/* Status Messages & Loaders */
.status-msg {
  text-align: center;
  padding: 48px 24px;
  font-style: italic;
  font-size: 1.2rem;
  color: var(--ink-muted);
}

.skeleton-ayah {
  background: var(--bg-card);
  border: 1px solid var(--line-color);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 16px;
  animation: skeleton-shimmer 1.8s infinite;
}

@keyframes skeleton-shimmer {
  0% { opacity: 0.6; }
  50% { opacity: 0.9; }
  100% { opacity: 0.6; }
}

/* Ayat List & Ayah Cards */
.ayat-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.ayah-card {
  background: var(--bg-card);
  border: 1px solid var(--line-color);
  border-radius: 12px;
  padding: 24px 20px;
  position: relative;
  scroll-margin-top: 80px;
  box-shadow: var(--card-shadow);
  transition: all 0.25s ease;
}

.ayah-card:hover {
  border-color: var(--gold-soft);
  transform: translateY(-1px);
}

.ayah-card.playing {
  background: var(--active-ayah-bg);
  border-color: var(--active-ayah-border);
  box-shadow: 0 0 0 2px var(--gold-glow), var(--card-shadow);
}

.ayah-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px dashed var(--line-subtle);
  padding-bottom: 12px;
}

.ayah-medallion {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ayah-badge {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold-primary);
  border: 1.5px solid var(--gold-soft);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-subtle);
  flex-shrink: 0;
}

.ayah-reference {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.ayah-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.action-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--line-color);
  color: var(--ink-secondary);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.82rem;
  cursor: pointer;
  font-family: system-ui, -apple-system, sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.action-btn:hover {
  background: var(--teal-light);
  color: var(--teal-primary);
  border-color: var(--teal-primary);
}

.action-btn.active {
  background: var(--gold-primary);
  color: #FFFFFF;
  border-color: var(--gold-primary);
}

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

.arabic-text {
  font-family: 'Amiri', 'Traditional Arabic', serif;
  font-size: var(--arabic-size);
  direction: rtl;
  text-align: right;
  line-height: 2.3;
  color: var(--ink-primary);
  margin: 12px 0 16px;
  word-spacing: 2px;
  user-select: text;
}

.translit-text {
  margin-top: 10px;
  font-style: italic;
  font-size: 1.12rem;
  color: var(--teal-deep);
  line-height: 1.6;
}

[data-theme="night"] .translit-text {
  color: var(--teal-primary);
}

.translation-text {
  margin-top: 8px;
  font-size: var(--trans-size);
  color: var(--ink-primary);
  font-weight: 500;
  line-height: 1.7;
}

/* Tafsir Accordion Box */
.tafsir-box {
  display: none;
  margin-top: 16px;
  padding: 16px 20px;
  background: var(--bg-subtle);
  border-left: 4px solid var(--gold-primary);
  border-radius: 0 8px 8px 0;
  font-size: 1.05rem;
  color: var(--ink-primary);
  line-height: 1.75;
  animation: fadeIn 0.3s ease;
}

.tafsir-box.open {
  display: block;
}

.tafsir-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.tafsir-title {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--gold-deep);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

[data-theme="night"] .tafsir-title {
  color: var(--gold-soft);
}

.tafsir-close {
  background: none;
  border: none;
  color: var(--ink-muted);
  cursor: pointer;
  font-size: 1.1rem;
}

.tafsir-content {
  font-size: 1.02rem;
  color: var(--ink-primary);
}

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

/* Mushaf / Reading Mode View */
.mushaf-view {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--line-color);
  border-radius: 12px;
  padding: 36px 30px;
  box-shadow: var(--card-shadow);
  margin-top: 24px;
}

.mushaf-view.active {
  display: block;
}

.mushaf-paragraph {
  font-family: 'Amiri', serif;
  font-size: clamp(2rem, 4.5vw, 2.5rem);
  direction: rtl;
  text-align: justify;
  line-height: 2.5;
  color: var(--ink-primary);
}

.mushaf-ayah-span {
  display: inline;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.mushaf-ayah-span:hover {
  background: var(--teal-light);
}

.mushaf-ayah-span.playing {
  background: var(--gold-glow);
  color: var(--gold-deep);
}

.ayah-end-symbol {
  font-size: 0.85em;
  color: var(--gold-primary);
  margin: 0 4px;
  user-select: none;
}

/* Floating Audio Player Bar at Bottom */
.audio-player-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--line-color);
  padding: 12px 20px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
  z-index: 99;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s ease;
}

.audio-bar-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.audio-track-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.audio-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.audio-status-tag {
  background: var(--teal-primary);
  color: #FFFFFF;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.audio-current-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audio-reciter-name {
  font-size: 0.85rem;
  color: var(--ink-muted);
  font-family: system-ui, -apple-system, sans-serif;
  white-space: nowrap;
}

.audio-main-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.player-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--line-color);
  color: var(--ink-primary);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.player-btn:hover {
  background: var(--teal-light);
  color: var(--teal-primary);
  border-color: var(--teal-primary);
}

.player-btn.play-main {
  width: 46px;
  height: 46px;
  background: var(--teal-primary);
  color: #FFFFFF;
  border-color: var(--teal-primary);
  box-shadow: 0 2px 10px var(--teal-glow);
}

.player-btn.play-main:hover {
  background: var(--teal-deep);
  transform: scale(1.05);
}

.player-btn.active {
  background: var(--gold-primary);
  color: #FFFFFF;
  border-color: var(--gold-primary);
}

.player-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.audio-progress-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.audio-time {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.78rem;
  color: var(--ink-muted);
  min-width: 42px;
}

.audio-scrubber {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  background: var(--line-color);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}

.audio-scrubber::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--teal-primary);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  transition: transform 0.1s;
}

.audio-scrubber::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Modals (Search, Bookmarks, Settings) */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--line-color);
  border-radius: 12px;
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
  animation: modalEnter 0.25s ease;
  overflow: hidden;
}

@keyframes modalEnter {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink-primary);
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--ink-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
}

.search-input-wrap {
  position: relative;
  margin-bottom: 16px;
}

.search-input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border-radius: 8px;
  border: 1px solid var(--line-color);
  background: var(--bg-subtle);
  color: var(--ink-primary);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: var(--teal-primary);
  box-shadow: 0 0 0 2px var(--teal-glow);
}

.search-icon-pos {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-muted);
  width: 18px;
  height: 18px;
}

.search-results-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 50vh;
  overflow-y: auto;
}

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--line-subtle);
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.2s ease;
}

.search-result-item:hover {
  background: var(--teal-light);
  border-color: var(--teal-primary);
}

.result-number {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--gold-primary);
  width: 28px;
}

.result-info {
  flex: 1;
  margin: 0 12px;
}

.result-name-en {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink-primary);
}

.result-translation {
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.result-name-ar {
  font-family: 'Amiri', serif;
  font-size: 1.25rem;
  direction: rtl;
  color: var(--teal-deep);
}

/* Bookmarks List */
.bookmarks-empty {
  text-align: center;
  padding: 36px 12px;
  color: var(--ink-muted);
  font-style: italic;
}

.bookmark-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid var(--line-subtle);
  border-radius: 8px;
  margin-bottom: 8px;
  background: var(--bg-subtle);
}

.bookmark-info {
  flex: 1;
  cursor: pointer;
}

.bookmark-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink-primary);
}

.bookmark-snippet {
  font-family: 'Amiri', serif;
  font-size: 1.15rem;
  color: var(--teal-deep);
  direction: rtl;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

.bookmark-delete-btn {
  background: none;
  border: none;
  color: #C0392B;
  cursor: pointer;
  padding: 6px;
  font-size: 1.1rem;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink-primary);
  color: var(--bg-card);
  padding: 10px 20px;
  border-radius: 24px;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.9rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 300;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .nav-container {
    padding: 10px 14px;
  }
  .brand-subtitle {
    display: none;
  }
  .wrap {
    padding: 16px 12px;
  }
  .surah-hero {
    padding: 24px 14px 20px;
  }
  .surah-picker-select {
    min-width: 200px;
  }
  .controls-panel {
    padding: 14px 12px;
  }
  .ayah-card {
    padding: 18px 14px;
  }
  .audio-player-bar {
    padding: 10px 14px;
  }
  .audio-reciter-name {
    display: none;
  }
}
