:root {
  --green: #0f6b50;
  --green-dark: #084332;
  --gold: #c9a227;
  --cream: #faf7ef;
  --white: #ffffff;
  --text: #1f2d2a;
  --muted: #6f7f7a;
  --border: rgba(15, 107, 80, 0.14);
  --shadow: 0 20px 60px rgba(8, 67, 50, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Cairo", sans-serif;
  background:
    radial-gradient(circle at top right, rgba(201, 162, 39, 0.12), transparent 30%),
    linear-gradient(135deg, #f9f5ea, #eef7f2);
  color: var(--text);
}

/* .topbar {
  height: 90px;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
} */

.topbar {
    min-height: 80px;
    background: linear-gradient(135deg, #063e32, #086348);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 44px;
    border-bottom-left-radius: 42px;
    box-shadow: var(--shadow);
} 

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand h1 {
  font-size: 22px;
  margin: 0;
  color: var(--green-dark);
  font-weight: 800;
}

.nav-links {
  display: flex;
  gap: 10px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 600;
}

.nav-links a.active,
.nav-links a:hover {
  background: var(--green);
  color: white;
}

.top-actions {
  display: flex;
  gap: 8px;
}

button {
  font-family: inherit;
  border: none;
  cursor: pointer;
}

.top-actions button,
.advanced-btn,
.search-box button {
  background: var(--green);
  color: white;
  padding: 11px 18px;
  border-radius: 999px;
  font-weight: 700;
}

.profile {
  width: 42px;
  height: 42px;
  padding: 0 !important;
  background: var(--gold) !important;
}

.page-shell {
  max-width: 1500px;
  margin: auto;
  padding: 34px;
}

.search-row {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 28px;
}

.surah-select,
.search-box,
.card,
.bottom-features article {
  background: rgba(255,255,255,0.82);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.surah-select {
  padding: 18px 22px;
  border-radius: 24px;
}

.surah-select strong {
  display: block;
  color: var(--green-dark);
}

.surah-select span {
  color: var(--muted);
  font-size: 14px;
}

.search-box {
  border-radius: 999px;
  padding: 8px;
  display: flex;
  gap: 10px;
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 0 18px;
  font-size: 16px;
}

.layout-grid {
  display: grid;
  grid-template-columns: 330px 1fr 360px;
  gap: 24px;
  align-items: start;
}

.card {
  border-radius: 32px;
}

.timeline-panel,
.tafsir-panel {
  padding: 24px;
}

.panel-title,
.tafsir-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-title h2,
.tafsir-head h2 {
  margin: 0;
  font-size: 20px;
  color: var(--green-dark);
}

.tabs {
  display: flex;
  gap: 8px;
  margin: 18px 0;
}

.tabs button {
  padding: 8px 14px;
  border-radius: 999px;
  background: #edf4ef;
  color: var(--green-dark);
  font-weight: 700;
}

.tabs button.active {
  background: var(--green);
  color: white;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.scholar {
  display: grid;
  grid-template-columns: 34px 1fr 48px;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 22px;
  background: #f7fbf8;
  border: 1px solid var(--border);
}

.scholar.active {
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: white;
}

.scholar h3,
.scholar p {
  margin: 0;
}

.scholar p {
  font-size: 13px;
  opacity: 0.75;
}

.step,
.avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 800;
}

.step {
  width: 30px;
  height: 30px;
  background: rgba(201,162,39,0.22);
  color: var(--gold);
}

.avatar {
  width: 48px;
  height: 48px;
  background: var(--cream);
  color: var(--green-dark);
}

.scholar button {
  margin-top: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: white;
  color: var(--green-dark);
  font-weight: 700;
}

.quran-area {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ayah-card {
  padding: 38px;
  position: relative;
  overflow: hidden;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.92), rgba(250,247,239,0.92));
}

.ayah-badge {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(15,107,80,0.1);
  color: var(--green-dark);
  font-weight: 700;
  margin-bottom: 24px;
}

.ayah-text {
  font-family: "Amiri", serif;
  font-size: 35px;
  line-height: 2.3;
  color: #162b25;
  margin: 0;
}

.corner {
  position: absolute;
  width: 90px;
  height: 90px;
  border-color: var(--gold);
  opacity: 0.45;
}

.top-right {
  top: 22px;
  right: 22px;
  border-top: 3px solid;
  border-right: 3px solid;
}

.bottom-left {
  bottom: 22px;
  left: 22px;
  border-bottom: 3px solid;
  border-left: 3px solid;
}

.ayah-actions,
.feature-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.ayah-actions button,
.feature-actions button {
  padding: 11px 18px;
  border-radius: 999px;
  background: #edf4ef;
  color: var(--green-dark);
  font-weight: 700;
}

.ayah-actions .play {
  background: var(--gold);
  color: white;
}

.feature-actions {
  padding: 18px;
  margin-top: 0;
}

.tafsir-open p {
  line-height: 2;
  color: #354642;
}

.tafsir-open a {
  color: var(--green);
  font-weight: 800;
  text-decoration: none;
}

.small-icons {
  display: flex;
  gap: 6px;
}

.small-icons button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #edf4ef;
}

details {
  margin-top: 12px;
  padding: 16px;
  border-radius: 18px;
  background: #f7fbf8;
  border: 1px solid var(--border);
}

summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--green-dark);
}

summary span {
  float: left;
  font-size: 13px;
  color: var(--muted);
}

.bottom-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 28px;
}

.bottom-features article {
  padding: 22px;
  border-radius: 24px;
}

.bottom-features strong {
  display: block;
  color: var(--green-dark);
  margin-bottom: 6px;
}

.bottom-features span {
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 1200px) {
  .layout-grid {
    grid-template-columns: 1fr;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .bottom-features {
    grid-template-columns: 1fr 1fr;
  }

  .nav-links {
    display: none;
  }
}

@media (max-width: 700px) {
  .topbar {
    padding: 0 18px;
  }

  .brand h1 {
    font-size: 16px;
  }

  .page-shell {
    padding: 18px;
  }

  .ayah-text {
    font-size: 25px;
  }

  .bottom-features {
    grid-template-columns: 1fr;
  }
}