/* ===================================================
   TAWIL — تأويل | Dream Interpretation Website
   Mystical Dark Theme — Arabic RTL
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&family=Noto+Naskh+Arabic:wght@400;500;600;700&display=swap');

/* ── Variables ─────────────────────────────────── */
:root {
  --bg-deep:        #070b18;
  --bg-dark:        #0d1225;
  --bg-card:        #111827;
  --bg-card-hover:  #161f35;
  --bg-input:       #0f1520;

  --accent-gold:    #c9922a;
  --accent-gold-lt: #e6b84a;
  --accent-purple:  #7c3aed;
  --accent-purple-lt: #a78bfa;
  --accent-teal:    #0e9488;

  --text-primary:   #e8e4f0;
  --text-secondary: #9a93b0;
  --text-muted:     #5a5472;

  --border:         rgba(124, 58, 237, 0.2);
  --border-gold:    rgba(201, 146, 42, 0.3);
  --glow-purple:    0 0 40px rgba(124, 58, 237, 0.25);
  --glow-gold:      0 0 30px rgba(201, 146, 42, 0.2);

  --radius-sm:      8px;
  --radius-md:      14px;
  --radius-lg:      22px;
  --radius-xl:      32px;

  --transition:     all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: 'Noto Naskh Arabic', 'Amiri', serif;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.8;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

ul { list-style: none; }

img { max-width: 100%; }

/* ── Scrollbar ──────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--accent-purple); border-radius: 3px; }

/* ── Stars Background ───────────────────────────── */
.stars-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.star {
  position: absolute;
  border-radius: 50%;
  background: white;
  animation: twinkle var(--dur, 3s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

@keyframes twinkle {
  0%, 100% { opacity: var(--min-op, 0.1); transform: scale(1); }
  50%       { opacity: var(--max-op, 0.8); transform: scale(1.3); }
}

/* ── Navigation ─────────────────────────────────── */
.nav, .navbar {
  position: fixed;
  top: 0; right: 0; left: 0;
  z-index: 100;
  padding: 0 2rem;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(7, 11, 24, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}
.nav.scrolled, .navbar.scrolled {
  box-shadow: 0 4px 40px rgba(124,58,237,0.12);
}
.nav-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav-logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-gold));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.nav-logo-text {
  font-family: 'Amiri', serif;
  font-size: 1.7rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-gold-lt), var(--accent-purple-lt));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.nav-link {
  padding: 0.4rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
  background: rgba(124, 58, 237, 0.15);
}

.nav-link.active { color: var(--accent-gold-lt); }

.nav-cta {
  padding: 0.45rem 1.3rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent-purple), #5b21b6);
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition);
  border: 1px solid rgba(167, 139, 250, 0.3);
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.nav-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  border: 2px solid var(--border);
}

/* ── Page Wrapper ───────────────────────────────── */
.page {
  position: relative;
  z-index: 1;
  padding-top: 70px;
}

/* ── Hero Section ───────────────────────────────── */
.hero {
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  position: relative;
  overflow: hidden;
  max-width: 100vw;
}

.hero-moon {
  position: absolute;
  top: 4%;
  left: 50%;
  z-index: 1;
  transform: translateX(-50%);
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f0e68c, #c9922a 40%, #7c3aed 75%, transparent);
  box-shadow: 0 0 80px rgba(201, 146, 42, 0.4), 0 0 160px rgba(124, 58, 237, 0.2);
  animation: moonFloat 8s ease-in-out infinite;
  opacity: 0.85;
}

.hero-moon::after {
  content: '';
  position: absolute;
  top: 15%;
  right: 15%;
  width: 60%;
  height: 60%;
  border-radius: 50%;
  background: rgba(7, 11, 24, 0.35);
}

@keyframes moonFloat {
  0%, 100% { transform: translateX(-50%) translateY(0px); }
  50%       { transform: translateX(-50%) translateY(-18px); }
}

.hero-content {
  max-width: 760px;
  margin-top: 6rem;
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.2rem;
  border-radius: 50px;
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--accent-purple-lt);
  margin-bottom: 1.8rem;
  letter-spacing: 0.5px;
}

