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

:root {
  /* New night-sky palette */
  --night-1:    #0A0F1E;
  --night-2:    #0F1E3C;
  --night-3:    #0F2044;
  --indigo:     #0D3B6E;
  --teal-dark:  #0A5C7A;
  --teal:       #0D7A7A;
  --gold:       #C9A84C;
  --gold-light: #E8C96A;
  --bg:         #F0F4F8;
  --card-bg:    #FFFFFF;
  --text-dark:  #0A0F1E;
  --text-mid:   #2D3748;
  --text-muted: #64748B;
  --text-soft:  #A0AEC0;
  --border:     #E2E8F0;
  --shadow-card: 0 4px 20px rgba(10,15,30,0.08), 0 1px 4px rgba(10,15,30,0.05);
  --radius:     20px;
  --radius-sm:  14px;

  /* Landing polish */
  --bg-landing:     #F8F8FA;
  --shadow-rest:    0 1px 3px rgba(0,0,0,0.04), 0 4px 14px rgba(0,0,0,0.06);
  --shadow-hover:   0 2px 8px rgba(0,0,0,0.06), 0 8px 28px rgba(0,0,0,0.10);
  --shadow-pressed: 0 1px 2px rgba(0,0,0,0.06), 0 2px 6px rgba(0,0,0,0.04);
  --radius-lg:      18px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text-dark);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  line-height: 1.7;
}

/* ── App wrapper ──────────────────────────────────────── */
.app {
  max-width: 600px;
  margin: 0 auto;
  padding: 0;
}

/* ── Views ────────────────────────────────────────────── */
.view { display: none; }
.view.active { display: block; animation: fadeUp 0.4s ease both; }

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

/* ════════════════════════════════════════════════════════
   LANDING VIEW — Apple-Minimal Stacked Cards
════════════════════════════════════════════════════════ */

#landing-view {
  background: var(--bg-landing);
}

.landing-header {
  text-align: center;
  padding: 48px 1rem 0;
  animation: fadeInUp 0.5s ease-out 0.1s both;
}

.landing-headline {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.landing-headline .highlight {
  color: var(--teal-dark);
}

.landing-divider {
  width: 36px;
  height: 2px;
  background: var(--teal-dark);
  margin: 14px auto 0;
  border: none;
  border-radius: 2px;
  opacity: 0.6;
}

/* ── Stacked Card Container ─────────────────────────── */
.landing-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 20px 0;
}

/* ── Card — borderless, shadow-depth ────────────────── */
.landing-card {
  background: #FFFFFF;
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-rest);
  padding: 28px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  text-align: left;
  width: 100%;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.landing-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.landing-card:active {
  box-shadow: var(--shadow-pressed);
  transform: scale(0.98);
}

/* Staggered entrance */
.landing-card:nth-child(1) {
  animation: fadeInUp 0.5s ease-out 0.2s both;
}
.landing-card:nth-child(2) {
  animation: fadeInUp 0.5s ease-out 0.3s both;
}
.landing-card:nth-child(3) {
  animation: fadeInUp 0.5s ease-out 0.4s both;
}

/* ── Emoji Icon Circle ──────────────────────────────── */
.landing-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.landing-card-icon.curhat {
  background: rgba(42, 124, 111, 0.08);
}

.landing-card-icon.panduan {
  background: rgba(196, 152, 59, 0.08);
}

.landing-card-icon.jelajahi {
  background: rgba(120, 100, 70, 0.08);
}

/* ── Card Text ──────────────────────────────────────── */
.landing-card-text {
  display: flex;
  flex-direction: column;
}

.landing-card-title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-dark);
  letter-spacing: -0.01em;
  display: block;
}

.landing-card-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 3px;
}

/* ── Section Divider (between cards and VOTD) ────────── */
.landing-section-divider {
  border: none;
  height: 1px;
  background: rgba(0, 0, 0, 0.06);
  margin: 14px 20px;
}

/* ── Nowrap (prevents "Al-" orphaning on narrow screens) ── */
.nowrap {
  white-space: nowrap;
}

/* ── Verse of the Day ───────────────────────────────── */
.landing-votd {
  padding: 0 20px 48px;
  animation: fadeInUp 0.5s ease-out 0.5s both;
}

/* ── Entrance Animation ─────────────────────────────── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Mode Back Button (light background variant) ─────── */
.mode-back-wrap {
  padding: 16px 16px 0;
}

