:root {
  --green: #1A4D44;
  --green-deep: #0B2A26;
  --green-light: #2E6B5F;
  --gold: #B89968;
  --gold-light: #C9A961;
  --ivory: #FAFAF7;
  --white: #FFFFFF;
  --live: #5DCAA5;
  --red: #E24B4A;
  --whatsapp: #25D366;
  
  --font-body: 'Tajawal', system-ui, sans-serif;
  --font-arabic: 'Amiri', serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

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

html, body {
  -webkit-text-size-adjust: 100%;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
}

body {
  font-family: var(--font-body);
  background: var(--ivory);
  color: var(--green-deep);
  direction: rtl;
  line-height: 1.7;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-overflow-scrolling: touch;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
@keyframes rotateSlow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes glowSoft { 0%, 100% { opacity: 0.3; } 50% { opacity: 0.6; } }
@keyframes pulseRed { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.3); opacity: 0.5; } }
@keyframes pulseLive { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.4); opacity: 0.6; } }
@keyframes countPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.02); } }
@keyframes glowBg { 0%, 100% { opacity: 0.4; transform: scale(1); } 50% { opacity: 0.7; transform: scale(1.05); } }

.welcome-page {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-deep) 100%);
  min-height: 100vh;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.welcome-bg-ornament {
  position: absolute;
  pointer-events: none;
  opacity: 0.06;
  animation: rotateSlow 90s linear infinite;
}

.welcome-bg-ornament.top-right { top: -100px; right: -100px; width: 380px; height: 380px; }
.welcome-bg-ornament.bottom-left { bottom: -80px; left: -80px; width: 300px; height: 300px; animation-direction: reverse; opacity: 0.05; }

.welcome-card {
  max-width: 420px;
  width: 100%;
  padding: 2rem 1.5rem 1.75rem;
  position: relative;
  z-index: 1;
}

.welcome-header { text-align: center; margin-bottom: 1.25rem; animation: fadeUp 0.8s ease-out 0.2s both; }
.welcome-logo-wrapper { display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; position: relative; }
.welcome-logo-glow { position: absolute; inset: -25px; background: var(--gold); border-radius: 50%; filter: blur(30px); opacity: 0.4; animation: glowSoft 3s ease-in-out infinite; }
.welcome-logo { position: relative; z-index: 1; }
.welcome-bismillah { font-size: 13px; color: rgba(250,250,247,0.6); margin: 0 0 4px; }
.welcome-title { font-size: 24px; font-weight: 500; color: var(--ivory); margin: 6px 0 0; }

.welcome-niyyah {
  background: rgba(184,153,104,0.06);
  border: 0.5px solid rgba(184,153,104,0.2);
  border-radius: 14px;
  padding: 16px 14px;
  margin-bottom: 16px;
  animation: fadeUp 0.8s ease-out 0.4s both;
}
.welcome-niyyah p { font-size: 12px; color: rgba(250,250,247,0.85); line-height: 2.1; text-align: center; }
.welcome-niyyah .highlight { color: var(--gold); }

