:root{
  --bg:#f5efe4;
  --surface:#fffdf8;
  --primary:#1f5f3f;
  --primary-light:#2f7a57;
  --gold:#c8a96b;
  --text:#1f2937;
  --muted:#6b7280;
  --border:#e7dcc8;
  --shadow:0 12px 40px rgba(0,0,0,.06);
}

[data-theme="dark"]{
  --bg:#000;
  --surface:#0c0c0c;
  --primary:#2f7a57;
  --text:#f3f4f6;
  --muted:#9ca3af;
  --border:#1c1c1c;
  --shadow:0 12px 40px rgba(0,0,0,.5);
}

body{
  background:var(--bg);
  color:var(--text);
  font-family:'Inter',sans-serif;
}

/* TOP BAR */
.topbar{
  position:sticky;
  top:0;
  z-index:1000;
  background:rgba(255,253,248,.9);
  backdrop-filter:blur(12px);
  border-bottom:1px solid var(--border);
  padding:12px 0;
}

[data-theme="dark"] .topbar{
  background:rgba(0,0,0,.85);
}

.brand{
  font-weight:800;
  font-size:22px;
  color:var(--primary);
  text-decoration:none;
}

.icon-btn{
  width:42px;
  height:42px;
  border-radius:14px;
  border:1px solid var(--border);
  background:var(--surface);
}

/* LAYOUT */
.container-narrow{
  max-width:900px;
}

.page{
  padding:30px 0 100px;
}

/* SURAH HEADER */
.surah-header{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:26px;
  padding:30px;
  box-shadow:var(--shadow);
  margin-bottom:25px;
}

.surah-title{
  font-size:42px;
  font-weight:800;
}

.arabic-title{
  font-family:'Amiri',serif;
  font-size:34px;
  text-align:right;
  direction:rtl;
  margin-top:10px;
}

.meta{
  color:var(--muted);
  margin-top:10px;
}

.badge-soft{
  display:inline-block;
  padding:8px 12px;
  border-radius:999px;
  background:#edf7f0;
  color:#1f5f3f;
  font-size:12px;
  margin-right:6px;
}

[data-theme="dark"] .badge-soft{
  background:#132018;
  color:#8de2b0;
}

/* TOOLS BAR */
.tools{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:20px;
}

.tool-btn{
  border:1px solid var(--border);
  background:var(--surface);
  padding:10px 14px;
  border-radius:14px;
  font-size:13px;
}

/* AYAH CARD */
.ayah{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:22px;
  padding:28px;
  margin-bottom:18px;
  box-shadow:var(--shadow);
}

.ayah-number{
  width:34px;
  height:34px;
  border-radius:10px;
  background:linear-gradient(135deg,var(--primary),var(--primary-light));
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  font-weight:700;
}

.arabic{
  font-family:'Amiri',serif;
  font-size:34px;
  text-align:right;
  direction:rtl;
  line-height:2.2;
  margin-top:15px;
}

.urdu{
  font-family:'Noto Nastaliq Urdu',serif;
  font-size:22px;
  margin-top:14px;
  line-height:2.3;
}

.english{
  font-size:16px;
  color:var(--muted);
  margin-top:10px;
  line-height:1.8;
}

.ayah-actions{
  display:flex;
  gap:10px;
  margin-top:15px;
}

.small-btn{
  border:none;
  background:transparent;
  color:var(--muted);
}

/* PROGRESS */
.progress-bar{
  height:3px;
  background:linear-gradient(90deg,var(--primary),var(--gold));
  width:0%;
  position:fixed;
  top:0;
  left:0;
  z-index:9999;
}

/* SIDEBAR MINI */
.sidebar{
  position:sticky;
  top:90px;
}

.sidebar-box{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:22px;
  padding:20px;
  margin-bottom:20px;
  box-shadow:var(--shadow);
}

.sidebar-title{
  font-weight:700;
  margin-bottom:12px;
}

.link{
  display:flex;
  justify-content:space-between;
  padding:10px 0;
  border-bottom:1px solid var(--border);
  color:var(--text);
  text-decoration:none;
  font-size:14px;
}

.link:last-child{border:none;}

/* FOOTER */
.footer{
  text-align:center;
  padding:40px;
  color:var(--muted);
}

@media(max-width:992px){
  .arabic-title{font-size:26px;}
  .arabic{font-size:28px;}
}