/* ==================================================
   BRAND TOKENS – RABBIALLAH
================================================== */
:root {
  --primary: #1f5f3b;
  --primary-dark: #174a2e;
  --secondary: #0fa3a3;
  --secondary-dark: #0b7f7f;

  --bg-soft: #f8faf9;
  --bg-card: #ffffff;
  --bg-muted: #f1f5f3;

  --text-main: #111;
  --text-muted: #666;
  --text-light: #888;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --shadow-sm: 0 6px 16px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.06);
}

/* ==================================================
   GLOBAL SAFE RESET
================================================== */
.quran-index,
.surah-header-box,
.ayah-list {
  box-sizing: border-box;
}

/* ==================================================
   QURAN INDEX (SURAH LIST)
================================================== */
.quran-index {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin: 40px 0;
}

.surah-card {
  background: var(--bg-card);
  padding: 22px 24px;
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-main);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.surah-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.surah-number {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  margin-right: 18px;
  font-weight: 600;
}

.surah-text h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.surah-text small {
  color: var(--text-muted);
  font-size: 13px;
}

.surah-arabic {
  margin-left: auto;
  font-size: 22px;
  font-weight: 500;
  color: var(--primary);
}

/* ==================================================
   SURAH HEADER
================================================== */
.surah-header-box {
  background: linear-gradient(180deg, var(--bg-soft), var(--bg-card));
  padding: 48px 32px;
  border-radius: var(--radius-lg);
  text-align: center;
  margin: 50px 0;
  box-shadow: var(--shadow-md);
}

.surah-arabic-title {
  font-size: 48px;
  color: var(--primary);
  margin-bottom: 10px;
}

.surah-header-box h1 {
  font-size: 32px;
  margin: 0;
}

.surah-meaning {
  color: var(--text-muted);
  font-size: 16px;
  margin-top: 6px;
}

.surah-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin: 32px 0;
}

.surah-meta-grid div {
  background: var(--bg-muted);
  padding: 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.surah-actions button {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  padding: 12px 22px;
  margin: 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
}

.surah-actions button:hover {
  opacity: 0.9;
}

/* ==================================================
   AYAH CARD – SIDEBAR STYLE
================================================== */
.ayah-card {
  display: flex;
  background: #f4f6f5;
  border-radius: var(--radius-md);
  margin-bottom: 30px;
  overflow: hidden;
  transition: background 0.3s ease;
}

.ayah-card:hover {
  background: #eef2f0;
}

.ayah-card.playing {
  background: #e4f3ee;
}

/* ==================================================
   AYAH SIDEBAR
================================================== */
.ayah-sidebar {
  width: 64px;
  background: linear-gradient(180deg, var(--secondary), var(--secondary-dark));
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 8px;
  gap: 12px;
}

.ayah-number-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 13px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
}

.ayah-sidebar button {
  all: unset;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.15);
  transition: background 0.2s ease, transform 0.15s ease;
}

.ayah-sidebar button i {
  font-size: 15px;
  color: #fff;
  pointer-events: none;
}

.ayah-sidebar button:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.05);
}

.ayah.playing .ayah-sidebar {
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
}

.ayah.playing .ayah-play i {
  color: #ffffff;
}

.ayah.playing::after {
  content: 'Now Playing';
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 11px;
  color: var(--primary);
  opacity: 0.7;
}


/* ==================================================
   AYAH CONTENT
================================================== */
.ayah-content {
  padding: 28px 34px;
  flex: 1;
}

/* Arabic */
.ayah-arabic-text {
  font-size: 34px;
  line-height: 2;
  text-align: right;
  color: var(--text-main);
  margin-bottom: 18px;
}

/* Transliteration */
.ayah-transliteration-text {
  font-size: 15px;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* Translation */
.ayah-translation-box {
  background: var(--bg-card);
  border-left: 5px solid var(--secondary);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  transition: opacity 0.2s ease;
}

/* Hidden state */
.ayah-translation-box[style*="display: none"] {
  opacity: 0;
}

.translation-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 6px;
}

.ayah-translation-text {
  font-size: 16px;
  color: var(--text-main);
  line-height: 1.7;
}

.reading-stats {
    margin-top: 14px;
    font-size: 13px;
    color: #666;
}

/* Sidebar separator (between bookmark & actions) */
.ayah-sidebar-separator {
    width: 26px;
    height: 1px;
    background: rgba(255, 255, 255, 0.35);
    margin: 4px 0 6px;
    border-radius: 2px;
}

#filter-favorites.active {
    background: linear-gradient(135deg, #f5b301, #e0a800);
    color: #000;
}

.surah-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #444;
    text-decoration: none;
}

.surah-back-btn:hover {
    color: #000;
}



/* ==================================================
   FIXED BOTTOM AUDIO PLAYER
================================================== */
#quran-bottom-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 72px;
  background: var(--bg-card);
  border-top: 1px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  z-index: 9999;
  box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.08);
}

#quran-bottom-player .player-left,
#quran-bottom-player .player-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

#quran-bottom-player .player-center {
  flex: 1;
  text-align: center;
  padding: 0 20px;
  font-size: 14px;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#quran-bottom-player button,
#quran-bottom-player a {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--primary);
  padding: 8px;
}

#quran-bottom-player button:hover,
#quran-bottom-player a:hover {
  color: var(--primary-dark);
}

/* ==================================================
   MOBILE OPTIMIZATION
================================================== */
@media (max-width: 768px) {
  .ayah-card {
    flex-direction: column;
  }

  .ayah-sidebar {
    width: 100%;
    flex-direction: row;
    justify-content: space-around;
    padding: 10px;
  }

  .ayah-arabic-text {
    font-size: 28px;
  }

  .surah-arabic-title {
    font-size: 38px;
  }

  #quran-bottom-player {
    height: 64px;
    padding: 0 12px;
  }

  #quran-bottom-player .player-center {
    font-size: 12px;
  }
}