.back-btn-light {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  padding: 7px 16px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.back-btn-light:hover {
  color: var(--text-dark);
  border-color: var(--text-muted);
  background: rgba(0,0,0,0.03);
}

/* ── Panduan Card (teal accent) ──────────────────────── */
.panduan-grid .emotion-card {
  background: #EDF7F6;
  border-color: #B8DDD9;
}

.panduan-grid .emotion-card::before {
  background: var(--teal-dark);
}

.panduan-grid .emotion-card:hover {
  border-color: var(--teal-dark);
}

/* ── Panduan Expanded View (sub-questions) ─────────── */
.panduan-expanded {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: var(--bg);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.panduan-expanded.hidden { display: none; }
.panduan-expanded.slide-up   { animation: slideUpFadeIn  0.3s ease both; }
.panduan-expanded.slide-down { animation: slideDownFadeOut 0.25s ease both; }

@keyframes slideUpFadeIn {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideDownFadeOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(40px); }
}

.panduan-expanded-inner {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px 20px 60px;
}

.panduan-expanded-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  padding: 7px 16px;
  margin-bottom: 24px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.panduan-expanded-back:hover {
  color: var(--text-dark);
  border-color: var(--text-muted);
  background: rgba(0,0,0,0.03);
}

.panduan-expanded-header {
  text-align: center;
  margin-bottom: 28px;
}
.panduan-expanded-emoji {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 10px;
}
.panduan-expanded-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
}
.panduan-expanded-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.sub-questions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sub-question-row {
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-mid);
  line-height: 1.55;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.sub-question-row:hover {
  border-color: var(--teal-dark);
  background: #EDF7F6;
  color: var(--teal-dark);
}
.sub-question-row:active {
  transform: scale(0.98);
}
.sub-question-arrow {
  flex-shrink: 0;
  color: var(--text-soft);
  transition: color 0.15s;
}
.sub-question-row:hover .sub-question-arrow {
  color: var(--teal-dark);
}

.tulis-sendiri-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.tulis-sendiri-row {
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  background: var(--card-bg);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  gap: 10px;
}
.tulis-sendiri-row:hover {
  border-color: var(--teal-dark);
  color: var(--teal-dark);
  background: #EDF7F6;
}

.tulis-sendiri-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tulis-sendiri-form textarea {
  width: 100%;
  min-height: 80px;
  padding: 14px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--text-dark);
  background: #F8FAFC;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  resize: vertical;
  line-height: 1.75;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.tulis-sendiri-form textarea:focus {
  border-color: var(--teal-dark);
  box-shadow: 0 0 0 3px rgba(10,92,122,0.10);
}
.tulis-sendiri-form textarea::placeholder { color: var(--text-soft); }
.tulis-sendiri-submit {
  align-self: flex-end;
  padding: 10px 22px;
  background: linear-gradient(135deg, var(--night-3), var(--teal-dark));
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
  box-shadow: 0 4px 16px rgba(10,92,122,0.30);
}
.tulis-sendiri-submit:hover { opacity: 0.88; }
.tulis-sendiri-submit:disabled { opacity: 0.5; cursor: default; }

/* ════════════════════════════════════════════════════════
   JELAJAHI VIEW — Quran Explorer
════════════════════════════════════════════════════════ */

/* Hero gradient variant for Jelajahi */
.hero-jelajahi {
  background: linear-gradient(160deg,
    #0A0F1E 0%,
    #1A1A2E 30%,
    #16213E 55%,
    #0F3460 75%,
    #0A5C7A 100%
  );
}

/* ── Jelajahi Preset Grid (2-column) ─────────────────── */
.jelajahi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-bottom: 20px;
}

.jelajahi-card {
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 12px;
  text-align: center;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  position: relative;
  overflow: hidden;
}

.jelajahi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--teal-dark);
  border-radius: 2px 2px 0 0;
  opacity: 0.5;
}

.jelajahi-card:hover {
  border-color: var(--teal-dark);
  background: #EDF7F6;
}

.jelajahi-card:active {
  transform: scale(0.97);
}

.jc-name,
.jc-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  display: block;
}

.jc-meta,
.jc-sub {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 3px;
  display: block;
}

/* ── Juz Surah List ──────────────────────────────────── */
.juz-surah-list {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: var(--bg);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.juz-surah-list.hidden { display: none; }
.juz-surah-list.slide-up   { animation: slideUpFadeIn  0.3s ease both; }
.juz-surah-list.slide-down { animation: slideDownFadeOut 0.25s ease both; }

.juz-surah-inner {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px 20px 60px;
}

.juz-surah-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.juz-surah-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-dark);
}

.juz-surah-rows {
  display: flex;
  flex-direction: column;
}

.juz-surah-row {
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.juz-surah-row:hover {
  border-color: var(--teal-dark);
  background: #EDF7F6;
}

.juz-surah-row:active {
  transform: scale(0.98);
}

.juz-row-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.juz-row-num,
.juz-surah-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(10,92,122,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--teal-dark);
  flex-shrink: 0;
}

.juz-row-name,
.juz-surah-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  flex: 1;
}

.juz-row-ayat,
.juz-surah-info {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  flex-shrink: 0;
}

/* ── Reading Progress Bar (for long surahs) ──────────── */
.reading-progress {
  height: 4px;
  background: var(--border);
  margin: 12px 20px;
  border-radius: 4px;
  overflow: hidden;
}

.reading-progress-fill {
  height: 100%;
  background: var(--teal-dark);
  border-radius: 2px;
  transition: width 0.2s ease;
}

/* ── Jelajahi Intro Card (static surah info) ─────────── */
.jelajahi-intro {
  background: linear-gradient(160deg, #0A0F1E 0%, #16213E 55%, #0A5C7A 100%);
  border-radius: 24px;
  padding: 32px 24px;
  margin-top: 8px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(10,15,30,0.20);
  min-height: 35vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  animation: fadeInUp 0.4s ease-out both;
  position: relative;
  overflow: hidden;
}

.jelajahi-intro::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  border: 1px solid rgba(201,168,76,0.10);
  pointer-events: none;
}

