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

:root {
  --bg: #fff;
  --bg2: #f5f5f0;
  --text: #1a1a1a;
  --text2: #555;
  --text3: #999;
  --border: #e0e0e0;
  --border2: #ccc;
  --green: #1a3a2a;
  --greenlight: #e8f0eb;
  --greentext: #1a3a2a;
  --gold: #c9a84c;
  --goldbg: #fdf6e3;
  --arabic-size: 22px;
  --card-bg: #fff;
}

.dark {
  --bg: #0f1f17;
  --bg2: #162b1f;
  --text: #e8e8e0;
  --text2: #a0b0a0;
  --text3: #607060;
  --border: #2a3e30;
  --border2: #3a5040;
  --green: #2a5a3a;
  --greenlight: rgba(26, 58, 42, 0.45);
  --greentext: #6ec99a;
  --gold: #d4a853;
  --goldbg: rgba(201, 168, 76, 0.12);
  --card-bg: #162b1f;
}

body {
  background: var(--bg);
  transition: background 0.2s;
}

.app {
  font-family: 'Nunito', sans-serif;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 0 3rem;
}

/* ── Header ── */

.header {
  background: var(--green);
  color: #f0e6c8;
  padding: 1rem 1.1rem 0.8rem;
  border-radius: 0 0 14px 14px;
  margin-bottom: 0.85rem;
}

.header-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0.6rem;
}

.logo {
  width: 36px;
  height: 36px;
  background: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Amiri', serif;
  font-size: 18px;
  color: #1a3a2a;
  font-weight: 700;
  flex-shrink: 0;
}

.app-name {
  font-family: 'Lora', serif;
  font-size: 21px;
  font-weight: 500;
  color: #f0e6c8;
  letter-spacing: 0.03em;
}

.app-sub {
  font-size: 11px;
  color: #a8c4b0;
}

.header-right {
  margin-left: auto;
  display: flex;
  gap: 6px;
  align-items: center;
}

.hbtn {
  background: rgba(255, 255, 255, 0.15);
  border: 0.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 99px;
  padding: 5px 11px;
  cursor: pointer;
  font-size: 12px;
  color: #f0e6c8;
  font-family: 'Nunito', sans-serif;
  transition: background 0.15s;
  font-weight: 500;
}

.hbtn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.hbtn.on {
  background: var(--gold);
  color: #1a3a2a;
  border-color: var(--gold);
}

.search-wrap {
  position: relative;
}

.search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  background: none;
  border: none;
  color: #a8c4b0;
  font-size: 13px;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
}

.search-clear:hover {
  color: #f0e6c8;
}

.search-wrap input {
  width: 100%;
  padding: 9px 32px 9px 36px;
  background: rgba(255, 255, 255, 0.12);
  border: 0.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #f0e6c8;
  font-size: 14px;
  font-family: 'Nunito', sans-serif;
  outline: none;
}

.search-wrap input::placeholder {
  color: #a8c4b0;
}

.search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.6;
  font-size: 15px;
  color: #f0e6c8;
}

/* ── Arabic size dropdown ── */

.size-wrap {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.15);
  border: 0.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 99px;
  padding: 4px 11px;
  cursor: pointer;
  transition: background 0.15s;
}

.size-wrap:hover {
  background: rgba(255, 255, 255, 0.22);
}

.size-select {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: none;
  outline: none;
  font-size: 12px;
  color: #f0e6c8;
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  cursor: pointer;
  padding-right: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='%23a8c4b0'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0 center;
}

.size-select option {
  background: #1a3a2a;
  color: #f0e6c8;
  font-size: 14px;
}


/* ── Sticky nav ── */

.nav-sticky {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  padding-top: 0.6rem;
}

/* ── Daily dua banner ── */

.doh-banner {
  margin: 0 1.1rem 0.85rem;
  background: var(--green);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  border: 0.5px solid rgba(255, 255, 255, 0.1);
}

.doh-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gold);
  text-transform: uppercase;
}

.doh-title {
  font-family: 'Lora', serif;
  font-size: 13px;
  color: #d4e8d8;
  margin-bottom: 5px;
}