.hero-title {
  font-family: 'Amiri', serif;
  font-size: clamp(2.2rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.2rem;
  background: linear-gradient(180deg, #ffffff 0%, var(--accent-gold-lt) 60%, var(--accent-purple-lt) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  overflow-wrap: break-word;
  word-break: break-word;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 2;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Buttons ─────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.8rem;
  border-radius: var(--radius-md);
  font-family: 'Noto Naskh Arabic', serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-purple), #5b21b6);
  color: white;
  box-shadow: 0 4px 25px rgba(124, 58, 237, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 35px rgba(124, 58, 237, 0.5);
}

.btn-gold {
  background: linear-gradient(135deg, var(--accent-gold), #a16207);
  color: #1a0e00;
  font-weight: 700;
  box-shadow: 0 4px 25px rgba(201, 146, 42, 0.3);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 35px rgba(201, 146, 42, 0.45);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: rgba(124, 58, 237, 0.1);
  border-color: var(--accent-purple);
}

.btn-sm {
  padding: 0.45rem 1.1rem;
  font-size: 0.88rem;
}

.btn-lg {
  padding: 1rem 2.4rem;
  font-size: 1.1rem;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* ── Section ─────────────────────────────────────── */
.section {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-tag {
  display: inline-block;
  padding: 0.3rem 1rem;
  border-radius: 50px;
  background: rgba(201, 146, 42, 0.12);
  border: 1px solid var(--border-gold);
  color: var(--accent-gold-lt);
  font-size: 0.82rem;
  margin-bottom: 1rem;
  letter-spacing: 1px;
}

.section-title {
  font-family: 'Amiri', serif;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.8rem;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 560px;
  margin: 0 auto;
  line-height: 2;
}

/* ── Search Bar ──────────────────────────────────── */
.search-hero {
  max-width: 700px;
  margin: 0 auto 2rem;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 0.5rem 0.5rem 0.5rem 1.5rem;
  gap: 0.8rem;
  transition: var(--transition);
  box-shadow: var(--glow-purple);
}

.search-box:focus-within {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2), var(--glow-purple);
}

.search-box input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: 'Noto Naskh Arabic', serif;
  font-size: 1.05rem;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.search-icon {
  color: var(--text-muted);
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ── Cards ───────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  transition: var(--transition);
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(124, 58, 237, 0.4);
  transform: translateY(-3px);
  box-shadow: var(--glow-purple);
}

.card-gold {
  border-color: var(--border-gold);
}

.card-gold:hover {
  border-color: rgba(201, 146, 42, 0.5);
  box-shadow: var(--glow-gold);
}

/* ── Grid ────────────────────────────────────────── */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.2rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(440px, 1fr));
  gap: 1.5rem;
}

/* ── Feature Cards ───────────────────────────────── */
.feature-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.2rem;
}

.feature-icon-purple { background: rgba(124, 58, 237, 0.15); }
.feature-icon-gold   { background: rgba(201, 146, 42, 0.15); }
.feature-icon-teal   { background: rgba(14, 148, 136, 0.15); }

.feature-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
}

.feature-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.9;
}

/* ── Category Cards ──────────────────────────────── */
.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.category-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-gold);
  transform: translateY(-4px);
  box-shadow: var(--glow-gold);
}

.category-emoji {
  font-size: 2.2rem;
  margin-bottom: 0.8rem;
  display: block;
}

.category-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
}

.category-count {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ── Interpretation Result ───────────────────────── */
.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.result-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(201, 146, 42, 0.12), transparent 70%);
  border-radius: 0 0 0 100%;
}

.result-source {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.9rem;
  border-radius: 50px;
  background: rgba(201, 146, 42, 0.12);
  border: 1px solid var(--border-gold);
  color: var(--accent-gold-lt);
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

.result-title {
  font-family: 'Amiri', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.result-text {
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 2.1;
  border-inline-start: 3px solid var(--accent-gold);
  padding-inline-start: 1rem;
}

.result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.2rem;
}

.tag {
  padding: 0.25rem 0.8rem;
  border-radius: 50px;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.25);
  color: var(--accent-purple-lt);
  font-size: 0.8rem;
}