.ji-emoji,
.jelajahi-intro-emoji {
  font-size: 2.5rem;
  line-height: 1;
}

.ji-name,
.jelajahi-intro-surah {
  font-size: 1.25rem;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0;
}

.ji-arabic-name {
  font-family: 'Amiri', serif;
  font-size: 1.5rem;
  color: rgba(255,255,255,0.7);
  margin: 4px 0 0;
}

.ji-meta,
.jelajahi-intro-meta {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
  margin: 0;
}

.ji-bismillah {
  font-family: 'Amiri', serif;
  font-size: 1.3rem;
  color: rgba(201,168,76,0.85);
  margin: 12px 0 0;
  line-height: 1.8;
  letter-spacing: 0.5px;
}

.ji-hint,
.jelajahi-intro-hint {
  margin-top: 16px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.35);
  animation: hintPulse 2s ease-in-out infinite;
}

/* ── Jelajahi Loading State ─────────────────────────── */
.jelajahi-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  gap: 16px;
  padding: 32px 20px;
}

.jl-icon {
  font-size: 2.5rem;
  animation: hintPulse 2s ease-in-out infinite;
}

/* ── Per-verse Relevance (panduan mode) ──────────────── */
.vc-relevance {
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--text-mid);
  background: #EDF7F6;
  border-left: 3px solid var(--teal-dark);
  border-radius: 0 10px 10px 0;
  padding: 10px 13px;
  margin-bottom: 14px;
}

/* ════════════════════════════════════════════════════════
   SELECTION VIEW — Hero + Input + Emotions
════════════════════════════════════════════════════════ */

/* ── Hero Header ──────────────────────────────────────── */
.header {
  margin: 12px 16px 0;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(10,15,30,0.20);
}

.hero {
  background: linear-gradient(160deg,
    #0A0F1E 0%,
    #0F2044 30%,
    #0D3B6E 55%,
    #0A5C7A 75%,
    #0D7A7A 100%
  );
  padding: 28px 24px 44px;
  position: relative;
}

/* Decorative glow rings */
.hero::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 300px; height: 300px;
  border-radius: 50%;
  border: 1px solid rgba(201,168,76,0.12);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  border-radius: 50%;
  border: 1px solid rgba(201,168,76,0.08);
  pointer-events: none;
}

.hero-ornament {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: rgba(201,168,76,0.55);
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero-title {
  font-size: clamp(28px, 7vw, 38px);
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.8px;
  line-height: 1.15;
  margin-bottom: 12px;
}

.hero-title span {
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  line-height: 1.7;
  font-weight: 400;
  max-width: 380px;
}

/* Wave bottom of hero — replaced by card border-radius */
.hero-wave {
  display: none;
}

/* ── Floating Input Card ──────────────────────────────── */
.input-card {
  margin: 16px 16px 0;
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 8px 40px rgba(10,15,30,0.14), 0 2px 8px rgba(10,15,30,0.08);
  position: relative;
  z-index: 2;
}

/* ── Search Textarea ──────────────────────────────────── */
.search-textarea-wrap { position: relative; }

.search-textarea {
  width: 100%;
  min-height: 100px;
  padding: 14px 40px 14px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 14.5px;
  color: var(--text-dark);
  background: #F8FAFC;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  resize: vertical;
  line-height: 1.75;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.search-textarea::placeholder { color: var(--text-soft); }

.search-textarea:focus {
  border-color: var(--teal-dark);
  box-shadow: 0 0 0 3px rgba(10,92,122,0.10);
  background: #FFFFFF;
}

.search-clear {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-soft);
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s;
}

.search-clear:hover { color: var(--text-dark); background: rgba(0,0,0,0.06); }
.search-clear.hidden { display: none; }

.search-helper {
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--text-soft);
  line-height: 1.5;
}

/* ── Submit Button ────────────────────────────────────── */
.search-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 14px;
  padding: 15px;
  background: linear-gradient(135deg, var(--night-3), var(--teal-dark));
  color: white;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  letter-spacing: 0.2px;
  box-shadow: 0 4px 16px rgba(10,92,122,0.35);
}

.search-submit-btn:hover  { opacity: 0.9; }
.search-submit-btn:active { transform: scale(0.98); }
.search-submit-btn.hidden { display: none; }

/* ── Home Content (Emotion Grid + VotD) ──────────────── */
.home-content {
  padding: 0 20px 48px;
}

/* ── Divider ──────────────────────────────────────────── */
.search-divider {
  text-align: center;
  margin: 32px 0 24px;
  position: relative;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.search-divider::before,
.search-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 90px);
  height: 1px;
  background: var(--border);
}

.search-divider::before { left: 0; }
.search-divider::after  { right: 0; }

/* ── Emotion Carousel ─────────────────────────────────── */
.emotion-grid {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  /* Break out of home-content's 20px side padding for full-bleed */
  width: calc(100% + 40px);
  margin-left: -20px;
  padding: 8px 20px 20px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin-bottom: 16px;
  cursor: grab;
}
.emotion-grid::-webkit-scrollbar { display: none; }
.emotion-grid.is-dragging { cursor: grabbing; scroll-behavior: auto; }