.welcome-actions {
  background: rgba(255,255,255,0.04);
  border: 0.5px solid rgba(184,153,104,0.15);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 16px;
  animation: fadeUp 0.8s ease-out 0.6s both;
}
.welcome-actions-title { font-size: 11px; color: rgba(184,153,104,0.75); margin: 0 0 10px; letter-spacing: 1px; text-align: center; }
.welcome-action-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.welcome-action-row:last-child { margin-bottom: 0; }
.welcome-action-icon { width: 24px; height: 24px; background: rgba(184,153,104,0.15); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.welcome-action-icon svg { width: 12px; height: 12px; color: var(--gold); }
.welcome-action-text { font-size: 12px; color: var(--ivory); margin: 0; }

.welcome-hadith {
  background: rgba(184,153,104,0.08);
  border: 0.5px solid rgba(184,153,104,0.25);
  border-radius: 14px;
  padding: 14px 12px;
  margin-bottom: 20px;
  animation: fadeUp 0.8s ease-out 0.8s both;
}
.welcome-hadith p { font-family: var(--font-arabic); font-size: 14px; color: rgba(250,250,247,0.95); line-height: 2; text-align: center; }
.welcome-hadith .source { font-size: 10px; color: rgba(184,153,104,0.7); margin: 8px 0 0; text-align: center; }
.welcome-hadith .highlight { color: var(--gold); }

.welcome-btn {
  width: 100%;
  padding: 16px;
  background: rgba(184,153,104,0.15);
  color: var(--gold);
  border: 0.5px solid rgba(184,153,104,0.3);
  border-radius: 14px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  animation: fadeUp 0.8s ease-out 1s both;
}
.welcome-btn:hover {
  background: rgba(184,153,104,0.25);
  border-color: rgba(184,153,104,0.5);
}
.welcome-btn:active { transform: scale(0.98); }

.main-page {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: var(--ivory);
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--green);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-brand { display: flex; align-items: center; gap: 8px; }
.topbar-brand-text { font-weight: 500; font-size: 13px; color: var(--ivory); }
.topbar-night-btn { width: 30px; height: 30px; background: rgba(184,153,104,0.15); border: 0.5px solid rgba(184,153,104,0.4); border-radius: 50%; cursor: pointer; color: var(--gold); display: flex; align-items: center; justify-content: center; }
.topbar-night-btn svg { width: 13px; height: 13px; }

.hero {
  background: linear-gradient(180deg, var(--green) 0%, var(--green-deep) 100%);
  padding: 2rem 1.5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-pattern { position: absolute; inset: 0; opacity: 0.07; pointer-events: none; }
.hero-content { position: relative; }
.hero-logo-wrapper { display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px; position: relative; }
.hero-logo-glow { position: absolute; inset: -18px; background: var(--gold); border-radius: 50%; filter: blur(24px); opacity: 0.3; animation: glowSoft 4s ease-in-out infinite; }
.hero-logo { position: relative; }
.hero-title { font-size: 24px; font-weight: 500; margin: 0 0 8px; color: var(--ivory); line-height: 1.4; }
.hero-sub1 { font-size: 13px; color: rgba(250,250,247,0.85); margin: 0 0 3px; }
.hero-sub2 { font-size: 12px; color: var(--gold); margin: 0 0 22px; }

.hadith-card {
  background: rgba(184,153,104,0.08);
  border: 0.5px solid rgba(184,153,104,0.25);
  border-radius: 14px;
  padding: 14px 12px;
  max-width: 280px;
  margin: 0 auto;
}
.hadith-card-icon { margin-bottom: 6px; }
.hadith-card p { font-family: var(--font-arabic); font-size: 13px; color: rgba(250,250,247,0.95); line-height: 2; }
.hadith-card .highlight { color: var(--gold); }
.hadith-card .source { font-size: 9px; color: rgba(184,153,104,0.7); margin: 8px 0 0; }

.tabs-bar {
  background: white;
  border: 0.5px solid rgba(26,77,68,0.15);
  border-radius: 14px;
  padding: 4px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  margin: 1.25rem 1.5rem 0;
}

.tab {
  padding: 10px 2px;
  background: white;
  color: rgba(11,42,38,0.55);
  border-radius: 10px;
  text-align: center;
  font-size: 10px;
  cursor: pointer;
  position: relative;
  border: none;
  font-family: inherit;
  transition: all 0.2s;
}
.tab:hover { background: rgba(184,153,104,0.05); }
.tab.active { background: var(--gold); color: var(--green-deep); }
.tab-icon { display: block; margin: 0 auto 2px; width: 15px; height: 15px; }
.tab-live-dot { position: absolute; top: 4px; left: 4px; width: 5px; height: 5px; background: var(--red); border-radius: 50%; animation: pulseRed 1.5s ease-in-out infinite; }

.content-section { padding: 1rem 1.5rem 0; }

.player-card {
  background: white;
  border-radius: 14px;
  padding: 1.5rem 1.25rem;
  border: 0.5px solid rgba(26,77,68,0.1);
}

.player-button-wrapper { display: flex; justify-content: center; margin-bottom: 14px; position: relative; }
.player-button-glow { position: absolute; width: 110px; height: 110px; background: var(--gold); border-radius: 50%; filter: blur(20px); opacity: 0.3; animation: glowBg 4s ease-in-out infinite; }
.player-button-ring { width: 84px; height: 84px; border-radius: 50%; background: linear-gradient(135deg, rgba(26,77,68,0.08) 0%, rgba(184,153,104,0.15) 100%); border: 2px solid var(--green); display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; }
.player-button-play { width: 56px; height: 56px; border-radius: 50%; background: var(--green); border: none; color: var(--gold); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.player-button-play svg { width: 22px; height: 22px; }

.player-info { text-align: center; margin-bottom: 10px; }
.player-track-name { font-size: 13px; font-weight: 500; margin: 0; color: var(--green-deep); }
.player-reciter-name { font-size: 11px; color: rgba(11,42,38,0.6); margin: 3px 0 0; }

.player-progress-bar { height: 3px; background: rgba(26,77,68,0.1); border-radius: 2px; overflow: hidden; margin-bottom: 6px; }
.player-progress-fill { height: 100%; background: linear-gradient(90deg, var(--green), var(--gold)); transition: width 0.3s linear; }
.player-times { display: flex; justify-content: space-between; font-size: 10px; color: rgba(11,42,38,0.5); font-family: var(--font-mono); }

.player-reciter-btn { width: 100%; padding: 9px; background: rgba(26,77,68,0.06); color: var(--green); border: none; border-radius: 8px; font-size: 11px; cursor: pointer; margin-top: 12px; font-family: inherit; }
.player-reciter-btn:hover { background: rgba(26,77,68,0.1); }

.counter-section {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-deep) 100%);
  border-radius: 16px;
  padding: 0;
  position: relative;
  overflow: hidden;
}

.counter-pattern { position: absolute; inset: 0; opacity: 0.06; pointer-events: none; }
.counter-content { position: relative; padding: 2rem 1.5rem 1.75rem; text-align: center; }
.counter-label { font-size: 12px; color: rgba(250,250,247,0.7); margin: 0 0 22px; }
.counter-big { animation: countPulse 4s ease-in-out infinite; }
.counter-number { font-family: var(--font-mono); font-size: 52px; color: var(--gold); margin: 0; font-weight: 500; line-height: 1; letter-spacing: 2px; }
.counter-unit { font-size: 14px; color: var(--ivory); margin: 10px 0 0; }

.counter-divider { height: 0.5px; background: rgba(184,153,104,0.2); margin: 22px 0 18px; }

.counter-breakdown { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px; }
.counter-item svg { color: var(--gold); width: 13px; height: 13px; display: block; margin: 0 auto 4px; }
.counter-item-value { font-family: var(--font-mono); font-size: 15px; color: var(--ivory); margin: 0; font-weight: 500; }
.counter-item-label { font-size: 9px; color: rgba(250,250,247,0.5); margin: 3px 0 0; }

.share-section { padding: 1rem 1.5rem 0; }
.share-label { font-family: var(--font-arabic); font-size: 13px; color: var(--green); margin: 0 0 10px; line-height: 1.8; text-align: center; }
.share-buttons { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 6px; }

.share-btn {
  padding: 13px 8px;
  border: none;
  border-radius: 10px;
  font-size: 11px;
  cursor: pointer;
  font-weight: 500;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: transform 0.2s;
}
.share-btn:hover { transform: translateY(-2px); }
.share-btn:active { transform: translateY(0); }
.share-btn svg { width: 16px; height: 16px; }
.share-btn-whatsapp { background: linear-gradient(135deg, var(--green) 0%, var(--green-deep) 100%); color: var(--gold); border: 0.5px solid rgba(184,153,104,0.4); font-size: 12px; }
.share-btn-status, .share-btn-x { background: white; color: var(--green-deep); border: 0.5px solid rgba(26,77,68,0.2); }

.footer-dua {
  padding: 1.25rem 1.5rem 1.5rem;
  margin-top: 0.75rem;
  text-align: center;
  background: linear-gradient(180deg, transparent 0%, rgba(26,77,68,0.04) 100%);
}
.footer-dua p { font-family: var(--font-arabic); font-size: 12px; color: var(--green); margin: 0; line-height: 1.9; }

.episodes-list { padding: 0 1.5rem 1rem; display: flex; flex-direction: column; gap: 10px; }

.episode-card { background: white; border: 0.5px solid rgba(184,153,104,0.25); border-radius: 14px; padding: 1rem; display: flex; gap: 10px; align-items: center; }
.episode-card.playing { background: linear-gradient(135deg, var(--ivory) 0%, rgba(184,153,104,0.12) 100%); border: 1.5px solid var(--gold); }

.episode-icon-wrapper { position: relative; flex-shrink: 0; }
.episode-icon { width: 46px; height: 46px; background: var(--green); border-radius: 50%; display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; cursor: pointer; }
.episode-icon svg { color: var(--gold); width: 19px; height: 19px; }
.episode-icon.idle { background: rgba(184,153,104,0.12); }
.episode-icon.idle svg { color: var(--gold); }

.episode-info { flex: 1; min-width: 0; }
.episode-title-row { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.episode-title { font-size: 12px; font-weight: 500; color: var(--green-deep); margin: 0; }
.episode-meta { font-size: 10px; color: rgba(11,42,38,0.6); margin: 0; }
.episode-duration { font-size: 9px; color: rgba(11,42,38,0.4); margin: 4px 0 0; font-family: var(--font-mono); }

.episode-playing-badge { background: var(--gold); color: var(--green-deep); font-size: 9px; padding: 3px 7px; border-radius: 4px; font-weight: 500; }

.episode-progress { height: 3px; background: rgba(184,153,104,0.2); border-radius: 2px; overflow: hidden; margin-top: 10px; }
.episode-progress-fill { height: 100%; background: var(--gold); }
.episode-times { display: flex; justify-content: space-between; font-size: 9px; color: rgba(11,42,38,0.5); font-family: var(--font-mono); margin-top: 6px; }

.video-wrapper { background: var(--green-deep); border-radius: 14px; overflow: hidden; aspect-ratio: 16/9; position: relative; }
.video-iframe { width: 100%; height: 100%; border: 0; }

.live-badge { position: absolute; top: 10px; right: 10px; display: flex; align-items: center; gap: 4px; background: var(--red); padding: 3px 8px; border-radius: 4px; animation: pulseLive 2s ease-in-out infinite; }
.live-badge-dot { width: 6px; height: 6px; background: white; border-radius: 50%; }
.live-badge-text { color: white; font-size: 9px; font-weight: 500; letter-spacing: 1px; }

.video-info { padding: 10px 4px 0; }
.video-info p:first-child { font-size: 13px; font-weight: 500; margin: 0; color: var(--green-deep); }
.video-info p:last-child { font-size: 11px; color: rgba(11,42,38,0.6); margin: 3px 0 0; }

.install-prompt {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  max-width: 360px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-deep) 100%);
  border: 0.5px solid var(--gold);
  border-radius: 14px;
  padding: 14px;
  z-index: 200;
  display: none;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  animation: fadeUp 0.4s ease-out;
}
.install-prompt.show { display: flex; }

