/* ═══════════════════════════════════════════════════════════════
   رمضان ١٤٤٧ — STYLESHEET
   Aesthetic: Nocturnal Islamic Sanctuary
   Deep navy + warm gold + geometric patterns
   Mobile-first, RTL
═══════════════════════════════════════════════════════════════ */

/* ── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-deep:       #05090f;
  --bg-mid:        #091524;
  --bg-card:       #0c1e36;
  --bg-card-2:     #0f2448;
  --bg-card-hover: #132c55;
  --gold:          #c9a84c;
  --gold-light:    #e8c96a;
  --gold-dim:      #7a6330;
  --gold-glow:     rgba(201, 168, 76, 0.25);
  --cream:         #f0e0b8;
  --cream-dim:     #9a8060;
  --text-1:        #e8dcc8;
  --text-2:        #a89070;
  --text-3:        #6a5840;
  --mercy:         #1a5c8a;
  --mercy-light:   #2272aa;
  --mercy-bg:      rgba(26, 92, 138, 0.3);
  --forgiveness:   #1a6b3a;
  --forgiveness-light: #22854a;
  --forgiveness-bg: rgba(26, 107, 58, 0.3);
  --freedom:       #6b2a6b;
  --freedom-light: #8a3a8a;
  --freedom-bg:    rgba(107, 42, 107, 0.3);
  --radius-sm:     8px;
  --radius-md:     14px;
  --radius-lg:     20px;
  --radius-xl:     28px;
  --border-gold:   rgba(201, 168, 76, 0.2);
  --border-gold-2: rgba(201, 168, 76, 0.4);
  --shadow:        0 8px 32px rgba(0,0,0,0.5);
  --shadow-gold:   0 4px 24px rgba(201,168,76,0.15);
  --font-display:  'Amiri', 'Georgia', serif;
  --font-quran:    'Amiri Quran', 'Amiri', serif;
  --font-ui:       'Tajawal', 'Arial', sans-serif;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-ui);
  background-color: var(--bg-deep);
  color: var(--text-1);
  min-height: 100vh;
  padding-bottom: 80px;
  overflow-x: hidden;
  direction: rtl;
  position: relative;
}

/* ── AMBIENT BACKGROUND ───────────────────────────────────── */
.bg-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.12;
  animation: glowPulse 8s ease-in-out infinite alternate;
}

.glow-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, #1a4a8a, transparent 70%);
  top: -20%; left: -20%;
  animation-delay: 0s;
}
.glow-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #c9a84c, transparent 70%);
  bottom: 20%; right: -20%;
  animation-delay: 3s;
}
.glow-3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #6b2a6b, transparent 70%);
  bottom: -10%; left: 30%;
  animation-delay: 6s;
}

@keyframes glowPulse {
  from { opacity: 0.08; transform: scale(1); }
  to   { opacity: 0.18; transform: scale(1.1); }
}

.geo-pattern {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.4;
}

/* ── SITE HEADER ──────────────────────────────────────────── */
.site-header {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 28px 20px 20px;
  background: linear-gradient(180deg, rgba(5,9,15,0.98) 0%, rgba(5,9,15,0) 100%);
  border-bottom: 1px solid var(--border-gold);
}

.header-bismillah {
  font-family: var(--font-quran);
  font-size: 1.1rem;
  color: var(--gold);
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  opacity: 0.85;
  animation: fadeInDown 0.8s ease both;
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  animation: fadeInDown 0.8s ease 0.15s both;
}

.crescent-wrap {
  font-size: 2.2rem;
  color: var(--gold);
  animation: crescentFloat 4s ease-in-out infinite;
  display: inline-block;
}

@keyframes crescentFloat {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50%       { transform: translateY(-6px) rotate(5deg); }
}

.site-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--cream);
  line-height: 1;
}

.gold-text {
  color: var(--gold-light);
  text-shadow: 0 0 20px rgba(201,168,76,0.5);
}

.site-sub {
  font-size: 0.85rem;
  color: var(--text-2);
  margin-top: 4px;
  letter-spacing: 0.08em;
  animation: fadeInDown 0.8s ease 0.3s both;
}