/* ── Emotion Card ─────────────────────────────────────── */
.emotion-card {
  flex-shrink: 0;
  width: 92px;
  min-height: 114px;
  scroll-snap-align: start;
  background: #EEF3FB;
  border: 1.5px solid #C8D8F0;
  border-radius: var(--radius);
  padding: 14px 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  text-align: center;
  font-family: 'Inter', sans-serif;
  position: relative;
  overflow: hidden;
  transform-origin: center;
  will-change: transform, opacity;
  user-select: none;
  -webkit-user-select: none;
  transition: box-shadow 0.2s, border-color 0.2s;
}

/* Accent bar on top */
.emotion-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: #6B8DD6;
  border-radius: 2px 2px 0 0;
}

.emotion-card:hover {
  box-shadow: 0 8px 24px rgba(10,15,30,0.13);
  border-color: #6B8DD6;
}
.emotion-card:active { opacity: 0.75 !important; }

.ec-emoji  { font-size: 26px; line-height: 1; }
.ec-label  { font-weight: 700; font-size: 11.5px; color: var(--text-dark); }
.ec-desc   { font-size: 9.5px; color: var(--text-muted); line-height: 1.4; }

/* ════════════════════════════════════════════════════════
   VERSES VIEW — Results Header + Cards
════════════════════════════════════════════════════════ */

/* ── Results Header (dark gradient) ──────────────────── */
.results-header {
  background: linear-gradient(160deg,
    #0A0F1E 0%,
    #0F2044 55%,
    #0A5C7A 100%
  );
  padding: 20px 20px 48px;
  position: relative;
  overflow: hidden;
  margin: 12px 16px 0;
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(10,15,30,0.20);
}

.results-header::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  border: 1px solid rgba(201,168,76,0.10);
  pointer-events: none;
}

/* Wave bottom of results header — replaced by card border-radius */
.results-wave {
  display: none;
}

/* ── Results Content ──────────────────────────────────── */
.results-content {
  padding: 0 16px 60px;
  margin-top: 16px;
}

/* ── Back Button ──────────────────────────────────────── */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid rgba(255,255,255,0.20);
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.65);
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  padding: 7px 16px;
  margin-bottom: 20px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  background: rgba(255,255,255,0.06);
}

.back-btn:hover {
  color: white;
  border-color: rgba(255,255,255,0.38);
  background: rgba(255,255,255,0.12);
}

/* ── Chat Thread ──────────────────────────────────────── */
.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Base bubble */
.chat-bubble {
  max-width: 88%;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.75;
  word-break: break-word;
  animation: bubblePop 0.25s ease both;
}

@keyframes bubblePop {
  from { opacity: 0; transform: scale(0.96) translateY(6px); }
  to   { opacity: 1; transform: scale(1)    translateY(0);   }
}

/* User bubble — glassmorphism on dark */
.chat-bubble--user {
  align-self: flex-end;
  background: rgba(255,255,255,0.10);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 14px 4px 14px 14px;
  color: rgba(255,255,255,0.90);
  font-style: italic;
}

/* App bubble — glassmorphism with gold hint */
.chat-bubble--app {
  align-self: flex-start;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(201,168,76,0.22);
  border-radius: 4px 14px 14px 14px;
  color: rgba(255,255,255,0.80);
}

/* Loading step indicator */
.chat-bubble--typing {
  padding: 14px 20px;
  display: flex;
  align-items: center;
}

.ls-step-text {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  letter-spacing: 0.01em;
}

.ls-step-text.ls-fade {
  animation: lsSlideIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

.ls-step-wrap {
  display: inline-block;
  animation: lsBounce 1.0s ease-in-out infinite;
}

@keyframes lsBounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

/* Blinking cursor during typewriter */
.chat-bubble--typing-active .cb-text::after {
  content: '|';
  animation: cursorBlink 0.65s step-end infinite;
  color: var(--gold);
  font-weight: 300;
  margin-left: 1px;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* Back/action button inside a chat bubble */
.cb-back-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 7px 15px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 100px;
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  transition: all 0.15s;
}

.cb-back-btn:hover {
  background: rgba(255,255,255,0.20);
  border-color: rgba(255,255,255,0.40);
  color: white;
}

/* ════════════════════════════════════════════════════════
   VERSE CARDS — Split dark/light design
════════════════════════════════════════════════════════ */

/* ── Verses Grid (legacy, kept for error states) ─────── */
.verses-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* ── Verses Header (light sticky) ────────────────────── */
.verses-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 10px;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 5;
}

.verse-counter {
  display: flex;
  align-items: center;
  gap: 8px;
}

.verse-counter-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-mid);
  min-width: 72px;
  text-align: center;
}

.verse-counter-arrow {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.verse-counter-arrow:hover {
  border-color: var(--teal-dark);
  color: var(--teal-dark);
  background: rgba(10,92,122,0.05);
}
.verse-counter-arrow:disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

/* ── Verses Carousel ─────────────────────────────────── */
.verses-carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-behavior: smooth;
}
.verses-carousel::-webkit-scrollbar { display: none; }

.verse-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  overflow-y: auto;
  padding: 0 16px 20px;
  min-height: 0;
}