.install-prompt-icon { width: 40px; height: 40px; background: rgba(184,153,104,0.15); border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.install-prompt-icon svg { color: var(--gold); width: 22px; height: 22px; }

.install-prompt-content { flex: 1; min-width: 0; }
.install-prompt-title { font-size: 12px; color: var(--ivory); margin: 0; font-weight: 500; }
.install-prompt-desc { font-size: 10px; color: rgba(250,250,247,0.6); margin: 2px 0 0; }

.install-prompt-actions { display: flex; gap: 6px; flex-shrink: 0; }
.install-btn-yes { padding: 8px 12px; background: var(--gold); color: var(--green-deep); border: none; border-radius: 8px; font-size: 11px; font-weight: 500; cursor: pointer; font-family: inherit; }
.install-btn-no { padding: 8px 12px; background: transparent; color: rgba(250,250,247,0.6); border: none; border-radius: 8px; font-size: 11px; cursor: pointer; font-family: inherit; }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

@media (max-width: 360px) {
  .hero-title { font-size: 22px; }
  .counter-number { font-size: 44px; }
  .welcome-card { padding: 1.5rem 1rem; }
}

@media (display-mode: standalone) {
  .install-prompt { display: none !important; }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11,42,38,0.85);
  backdrop-filter: blur(8px);
  z-index: 300;
  display: none;
}
.modal-overlay.show { display: block; }