.doh-arabic {
  font-family: 'Amiri', serif;
  font-size: 20px;
  line-height: 1.8;
  text-align: right;
  direction: rtl;
  color: #f0e6c8;
  margin-bottom: 4px;
}

.doh-trans {
  font-size: 11.5px;
  color: #a8c4b0;
  line-height: 1.5;
  margin-bottom: 4px;
}

.doh-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.doh-btn {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 99px;
  border: 0.5px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #f0e6c8;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
}

/* ── Tabs ── */

.tabs {
  display: flex;
  gap: 6px;
  padding: 0 1.1rem;
  margin-bottom: 0.6rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  white-space: nowrap;
  padding: 6px 13px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 500;
  border: 0.5px solid var(--border2);
  color: var(--text2);
  background: var(--card-bg);
  cursor: pointer;
  transition: all 0.15s;
}

.tab.active {
  background: var(--green);
  color: #f0e6c8;
  border-color: var(--green);
}

.tab:hover:not(.active) {
  background: var(--bg2);
}

.fav-badge {
  background: var(--gold);
  color: #1a3a2a;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 99px;
  display: none;
  margin-left: 3px;
}

.fav-badge.show {
  display: inline;
}

/* ── Filter chips ── */

.filter-row {
  display: flex;
  gap: 5px;
  padding: 0 1.1rem;
  margin-bottom: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-row::-webkit-scrollbar {
  display: none;
}

.chip {
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 12px;
  border: 0.5px solid var(--border);
  color: var(--text3);
  background: none;
  cursor: pointer;
  transition: all 0.12s;
}

.chip.active {
  background: var(--greenlight);
  color: var(--greentext);
  border-color: var(--greentext);
}

/* ── Cards ── */

.cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 1.1rem;
}

.card {
  background: var(--card-bg);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  transition: border-color 0.15s;
}

.card:hover {
  border-color: var(--border2);
}

.card.is-fav {
  border-color: rgba(201, 168, 76, 0.4);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.55rem;
}

.ctag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--greenlight);
  color: var(--greentext);
}

.cactions {
  display: flex;
  gap: 6px;
}

.fbtn {
  background: none;
  border: 0.5px solid var(--border);
  border-radius: 8px;
  padding: 3px 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text3);
  transition: all 0.15s;
}

.fbtn:hover,
.fbtn.on {
  border-color: var(--gold);
  color: var(--gold);
}

.fbtn.on {
  background: var(--goldbg);
}

.abtn {
  font-size: 12px;
  color: var(--text3);
  background: none;
  border: 0.5px solid var(--border);
  border-radius: 8px;
  padding: 3px 9px;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  transition: all 0.15s;
}

.abtn:hover {
  border-color: var(--green);
  color: var(--greentext);
}

.abtn.ok {
  color: var(--greentext);
  border-color: var(--green);
}


.card-title {
  font-family: 'Lora', serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.6rem;
}

.arabic {
  font-family: 'Amiri', serif;
  font-size: var(--arabic-size);
  line-height: 1.9;
  text-align: right;
  direction: rtl;
  color: var(--greentext);
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 0.5px solid var(--border);
}

.latin {
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 13px;
  color: var(--text2);
  line-height: 1.6;
  margin-bottom: 0.4rem;
}

.transl {
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.src {
  font-size: 11.5px;
  color: var(--text3);
  display: flex;
  align-items: center;
  gap: 5px;
}

.src-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}

/* ── Misc ── */

.empty {
  text-align: center;
  padding: 2.5rem 1.25rem;
  color: var(--text3);
  font-size: 14px;
  line-height: 1.8;
}

.rc {
  font-size: 11.5px;
  color: var(--text3);
  padding: 0.3rem 1.1rem 0.5rem;
  border-bottom: 0.5px solid var(--border);
  margin-bottom: 0.75rem;
}

.fseclabel {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--gold);
  text-transform: uppercase;
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.fseclabel::after {
  content: '';
  flex: 1;
  height: 0.5px;
  background: rgba(201, 168, 76, 0.3);
}

/* ── Footer ── */

.footer {
  text-align: center;
  font-size: 11px;
  color: var(--text3);
  padding: 2rem 1.25rem 0;
  line-height: 1.8;
}

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