/* Intro slide — dark-gradient chat-bubble style */
.intro-chat {
  background: linear-gradient(160deg, #0A0F1E 0%, #0F2044 55%, #0A5C7A 100%);
  border-radius: 24px;
  padding: 24px 20px 28px;
  margin-top: 8px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(10,15,30,0.20);
  display: flex;
  flex-direction: column;
  min-height: 45vh;
}
.intro-chat::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  border: 1px solid rgba(201,168,76,0.10);
  pointer-events: none;
}
.intro-chat .chat-thread {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.intro-swipe-hint {
  margin-top: 20px;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.35);
  animation: hintPulse 2s ease-in-out infinite;
}
@keyframes hintPulse {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 1; }
}

/* Verse cards inside carousel — no entrance animation */
.verse-slide .verse-card {
  opacity: 1;
  transform: none;
}
.verse-slide .verse-card:hover {
  transform: none;
  box-shadow: var(--shadow-card);
}

/* ── Verses Dots (pagination) ────────────────────────── */
.verses-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 12px 0 4px;
}

.verse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.2s ease, transform 0.2s ease;
}
.verse-dot.active {
  background: var(--gold);
  transform: scale(1.25);
}

/* Loading state inside carousel */
.verse-slide-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  text-align: center;
  padding: 40px 24px;
  gap: 18px;
}

/* ── Verse Card ───────────────────────────────────────── */
.verse-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(226,232,240,0.8);
  display: flex;
  flex-direction: column;
  /* Visibility transition */
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.4s ease, transform 0.4s ease,
              box-shadow 0.18s, border-color 0.18s;
  min-width: 0;
}

.verse-card.card-visible {
  opacity: 1;
  transform: none;
}

.verse-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(10,15,30,0.13);
}

/* ── Dark Arabic Section ──────────────────────────────── */
.vc-arabic-section {
  background: linear-gradient(135deg, #0A0F1E 0%, #0F2044 70%, #0D3B6E 100%);
  padding: 20px 20px 18px;
  position: relative;
  overflow: hidden;
}

/* Gold vertical accent bar on the left */
.vc-arabic-section::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--gold), var(--gold-light), transparent);
  border-radius: 0 2px 2px 0;
}

/* Decorative ring */
.vc-arabic-section::after {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 130px; height: 130px;
  border-radius: 50%;
  border: 1px solid rgba(201,168,76,0.12);
  pointer-events: none;
}

.vc-ref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.vc-ref-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.vc-ref-label::before {
  content: '';
  display: block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}

.vc-surah-number {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(201,168,76,0.30);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: rgba(201,168,76,0.75);
  flex-shrink: 0;
}

.vc-arabic-text {
  font-family: 'Amiri', serif;
  font-size: 24px;
  line-height: 2.1;
  direction: rtl;
  text-align: right;
  color: rgba(255,255,255,0.95);
}

/* ── Light Content Section ────────────────────────────── */
.vc-content {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.vc-translation {
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--text-mid);
  font-style: italic;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  flex: 1;
}

/* ── Per-verse Resonance ──────────────────────────────── */
.vc-resonance {
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--text-mid);
  background: #F0F7FF;
  border-left: 3px solid var(--teal-dark);
  border-radius: 0 10px 10px 0;
  padding: 10px 13px;
  margin-bottom: 14px;
}

/* ── Tafsir Toggle Button ─────────────────────────────── */
.vc-tafsir-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0 0 14px;
  padding: 10px 13px;
  background: #F8FAFC;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, border-radius 0.15s;
  gap: 8px;
  text-align: left;
}

.vc-tafsir-btn:hover {
  background: rgba(10,92,122,0.05);
  border-color: var(--teal-dark);
  color: var(--teal-dark);
}

.vc-tafsir-btn.open {
  background: rgba(10,92,122,0.06);
  border-color: var(--teal-dark);
  color: var(--teal-dark);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  margin-bottom: 0;
}

.vc-tafsir-btn-arrow {
  flex-shrink: 0;
  opacity: 0.7;
}

/* ── Tafsir Unified Panel ─────────────────────────────── */
.vc-tafsir-panel {
  margin-bottom: 14px;
  border: 1.5px solid var(--teal-dark);
  border-top: none;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  overflow: hidden;
}
.vc-tafsir-panel.hidden { display: none; }

/* ── Tab Bar ──────────────────────────────────────────── */
.vc-tafsir-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: rgba(10,92,122,0.03);
}
.vc-tab-btn {
  flex: 1;
  padding: 8px 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.01em;
}
.vc-tab-btn.active {
  color: var(--teal-dark);
  border-bottom-color: var(--teal-dark);
  background: rgba(10,92,122,0.06);
}
.vc-tab-btn:hover:not(.active) {
  background: rgba(10,92,122,0.03);
  color: var(--text-mid);
}

/* ── Tab Content ──────────────────────────────────────── */
.vc-tab-content {
  padding: 14px 14px 12px;
}
.vc-tab-content.hidden { display: none; }

.vc-tafsir-text {
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--text-mid);
  white-space: pre-wrap;
  margin-bottom: 10px;
}
.vc-tafsir-note {
  font-size: 10.5px;
  font-style: italic;
  font-weight: 600;
  color: var(--teal-dark);
  margin-top: 10px;
}

