/* =====================================================
   QURAN JUZ — PREMIUM MANUSCRIPT UI
   Light · Dim · Dark
===================================================== */

/* ================= ROOT TOKENS ================= */
:root {
  --font-ui: 'Poppins', system-ui, -apple-system, sans-serif;
  --font-arabic: 'Amiri Quran', serif;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --transition-fast: 0.2s ease;
  --transition: 0.35s ease;

  --gold: #d4af37;
  --gold-soft: rgba(212, 175, 55, 0.25);
}

/* ================= THEME: LIGHT ================= */
body.light {
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-soft: #f1f5f9;

  --text-main: #0f172a;
  --text-muted: #475569;

  --border: #e2e8f0;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

/* ================= THEME: DIM ================= */
body.dim {
  --bg-main: #0f172a;
  --bg-card: #111827;
  --bg-soft: #1e293b;

  --text-main: #e5e7eb;
  --text-muted: #94a3b8;

  --border: #1f2937;
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
}

/* ================= THEME: DARK ================= */
body.dark {
  --bg-main: #020617;
  --bg-card: #020617;
  --bg-soft: #020617;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;

  --border: rgba(255,255,255,0.04);
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.65);
}

/* ================= RESET ================= */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-ui);
  background: radial-gradient(
    circle at top,
    var(--bg-soft),
    var(--bg-main)
  );
  color: var(--text-main);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.no-copy {
  user-select: none;
}

/* ================= APP SHELL ================= */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ================= HEADER ================= */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg-card) 92%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1200px;
  margin: auto;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
}

.header-icon {
  font-size: 20px;
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
}

.app-title {
  margin: 0;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.app-title .arabic {
  font-family: var(--font-arabic);
  font-size: 22px;
}

.app-subtitle {
  margin: 4px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

.arabic-small {
  font-family: var(--font-arabic);
}

/* ================= MAIN ================= */
.app-main {
  flex: 1;
}

/* ================= PAGE INTRO ================= */
.page-intro {
  padding: 64px 18px 36px;
  text-align: center;
}

.section-title {
  font-size: 30px;
  margin: 0;
  font-weight: 600;
}

.section-title .gold {
  color: var(--gold);
}

.section-subtitle {
  margin-top: 14px;
  font-size: 14px;
  color: var(--text-muted);
}

.arabic-text {
  display: block;
  margin-top: 12px;
  font-family: var(--font-arabic);
  font-size: 20px;
}

/* ================= SEARCH ================= */
.search-section {
  padding: 0 18px 40px;
}

.search-box {
  max-width: 560px;
  margin: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow);
}

.search-box input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 14px;
  color: var(--text-main);
}

/* typing dots */
.typing-indicator span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  margin-left: 3px;
  opacity: 0;
}

/* ================= JUZ GRID ================= */
.juz-section {
  padding: 0 18px 120px;
}

.juz-grid {
  max-width: 1200px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}

.juz-card {
  background: linear-gradient(
    180deg,
    var(--bg-card),
    var(--bg-soft)
  );
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.juz-card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 20px 60px rgba(0,0,0,0.35),
    inset 0 0 0 1px var(--gold-soft);
}

.juz-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.juz-index {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(
    circle at top,
    var(--gold-soft),
    transparent
  );
  display: grid;
  place-items: center;
  font-weight: 600;
  color: var(--gold);
}

.juz-title {
  margin: 0;
  font-size: 15px;
}