.header-clock {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--text-2);
  margin-top: 10px;
  letter-spacing: 0.05em;
  animation: fadeInDown 0.8s ease 0.45s both;
}

/* ── BOTTOM NAV ───────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  right: 0; left: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  background: rgba(5, 9, 15, 0.97);
  border-top: 1px solid var(--border-gold);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 8px 0 max(8px, env(safe-area-inset-bottom));
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-decoration: none;
  color: var(--text-3);
  transition: color 0.2s, transform 0.15s;
  padding: 4px 0;
}

.nav-icon { font-size: 1.3rem; line-height: 1; }
.nav-label { font-size: 0.6rem; font-weight: 500; letter-spacing: 0.04em; white-space: nowrap; }

.nav-item.active {
  color: var(--gold);
}
.nav-item:active { transform: scale(0.9); }

/* ── MAIN & SECTIONS ──────────────────────────────────────── */
main {
  position: relative;
  z-index: 1;
}

.section {
  padding: 24px 0 8px;
  scroll-margin-top: 20px;
}

.section-inner {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--cream);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.title-icon { font-size: 1.2rem; }

/* ── SHARED CARD STYLE ────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow);
}

/* ── TODAY SECTION ────────────────────────────────────────── */

/* Banners */
.special-banner,
.qadr-banner {
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
  text-align: center;
  animation: fadeInDown 0.5s ease both;
}

.special-banner {
  background: linear-gradient(135deg, var(--gold-dim), #5a4010);
  border: 1px solid var(--gold);
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
}

.qadr-banner {
  background: linear-gradient(135deg, rgba(107,42,107,0.6), rgba(30,10,50,0.9));
  border: 1px solid rgba(200, 150, 255, 0.4);
  box-shadow: 0 0 30px rgba(150, 80, 200, 0.2);
}

.qadr-stars { font-size: 1.4rem; letter-spacing: 8px; margin-bottom: 8px; }
.qadr-headline {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: #ddb8ff;
  font-weight: 700;
}
.qadr-sub { font-size: 0.9rem; color: #b890e0; margin: 4px 0 10px; }
.qadr-dua {
  font-family: var(--font-quran);
  font-size: 1.1rem;
  color: var(--gold-light);
  direction: rtl;
  line-height: 1.8;
  background: rgba(0,0,0,0.3);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border-right: 3px solid var(--gold);
}

.hidden { display: none !important; }

/* Day hero card */
.day-hero-card {
  background: linear-gradient(135deg, var(--bg-card-2) 0%, #0a1a30 100%);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-xl);
  padding: 24px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-gold), var(--shadow);
  animation: fadeInUp 0.6s ease both;
  position: relative;
  overflow: hidden;
}

.day-hero-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 150px; height: 150px;
  background: radial-gradient(circle, rgba(201,168,76,0.1), transparent 70%);
  border-radius: 50%;
}

.day-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.day-number-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.day-small-label {
  font-size: 0.75rem;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.day-big-num {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1;
  text-shadow: 0 0 30px rgba(201,168,76,0.4);
}

.moon-deco {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.moon-crescent {
  font-size: 2rem;
  animation: crescentFloat 5s ease-in-out infinite;
}

.moon-stars {
  font-size: 0.7rem;
  color: var(--gold-dim);
  letter-spacing: 4px;
}

.day-dates-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.hijri-date-text {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--cream);
  font-weight: 700;
}

.gregorian-date-text {
  font-size: 0.85rem;
  color: var(--text-2);
}

.dates-sep { color: var(--gold-dim); }

.ashr-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.ashr-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
}

.ashr-badge.mercy { background: var(--mercy-bg); color: #6bbde0; border: 1px solid var(--mercy-light); }
.ashr-badge.forgiveness { background: var(--forgiveness-bg); color: #6bdb9a; border: 1px solid var(--forgiveness-light); }
.ashr-badge.freedom { background: var(--freedom-bg); color: #e08be0; border: 1px solid var(--freedom-light); }

.ashr-theme-text {
  font-size: 0.85rem;
  color: var(--text-2);
}

.today-theme {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--cream);
  font-weight: 700;
  border-top: 1px solid var(--border-gold);
  padding-top: 12px;
  margin-top: 4px;
}

/* Progress widget */
.progress-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
  animation: fadeInUp 0.6s ease 0.1s both;
}

.progress-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.progress-title { font-size: 0.9rem; color: var(--text-2); }
.progress-label { font-size: 0.85rem; color: var(--gold); font-weight: 700; }

.progress-track {
  width: 100%;
  height: 10px;
  background: rgba(255,255,255,0.05);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--mercy-light), var(--forgiveness-light), var(--freedom-light));
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(201,168,76,0.3);
}

