@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&family=Outfit:wght@300;400;500;600;700&family=Noto+Sans+Bengali:wght@400;500;600;700&display=swap');

:root {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1e293b;
  --bg-card-active: #3e3812;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-arabic: #00e699;
  --text-gold: #fbbf24;
  --accent-color: #0d9488;
  --accent-glow: rgba(13, 148, 136, 0.3);
  --active-highlight-bg: #42380d;
  --active-highlight-text: #fef08a;
  --border-color: rgba(255, 255, 255, 0.1);
  --glass-bg: rgba(30, 41, 59, 0.92);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
  --font-arabic: 'Amiri', serif;
  --font-sans: 'Outfit', sans-serif;
  --font-bengali: 'Noto Sans Bengali', sans-serif;
  --arabic-font-size: 2rem;
}

[data-theme="light"] {
  --bg-primary: #f1f5f9;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-active: #fffde7;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-arabic: #0f766e;
  --text-gold: #d97706;
  --accent-color: #0d9488;
  --accent-glow: rgba(13, 148, 136, 0.2);
  --active-highlight-bg: #fffde7;
  --active-highlight-text: #854d0e;
  --border-color: rgba(0, 0, 0, 0.08);
  --glass-bg: rgba(255, 255, 255, 0.92);
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 20px rgba(0,0,0,0.1);
}

/* Modern Sleek Custom Scrollbar for Entire Website */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: #10b981;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #059669;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  scrollbar-width: thin;
  scrollbar-color: #10b981 var(--bg-primary);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.65rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-primary);
  text-decoration: none;
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #0d9488, #0f766e);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
  box-shadow: 0 0 12px var(--accent-glow);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nav-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 500;
  min-height: 36px;
  text-decoration: none;
}

.nav-btn:hover, .nav-btn.active {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

/* Main Container */
.main-container {
  max-width: 980px;
  margin: 1rem auto;
  width: 94%;
  flex: 1;
}

/* Surah Banner */
.surah-banner {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-radius: 16px;
  padding: 1.75rem 1.25rem;
  text-align: center;
  border: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-lg);
}

.surah-title-ar {
  font-family: var(--font-arabic);
  font-size: clamp(2rem, 6vw, 3rem);
  color: var(--text-gold);
  margin-bottom: 0.4rem;
}

.surah-title-en {
  font-size: clamp(1.1rem, 3.5vw, 1.4rem);
  font-weight: 600;
  color: var(--text-primary);
}

.surah-info {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 0.4rem;
}

.surah-header-bar {
  background: #0d9488;
  color: white;
  padding: 0.85rem 1.25rem;
  border-radius: 8px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
}

.quick-select {
  padding: 0.6rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.95rem;
  width: 100%;
  max-width: 400px;
  cursor: pointer;
}

.bismillah {
  font-family: var(--font-arabic);
  font-size: clamp(2rem, 5vw, 2.8rem);
  color: var(--text-arabic);
  text-align: center;
  margin: 1rem 0 1.5rem;
}

.compact-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.compact-btn {
  background: #0d9488;
  color: white;
  border: none;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.compact-btn:hover, .compact-btn.active {
  background: #0f766e;
}

.quran-reader-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.quran-reader-container.line-by-line .ayah-item {
  padding: 0.85rem 1rem;
  border-bottom: 1px dashed var(--border-color);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quran-reader-container.line-by-line .ayah-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.ayah-item.active-ayah {
  background-color: var(--active-highlight-bg) !important;
  border: 1.5px solid var(--text-gold) !important;
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.25);
}

.ayah-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.4rem;
}

.ayah-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--accent-color);
  color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.ayah-arabic-text {
  font-family: var(--font-arabic);
  font-size: var(--arabic-font-size);
  line-height: 2;
  direction: rtl;
  text-align: right;
  flex: 1;
  color: var(--text-primary);
}

.ayah-item.active-ayah .ayah-arabic-text {
  color: var(--active-highlight-text);
  font-weight: 700;
}

.ayah-translation-text {
  font-family: var(--font-bengali);
  font-size: 0.98rem;
  color: var(--text-secondary);
  line-height: 1.5;
  padding-left: 2.8rem;
}

.ayah-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.25rem;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.ayah-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-color);
}

.player-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color);
  padding: 0.65rem 1rem;
  box-shadow: 0 -10px 25px rgba(0,0,0,0.3);
}

.player-container {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.player-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 180px;
}

.reciter-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-color);
  flex-shrink: 0;
}

.playing-title {
  font-weight: 600;
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.playing-reciter {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.player-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  flex: 1;
}

.control-buttons {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-play-main {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-color);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  cursor: pointer;
  box-shadow: 0 0 12px var(--accent-glow);
  flex-shrink: 0;
}

.progress-container {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  max-width: 450px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.progress-bar {
  flex: 1;
  height: 6px;
  background: var(--bg-secondary);
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent-color);
  width: 0%;
}

.action-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
}

@media (max-width: 768px) {
  .navbar { padding: 0.6rem 0.85rem; }
  .brand span { font-size: 1.05rem; }
  .nav-controls { gap: 0.3rem; }
  .nav-btn { padding: 0.35rem 0.5rem; font-size: 0.78rem; min-height: 32px; }
  .main-container { width: 96%; margin: 0.5rem auto; }
  .surah-header-bar { font-size: 0.95rem; padding: 0.75rem 0.85rem; }
  .compact-btn { padding: 0.4rem 0.65rem; font-size: 0.8rem; }
  .ayah-translation-text { padding-left: 0; margin-top: 0.3rem; }
  .quran-split-grid { grid-template-columns: 1fr !important; gap: 0.85rem !important; }
  .quran-sidebar { position: static !important; }
  .quran-reader-container { max-height: none !important; }
}