.juz-name-en {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.juz-arrow {
  margin-left: auto;
  font-size: 22px;
  opacity: 0.4;
}

.juz-arabic {
  margin-top: 18px;
  font-family: var(--font-arabic);
  font-size: 24px;
  text-align: right;
  color: var(--text-main);
}

/* ================= FOOTER ================= */
.app-footer {
  text-align: center;
  padding: 48px 18px 96px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ================= MOBILE NAV ================= */
.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 68px;
  background: color-mix(in srgb, var(--bg-card) 92%, transparent);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.mobile-nav .nav-item {
  text-decoration: none;
  font-size: 13px;
  color: var(--text-muted);
}

.mobile-nav .gold {
  color: var(--gold);
}

/* ================= MOBILE ================= */
@media (max-width: 480px) {
  .section-title { font-size: 24px; }
  .arabic-text { font-size: 18px; }
  .juz-grid { grid-template-columns: 1fr; }
  .juz-arabic { font-size: 22px; }
}

/* ================= DESKTOP ================= */
@media (min-width: 1024px) {
  .section-title { font-size: 36px; }
  .arabic-text { font-size: 24px; }
  .juz-arabic { font-size: 28px; }
}

/* ================= ANIMATION ================= */
@keyframes typingPulse {
  0% { opacity: 0.2; }
  20% { opacity: 1; }
  100% { opacity: 0.2; }
}

.gold {

  color: var(--gold);
}




/* =====================================================
   PAGE INTRO — ILLUMINATED MANUSCRIPT STYLE
   Calligraphic • Sacred • Timeless
===================================================== */

.page-intro {
  position: relative;
  padding: 90px 18px 64px;
  text-align: center;
  overflow: hidden;
}

/* subtle parchment / light halo */
.page-intro::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(
      circle at center,
      var(--gold-soft),
      transparent 65%
    );
  opacity: 0.35;
  pointer-events: none;
}

/* ================= TITLE ================= */

.section-title {
  position: relative;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin: 0;
  z-index: 2;
}

/* gold accent stays restrained */
.section-title .gold {
  color: var(--gold);
  font-weight: 600;
}

/* ornamental divider under title */
.section-title::after {
  content: "✦";
  display: block;
  margin: 18px auto 0;
  font-size: 18px;
  color: var(--gold);
  opacity: 0.65;
}

/* ================= SUBTITLE ================= */

.section-subtitle {
  margin-top: 22px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.8;
  z-index: 2;
  position: relative;
}

/* ================= ARABIC CALLIGRAPHY ================= */

.arabic-text {
  position: relative;
  display: block;
  margin-top: 26px;

  font-family: var(--font-arabic);
  font-size: 26px;
  line-height: 1.9;
  text-align: center;

  color: var(--text-main);

  /* calligraphic depth */
  text-shadow:
    0 1px 0 rgba(255,255,255,0.05),
    0 6px 20px rgba(0,0,0,0.25);

  z-index: 2;
}

/* ghost calligraphy layer (artistic depth) */
.arabic-text::before {
  content: attr(data-ghost);
  position: absolute;
  inset: 0;
  transform: translateY(6px);
  color: var(--gold);
  opacity: 0.08;
  filter: blur(1px);
  z-index: -1;
}

/* ================= THEME REFINEMENTS ================= */

/* LIGHT */
body.light .page-intro::before {
  opacity: 0.25;
}

/* DIM */
body.dim .arabic-text {
  text-shadow:
    0 1px 0 rgba(255,255,255,0.04),
    0 10px 30px rgba(0,0,0,0.45);
}

/* DARK (night prayer feel) */
body.dark .page-intro::before {
  opacity: 0.45;
}

body.dark .arabic-text {
  color: #f8fafc;
  text-shadow:
    0 0 1px rgba(255,255,255,0.1),
    0 12px 40px rgba(0,0,0,0.65);
}

/* ================= RESPONSIVE ================= */

@media (max-width: 480px) {
  .section-title {
    font-size: 26px;
  }

  .arabic-text {
    font-size: 20px;
  }
}

@media (min-width: 1024px) {
  .section-title {
    font-size: 40px;
  }

  .arabic-text {
    font-size: 32px;
  }
}

.quran {
  margin-top: 40px;
  font-family: 'Amiri Quran', serif;
  font-size: 56px;
  text-align: center;
  
  /* 1. Use a solid high-quality gold base */
  color: #D4AF37; 
  
  /* 2. Stack shadows to create "Premium" depth */
  /* This creates a 3D 'stamped' look without clipping */
  text-shadow: 
    1px 1px 0px #F1D37E,   /* Top Light highlight */
    -1px -1px 0px #8A6D3B, /* Bottom Dark depth */
    0px 0px 15px rgba(212, 175, 55, 0.4), /* Outer gold glow */
    2px 4px 8px rgba(0, 0, 0, 0.3);       /* Soft floor shadow */
    
  line-height: 1.8;
}