/* ======================================================
   HOLY QURAN – PREMIUM UI
   Light • Dim • Dark (Unified Theme System)
   Reverent • Calm • Manuscript-Inspired
====================================================== */

/* ===================== THEME VARIABLES ===================== */

/* ---------- LIGHT (DEFAULT) ---------- */
:root {
  --bg-main: #fdfdfd;
  --bg-card: #ffffff;
  --bg-soft: #f1f5f9;

  --text-main: #1f2937;
  --text-muted: #6b7280;
  --text-soft: #334155;

  --gold: #bfa742;
  --gold-soft: rgba(191, 167, 66, 0.35);

  --border-soft: rgba(0, 0, 0, 0.06);

  --radius-lg: 22px;
  --radius-md: 14px;

  --blur-glass: blur(12px);
}

/* ---------- DIM MODE ---------- */
body.dim {
  --bg-main: #111827;
  --bg-card: #1f2937;
  --bg-soft: #0f172a;

  --text-main: #d1d5db;
  --text-muted: #9ca3af;
  --text-soft: #e5e7eb;

  --gold: #facc15;
  --gold-soft: rgba(250, 204, 21, 0.35);

  --border-soft: rgba(255, 255, 255, 0.06);
}

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

  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --text-soft: #cbd5f5;

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

  --border-soft: rgba(255, 255, 255, 0.06);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  transition: background-color 0.35s ease, color 0.35s ease;
  -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-main) 85%, transparent);
  backdrop-filter: var(--blur-glass);
  border-bottom: 1px solid var(--border-soft);
}

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

.header-left,
.header-right {
  display: flex;
  align-items: center;
}

.header-left a,
.header-right button {
  font-size: 18px;
  color: var(--text-soft);
  background: none;
  border: none;
  cursor: pointer;
}

.header-center {
  text-align: center;
}

.app-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.app-title .arabic {
  font-family: 'Amiri Quran', serif;
  font-size: 22px;
}

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

.arabic-small {
  font-family: 'Amiri Quran', serif;
}

/* ===================== HERO ===================== */
.quran-hero {
  position: relative;
  padding: 90px 20px 70px;
  text-align: center;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at center,
    var(--gold-soft),
    transparent 65%
  );
  pointer-events: none;
}

.hero-title {
  font-size: 34px;
  font-weight: 600;
}

.hero-title .arabic-large {
  display: block;
  font-family: 'Amiri Quran', serif;
  font-size: 44px;
  margin-top: 12px;
}

.hero-subtitle {
  margin-top: 18px;
  font-size: 15px;
  color: var(--text-muted);
}

.hero-subtitle .arabic-text {
  display: block;
  margin-top: 10px;
  font-family: 'Amiri Quran', serif;
  font-size: 18px;
}

.bismillah {
  margin-top: 2.5rem; /* 40px */
  font-family: 'Amiri Quran', serif;
  font-size: 3rem; /* 48px */
  color: var(--gold);
  text-shadow: 0 0 1.5625rem var(--gold-soft); /* 25px */
}


/* ===================== SEARCH ===================== */
.search-section {
  padding: 20px;
}

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

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

/* ===================== SURAH GRID ===================== */
.surah-section {
  padding: 40px 20px 120px;
}

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

.surah-card {
  background: linear-gradient(
    180deg,
    var(--bg-card),
    var(--bg-soft)
  );
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  text-decoration: none;
  color: inherit;
  transition: all 0.35s ease;
}

.surah-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold-soft);
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}

.surah-index {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--gold) 15%, transparent);
  color: var(--gold);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.surah-name {
  font-size: 16px;
  font-weight: 600;
}

.surah-urdu {
  font-size: 13px;
  color: var(--text-muted);
}

.surah-arabic {
  font-family: 'Amiri Quran', serif;
  font-size: 20px;
  margin-top: 8px;
  color: var(--text-soft);
}

.surah-arrow {
  font-size: 22px;
  opacity: 0.4;
}

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

/* ===================== MOBILE NAV ===================== */
.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: color-mix(in srgb, var(--bg-main) 90%, transparent);
  backdrop-filter: var(--blur-glass);
  border-top: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-around;
  padding: 12px 0;
}

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

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

/* ===================== RESPONSIVE ===================== */
@media (max-width: 640px) {
  .hero-title {
    font-size: 26px;
  }

  .hero-title .arabic-large {
    font-size: 34px;
  }

  .bismillah {
    font-size: 1.4rem;
  }
}



/* ======================================================
   RESPONSIVE FIXES – MOBILE FIRST
   Phones • Small Tablets • Touch UX
====================================================== */

/* ---------- GLOBAL MOBILE TUNING ---------- */
@media (max-width: 480px) {

  body {
    font-size: 14px;
  }

  .app-shell {
    padding-bottom: 72px; /* space for mobile nav */
  }

  /* ---------- HEADER ---------- */
  .header-inner {
    grid-template-columns: auto 1fr auto;
    gap: 10px;
  }

  .app-title {
    font-size: 16px;
    line-height: 1.2;
  }

  .app-title .arabic {
    font-size: 18px;
  }

  .app-subtitle {
    font-size: 11px;
  }

  /* ---------- HERO ---------- */
  .quran-hero {
    padding: 60px 16px 50px;
  }

  .hero-title {
    font-size: 22px;
  }

  .hero-title .arabic-large {
    font-size: 28px;
  }

  .hero-subtitle {
    font-size: 13px;
  }

  .hero-subtitle .arabic-text {
    font-size: 16px;
  }

  .bismillah {
    font-size: 1.4rem;
    margin-top: 28px;
  }

  /* ---------- SEARCH ---------- */
  .search-section {
    padding: 12px;
  }

  .search-box {
    width: 100%;
    padding: 12px 14px;
    border-radius: 18px;
  }

  .search-box input {
    font-size: 13px;
  }

  /* ---------- SURAH GRID ---------- */
  .surah-section {
    padding: 28px 14px 90px;
  }

  .surah-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .surah-card {
    padding: 16px;
    gap: 14px;
  }

  .surah-index {
    width: 36px;
    height: 36px;
    font-size: 13px;
  }

  .surah-name {
    font-size: 14px;
  }

  .surah-urdu {
    font-size: 12px;
  }

  .surah-arabic {
    font-size: 18px;
  }

  .surah-arrow {
    display: none; /* reduce clutter on mobile */
  }

  /* ---------- FOOTER ---------- */
  .app-footer {
    font-size: 11px;
    padding: 30px 16px 80px;
  }

  /* ---------- MOBILE NAV ---------- */
  .mobile-nav {
    height: 64px;
    padding: 8px 0;
  }

  .mobile-nav .nav-item {
    font-size: 12px;
  }
}

/* ---------- SMALL TABLETS ---------- */
@media (min-width: 481px) and (max-width: 768px) {

  .hero-title {
    font-size: 26px;
  }

  .hero-title .arabic-large {
    font-size: 34px;
  }

  .surah-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}


@media (max-width: 480px) {
  .bismillah {
    font-size: 1.8rem;
    line-height: 1.5;
    padding: 0.3em 0;
  }
}