.ashr-dividers {
  display: flex;
  justify-content: space-around;
  margin-top: 10px;
}

.ashr-div-label {
  font-size: 0.65rem;
  text-align: center;
  line-height: 1.4;
}
.mercy-color { color: #6bbde0; }
.forgiveness-color { color: #6bdb9a; }
.freedom-color { color: #e08be0; }

/* Stats row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
  animation: fadeInUp 0.6s ease 0.2s both;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 12px 8px;
  text-align: center;
  cursor: default;
}

.stat-icon { font-size: 1.1rem; margin-bottom: 4px; }
.stat-num {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold-light);
}
.stat-label {
  font-size: 0.62rem;
  color: var(--text-2);
  white-space: nowrap;
}

/* ── PRAYER TIMES ─────────────────────────────────────────── */

.city-chooser {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}

.city-chooser-prompt {
  font-size: 0.95rem;
  color: var(--text-2);
  margin-bottom: 14px;
  text-align: center;
}

.city-search-box {
  position: relative;
  margin-bottom: 14px;
}

.city-search-input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  color: var(--text-1);
  font-family: var(--font-ui);
  font-size: 0.95rem;
  padding: 10px 14px 10px 40px;
  outline: none;
  transition: border-color 0.2s;
  direction: rtl;
}
.city-search-input::placeholder { color: var(--text-3); }
.city-search-input:focus { border-color: var(--gold); }

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  pointer-events: none;
}

.cities-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 2px;
}

.cities-list::-webkit-scrollbar { width: 4px; }
.cities-list::-webkit-scrollbar-track { background: transparent; }
.cities-list::-webkit-scrollbar-thumb { background: var(--border-gold); border-radius: 2px; }

.city-option {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text-1);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  text-align: center;
}
.city-option:hover { background: rgba(201,168,76,0.1); border-color: var(--gold); }
.city-option:active { transform: scale(0.96); }

/* Prayer display */
.prayer-display { animation: fadeInUp 0.5s ease both; }

.prayer-city-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px 14px;
  background: rgba(201,168,76,0.08);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
}

.prayer-city-icon { font-size: 1.1rem; }
.prayer-city-label {
  flex: 1;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--cream);
  font-weight: 700;
}

.change-city-btn {
  background: none;
  border: 1px solid var(--border-gold);
  color: var(--gold);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}
.change-city-btn:hover { background: rgba(201,168,76,0.1); }

/* Next prayer widget */
.next-prayer-widget {
  background: linear-gradient(135deg, var(--bg-card-2), #0a1a30);
  border: 1px solid var(--border-gold-2);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  margin-bottom: 14px;
  box-shadow: var(--shadow-gold);
  position: relative;
  overflow: hidden;
}

.next-prayer-widget::before {
  content: '';
  position: absolute;
  top: -30px; left: 50%; transform: translateX(-50%);
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(201,168,76,0.08), transparent 70%);
  border-radius: 50%;
}

.npw-label { font-size: 0.8rem; color: var(--text-2); letter-spacing: 0.1em; margin-bottom: 4px; }
.npw-prayer-name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--cream);
  font-weight: 700;
  margin-bottom: 8px;
}
.npw-countdown {
  font-family: 'Tajawal', monospace;
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--gold-light);
  text-shadow: 0 0 20px rgba(201,168,76,0.4);
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.npw-athan-time {
  font-size: 0.85rem;
  color: var(--text-2);
}

