/* =============================
   BlessingsDaily — style.css
   Shared styles for all pages
   ============================= */

:root {
  --primary: #6C3FC5;
  --primary-dark: #4A2A8F;
  --primary-light: #9B6EE8;
  --gold: #F5C518;
  --gold-light: #FFF3C4;
  --bg: #F4F0FA;
  --card-bg: #FFFFFF;
  --text: #1A1A2E;
  --text-light: #6B6B8A;
  --border: #E8E4F4;
  --success: #22C55E;
  --radius: 16px;
  --shadow: 0 4px 24px rgba(108, 63, 197, 0.10);
  --shadow-hover: 0 8px 36px rgba(108, 63, 197, 0.22);
  --nav-h: 66px;
}

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 3px; }

/* =====================
   HEADER / TOPBAR
   ===================== */
.topbar {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, #A855F7 100%);
  color: white;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(74,42,143,0.25);
}
.topbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: white;
}
.topbar-logo .logo-icon { font-size: 1.8rem; }
.topbar-logo .logo-text { font-size: 1.2rem; font-weight: 700; letter-spacing: 0.5px; }
.topbar-logo .logo-sub { font-size: 0.7rem; opacity: 0.8; letter-spacing: 1px; text-transform: uppercase; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.topbar-user {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.15); border-radius: 100px;
  padding: 6px 14px 6px 8px; cursor: pointer;
}
.topbar-user .avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--gold); color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.95rem;
}
.topbar-user .uname { font-size: 0.9rem; font-weight: 500; }
.btn-logout {
  background: rgba(255,255,255,0.18); color: white; border: 1px solid rgba(255,255,255,0.35);
  border-radius: 100px; padding: 6px 16px; cursor: pointer; font-size: 0.85rem;
  transition: all 0.2s;
}
.btn-logout:hover { background: rgba(255,255,255,0.3); }

/* =====================
   BOTTOM NAV (mobile-style)
   ===================== */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: white;
  display: flex;
  border-top: 1px solid var(--border);
  z-index: 100;
  box-shadow: 0 -4px 16px rgba(108,63,197,0.08);
}
.nav-link {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 8px 4px; text-decoration: none; color: var(--text-light);
  font-size: 0.7rem; font-weight: 500; gap: 3px; transition: all 0.2s;
}
.nav-link .nav-icon { font-size: 1.35rem; }
.nav-link:hover, .nav-link.active { color: var(--primary); }
.nav-link.active .nav-icon { transform: scale(1.15); }

/* =====================
   PAGE WRAPPER
   ===================== */
.page-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px 90px;
}
.page-title {
  font-size: 1.6rem; font-weight: 700; color: var(--text);
  margin-bottom: 4px;
}
.page-sub { color: var(--text-light); font-size: 0.95rem; margin-bottom: 20px; }

/* =====================
   BLESSING CARDS
   ===================== */
.blessing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.blessing-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border-left: 4px solid var(--card-color, var(--primary));
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.blessing-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.card-header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.faith-badge {
  font-size: 0.75rem; font-weight: 600; padding: 3px 10px;
  border-radius: 100px; white-space: nowrap;
}
.cat-badge {
  font-size: 0.72rem; background: var(--bg); color: var(--text-light);
  padding: 3px 8px; border-radius: 100px; border: 1px solid var(--border);
}
.save-btn {
  margin-left: auto; background: none; border: none; cursor: pointer;
  font-size: 1.1rem; padding: 2px; line-height: 1; transition: transform 0.15s;
}
.save-btn:hover { transform: scale(1.3); }
.card-title { font-size: 1rem; font-weight: 700; color: var(--text); line-height: 1.3; }
.card-text { font-size: 0.88rem; color: var(--text-light); line-height: 1.6; flex: 1; }
.card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.share-btn-sm {
  background: none; border: 1px solid var(--border); color: var(--text-light);
  border-radius: 100px; padding: 4px 12px; font-size: 0.78rem; cursor: pointer;
  transition: all 0.2s;
}
.share-btn-sm:hover { background: var(--primary); color: white; border-color: var(--primary); }
.read-more { font-size: 0.78rem; color: var(--primary); font-weight: 600; }

/* =====================
   HERO / DAILY BLESSING
   ===================== */
.daily-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 55%, #A855F7 100%);
  border-radius: 20px;
  padding: 32px;
  color: white;
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
}
.daily-hero::before {
  content: '';
  position: absolute; top: -30px; right: -30px;
  width: 160px; height: 160px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
}
.daily-hero::after {
  content: '';
  position: absolute; bottom: -50px; left: -20px;
  width: 120px; height: 120px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}