.modal {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--ivory);
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.modal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: var(--green);
  position: sticky;
  top: 0;
  z-index: 10;
}

.modal-title { font-size: 16px; font-weight: 500; color: var(--ivory); margin: 0; }

.modal-close {
  width: 34px;
  height: 34px;
  background: rgba(184,153,104,0.15);
  border: 0.5px solid rgba(184,153,104,0.4);
  border-radius: 50%;
  cursor: pointer;
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-search-bar {
  padding: 12px 16px;
  background: white;
  border-bottom: 0.5px solid rgba(26,77,68,0.1);
  position: sticky;
  top: 66px;
  z-index: 9;
}

.modal-search-wrapper {
  position: relative;
}

.modal-search-input {
  width: 100%;
  padding: 12px 40px 12px 16px;
  background: rgba(26,77,68,0.05);
  border: 0.5px solid rgba(26,77,68,0.15);
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  color: var(--green-deep);
  direction: rtl;
  outline: none;
  transition: all 0.2s;
}

.modal-search-input:focus {
  border-color: var(--gold);
  background: white;
}

.modal-search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(11,42,38,0.4);
  pointer-events: none;
}

.modal-search-icon svg { width: 18px; height: 18px; }

.modal-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  -webkit-overflow-scrolling: touch;
}

