/* Basic reset */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
:root{
  --bg: #fff;
  --text: #0f172a;
  --muted: #475569;
  --card: #ffffff;
  --border: #e2e8f0;
  --accent: #0ea5e9;
  --arabic-font: 'Scheherazade New', serif;
  --latin-font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif;
}

.dark{
  --bg: #0b1220;
  --text: #e5e7eb;
  --muted: #a1a1aa;
  --card: #0f172a;
  --border: #1f2a44;
  --accent: #22d3ee;
}

body{
  background: var(--bg);
  color: var(--text);
  font-family: var(--latin-font);
  line-height: 1.6;
}

.topbar{
  position: sticky; top: 0; z-index: 20;
  display:flex; align-items:center; justify-content:space-between;
  padding: 12px 16px; background: var(--card);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.brand{ display:flex; align-items:center; gap:10px; }
.brand .logo{
  font-size: 22px; background: var(--accent); color:#001018;
  padding: 4px 10px; border-radius: 12px; display:inline-block;
}
.brand h1{ font-size: 18px; margin:0; font-weight:600; }

.controls{ display:flex; align-items:center; gap:12px; flex-wrap: wrap; }

.select-wrap{ display:flex; align-items:center; gap:8px; font-size:14px; }
select{
  padding: 8px 10px; border-radius: 10px; border:1px solid var(--border);
  background: var(--bg); color: var(--text);
}

.btn{
  padding: 8px 12px; border-radius:12px; border:1px solid var(--border);
  background: var(--bg); color: var(--text); cursor:pointer;
}
.btn:hover{ border-color: var(--accent); }

.btn-ghost{
  padding: 4px 8px; border-radius:10px; border:1px solid var(--border);
  background: transparent; color: var(--text); cursor:pointer;
}

.container{ max-width: 980px; margin: 0 auto; padding: 20px 16px; }

.bismillah{
  text-align:center; font-size: 34px; margin: 8px 0 16px;
  font-family: var(--arabic-font); letter-spacing: 2px;
}

.surah-meta{
  display:flex; justify-content: space-between; align-items: center;
  border:1px solid var(--border); background: var(--card);
  padding: 10px 12px; border-radius: 14px; margin-bottom: 12px;
  font-size: 14px; color: var(--muted);
}

.verses{ display:flex; flex-direction: column; gap: 16px; }

.ayah{
  border:1px solid var(--border); background: var(--card);
  padding: 14px; border-radius: 16px;
  transition: border-color .2s, box-shadow .2s;
}

.ayah:focus-within, .ayah:hover{
  border-color: var(--accent);
  box-shadow: 0 6px 20px rgba(15,23,42,.08);
}

.ayah-top{ display:flex; gap:8px; align-items:center; }
.ayah-number{ 
  display:inline-flex; align-items:center; justify-content:center;
  min-width: 34px; height: 34px; padding:0 10px;
  border-radius: 999px; border:1px solid var(--border); font-weight:600;
}

.arabic{
  font-family: var(--arabic-font);
  font-size: 28px; line-height: 2.1; margin: 10px 0 6px;
  word-spacing: 3px;
}

.translation{
  font-size: 16px; color: var(--muted); margin: 4px 0 0;
}

.footer{
  padding: 24px 16px; border-top: 1px solid var(--border);
  color: var(--muted); font-size: 14px;
}

.footer a{ color: var(--accent); text-decoration: none; }

/* Small screens */
@media (max-width: 640px){
  .arabic{ font-size: 24px; line-height: 2; }
  .topbar { gap: 8px; }
  .controls { gap: 8px; }
}