/* Iftar/Suhoor row */
.iftar-suhoor-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.is-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 10px;
  border-radius: var(--radius-md);
  text-align: center;
}

.is-card.iftar-card { background: rgba(201,168,76,0.1); border: 1px solid rgba(201,168,76,0.3); }
.is-card.suhoor-card { background: rgba(26,92,138,0.2); border: 1px solid rgba(26,92,138,0.4); }

.is-icon { font-size: 1.5rem; }
.is-label { font-size: 0.75rem; color: var(--text-2); }
.is-time { font-family: var(--font-display); font-size: 1.2rem; color: var(--cream); font-weight: 700; }

/* Prayer cards grid */
.prayer-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.prayer-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 14px 8px;
  text-align: center;
  transition: transform 0.15s, box-shadow 0.15s;
}

.prayer-card.is-next {
  background: var(--bg-card-2);
  border-color: var(--gold);
  box-shadow: 0 0 15px rgba(201,168,76,0.2);
  transform: translateY(-2px);
}

.prayer-card.is-past { opacity: 0.5; }

.pc-icon { font-size: 1.4rem; margin-bottom: 4px; }
.pc-name { font-size: 0.8rem; color: var(--text-2); margin-bottom: 6px; }
.pc-time { font-family: var(--font-display); font-size: 1rem; color: var(--cream); font-weight: 700; }

.prayer-card.pc-iftar { border-color: rgba(201,168,76,0.4); }
.prayer-card.pc-iftar .pc-name { color: var(--gold); }

.iftar-badge {
  display: inline-block;
  background: var(--gold);
  color: #000;
  font-size: 0.55rem;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 700;
  margin-right: 4px;
  vertical-align: middle;
}

/* Prayer loading/error */
.prayer-loading, .prayer-error {
  text-align: center;
  padding: 30px;
  color: var(--text-2);
}

.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border-gold);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── DAILY CONTENT ────────────────────────────────────────── */

.day-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 14px;
}

.day-nav-arrow {
  background: none;
  border: 1px solid var(--border-gold);
  color: var(--gold);
  font-size: 1.4rem;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, transform 0.1s;
}
.day-nav-arrow:hover { background: rgba(201,168,76,0.1); }
.day-nav-arrow:active { transform: scale(0.9); }

.day-nav-center { text-align: center; }
.nav-day-num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--cream);
}
.nav-hijri { font-size: 0.8rem; color: var(--text-2); }

/* Content tabs */
.content-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.ctab-btn {
  flex: 1;
  padding: 10px 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  color: var(--text-2);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.ctab-btn.active {
  background: rgba(201,168,76,0.15);
  border-color: var(--gold);
  color: var(--gold-light);
  font-weight: 700;
}

.ctab-panel { display: none; }
.ctab-panel.active { display: block; animation: fadeInUp 0.3s ease both; }

/* Hadith */
.hadith-container {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.hadith-day-theme {
  background: linear-gradient(135deg, var(--gold-dim), #3a2808);
  color: var(--cream);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 18px;
  letter-spacing: 0.05em;
}

.hadith-quote {
  padding: 20px 18px;
  position: relative;
  border-bottom: 1px solid var(--border-gold);
}

.hadith-mark {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--gold-dim);
  line-height: 0.5;
  display: inline;
}
.hadith-mark-close { float: left; line-height: 0.5; }

.hadith-text {
  font-family: var(--font-quran);
  font-size: 1.2rem;
  color: var(--cream);
  line-height: 2;
  text-align: center;
  margin: 10px 0;
  direction: rtl;
}

.hadith-details {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-gold);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hd-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.88rem;
}

.hd-icon { font-size: 0.9rem; flex-shrink: 0; }
.hd-key { color: var(--text-2); white-space: nowrap; flex-shrink: 0; }
.hd-val { color: var(--text-1); font-family: var(--font-display); }
.hd-val.small { font-size: 0.8rem; color: var(--text-2); }
.hd-grade-badge {
  background: rgba(34, 120, 74, 0.3);
  border: 1px solid #22784a;
  color: #6bdb9a;
  font-size: 0.75rem;
  padding: 2px 10px;
  border-radius: 10px;
  font-weight: 700;
}

.hadith-note-box {
  padding: 14px 18px;
}

.hn-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 8px;
}