.surah-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.surah-card {
  background: white;
  border: 0.5px solid rgba(26,77,68,0.12);
  border-radius: 12px;
  padding: 14px 12px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: right;
}

.surah-card:hover, .surah-card:active {
  background: rgba(184,153,104,0.08);
  border-color: var(--gold);
}

.surah-card.active {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-deep) 100%);
  border-color: var(--gold);
}

.surah-card.active .surah-name { color: var(--gold); }
.surah-card.active .surah-meta { color: rgba(250,250,247,0.6); }
.surah-card.active .surah-number { background: var(--gold); color: var(--green-deep); }

.surah-number {
  width: 32px;
  height: 32px;
  background: rgba(26,77,68,0.08);
  color: var(--green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  flex-shrink: 0;
}

.surah-info { flex: 1; min-width: 0; }

.surah-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--green-deep);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.surah-meta {
  font-size: 10px;
  color: rgba(11,42,38,0.5);
  margin: 2px 0 0;
}

.reciter-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reciter-card {
  background: white;
  border: 0.5px solid rgba(26,77,68,0.12);
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
}

.reciter-card:hover, .reciter-card:active {
  background: rgba(184,153,104,0.06);
  border-color: var(--gold);
}

.reciter-card.active {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-deep) 100%);
  border-color: var(--gold);
}

.reciter-card.active .reciter-name-text { color: var(--gold); }
.reciter-card.active .reciter-country { color: rgba(250,250,247,0.6); }
.reciter-card.active .reciter-avatar { background: rgba(184,153,104,0.2); }
.reciter-card.active .reciter-avatar svg { color: var(--gold); }
.reciter-card.active .reciter-check { display: flex; }

.reciter-avatar {
  width: 44px;
  height: 44px;
  background: rgba(184,153,104,0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.reciter-avatar svg {
  width: 22px;
  height: 22px;
  color: var(--gold);
}

.reciter-info { flex: 1; min-width: 0; }

.reciter-name-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--green-deep);
  margin: 0;
}

.reciter-country {
  font-size: 11px;
  color: rgba(11,42,38,0.5);
  margin: 2px 0 0;
}

.reciter-check {
  width: 24px;
  height: 24px;
  background: var(--gold);
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.reciter-check svg {
  width: 14px;
  height: 14px;
  color: var(--green-deep);
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: rgba(11,42,38,0.5);
}

.empty-state svg {
  width: 48px;
  height: 48px;
  color: rgba(11,42,38,0.2);
  margin-bottom: 12px;
}

.empty-state p {
  font-size: 13px;
  margin: 0;
}

.noor-card {
  background: white;
  border: 0.5px solid rgba(184,153,104,0.25);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 12px;
}

.noor-thumbnail {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-deep) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.noor-thumbnail-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  pointer-events: none;
}