.hero-tag { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1.5px; opacity: 0.8; margin-bottom: 8px; }
.hero-symbol { font-size: 3rem; margin-bottom: 12px; display: block; }
.hero-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 14px; line-height: 1.3; }
.hero-text { font-size: 1rem; line-height: 1.75; opacity: 0.92; margin-bottom: 20px; }
.hero-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.hero-badge {
  background: rgba(255,255,255,0.18); border-radius: 100px; padding: 4px 14px;
  font-size: 0.8rem; font-weight: 500;
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-white {
  background: white; color: var(--primary); border: none;
  border-radius: 100px; padding: 10px 20px; font-size: 0.9rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.btn-white:hover { background: var(--gold); color: var(--primary-dark); }
.btn-outline-white {
  background: transparent; color: white;
  border: 1.5px solid rgba(255,255,255,0.5);
  border-radius: 100px; padding: 10px 20px; font-size: 0.9rem; font-weight: 500;
  cursor: pointer; transition: all 0.2s;
}
.btn-outline-white:hover { background: rgba(255,255,255,0.15); border-color: white; }

/* =====================
   SECTION HEADERS
   ===================== */
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.section-title { font-size: 1.1rem; font-weight: 700; color: var(--text); }
.see-all { color: var(--primary); font-size: 0.85rem; font-weight: 600; text-decoration: none; }
.see-all:hover { text-decoration: underline; }

/* =====================
   CATEGORY CHIPS / PILLS
   ===================== */
.cat-scroll {
  display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px;
  margin-bottom: 20px; scrollbar-width: none;
}
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-chip {
  flex-shrink: 0; display: flex; align-items: center; gap: 6px;
  background: white; border: 1.5px solid var(--border);
  border-radius: 100px; padding: 7px 16px; font-size: 0.85rem;
  font-weight: 500; cursor: pointer; transition: all 0.2s; white-space: nowrap;
  text-decoration: none; color: var(--text);
}
.cat-chip:hover, .cat-chip.active {
  background: var(--primary); color: white; border-color: var(--primary);
}

/* Category Cards Grid */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.cat-card {
  background: white; border-radius: var(--radius);
  padding: 20px 16px; text-align: center; cursor: pointer;
  box-shadow: var(--shadow); transition: all 0.2s;
  text-decoration: none; color: var(--text);
  border-top: 3px solid var(--c-color, #ccc);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.cat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.cat-card .cat-icon { font-size: 2rem; }
.cat-card .cat-name { font-size: 0.9rem; font-weight: 600; }
.cat-card .cat-count { font-size: 0.75rem; color: var(--text-light); }

/* Faith Filter Tabs */
.faith-tabs {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px;
  margin-bottom: 20px; scrollbar-width: none;
}
.faith-tabs::-webkit-scrollbar { display: none; }
.faith-tab {
  flex-shrink: 0; background: white; border: 1.5px solid var(--border);
  border-radius: 100px; padding: 6px 16px; font-size: 0.82rem; font-weight: 500;
  cursor: pointer; transition: all 0.2s; color: var(--text);
}
.faith-tab.active { background: var(--primary); color: white; border-color: var(--primary); }

/* =====================
   LOGIN / REGISTER PAGE
   ===================== */
.auth-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #1A0A3C 0%, #3B1A8F 50%, #6C3FC5 100%);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.auth-box {
  background: white; border-radius: 24px;
  padding: 40px 36px; width: 100%; max-width: 440px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}
.auth-logo {
  text-align: center; margin-bottom: 28px;
}
.auth-logo .logo-icon-big { font-size: 3rem; display: block; margin-bottom: 8px; }
.auth-logo h1 { font-size: 1.7rem; font-weight: 800; color: var(--primary-dark); }
.auth-logo p { color: var(--text-light); font-size: 0.9rem; margin-top: 4px; }
.auth-tabs {
  display: flex; background: var(--bg); border-radius: 12px;
  padding: 4px; margin-bottom: 24px;
}
.auth-tab {
  flex: 1; text-align: center; padding: 9px; border-radius: 9px;
  cursor: pointer; font-size: 0.9rem; font-weight: 600; color: var(--text-light);
  transition: all 0.2s;
}
.auth-tab.active { background: white; color: var(--primary); box-shadow: 0 2px 8px rgba(108,63,197,0.12); }
.form-group { margin-bottom: 16px; }
.form-label { font-size: 0.85rem; font-weight: 600; color: var(--text); margin-bottom: 6px; display: block; }
.form-input {
  width: 100%; padding: 12px 16px; border: 1.5px solid var(--border);
  border-radius: 12px; font-size: 0.95rem; color: var(--text);
  transition: border-color 0.2s; outline: none; background: var(--bg);
}
.form-input:focus { border-color: var(--primary); background: white; }
.btn-primary {
  width: 100%; background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: white; border: none; border-radius: 12px; padding: 13px;
  font-size: 1rem; font-weight: 700; cursor: pointer; transition: all 0.2s;
  margin-top: 6px;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.faith-select-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 6px;
}
.faith-opt {
  border: 2px solid var(--border); border-radius: 10px; padding: 8px 4px;
  text-align: center; cursor: pointer; font-size: 0.78rem; font-weight: 500;
  transition: all 0.2s;
}
.faith-opt.selected { border-color: var(--primary); background: var(--primary); color: white; }
.faith-opt .f-icon { font-size: 1.4rem; display: block; margin-bottom: 3px; }
.divider { display: flex; align-items: center; gap: 10px; margin: 16px 0; }
.divider span { color: var(--text-light); font-size: 0.82rem; white-space: nowrap; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.social-login {
  display: flex; gap: 10px;
}
.btn-social {
  flex: 1; border: 1.5px solid var(--border); background: white;
  border-radius: 10px; padding: 10px; font-size: 0.85rem; font-weight: 500;
  cursor: pointer; transition: all 0.2s; color: var(--text);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-social:hover { border-color: var(--primary); color: var(--primary); }

/* =====================
   PROFILE PAGE
   ===================== */
.profile-hero {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border-radius: 20px; padding: 28px; color: white; text-align: center; margin-bottom: 20px;
}
.profile-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--gold); color: var(--primary-dark);
  font-size: 2rem; font-weight: 800; display: flex; align-items: center;
  justify-content: center; margin: 0 auto 14px; border: 3px solid rgba(255,255,255,0.3);
}
.profile-name { font-size: 1.3rem; font-weight: 700; }
.profile-email { font-size: 0.85rem; opacity: 0.8; margin-top: 4px; }
.profile-stats {
  display: flex; justify-content: center; gap: 30px; margin-top: 18px;
}
.stat { text-align: center; }
.stat-num { font-size: 1.4rem; font-weight: 800; }
.stat-label { font-size: 0.72rem; opacity: 0.7; letter-spacing: 0.5px; text-transform: uppercase; }
.settings-card {
  background: white; border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow); margin-bottom: 14px;
}
.settings-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 14px; color: var(--text); }
.setting-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.setting-row:last-child { border-bottom: none; }
.setting-label { font-size: 0.9rem; color: var(--text); }
.setting-sub { font-size: 0.78rem; color: var(--text-light); margin-top: 2px; }
.toggle {
  width: 44px; height: 24px; border-radius: 100px; background: #DDD;
  position: relative; cursor: pointer; transition: background 0.2s;
  border: none; outline: none;
}
.toggle.on { background: var(--primary); }
.toggle::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; border-radius: 50%; background: white;
  transition: left 0.2s; box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.toggle.on::after { left: 22px; }

/* =====================
   BLESSING DETAIL PAGE
   ===================== */
.detail-hero {
  border-radius: 24px; padding: 40px 32px; color: white; margin-bottom: 24px;
  position: relative; overflow: hidden;
}
.detail-symbol { font-size: 4rem; display: block; margin-bottom: 16px; }
.detail-title { font-size: 1.7rem; font-weight: 800; margin-bottom: 16px; line-height: 1.3; }
.detail-text {
  font-size: 1.05rem; line-height: 1.85; opacity: 0.95;
  border-left: 3px solid rgba(255,255,255,0.5); padding-left: 16px; margin-bottom: 24px;
}
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-action {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.2); color: white;
  border: 1px solid rgba(255,255,255,0.35); border-radius: 100px;
  padding: 10px 20px; font-size: 0.9rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s; text-decoration: none;
}
.btn-action:hover { background: rgba(255,255,255,0.35); }
.related-section { margin-top: 8px; }

