/* ========================================
   Al-Quran — Shared Styles
   ======================================== */

:root {
  --bg:      #07090f;
  --bg2:     #0c1020;
  --bg3:     #111827;
  --bg4:     #1a2035;
  --gold:    #c9943a;
  --gold2:   #e8b96a;
  --gold3:   #f5d08a;
  --text:    #ede8df;
  --text2:   #a09585;
  --text3:   #5a5248;
  --border:  rgba(201,148,58,0.14);
  --border2: rgba(255,255,255,0.06);
  --green:   #1e6e4a;
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Ambient BG ── */
body::before {
  content:'';
  position:fixed; inset:0;
  background:
    radial-gradient(ellipse 80% 60% at 15% 10%, rgba(201,148,58,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 85% 90%, rgba(30,110,74,0.06) 0%, transparent 60%);
  pointer-events:none; z-index:0;
}

body::after {
  content:'';
  position:fixed; inset:0;
  background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M40 0 L43 30 L73 20 L50 40 L73 60 L43 50 L40 80 L37 50 L7 60 L30 40 L7 20 L37 30 Z' fill='none' stroke='rgba(201,148,58,0.035)' stroke-width='0.5'/%3E%3C/svg%3E");
  background-size:80px 80px;
  pointer-events:none; z-index:0; opacity:0.7;
}

/* ── NAV ── */
nav {
  position:fixed; top:0; left:0; right:0; z-index:100;
  height:64px; padding:0 2rem;
  display:grid; grid-template-columns:1fr auto 1fr; align-items:center;
  background:rgba(7,9,15,0.9);
  backdrop-filter:blur(24px) saturate(1.5);
  border-bottom:1px solid var(--border);
}

.nav-brand {
  display:flex; align-items:center; gap:10px;
  text-decoration:none; justify-self:start;
}

.nav-arabic {
  font-family:'Amiri',serif;
  font-size:1.55rem; color:var(--gold2); line-height:1;
}

.nav-sep { width:1px; height:20px; background:var(--border2); }

.nav-name {
  font-family:'Cormorant Garamond',serif;
  font-size:0.9rem; letter-spacing:0.2em;
  text-transform:uppercase; color:var(--text2);
}

.nav-links {
  display:flex; align-items:center; gap:1.75rem; list-style:none;
  justify-self:center;
}

.nav-links a {
  color:var(--text3); text-decoration:none;
  font-size:0.78rem; font-weight:500;
  letter-spacing:0.08em; text-transform:uppercase;
  transition:color 0.2s;
}

.nav-links a:hover,
.nav-links a.active { color:var(--gold2); }

/* ── BUTTONS ── */
.pill-btn {
  display:inline-flex; align-items:center; gap:0.4rem;
  background:rgba(255,255,255,0.05); border:1px solid var(--border2);
  color:var(--text2); padding:0.5rem 1rem; border-radius:50px;
  font-family:'DM Sans',sans-serif; font-size:0.78rem; font-weight:500;
  cursor:pointer; transition:all 0.2s; white-space:nowrap;
}
.pill-btn:hover { background:rgba(201,148,58,0.1); border-color:rgba(201,148,58,0.3); color:var(--gold2); }
.pill-btn.playing, .pill-btn.on { background:var(--gold); border-color:var(--gold); color:#000; }
.pill-btn svg { width:12px; height:12px; flex-shrink:0; }

.audio-btn {
  display:inline-flex; align-items:center; gap:0.35rem;
  background:rgba(201,148,58,0.08); border:1px solid rgba(201,148,58,0.2);
  color:var(--gold); padding:0.35rem 0.85rem; border-radius:50px;
  font-family:'DM Sans',sans-serif; font-size:0.72rem; font-weight:500;
  cursor:pointer; transition:all 0.2s;
}
.audio-btn:hover { background:rgba(201,148,58,0.16); }
.audio-btn.playing { background:var(--gold); border-color:var(--gold); color:#000; }
.audio-btn svg { width:10px; height:10px; flex-shrink:0; }

.icon-btn {
  display:inline-flex; align-items:center; gap:0.35rem;
  background:transparent; border:1px solid var(--border2);
  color:var(--text3); padding:0.35rem 0.75rem; border-radius:50px;
  font-family:'DM Sans',sans-serif; font-size:0.72rem; font-weight:500;
  cursor:pointer; transition:all 0.2s;
}
.icon-btn:hover { border-color:rgba(201,148,58,0.3); color:var(--gold2); }
.icon-btn.bm-active { color:var(--gold2); border-color:rgba(201,148,58,0.4); background:rgba(201,148,58,0.08); }
.icon-btn svg { width:11px; height:11px; flex-shrink:0; }

/* ── VERSE CARD (shared) ── */
.verse-card {
  background:rgba(255,255,255,0.025);
  border:1px solid var(--border2); border-radius:14px;
  padding:1.5rem 1.75rem;
  position:relative; overflow:hidden;
}
.verse-card::before {
  content:''; position:absolute;
  left:0; top:15%; bottom:15%; width:2px;
  background:linear-gradient(180deg,transparent,var(--gold),transparent);
  opacity:0.3;
}

.verse-arabic-text {
  font-family:'Amiri',serif;
  font-size:clamp(1.3rem,3.5vw,1.9rem);
  line-height:2.1; color:var(--text);
  direction:rtl; text-align:right;
  margin-bottom:1rem;
}

.verse-translation-text {
  font-family:'Cormorant Garamond',serif;
  font-style:italic; font-weight:300;
  font-size:clamp(0.95rem,2vw,1.05rem);
  line-height:1.85; color:var(--text2);
  margin-bottom:1rem;
}

.verse-footer {
  display:flex; align-items:center;
  justify-content:space-between; flex-wrap:wrap; gap:0.5rem;
}

.verse-key { font-size:0.72rem; font-weight:600; letter-spacing:0.08em; color:var(--gold); }

.verse-actions { display:flex; gap:0.4rem; flex-wrap:wrap; }

/* ── SHIMMER ── */
.shimmer {
  background:linear-gradient(90deg,
    rgba(255,255,255,0.03) 0%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0.03) 100%);
  background-size:300% 100%;
  animation:shimmer 1.6s infinite;
  border-radius:6px; display:block;
}
@keyframes shimmer {
  0% { background-position:100% 0; }
  100% { background-position:-100% 0; }
}

/* ── MODAL (shared bottom-sheet) ── */
.modal-bg {
  position:fixed; inset:0; background:rgba(0,0,0,0.78);
  backdrop-filter:blur(10px); z-index:200;
  display:flex; align-items:flex-end; justify-content:center;
  opacity:0; pointer-events:none; transition:opacity 0.3s;
}
.modal-bg.open { opacity:1; pointer-events:all; }

.modal-sheet {
  background:var(--bg2); border:1px solid var(--border);
  border-bottom:none; border-radius:24px 24px 0 0;
  width:100%; max-width:820px; max-height:88vh;
  overflow-y:auto; padding:0 1.75rem 2rem;
  transform:translateY(100%);
  transition:transform 0.4s cubic-bezier(0.32,0.72,0,1);
}
.modal-bg.open .modal-sheet { transform:translateY(0); }

.modal-handle {
  width:40px; height:4px;
  background:var(--border); border-radius:2px;
  margin:1rem auto 1.5rem;
}

.modal-head {
  display:flex; align-items:flex-start;
  justify-content:space-between;
  margin-bottom:1.75rem; padding-bottom:1.25rem;
  border-bottom:1px solid var(--border2);
}

.modal-eyebrow {
  font-size:0.65rem; font-weight:600;
  letter-spacing:0.25em; text-transform:uppercase;
  color:var(--gold); margin-bottom:0.3rem;
}

.modal-title {
  font-family:'Cormorant Garamond',serif;
  font-size:1.5rem; font-weight:400;
}

.modal-close {
  width:34px; height:34px;
  background:rgba(255,255,255,0.05); border:1px solid var(--border2);
  border-radius:50%; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  color:var(--text2); font-size:1.1rem; transition:all 0.2s; flex-shrink:0;
}
.modal-close:hover { background:rgba(255,255,255,0.1); color:var(--text); }

.modal-body { display:grid; gap:1rem; }

/* ── SHARE PREVIEW ── */
.share-preview {
  border-radius:12px; overflow:hidden; margin-bottom:1.5rem;
  border:1px solid var(--border2);
}
.share-preview canvas { width:100%; height:auto; display:block; }

/* ── TOAST ── */
.toast-el {
  position:fixed; bottom:2rem; left:50%;
  transform:translateX(-50%) translateY(80px);
  background:var(--bg3); border:1px solid var(--border);
  border-radius:50px; padding:0.65rem 1.4rem;
  font-size:0.8rem; color:var(--text);
  z-index:400; transition:transform 0.3s;
  white-space:nowrap; pointer-events:none;
}
.toast-el.show { transform:translateX(-50%) translateY(0); }

/* ── SECTION HELPERS ── */
.section-eyebrow {
  font-size:0.65rem; font-weight:600;
  letter-spacing:0.25em; text-transform:uppercase;
  color:var(--gold); margin-bottom:0.75rem;
}

.section-title {
  font-family:'Cormorant Garamond',serif;
  font-size:clamp(1.8rem,4vw,2.8rem);
  font-weight:400; color:var(--text); line-height:1.15;
}
.section-title em { font-style:italic; color:var(--gold2); }

.section-desc {
  color:var(--text2); font-size:0.9rem; line-height:1.8;
  margin-top:0.75rem; max-width:500px;
  margin-left:auto; margin-right:auto; font-weight:300;
}

/* ── DIVIDER ── */
.divider {
  height:1px; position:relative; z-index:1;
  background:linear-gradient(90deg,transparent 0%,var(--border2) 30%,var(--border2) 70%,transparent 100%);
  margin:0 2rem;
}

/* ── FOOTER ── */
footer {
  position:relative; z-index:1;
  border-top:1px solid var(--border2);
  padding:2rem 1.5rem; text-align:center;
}
footer p { font-size:0.78rem; color:var(--text3); line-height:1.8; }
footer a { color:var(--gold); text-decoration:none; }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity:0; transform:translateY(18px); }
  to   { opacity:1; transform:translateY(0); }
}

/* ── AUTH UI ── */
#auth-ui {
  display:flex; align-items:center;
  justify-self:end; flex-shrink:0;
}