.noor-play-circle {
  width: 64px;
  height: 64px;
  background: rgba(184,153,104,0.2);
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.noor-play-circle svg {
  width: 26px;
  height: 26px;
  color: var(--gold);
  margin-right: -3px;
}

.noor-details {
  padding: 16px;
}

.noor-badge-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.noor-new-badge {
  background: var(--red);
  color: white;
  font-size: 9px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
  animation: pulseSoft 2s ease-in-out infinite;
}

@keyframes pulseSoft { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }

.noor-episode-meta {
  font-size: 10px;
  color: rgba(11,42,38,0.5);
}

.noor-episode-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--green-deep);
  margin: 0 0 4px;
  line-height: 1.5;
}

.noor-channel {
  font-size: 11px;
  color: rgba(11,42,38,0.55);
  margin: 0;
}

.noor-info-box {
  background: rgba(184,153,104,0.06);
  border: 0.5px solid rgba(184,153,104,0.2);
  border-radius: 10px;
  padding: 12px;
  margin-top: 12px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.noor-info-box svg {
  width: 16px;
  height: 16px;
  color: var(--gold);
  flex-shrink: 0;
  margin-top: 1px;
}

.noor-info-box p {
  font-size: 11px;
  color: var(--green-deep);
  margin: 0;
  line-height: 1.6;
}

body.night-mode .modal { background: var(--green-deep); }
body.night-mode .modal-search-bar { background: rgba(255,255,255,0.04); border-color: rgba(184,153,104,0.15); }
body.night-mode .modal-search-input { background: rgba(255,255,255,0.04); border-color: rgba(184,153,104,0.15); color: var(--ivory); }
body.night-mode .surah-card { background: rgba(255,255,255,0.04); border-color: rgba(184,153,104,0.15); }
body.night-mode .surah-name { color: var(--ivory); }
body.night-mode .surah-meta { color: rgba(250,250,247,0.5); }
body.night-mode .surah-number { background: rgba(184,153,104,0.12); color: var(--gold); }
body.night-mode .reciter-card { background: rgba(255,255,255,0.04); border-color: rgba(184,153,104,0.15); }
body.night-mode .reciter-name-text { color: var(--ivory); }
body.night-mode .reciter-country { color: rgba(250,250,247,0.5); }
body.night-mode .noor-card { background: rgba(255,255,255,0.04); border-color: rgba(184,153,104,0.15); }
body.night-mode .noor-episode-title { color: var(--ivory); }
body.night-mode .noor-channel { color: rgba(250,250,247,0.6); }
body.night-mode .noor-info-box p { color: var(--ivory); }

.reciter-list { display: flex; flex-direction: column; gap: 6px; }
.reciter-item { padding: 12px; background: white; border: 0.5px solid rgba(26,77,68,0.1); border-radius: 10px; cursor: pointer; display: flex; align-items: center; gap: 10px; transition: all 0.2s; }
.reciter-item:hover { background: rgba(184,153,104,0.05); border-color: var(--gold); }
.reciter-item.active { background: rgba(184,153,104,0.1); border-color: var(--gold); }
.reciter-item svg { color: var(--gold); width: 18px; height: 18px; flex-shrink: 0; }
.reciter-item-name { font-size: 13px; color: var(--green-deep); flex: 1; text-align: right; }

.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green-deep);
  color: var(--gold);
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 12px;
  z-index: 400;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.toast.show { opacity: 1; }