/* ── Stats ───────────────────────────────────────── */
.stats-strip {
  display: flex;
  justify-content: center;
  gap: 4rem;
  padding: 3rem 2rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(124, 58, 237, 0.04);
  flex-wrap: wrap;
}

.stat-item { text-align: center; }

.stat-number {
  font-family: 'Amiri', serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--accent-gold-lt);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.stat-label {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ── Testimonials ────────────────────────────────── */
.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
}

.testimonial-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 2;
  margin-bottom: 1.2rem;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.author-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.author-city {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.stars-rating {
  color: var(--accent-gold-lt);
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
}

/* ── Forms ───────────────────────────────────────── */
.form-group {
  margin-bottom: 1.4rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-input,
.form-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-family: 'Noto Naskh Arabic', serif;
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.9;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

/* ── Auth Page ───────────────────────────────────── */
.auth-container {
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--glow-purple);
}

.auth-header {
  text-align: center;
  margin-bottom: 2.2rem;
}

.auth-logo {
  font-family: 'Amiri', serif;
  font-size: 2.4rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-gold-lt), var(--accent-purple-lt));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.3rem;
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.auth-tabs {
  display: flex;
  background: var(--bg-input);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 2rem;
  border: 1px solid var(--border);
}

.auth-tab {
  flex: 1;
  padding: 0.6rem;
  text-align: center;
  font-size: 0.92rem;
  border-radius: calc(var(--radius-md) - 2px);
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
  font-family: 'Noto Naskh Arabic', serif;
}

.auth-tab.active {
  background: var(--accent-purple);
  color: white;
  font-weight: 600;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.social-btn {
  width: 100%;
  padding: 0.7rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: 'Noto Naskh Arabic', serif;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: var(--transition);
  margin-bottom: 0.8rem;
}

.social-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-purple);
  color: var(--text-primary);
}

.form-forgot {
  text-align: start;
  font-size: 0.82rem;
  color: var(--accent-purple-lt);
  margin-top: 0.4rem;
  cursor: pointer;
  display: block;
}

.form-forgot:hover { text-decoration: underline; }

/* ── Dashboard ───────────────────────────────────── */
.dashboard-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 70px);
}

.sidebar {
  background: var(--bg-dark);
  border-inline-end: 1px solid var(--border);
  padding: 2rem 1.2rem;
  position: sticky;
  top: 70px;
  height: calc(100vh - 70px);
  overflow-y: auto;
}

.sidebar-section {
  margin-bottom: 2rem;
}

.sidebar-section-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 0.8rem;
  padding: 0 0.5rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.92rem;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 0.2rem;
}

.sidebar-link:hover,
.sidebar-link.active {
  background: rgba(124, 58, 237, 0.12);
  color: var(--text-primary);
}

.sidebar-link.active {
  color: var(--accent-purple-lt);
  border-inline-start: 3px solid var(--accent-purple);
}

.sidebar-link-icon {
  font-size: 1.1rem;
  width: 22px;
  text-align: center;
}

.dashboard-main {
  padding: 2rem 2.5rem;
  overflow-x: hidden;
}

.page-heading {
  margin-bottom: 2rem;
}

.page-heading-title {
  font-family: 'Amiri', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
}

.page-heading-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ── Dream Journal Entry ─────────────────────────── */
.journal-entry {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  margin-bottom: 1.2rem;
  transition: var(--transition);
  cursor: pointer;
}

.journal-entry:hover {
  border-color: var(--accent-purple);
  background: var(--bg-card-hover);
}

.journal-entry-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.8rem;
  gap: 1rem;
}

.journal-entry-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.journal-entry-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.journal-entry-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.9;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.journal-entry-footer {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1rem;
}

.mood-badge {
  padding: 0.2rem 0.7rem;
  border-radius: 50px;
  font-size: 0.78rem;
  border: 1px solid;
}