/* ── Ibnu Kathir Markdown Styles ──────────────────────── */
.vc-tafsir-md h2 {
  font-size: 12.5px; font-weight: 700; color: var(--text-dark); margin: 14px 0 5px;
}
.vc-tafsir-md h3 {
  font-size: 11.5px; font-weight: 700; color: var(--night-2); margin: 12px 0 4px;
}
.vc-tafsir-md p {
  font-size: 12.5px; line-height: 1.85; color: var(--text-mid); margin-bottom: 6px;
}
.vc-tafsir-md blockquote {
  border-left: 3px solid var(--teal-dark);
  background: rgba(10,92,122,0.04);
  border-radius: 0 4px 4px 0;
  padding: 8px 12px;
  margin: 8px 0;
}
.vc-tafsir-md blockquote p { color: var(--text-mid); font-style: italic; margin-bottom: 0; }
.vc-tafsir-md strong { font-weight: 700; color: var(--text-dark); }
.vc-tafsir-md em     { font-style: italic; }

/* ── Baca Selengkapnya expand ─────────────────────────── */
.vc-tafsir-text-wrap {
  position: relative;
  max-height: 116px;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.vc-tafsir-text-wrap.expanded { max-height: 9999px; }
.vc-tafsir-text-wrap:not(.expanded)::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 52px;
  background: linear-gradient(transparent, #ffffff);
  pointer-events: none;
}
.vc-read-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  padding: 0;
  background: none;
  border: none;
  color: var(--teal-dark);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s;
}
.vc-read-more-btn:hover { color: var(--night-2); }

/* ── Asbabun Nuzul Panel ────────────────────────────────── */
.vc-asbab-toggle {
  margin-top: 0;
}
.vc-asbab-panel {
  margin-bottom: 14px;
  border: 1.5px solid var(--teal-dark);
  border-top: none;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  overflow: hidden;
}
.vc-asbab-panel.hidden { display: none; }
.vc-asbab-body {
  padding: 14px 14px 12px;
}

/* ── Verse Action Row ─────────────────────────────────── */
.vc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.vc-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  padding: 7px 13px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.vc-btn:hover {
  color: var(--teal-dark);
  border-color: var(--teal-dark);
  background: rgba(10,92,122,0.05);
}

.vc-btn:active { transform: scale(0.96); }

/* Audio button — playing state */
.vc-btn.playing {
  color: var(--teal-dark);
  border-color: var(--teal-dark);
  background: rgba(10,92,122,0.08);
}

/* ════════════════════════════════════════════════════════
   VERSE OF THE DAY
════════════════════════════════════════════════════════ */
.votd-section { margin-top: 8px; }

/* ── VOTD collapsible wrapper ─────────────────────────── */
.votd-wrap {
  margin: 0 0 24px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.votd-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  gap: 12px;
}

.votd-trigger-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* Override label/date colors for light trigger background */
.votd-trigger .votd-label { color: var(--gold); }
.votd-trigger .votd-date  { color: var(--text-muted); }

.votd-chevron {
  color: var(--text-muted);
  transition: transform 0.25s ease;
  flex-shrink: 0;
  display: flex;
}

.votd-trigger[aria-expanded="true"] .votd-chevron { transform: rotate(180deg); }

.votd-body          { display: none; }
.votd-body.open     { display: block; }

/* Card inside body: top corners squared off (wrap handles them) */
.votd-body .votd-card { border-radius: 0 0 var(--radius) var(--radius); }

.votd-skeleton {
  height: 200px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #0A0F1E 0%, #0F2044 60%, #0A5C7A 100%);
  animation: votdPulse 1.5s ease-in-out infinite;
}

@keyframes votdPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.65; }
}

.votd-card {
  background: linear-gradient(135deg, #0A0F1E 0%, #0F2044 60%, #0A5C7A 100%);
  border-radius: var(--radius);
  padding: 24px 22px;
  color: white;
  position: relative;
  overflow: hidden;
  animation: fadeUp 0.5s ease both;
}

.votd-card::before {
  content: '';
  position: absolute;
  bottom: -60px; right: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  border: 1px solid rgba(201,168,76,0.15);
  pointer-events: none;
}

.votd-card::after {
  content: '';
  position: absolute;
  bottom: -30px; right: -30px;
  width: 120px; height: 120px;
  border-radius: 50%;
  border: 1px solid rgba(201,168,76,0.10);
  pointer-events: none;
}

.votd-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.votd-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1.8px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.votd-date {
  font-size: 11px;
  color: rgba(255,255,255,0.40);
  font-weight: 400;
}

.votd-arabic {
  font-family: 'Amiri', serif;
  font-size: 22px;
  line-height: 2.1;
  direction: rtl;
  text-align: right;
  color: rgba(255,255,255,0.95);
  border-top: 1px solid rgba(201,168,76,0.22);
  border-bottom: 1px solid rgba(201,168,76,0.22);
  padding: 14px 0;
  margin-bottom: 14px;
}

.votd-translation {
  font-size: 13px;
  line-height: 1.85;
  color: rgba(255,255,255,0.68);
  font-style: italic;
  margin-bottom: 8px;
}

.votd-ref {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.8px;
  margin-bottom: 18px;
  text-transform: uppercase;
}

.votd-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Override vc-btn defaults for dark VOTD background */
.votd-card .vc-btn {
  border-color: rgba(255,255,255,0.22);
  color: rgba(255,255,255,0.78);
  background: rgba(255,255,255,0.07);
}
.votd-card .vc-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201,168,76,0.12);
}
.votd-card .vc-btn.playing {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201,168,76,0.15);
}
/* ════════════════════════════════════════════════════════
   VERSE ACTIONS + FEEDBACK + DISCLAIMER
════════════════════════════════════════════════════════ */
.verse-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.verse-actions.hidden { display: none; }