.loader { display: inline-block; width: 12px; height: 12px; border: 2px solid rgba(184,153,104,0.3); border-top-color: var(--gold); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

body.night-mode { background: var(--green-deep); }
body.night-mode .main-page { background: var(--green-deep); }
body.night-mode .player-card { background: rgba(255,255,255,0.04); border-color: rgba(184,153,104,0.15); }
body.night-mode .player-track-name { color: var(--ivory); }
body.night-mode .player-reciter-name { color: rgba(250,250,247,0.6); }
body.night-mode .player-times { color: rgba(250,250,247,0.5); }
body.night-mode .player-reciter-btn { background: rgba(184,153,104,0.1); color: var(--gold); }
body.night-mode .tabs-bar { background: rgba(255,255,255,0.04); border-color: rgba(184,153,104,0.15); }
body.night-mode .tab { background: transparent; color: rgba(250,250,247,0.5); }
body.night-mode .episode-card { background: rgba(255,255,255,0.04); border-color: rgba(184,153,104,0.15); }
body.night-mode .episode-card.playing { background: rgba(184,153,104,0.08); }
body.night-mode .episode-title { color: var(--ivory); }
body.night-mode .episode-meta { color: rgba(250,250,247,0.6); }
body.night-mode .episode-duration { color: rgba(250,250,247,0.4); }
body.night-mode .video-info p:first-child { color: var(--ivory); }
body.night-mode .video-info p:last-child { color: rgba(250,250,247,0.6); }
body.night-mode .share-label { color: var(--gold); }
body.night-mode .share-btn-status, body.night-mode .share-btn-x { background: rgba(255,255,255,0.05); color: var(--ivory); border-color: rgba(184,153,104,0.2); }
body.night-mode .footer-dua { background: linear-gradient(180deg, transparent 0%, rgba(184,153,104,0.04) 100%); }
body.night-mode .footer-dua p { color: var(--gold); }

/* === وضع الاستماع التفاعلي === */
.listen-overlay { position: fixed; inset: 0; background: linear-gradient(135deg, var(--green) 0%, var(--green-deep) 100%); z-index: 1000; display: none; flex-direction: column; overflow: hidden; }
.listen-overlay.active { display: flex; }
.listen-overlay::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(circle at 25% 25%, rgba(184,153,104,0.04) 0%, transparent 35%), radial-gradient(circle at 75% 75%, rgba(184,153,104,0.03) 0%, transparent 40%); pointer-events: none; }
.listen-header { position: relative; padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; z-index: 2; transition: opacity 0.4s ease; }
.listen-header.hidden { opacity: 0.15; }
.listen-header.hidden .listen-menu-btn { opacity: 0.4; }
.listen-status { display: flex; align-items: center; gap: 6px; }
.listen-status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--live); animation: pulseDot 2s ease-in-out infinite; }
.listen-status-text { font-size: 11px; color: var(--gold); letter-spacing: 1px; }
.listen-menu-btn { background: rgba(184,153,104,0.15); border: 0.5px solid rgba(184,153,104,0.4); border-radius: 50%; width: 36px; height: 36px; color: var(--gold); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.3s ease; padding: 0; }
.listen-menu-btn:active { transform: scale(0.95); }
.listen-info { position: relative; padding: 4px 18px 12px; text-align: center; z-index: 2; transition: opacity 0.4s ease; }
.listen-info.hidden { opacity: 0; }
.listen-surah-name { font-family: 'Amiri', serif; font-size: 16px; color: var(--ivory); margin: 0 0 2px; font-weight: 500; }
.listen-reciter-name { font-size: 12px; color: var(--gold); margin: 0; }

.listen-ayat { position: relative; flex: 1; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding: 20px 24px; z-index: 2; }
.ayah-display { text-align: center; transition: all 0.7s ease; }
.ayah-prev { opacity: 0.18; transform: scale(0.85); margin-bottom: 18px; }
.ayah-prev .ayah-text { font-size: 19px; color: rgba(250,250,247,0.4); }
.ayah-current { opacity: 1; transform: scale(1); margin-bottom: 18px; }
.ayah-current .ayah-text { font-size: 26px; color: var(--ivory); font-weight: 500; }
.ayah-next { opacity: 0.18; transform: scale(0.85); }
.ayah-next .ayah-text { font-size: 19px; color: rgba(250,250,247,0.4); }
.ayah-text { font-family: 'Amiri', serif; line-height: 2.4; margin: 0; transition: all 0.7s ease; padding: 0 8px; }
.ayah-number { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border: 0.5px solid rgba(184,153,104,0.4); border-radius: 50%; color: var(--gold); font-size: 11px; font-family: 'IBM Plex Mono', monospace; margin: 0 6px; vertical-align: middle; }
.ayah-divider { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 14px; opacity: 0.6; }
.ayah-divider-line { height: 1px; flex: 1; max-width: 50px; background: rgba(184,153,104,0.3); }
.ayah-divider-num { font-size: 11px; color: var(--gold); font-family: 'IBM Plex Mono', monospace; }
.ayah-loading { text-align: center; padding: 40px 20px; color: rgba(250,250,247,0.5); font-size: 13px; }