.hn-text {
  font-size: 0.9rem;
  color: var(--text-1);
  line-height: 1.8;
  font-family: var(--font-display);
}

/* Quran */
.quran-container {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.khatm-plan-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-gold);
}

.kp-btn {
  flex: 1;
  padding: 10px 6px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-2);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}
.kp-btn.active { color: var(--gold); border-bottom-color: var(--gold); background: rgba(201,168,76,0.05); }

.kp-panel { display: none; padding: 18px; }
.kp-panel.active { display: block; animation: fadeIn 0.3s ease; }

.juz-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.juz-hero-num {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--gold-light);
  text-shadow: 0 0 20px rgba(201,168,76,0.3);
  line-height: 1;
  width: 60px;
  text-align: center;
  flex-shrink: 0;
}

.juz-hero-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--cream);
  font-weight: 700;
}
.juz-hero-pages { font-size: 0.85rem; color: var(--text-2); margin-top: 2px; }

.juz-from-to {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.juz-ft-item { flex: 1; }
.jft-label { display: block; font-size: 0.7rem; color: var(--text-2); margin-bottom: 2px; }
.jft-val { font-family: var(--font-display); font-size: 0.95rem; color: var(--cream); }
.juz-ft-divider { color: var(--gold-dim); font-size: 1.2rem; }

.sessions-label {
  font-size: 0.85rem;
  color: var(--text-2);
  margin-bottom: 10px;
  font-weight: 700;
}

.sessions-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.session-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  border-right: 3px solid var(--gold-dim);
}

.session-time { font-size: 0.9rem; color: var(--text-1); }
.session-pages {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--gold);
}

.mark-read-btn {
  width: 100%;
  padding: 12px;
  background: rgba(201,168,76,0.1);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius-md);
  color: var(--gold);
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.mark-read-btn.marked {
  background: rgba(34, 120, 74, 0.2);
  border-color: #22784a;
  color: #6bdb9a;
}
.mark-read-btn:hover { background: rgba(201,168,76,0.2); }

.multi-juz-label {
  font-size: 0.9rem;
  color: var(--text-2);
  margin-bottom: 12px;
  text-align: center;
}

.multi-juz-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.multi-juz-item {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.mji-num {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold);
  width: 36px;
  text-align: center;
}

.mji-name { font-family: var(--font-display); font-size: 0.95rem; color: var(--cream); }
.mji-pages { font-size: 0.8rem; color: var(--text-2); }

.quran-tips-box {
  border-top: 1px solid var(--border-gold);
  padding: 14px 18px;
  background: rgba(201,168,76,0.04);
}
.qtb-header { font-size: 0.85rem; color: var(--gold); font-weight: 700; margin-bottom: 6px; }
.qtb-text { font-size: 0.9rem; color: var(--text-2); line-height: 1.7; }

/* Tasks */
.tasks-container {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.tasks-day-note {
  padding: 12px 16px;
  background: rgba(201,168,76,0.07);
  border-bottom: 1px solid var(--border-gold);
  font-size: 0.9rem;
  color: var(--text-1);
  line-height: 1.6;
  font-family: var(--font-display);
}

.tasks-points-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 6px;
  font-size: 0.85rem;
}

.tpb-label { color: var(--text-2); }
.tpb-earned { font-weight: 900; color: var(--gold-light); font-size: 1rem; }
.tpb-sep { color: var(--text-3); margin: 0 3px; }
.tpb-total { color: var(--text-2); }

.tasks-points-track {
  height: 4px;
  background: rgba(255,255,255,0.05);
  margin: 0 16px 14px;
}

.tasks-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold-light));
  transition: width 0.5s ease;
}

.tasks-list-wrap { padding: 0 0 16px; }

.task-item {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(201,168,76,0.08);
  align-items: flex-start;
  cursor: pointer;
  transition: background 0.15s;
}
.task-item:hover { background: rgba(255,255,255,0.02); }
.task-item:last-child { border-bottom: none; }