.auth-login-btn {
  display:inline-flex; align-items:center; gap:0.4rem;
  background:rgba(201,148,58,0.08); border:1px solid rgba(201,148,58,0.25);
  color:var(--gold2); padding:0.45rem 1rem; border-radius:50px;
  text-decoration:none; font-size:0.72rem; font-weight:600;
  letter-spacing:0.06em; transition:all 0.2s;
}
.auth-login-btn:hover {
  background:rgba(201,148,58,0.15); border-color:var(--gold);
}
.auth-login-btn svg { width:14px; height:14px; }

.auth-menu { position:relative; }

.auth-avatar {
  width:36px; height:36px; border-radius:50%;
  background:rgba(201,148,58,0.1); border:1px solid rgba(201,148,58,0.25);
  color:var(--gold2); cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  transition:all 0.2s;
}
.auth-avatar:hover {
  background:rgba(201,148,58,0.2);
  box-shadow:0 0 12px rgba(201,148,58,0.15);
}
.auth-avatar svg { width:18px; height:18px; }

.auth-dropdown {
  position:absolute; top:calc(100% + 8px); right:0;
  background:var(--bg3); border:1px solid var(--border);
  border-radius:12px; min-width:200px;
  opacity:0; pointer-events:none;
  transform:translateY(-6px); transition:all 0.2s;
  z-index:200; overflow:hidden;
}
.auth-dropdown.open { opacity:1; pointer-events:all; transform:translateY(0); }

.auth-dropdown-user {
  padding:0.75rem 1rem;
  border-bottom:1px solid var(--border2);
}
.auth-dropdown-label {
  display:block; font-size:0.6rem;
  letter-spacing:0.1em; text-transform:uppercase;
  color:var(--text3); margin-bottom:0.15rem;
}
.auth-dropdown-id {
  display:block; font-size:0.82rem; color:var(--text2);
  word-break:break-all;
}

.auth-dropdown-item {
  display:flex; align-items:center; gap:0.5rem;
  padding:0.7rem 1rem; color:var(--text2);
  text-decoration:none; font-size:0.8rem;
  transition:background 0.15s;
}
.auth-dropdown-item:hover { background:rgba(255,255,255,0.04); color:var(--text); }
.auth-dropdown-item svg { width:14px; height:14px; flex-shrink:0; }

/* ── RESPONSIVE NAV ── */



@media (max-width:640px) {
  nav { padding:0 1rem; grid-template-columns:1fr auto; }
  .nav-links { display:none; }
  nav .nav-brand { justify-self:start; }
  #auth-ui { justify-self:end; }
}