.listen-controls { position: relative; padding: 14px 22px 22px; background: rgba(0,0,0,0.25); border-top: 0.5px solid rgba(184,153,104,0.15); z-index: 2; transition: opacity 0.4s ease, transform 0.4s ease; }
.listen-controls.hidden { opacity: 0; transform: translateY(20px); pointer-events: none; }
.listen-times { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.listen-time { font-size: 10px; color: rgba(250,250,247,0.5); font-family: 'IBM Plex Mono', monospace; }
.listen-progress { height: 3px; background: rgba(184,153,104,0.15); border-radius: 2px; overflow: hidden; margin-bottom: 16px; cursor: pointer; position: relative; }
.listen-progress-fill { height: 100%; background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 100%); width: 0%; transition: width 0.1s linear; border-radius: 2px; }
.listen-buttons { display: flex; align-items: center; justify-content: center; gap: 22px; }
.listen-btn { background: rgba(184,153,104,0.1); border: 0.5px solid rgba(184,153,104,0.3); border-radius: 50%; color: var(--gold); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.3s ease; padding: 0; }
.listen-btn:active { transform: scale(0.92); }
.listen-btn-secondary { width: 38px; height: 38px; font-size: 16px; }
.listen-btn-play { width: 60px; height: 60px; background: var(--gold); color: var(--green-deep); border: none; font-size: 22px; }
.listen-btn-play:active { transform: scale(0.95); }
.listen-btn svg { width: 1em; height: 1em; }

.listen-menu { position: absolute; top: 0; left: 0; right: 0; background: rgba(11,42,38,0.97); backdrop-filter: blur(12px); padding: 14px 14px 20px; transform: translateY(-100%); transition: transform 0.4s ease; z-index: 10; border-bottom: 0.5px solid rgba(184,153,104,0.15); }
.listen-menu.active { transform: translateY(0); }
.listen-menu-header { display: flex; justify-content: flex-end; padding: 4px 4px 12px; }
.listen-menu-close { background: var(--gold); border: none; border-radius: 50%; width: 32px; height: 32px; color: var(--green-deep); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.listen-menu-items { display: flex; flex-direction: column; gap: 8px; }
.listen-menu-item { background: rgba(184,153,104,0.12); border: 0.5px solid rgba(184,153,104,0.3); border-radius: 12px; padding: 13px 16px; color: var(--ivory); display: flex; align-items: center; gap: 12px; text-align: right; cursor: pointer; font-family: inherit; font-size: 13px; transition: all 0.2s ease; width: 100%; }
.listen-menu-item:active { background: rgba(184,153,104,0.2); transform: scale(0.98); }
.listen-menu-item-icon { color: var(--gold); display: flex; align-items: center; justify-content: center; width: 22px; flex-shrink: 0; }
.listen-menu-item-content { flex: 1; }
.listen-menu-item-title { font-size: 13px; margin: 0; font-weight: 500; }
.listen-menu-item-subtitle { font-size: 10px; color: rgba(250,250,247,0.55); margin: 2px 0 0; }
.listen-menu-item-chevron { color: rgba(184,153,104,0.5); display: flex; align-items: center; }

.no-timing-msg { text-align: center; padding: 40px 20px; color: rgba(250,250,247,0.6); font-size: 13px; line-height: 1.8; }
.no-timing-msg-icon { font-size: 36px; color: var(--gold); margin-bottom: 12px; opacity: 0.6; }

@keyframes pulseDot { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(1.5); } }

@media (max-width: 380px) {
  .ayah-current .ayah-text { font-size: 22px; }
  .ayah-prev .ayah-text, .ayah-next .ayah-text { font-size: 17px; }
}