.task-check {
  width: 22px; height: 22px;
  border: 2px solid var(--border-gold-2);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 2px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  font-size: 0.75rem;
  color: transparent;
}

.task-item.completed .task-check {
  background: #22784a;
  border-color: #22784a;
  color: #fff;
}

.task-item.completed .task-text { text-decoration: line-through; opacity: 0.5; }

.task-body { flex: 1; }
.task-text { font-size: 0.9rem; color: var(--text-1); line-height: 1.5; margin-bottom: 4px; }

.task-why {
  font-size: 0.78rem;
  color: var(--text-2);
  font-style: italic;
}

.task-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
}

.task-difficulty {
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
}

.diff-easy { background: rgba(34,120,74,0.2); color: #6bdb9a; border: 1px solid rgba(34,120,74,0.4); }
.diff-medium { background: rgba(201,168,76,0.2); color: var(--gold-light); border: 1px solid var(--gold-dim); }
.diff-hard { background: rgba(200,80,60,0.2); color: #e08080; border: 1px solid rgba(200,80,60,0.4); }
.diff-challenge { background: rgba(107,42,107,0.3); color: #e08be0; border: 1px solid rgba(107,42,107,0.6); }

.task-points-badge {
  font-size: 0.7rem;
  color: var(--gold);
  font-weight: 700;
}

/* ── CALENDAR ─────────────────────────────────────────────── */

.cal-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  font-size: 0.75rem;
  color: var(--text-2);
}

.cl-item { display: flex; align-items: center; gap: 5px; }
.cl-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.mercy-bg { background: var(--mercy-light); }
.forgiveness-bg { background: var(--forgiveness-light); }
.freedom-bg { background: var(--freedom-light); }
.gold-bg { background: var(--gold); }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.cal-day-cell {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-sm);
  padding: 10px 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  min-height: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
}

.cal-day-cell::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
}

.cal-day-cell.mercy::before { background: var(--mercy-light); }
.cal-day-cell.forgiveness::before { background: var(--forgiveness-light); }
.cal-day-cell.freedom::before { background: var(--freedom-light); }

.cal-day-cell.is-today {
  border-color: var(--gold);
  background: var(--bg-card-2);
  box-shadow: 0 0 12px rgba(201,168,76,0.2);
}

.cal-day-cell.is-past { opacity: 0.55; }

.cal-day-cell.is-qadr { border-color: rgba(200,150,255,0.5); }
.cal-day-cell.is-qadr::after {
  content: '✨';
  position: absolute;
  top: 2px; left: 2px;
  font-size: 0.5rem;
}

.cal-day-cell:active { transform: scale(0.94); }

.cdc-num {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--cream);
  line-height: 1;
}

.cal-day-cell.is-today .cdc-num { color: var(--gold-light); }

.cdc-date {
  font-size: 0.6rem;
  color: var(--text-3);
  line-height: 1;
}

.cdc-theme {
  font-size: 0.55rem;
  color: var(--text-2);
  text-align: center;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ── QURAN TRACKER ────────────────────────────────────────── */

.tracker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.tracker-nums {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text-2);
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.tracker-done {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1;
}
.tracker-sep { color: var(--text-3); }
.tracker-total-num { font-size: 1.2rem; color: var(--text-2); }
.tracker-unit { font-size: 0.85rem; color: var(--text-3); }
.tracker-pct { font-size: 1.4rem; font-weight: 900; color: var(--gold); font-family: var(--font-display); }

.tracker-bar-outer {
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 18px;
}

.tracker-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--mercy-light), var(--gold));
  border-radius: 4px;
  transition: width 0.5s ease;
}

.tracker-juz-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.tracker-juz-item {
  aspect-ratio: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--text-2);
  position: relative;
}

.tracker-juz-item.completed {
  background: rgba(34,120,74,0.2);
  border-color: #22784a;
  color: #6bdb9a;
}
.tracker-juz-item.completed::after {
  content: '✓';
  position: absolute;
  top: 1px; right: 3px;
  font-size: 0.6rem;
  color: #6bdb9a;
}
.tracker-juz-item:active { transform: scale(0.9); }

