
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Amiri+Quran&display=swap');

:root {
  --primary: #0D6B3E;
  --primary-light: #16A34A;
  --bg-color: #F8FAF9;
  --surface: #FFFFFF;
  --surface-hover: #F0Fdf4;
  --text-main: #1F2937;
  --text-muted: #6B7280;
  --border: #E5E7EB;
  --radius: 16px;
  --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
  --glass-bg: rgba(255, 255, 255, 0.85);
  --show-roman: block;
  --show-english: block;
  --show-urdu: block;
  --show-hindi: block;
  --arabic-size: 2.5rem;
  --trans-size: 1.1rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #10B981; --primary-light: #34D399; --bg-color: #0F172A; --surface: #1E293B; --surface-hover: #334155; --text-main: #F8FAFC; --text-muted: #94A3B8; --border: #334155; --glass-bg: rgba(30, 41, 59, 0.85);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Outfit', sans-serif; background: var(--bg-color); color: var(--text-main); line-height: 1.6; transition: 0.3s; }
a { text-decoration: none; }

.arabic-text { font-family: 'Amiri Quran', serif; text-align: right; direction: rtl; color: var(--text-main); }
.bismillah { font-family: 'Amiri Quran', serif; font-size: 2.2rem; text-align: center; color: var(--primary); margin: 2rem 0; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

header { position: sticky; top: 0; z-index: 50; background: var(--glass-bg); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); padding: 1rem 0; }
.nav-content { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a { color: var(--text-muted); font-weight: 500; }

.hero { padding: 6rem 0; text-align: center; background: radial-gradient(circle at top, var(--surface-hover), var(--bg-color)); border-bottom: 1px solid var(--border); }
.hero h1 { font-size: 3.5rem; color: var(--primary); }
.btn { display: inline-flex; background: var(--primary); color: white; padding: 0.875rem 2rem; border-radius: 99px; font-weight: 600; cursor: pointer; border: none; }

.surah-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; padding: 3rem 0; }
.surah-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; color: var(--text-main); display: flex; align-items: center; gap: 1.5rem; }
.surah-card:hover { transform: translateY(-4px); background: var(--surface-hover); }
.surah-card-num { width: 48px; height: 48px; border-radius: 12px; background: var(--bg-color); display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--primary); border: 1px solid var(--border); }
.surah-card-info { flex: 1; }
.surah-card-title { font-size: 1.2rem; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.surah-card-arabic { font-family: 'Amiri Quran', serif; font-size: 1.5rem; color: var(--primary); }

.reader-header { text-align: center; padding: 4rem 0 2rem; }
.reader-controls { position: sticky; top: 70px; background: var(--glass-bg); backdrop-filter: blur(12px); padding: 1rem; border-radius: var(--radius); border: 1px solid var(--border); margin-bottom: 2rem; display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; z-index: 40; box-shadow: var(--shadow); }
.control-btn { padding: 0.5rem 1rem; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); color: var(--text-main); cursor: pointer; font-weight: 500; }
.control-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

.info-box { background: var(--surface); border-left: 4px solid var(--primary); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 2rem; box-shadow: var(--shadow); }
.audio-bar { display: flex; gap: 1rem; justify-content: center; background: var(--surface-hover); padding: 1rem; border-radius: var(--radius); border: 1px solid var(--border); margin-bottom: 2rem; flex-wrap: wrap; }
.audio-bar a { color: var(--primary); font-weight: 600; display: flex; align-items: center; gap: 0.5rem; }

.ayah-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; margin-bottom: 1.5rem; position: relative; box-shadow: var(--shadow); }
.ayah-num { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: white; font-weight: 600; margin-bottom: 1.5rem; }
.ayah-arabic { font-size: var(--arabic-size); }
.translation-block { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); font-size: var(--trans-size); }
.translation-lang { font-size: 0.75rem; text-transform: uppercase; color: var(--primary); font-weight: 700; margin-bottom: 0.5rem; }
.tr-roman { display: var(--show-roman); }
.tr-english { display: var(--show-english); }
.tr-urdu { display: var(--show-urdu); }
.tr-hindi { display: var(--show-hindi); }

.copy-btn { position: absolute; top: 1rem; right: 1rem; background: var(--bg-color); border: 1px solid var(--border); padding: 0.5rem 1rem; border-radius: 99px; cursor: pointer; color: var(--text-main); font-weight: 500; transition: 0.2s; }
.copy-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--text-main); color: var(--bg-color); padding: 1rem 2rem; border-radius: 99px; font-weight: 600; opacity: 0; transition: 0.3s; z-index: 1000; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-10px); }

.fade-in { animation: fadeIn 0.5s ease forwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