.va-refresh {
  flex: 1;
  padding: 13px 20px;
  background: var(--teal-dark);
  color: #fff;
  border: 1.5px solid var(--teal-dark);
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
  min-width: 150px;
}
.va-refresh:hover { opacity: 0.85; }

.va-secondary {
  flex: 1;
  padding: 13px 20px;
  background: transparent;
  color: var(--teal-dark);
  border: 1.5px solid var(--teal-dark);
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  min-width: 150px;
}
.va-secondary:hover { background: rgba(10,92,122,0.06); }

.verse-feedback {
  margin-top: 24px;
  text-align: center;
  padding: 24px 20px;
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  border-top: 2px solid rgba(201,168,76,0.28);
  box-shadow: var(--shadow-card);
}
.verse-feedback.hidden { display: none; }

.feedback-label {
  font-size: 14px;
  color: var(--text-mid);
  margin-bottom: 16px;
  font-weight: 500;
  line-height: 1.6;
}

.feedback-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.feedback-btn {
  padding: 9px 18px;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-mid);
  cursor: pointer;
  transition: all 0.15s;
}
.feedback-btn:hover {
  border-color: var(--teal-dark);
  color: var(--teal-dark);
  background: rgba(10,92,122,0.05);
}
.feedback-btn.selected {
  background: var(--night-2);
  color: white;
  border-color: var(--night-2);
}

.feedback-thanks {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: feedbackFadeIn 0.3s ease;
}
@keyframes feedbackFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0);   }
}
.feedback-thanks-icon { font-size: 22px; line-height: 1; }
.feedback-thanks-text {
  font-size: 14px; color: var(--text-mid);
  line-height: 1.65; max-width: 340px;
}
.feedback-try-again {
  margin-top: 6px;
  padding: 8px 18px;
  background: none;
  border: 1.5px solid var(--teal-dark);
  border-radius: 100px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--teal-dark);
  cursor: pointer;
  transition: all 0.15s;
}
.feedback-try-again:hover {
  background: var(--night-2);
  border-color: var(--night-2);
  color: white;
}

.verse-disclaimer {
  margin-top: 24px;
  font-size: 11.5px;
  color: var(--text-soft);
  text-align: center;
  line-height: 1.65;
}

/* ════════════════════════════════════════════════════════
   LOADING + SKELETON + ERROR
════════════════════════════════════════════════════════ */
.loading-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 20px 0 12px;
}

.loading-spinner {
  width: 32px; height: 32px;
  border: 2.5px solid var(--border);
  border-top-color: var(--teal-dark);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-text { font-size: 15px; color: var(--text-muted); font-weight: 400; }

.loading-dot { opacity: 0; animation: blink 1.4s infinite; }
.loading-dot:nth-child(1) { animation-delay: 0.0s; }
.loading-dot:nth-child(2) { animation-delay: 0.2s; }
.loading-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink {
  0%, 60%, 100% { opacity: 0; }
  30%           { opacity: 1; }
}

@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton-card { pointer-events: none; }

.sk-line, .sk-block {
  border-radius: 6px;
  background: linear-gradient(90deg, #E8EDF2 25%, #F2F5F8 50%, #E8EDF2 75%);
  background-size: 800px 100%;
  animation: shimmer 1.5s infinite;
  margin-bottom: 12px;
}
.sk-line           { height: 12px; width: 100%; }
.sk-line.sk-short  { width: 40%; }
.sk-line.sk-medium { width: 70%; }
.sk-block          { height: 72px; margin: 16px 0; border-radius: 8px; }

.error-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 60px 20px;
  text-align: center;
}
.error-emoji { font-size: 40px; }
.error-msg { font-size: 15px; color: var(--text-muted); max-width: 320px; line-height: 1.75; }
.error-back-btn {
  background: var(--night-2);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 24px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.error-back-btn:hover { background: var(--night-3); }

/* ════════════════════════════════════════════════════════
   TOAST
════════════════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--night-1);
  color: white;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 22px;
  border-radius: 100px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ════════════════════════════════════════════════════════
   SHARE BOTTOM SHEET
════════════════════════════════════════════════════════ */

/* Overlay behind sheet */
.share-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 50;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.share-overlay.visible { opacity: 1; }
.share-overlay.hidden { display: none; }

/* Sheet container */
.share-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 600px;
  margin: 0 auto;
  background: var(--card-bg);
  border-radius: 20px 20px 0 0;
  z-index: 51;
  padding: 12px 20px 28px;
  transform: translateY(100%);
  transition: transform 0.3s ease-out;
  max-height: 85vh;
  overflow-y: auto;
}
.share-sheet.visible { transform: translateY(0); }
.share-sheet.hidden { display: none; }

/* Drag handle */
.share-sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 16px;
}