.tracker-actions { text-align: center; }

.tracker-reset-btn {
  background: none;
  border: 1px solid var(--border-gold);
  color: var(--text-2);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  padding: 8px 20px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
}
.tracker-reset-btn:hover { border-color: var(--gold); color: var(--gold); }

/* ── TASBIH ───────────────────────────────────────────────── */

.dhikr-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.dhikr-btn {
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  color: var(--text-2);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
}
.dhikr-btn.active {
  background: rgba(201,168,76,0.15);
  border-color: var(--gold);
  color: var(--gold-light);
  font-weight: 700;
}
.dhikr-btn:hover { border-color: var(--gold-dim); color: var(--text-1); }

.tasbih-dhikr-display {
  font-family: var(--font-quran);
  font-size: 1.6rem;
  color: var(--cream);
  text-align: center;
  margin-bottom: 20px;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  line-height: 1.8;
  box-shadow: var(--shadow-gold);
}

.tasbih-area {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.tasbih-circle-btn {
  position: relative;
  width: 160px; height: 160px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  transition: transform 0.1s;
}

.tasbih-circle-btn:active { transform: scale(0.93); }

.tasbih-ring {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
}

.tasbih-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, var(--bg-card-2), var(--bg-card));
  border-radius: 50%;
  margin: 8px;
}

.tasbih-count-display {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1;
  text-shadow: 0 0 20px rgba(201,168,76,0.4);
}

.tasbih-max-display {
  font-size: 0.9rem;
  color: var(--text-2);
  margin-top: 2px;
}

.tasbih-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
}

.tasbih-ctrl-btn {
  width: 48px; height: 48px;
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: 50%;
  color: var(--gold);
  font-size: 1.4rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.tasbih-ctrl-btn:hover { background: rgba(201,168,76,0.1); }
.tasbih-ctrl-btn:active { transform: scale(0.9); }

.tasbih-total-block { text-align: center; }
.ttb-label { font-size: 0.75rem; color: var(--text-2); }
.ttb-count {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--cream);
}

.tasbih-done-msg {
  text-align: center;
  padding: 12px;
  background: rgba(34,120,74,0.2);
  border: 1px solid #22784a;
  border-radius: var(--radius-md);
  color: #6bdb9a;
  font-family: var(--font-display);
  font-size: 1rem;
  margin-bottom: 12px;
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.tdm-emoji { font-size: 1.3rem; margin-left: 8px; }

.tasbih-rounds {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-2);
}
.tr-label { margin-left: 6px; }
.tr-num { color: var(--gold); font-weight: 700; font-size: 1rem; }

/* ── FOOTER ───────────────────────────────────────────────── */

.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border-gold);
  padding: 30px 20px 20px;
  text-align: center;
  margin-top: 20px;
}

.footer-moon { font-size: 2rem; margin-bottom: 10px; }
.footer-dua {
  font-family: var(--font-quran);
  font-size: 1rem;
  color: var(--text-1);
  line-height: 1.9;
  margin-bottom: 8px;
}
.footer-year { font-size: 0.8rem; color: var(--text-3); }

/* ── ANIMATIONS ───────────────────────────────────────────── */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.8); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes shimmer {
  from { opacity: 0.5; }
  to   { opacity: 1; }
}

@keyframes ringPulse {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(201,168,76,0.3)); }
  50%       { filter: drop-shadow(0 0 10px rgba(201,168,76,0.6)); }
}

.tasbih-ring { animation: ringPulse 3s ease-in-out infinite; }

/* ── SCROLLBAR ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 2px; }

/* ── UTILITY ──────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── RESPONSIVE TWEAKS ────────────────────────────────────── */
@media (min-width: 400px) {
  .cal-grid { grid-template-columns: repeat(6, 1fr); }
  .tracker-juz-grid { grid-template-columns: repeat(7, 1fr); }
}

@media (min-width: 480px) {
  body { font-size: 17px; }
  .stats-row { grid-template-columns: repeat(4, 1fr); }
  .prayer-cards-grid { grid-template-columns: repeat(3, 1fr); }
  .cal-grid { grid-template-columns: repeat(6, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
