*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Solarized Light ── */
:root {
  --base3:   #FDF6E3;
  --base2:   #EEE8D5;
  --base1:   #93A1A1;
  --base0:   #657B83;
  --base00:  #586E75;
  --base01:  #073642;
  --yellow:  #B58900;
  --orange:  #CB4B16;
  --cyan:    #2AA198;
  --blue:    #268BD2;
  --green:   #859900;
  --main-font: "Roboto Mono", monospace;
  --bg: #fdf6e3;
}

html, body {
  width: 100%;
  min-height: 100%;
  background: var(--base3);
}

body {
  font-family: var(--main-font);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin: 0;
}

/* ── Top bar ── */
.top-bar {
  background: var(--base2);
  border-bottom: 1px solid #D4CDB6;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.top-bar .logo {
font-family: var(--main-font); 
 font-size: 18px;
  color: var(--base01);
  letter-spacing: 1px;
}
.top-bar .logo span {
  color: var(--yellow);
  
}
.top-bar .ornament {
  color: var(--yellow);
  font-size: 18px;
  letter-spacing: 6px;
}

/* ── Surah selector ── */
.surah-selector-container {
  background: var(--base2);
  border-bottom: 1px solid #D4CDB6;
  padding: 8px 16px;
  display: flex;
  justify-content: center;
}
#surahSelect {
  width: 100%;
  max-width: 400px;
  font-family: var(--main-font);
  font-size: 14px;
  color: var(--base00);
  background: var(--base3);
  border: 1px solid #C4BB98;
  border-radius: 4px;
  padding: 8px 12px;
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23B58900' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(100% - 12px) center;
  transition: all 0.2s;
}
#surahSelect:hover {
  border-color: var(--yellow);
}
#surahSelect:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 2px rgba(181, 137, 0, 0.1);
}

/* ── Progress bar ── */
.progress-bar {
  height: 2px;
  background: var(--base2);
}
.progress-fill {
  height: 100%;
  background: var(--yellow);
  transition: width .3s ease;
}

/* ── Main content ── */
.content {
  flex: 1;
  padding-bottom: 100px;
}

/* ── Surah hero ── */
.surah-hero {
  background: var(--base2);
  border-bottom: 1px solid #D4CDB6;
  padding: 24px 20px 22px;
  text-align: center;
  position: relative;
}
.surah-hero::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 50%;
  transform: translateX(-50%);
  width: 48px; height: 2px;
  background: var(--yellow);
}
.surah-badge {
  display: inline-block;
  border: 1px solid #C4BB98;
  padding: 2px 14px;
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--base1);
  margin-bottom: 10px;
}
.surah-name-en {
  font-family: var(--main-font);
  font-size: 24px;
  color: var(--base01);
  font-weight: 400;
  margin-bottom: 5px;
}
.surah-name-ar {
  font-family: 'Noto Naskh Arabic', serif;
  font-size: 16px;
  color: var(--base0);
  direction: rtl;
  margin-bottom: 5px;
}
.surah-meta {
  font-size: 11px;
  color: var(--base1);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* ── Ayah cards ── */
.ayah-card {
  background: var(--base3);
  border-bottom: 1px solid var(--base2);
  padding: 26px 20px 22px;
}

.ayah-num-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}
.ayah-num {
  width: 28px; height: 28px;
  border: 1px solid #C4BB98;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  color: var(--yellow);
  font-family: var(--main-font);
}

.arabic-text {
  font-family: 'Noto Naskh Arabic', serif;
  font-size: 27px;
  line-height: 2.0;
  color: var(--base01);
  direction: rtl;
  text-align: center;
  margin-bottom: 16px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 16px 14px;
}
.divider .line { flex: 1; height: 1px; background: var(--base2); }
.divider .gem { font-size: 10px; color: #C4BB98; }

.transliteration {
  font-size: 13px;
  color: var(--yellow);
  text-align: center;
  margin-bottom: 9px;
  padding: 0 10px;
  line-height: 1.65;
}
.translation {
  font-size: 15.5px;
  color: var(--base0);
  text-align: center;
  line-height: 1.85;
  padding: 0 6px;
}
.translation.turkish {
  margin-bottom: 8px;
}
.translation.english {
  font-size: 14px;
  color: var(--base1);
}

/* ── Bottom nav ── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--base2);
  border-top: 1px solid #D4CDB6;
  padding: 10px 16px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 100;
}
.nav-btn {
  font-family: var(--main-font);
  font-size: 14px;
  letter-spacing: .8px;
  padding: 9px 20px;
  border: 1px solid #C4BB98;
  color: var(--base0);
  background: var(--base3);
  cursor: pointer;
  border-radius: 2px;
  transition: all .18s;
  flex: 0 0 auto;
}
.nav-btn:hover:not(:disabled) {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--base3);
}
.nav-btn:disabled { opacity: .3; cursor: not-allowed; }
.nav-btn.primary {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--base3);
}
.nav-btn.primary:hover:not(:disabled) {
  background: #9A7200;
  border-color: #9A7200;
}
.nav-info {
  flex: 1;
  text-align: center;
}
.nav-info .ayah-range {
  font-family: var(--main-font);
  font-size: 15px;
  color: var(--base00);
  display: block;
}
.nav-info .ayah-total {
  font-size: 10px;
  color: var(--base1);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* ── Fade ── */
.ayah-list { transition: opacity .22s, transform .22s; }
.ayah-list.fading { opacity: 0; transform: translateY(6px); }

/* ── Expand Button ── */
.expand-btn {
  margin-top: 16px;
  padding: 6px 16px;
  background: transparent;
  border: 1px solid var(--yellow);
  color: var(--yellow);
  font-family: var(--main-font);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}
.expand-btn:hover {
  background: var(--yellow);
  color: var(--base3);
}

body.expanded-mode .content {
  padding-bottom: 40px;
}

.no-data {
  text-align: center;
  padding: 40px;
  color: var(--base1);
  font-family: var(--main-font);
}