.mood-good    { background: rgba(14, 148, 136, 0.1); border-color: rgba(14, 148, 136, 0.3); color: #5eead4; }
.mood-neutral { background: rgba(201, 146, 42, 0.1); border-color: rgba(201, 146, 42, 0.3); color: var(--accent-gold-lt); }
.mood-bad     { background: rgba(220, 38, 38, 0.1); border-color: rgba(220, 38, 38, 0.3); color: #fca5a5; }

/* ── Dashboard Stats ─────────────────────────────── */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.dash-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  text-align: center;
}

.dash-stat-icon {
  font-size: 1.8rem;
  margin-bottom: 0.6rem;
}

.dash-stat-number {
  font-family: 'Amiri', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-gold-lt);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.dash-stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ── Empty State ─────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.empty-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-title {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.empty-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* ── Ornamental Divider ──────────────────────────── */
.ornament {
  text-align: center;
  margin: 1rem 0;
  color: var(--accent-gold);
  opacity: 0.5;
  font-size: 1.4rem;
  letter-spacing: 0.5rem;
}

/* ── Footer ──────────────────────────────────────── */
.footer {
  background: var(--bg-dark);
  border-top: 1px solid var(--border);
  padding: 3rem 2rem 1.5rem;
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto 2.5rem;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.9;
  margin-top: 0.8rem;
}

.footer-col-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.footer-link {
  display: block;
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
  transition: var(--transition);
}

.footer-link:hover { color: var(--accent-gold-lt); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.footer-bottom p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ── Notification Toast ──────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.toast {
  padding: 0.9rem 1.5rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 0.9rem;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  animation: slideUp 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.toast-success { border-color: rgba(14, 148, 136, 0.4); }
.toast-error   { border-color: rgba(220, 38, 38, 0.4); }

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

/* ── Utilities ───────────────────────────────────── */
.text-gold   { color: var(--accent-gold-lt); }
.text-purple { color: var(--accent-purple-lt); }
.text-muted  { color: var(--text-muted); }
.text-center { text-align: center; }
.hidden      { display: none !important; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }

/* ── Search Page specific ────────────────────────── */
.search-page-hero {
  padding: 4rem 2rem 2rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.search-filters {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.filter-chip {
  padding: 0.35rem 1rem;
  border-radius: 50px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Noto Naskh Arabic', serif;
}

.filter-chip:hover,
.filter-chip.active {
  background: rgba(124, 58, 237, 0.15);
  border-color: var(--accent-purple);
  color: var(--accent-purple-lt);
}

.results-grid {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

.results-count {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  text-align: start;
}

/* ── Quran verse banner ──────────────────────────── */
.verse-banner {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(201, 146, 42, 0.08));
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  margin: 2rem auto;
  max-width: 700px;
}

.verse-text {
  font-family: 'Amiri', serif;
  font-size: 1.35rem;
  color: var(--accent-gold-lt);
  line-height: 2.2;
  margin-bottom: 0.6rem;
}

.verse-translation {
  font-size: 0.92rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.8;
  margin-bottom: 0.5rem;
  min-height: 0;
}
.verse-translation:empty { display: none; }

.verse-ref {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .hero-moon { width: 110px; height: 110px; top: 2%; }
  .stats-strip { gap: 2rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .grid-2 { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: center; width: 100%; }
  .hero-actions .btn { width: 100%; max-width: 280px; }
  .dashboard-main { padding: 1.5rem; }

  /* Nav compact on mobile */
  .nav, .navbar { padding: 0 0.9rem; height: 58px; max-width: 100vw; box-sizing: border-box; }
  .nav-logo-icon { width: 32px; height: 32px; font-size: 1rem; }
  .nav-logo-text { font-size: 1.35rem; }
  .nav-cta { padding: 0.4rem 0.7rem; font-size: 0 !important; max-width: 44px; overflow: hidden; }
  .nav-cta::before { content: "✨"; font-size: 1rem; }

  /* Hero responsive sizing */
  .hero { padding: 3rem 1rem; min-height: auto; }
  .hero-content { margin-top: 4rem; padding: 0 0.3rem; }
  .hero-title { font-size: clamp(1.6rem, 6vw, 2.4rem); line-height: 1.25; padding: 0 0.5rem; }
  .hero-subtitle { font-size: 0.95rem; line-height: 1.8; margin-bottom: 1.8rem; }
  .hero-badge { font-size: 0.75rem; padding: 0.35rem 0.9rem; }

  /* Blog navbar compact layout (inline-styled in blog template) */
  .navbar .nav-container { gap: 0.35rem; flex-wrap: nowrap; min-width: 0; }
  .navbar .nav-logo span { font-size: 1.15rem !important; }
  .navbar .nav-logo svg { width: 28px !important; height: 28px !important; }
  .navbar .nav-logo { gap: 0.4rem !important; flex-shrink: 0; }
  /* Hide the redundant "Blog" link on mobile — logo/breadcrumb already route there */
  .navbar .nav-link { display: none !important; }
  /* Shrink lang toggle inside blog navbar */
  .navbar [style*="gap:0.3rem"] a,
  .navbar [style*="gap: 0.3rem"] a { padding: 0.18rem 0.5rem !important; font-size: 0.72rem !important; }
  /* Compact Interpret CTA — icon-only on all mobile */
  .navbar a[href*="funnel.html"] {
    font-size: 0 !important;
    padding: 0.45rem 0.7rem !important;
    white-space: nowrap;
    max-width: 44px;
    overflow: hidden;
  }
  .navbar a[href*="funnel.html"]::before {
    content: "✨";
    font-size: 1rem;
  }
  /* Constrain nav container */
  .nav-container { max-width: 100vw !important; overflow: hidden !important; }
}

@media (max-width: 380px) {
  .navbar .nav-logo span { font-size: 1rem !important; }
  .hero-title { font-size: 1.7rem; }
}

/* ── Loading Spinner ─────────────────────────────── */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent-purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 2rem auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Geometric pattern overlay ───────────────────── */
.geo-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 40px, rgba(201, 146, 42, 0.5) 40px, rgba(201, 146, 42, 0.5) 41px),
    repeating-linear-gradient(90deg, transparent, transparent 40px, rgba(201, 146, 42, 0.5) 40px, rgba(201, 146, 42, 0.5) 41px);
  pointer-events: none;
}

/* ── Hamburger (mobile) ──────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: var(--transition);
}

@media (max-width: 640px) {
  .hamburger { display: flex; }
}

/* ── Language Switcher ──────────────────────────── */
.lang-switcher {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(13, 18, 37, 0.95);
  border: 1px solid var(--accent-purple, #7c5cff);
  border-radius: 999px;
  padding: 5px 8px 5px 12px;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px rgba(124, 92, 255, 0.25), 0 0 0 1px rgba(124, 92, 255, 0.15);
}

.lang-switcher-label {
  font-size: 1rem;
  margin-right: 4px;
  opacity: 0.9;
}

.lang-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-family: 'Noto Naskh Arabic', 'Segoe UI', sans-serif;
  font-weight: 600;
  letter-spacing: 0.3px;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
  min-width: 54px;
  text-align: center;
}

.lang-btn:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.08);
}

.lang-btn.active {
  background: var(--accent-purple);
  color: #fff;
  box-shadow: 0 2px 8px rgba(124, 92, 255, 0.4);
}

@media (max-width: 640px) {
  .lang-switcher {
    top: auto;
    bottom: 1rem;
    right: 1rem;
    padding: 4px 6px 4px 10px;
  }
  .lang-btn {
    font-size: 0.78rem;
    padding: 0.35rem 0.7rem;
    min-width: 44px;
  }
  .lang-switcher-label {
    font-size: 0.9rem;
  }
}

/* LTR override for English layout */
html[lang="en"] body {
  font-family: 'Noto Naskh Arabic', 'Segoe UI', sans-serif;
}

html[lang="en"] .nav-links {
  flex-direction: row;
}

html[lang="en"] .lang-switcher {
  /* Position now handled uniformly via top/right in .lang-switcher */
}