/* Live preview */
.share-preview-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}
.share-preview {
  width: 60%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.10);
  overflow: hidden;
  position: relative;
  background: #FFFFFF;
}
.share-preview.ratio-story { aspect-ratio: 9 / 16; width: 40%; }
.share-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Section labels */
.share-section {
  margin-bottom: 16px;
}
.share-section-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

/* Theme picker pills */
.share-theme-picker {
  display: flex;
  gap: 8px;
}
.theme-pill {
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.8125rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-mid);
  cursor: pointer;
  transition: all 0.15s ease;
}
.theme-pill.active {
  background: var(--teal-dark);
  color: #FFFFFF;
  border-color: var(--teal-dark);
}

/* Content toggles */
.share-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.875rem;
  color: var(--text-mid);
  cursor: pointer;
}
.share-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--teal-dark);
  cursor: pointer;
}

/* Platform buttons grid */
.share-platform-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.share-platform-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-mid);
  transition: background 0.15s ease;
}
.share-platform-btn:active {
  background: rgba(0,0,0,0.04);
}
.share-platform-btn svg {
  width: 24px;
  height: 24px;
  color: var(--text-muted);
}

/* ════════════════════════════════════════════════════════
   SHARE IMAGE RENDER (off-screen, captured by html2canvas)
════════════════════════════════════════════════════════ */
.share-render {
  position: fixed;
  top: -9999px;
  left: -9999px;
  pointer-events: none;
}

/* Share image template (built dynamically in JS) */
.si-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  padding: 8% 10% 0;
  position: relative;
}
.si-question {
  font-size: 16px;
  font-style: italic;
  text-align: center;
  margin-bottom: 24px;
  line-height: 1.6;
  max-width: 85%;
}
.si-arabic {
  font-family: 'Amiri', serif;
  font-size: 32px;
  line-height: 2.1;
  direction: rtl;
  text-align: center;
  width: 100%;
  margin-bottom: 20px;
}
.si-translation {
  font-size: 15px;
  line-height: 1.85;
  text-align: center;
  font-style: italic;
  margin-bottom: 16px;
  max-width: 90%;
}
.si-ref {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 16px;
  display: inline-block;
}
.si-tafsir {
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
  margin-bottom: 20px;
  max-width: 85%;
}
.si-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 10%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.si-footer-divider {
  width: 60%;
  height: 1px;
  margin-bottom: 14px;
}
.si-footer-brand {
  font-size: 3%;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* ── Share image theme: Light ── */
.si-theme-light { background: #FFFFFF; }
.si-theme-light .si-question { color: #4A4A4A; }
.si-theme-light .si-arabic { color: #1A1A1A; }
.si-theme-light .si-translation { color: #1A1A1A; }
.si-theme-light .si-ref { color: var(--teal-dark); background: rgba(42,124,111,0.08); }
.si-theme-light .si-tafsir { color: #8E8E93; }
.si-theme-light .si-footer-divider { background: rgba(0,0,0,0.08); }
.si-theme-light .si-footer-brand { color: #AAAAAA; }

/* ── Share image theme: Dark ── */
.si-theme-dark { background: #1A1D2E; }
.si-theme-dark .si-question { color: #C0C0D0; }
.si-theme-dark .si-arabic { color: #FFFFFF; }
.si-theme-dark .si-translation { color: #F0F0F0; }
.si-theme-dark .si-ref { color: #C9A84C; background: rgba(196,152,59,0.12); }
.si-theme-dark .si-tafsir { color: #808090; }
.si-theme-dark .si-footer-divider { background: rgba(255,255,255,0.10); }
.si-theme-dark .si-footer-brand { color: rgba(255,255,255,0.4); }

/* ── Share image theme: Classic ── */
.si-theme-classic { background: #F5EFE0; }
.si-theme-classic .si-question { color: #5C4E3E; }
.si-theme-classic .si-arabic { color: #2A1F14; }
.si-theme-classic .si-translation { color: #3D3225; }
.si-theme-classic .si-ref { color: #8B6F47; background: rgba(139,111,71,0.10); }
.si-theme-classic .si-tafsir { color: #8B7D6B; }
.si-theme-classic .si-footer-divider { background: rgba(61,50,37,0.12); }
.si-theme-classic .si-footer-brand { color: rgba(61,50,37,0.35); }

/* ════════════════════════════════════════════════════════
   SHARE BUTTON REDESIGN (full-width CTA)
════════════════════════════════════════════════════════ */
.vc-share-btn-full {
  display: block;
  width: 100%;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  background: var(--teal-dark);
  color: #FFFFFF;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-align: center;
  transition: opacity 0.15s ease, transform 0.15s ease;
  margin-top: 16px;
  line-height: 1.4;
}
.vc-share-btn-full:active {
  opacity: 0.85;
  transform: scale(0.98);
}

/* Audio button as secondary (ghost style) */
.vc-audio-btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  margin: 10px auto 0;
  padding: 8px 18px;
  border-radius: 20px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.vc-audio-btn-secondary:active {
  background: rgba(0,0,0,0.04);
}

/* ════════════════════════════════════════════════════════
   SCROLLBAR
════════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #CBD5E0; border-radius: 3px; }