/* =====================
   STATS STRIP (home)
   ===================== */
.stats-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 24px;
}
.stat-card {
  background: white; border-radius: 12px; padding: 14px 10px; text-align: center;
  box-shadow: var(--shadow);
}
.stat-card .s-num { font-size: 1.4rem; font-weight: 800; color: var(--primary); }
.stat-card .s-label { font-size: 0.7rem; color: var(--text-light); margin-top: 3px; }

/* =====================
   EMPTY STATE
   ===================== */
.empty-state {
  text-align: center; padding: 50px 20px; color: var(--text-light);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; color: var(--text); }

/* =====================
   TOAST
   ===================== */
.bd-toast {
  position: fixed; bottom: 86px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #1A1A2E; color: white; padding: 12px 24px; border-radius: 100px;
  font-size: 0.9rem; font-weight: 500; opacity: 0; transition: all 0.3s; z-index: 9999;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3); white-space: nowrap;
}
.bd-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* =====================
   SEARCH BAR
   ===================== */
.search-bar {
  display: flex; align-items: center; gap: 10px;
  background: white; border-radius: 100px; padding: 10px 18px;
  box-shadow: var(--shadow); margin-bottom: 20px; border: 1.5px solid var(--border);
}
.search-bar input {
  flex: 1; border: none; outline: none; font-size: 0.95rem; color: var(--text); background: none;
}
.search-bar .search-icon { color: var(--text-light); font-size: 1.1rem; }

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 600px) {
  .daily-hero { padding: 22px; }
  .hero-title { font-size: 1.2rem; }
  .hero-text { font-size: 0.9rem; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .auth-box { padding: 28px 20px; }
  .detail-hero { padding: 26px 20px; }
  .detail-title { font-size: 1.3rem; }
  .detail-text { font-size: 0.95rem; }
  .topbar-logo .logo-sub { display: none; }
}
