/* ── DEFINITIVE DESIGN SYSTEM TOKENS ── */
:root {
  --bg-dark: #03010a;
  --purple-main: #8b3cf7;
  --purple-glow: #c084fc;
  --purple-bright: #a855f7;
  --purple-deep: #7c3aed;
  --white: #ffffff;
  --text-muted: #9d8bb8;
  --text-dim: #7a6b94;
  --card-bg: rgba(15, 8, 32, 0.65);
  --card-border: rgba(192, 132, 252, 0.2);
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.09);
  --shadow-dark: rgba(0, 0, 0, 0.8);
  --shadow-glow: rgba(168, 85, 247, 0.25);

  --font-xs: 0.75rem;
  --font-sm: 0.875rem;
  --font-base: 1rem;
  --font-lg: 1.125rem;
  --font-xl: 1.25rem;
  --font-2xl: 1.5rem;
  --font-3xl: 2rem;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-pill: 50px;
}

html[data-theme="light"] {
  --bg-dark: #f8fafc;
  --white: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --card-bg: rgba(255, 255, 255, 0.85);
  --card-border: rgba(139, 60, 247, 0.2);
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(0, 0, 0, 0.08);
  --shadow-dark: rgba(0, 0, 0, 0.08);
  --shadow-glow: rgba(139, 60, 247, 0.15);
}


/* ── DESIGN SYSTEM TOKENS & TYPE SCALE ── */


/* ── UTILITY CLASSES FOR DESIGN CONSISTENCY ── */
.ui-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px var(--shadow-dark);
  transition: all 0.3s ease;
}

.ui-btn-primary {
  background: linear-gradient(135deg, var(--purple-deep), var(--purple-bright));
  color: var(--white);
  font-weight: 700;
  font-size: var(--font-sm);
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px var(--shadow-glow);
  transition: all 0.25s ease;
}
.ui-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(168, 85, 247, 0.45);
}

.ui-btn-secondary {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-weight: 600;
  font-size: var(--font-sm);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.25s ease;
}
.ui-btn-secondary:hover {
  color: var(--white);
  border-color: var(--card-border);
  background: rgba(255, 255, 255, 0.08);
}

.ui-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(192, 132, 252, 0.3);
  color: var(--purple-glow);
  font-size: var(--font-xs);
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ui-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--white);
  font-size: var(--font-sm);
  outline: none;
  transition: all 0.25s ease;
}
.ui-input:focus {
  border-color: var(--purple-glow);
  box-shadow: 0 0 12px var(--shadow-glow);
  background: rgba(255, 255, 255, 0.07);
}

/* theme.css */

/* GLOBAL TRANSITIONS FOR SMOOTH THEME SWAP */
body, nav, .site-footer, .bg-gradient, .wave-band, .orb, .geo-overlay, 
.contact-card, .book-card, .article-card, .setting-card, .stat-card, 
.sidebar-btn, .nav-btn, .action-btn, h1, h2, h3, p, span, a, 
.form-input, .form-textarea, .lib-search-bar input, .filter-pill, .settings-sidebar,
.slider, .category-chip, .articles-search-bar {
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, background 0.4s ease, text-shadow 0.4s ease;
}

/* ---------------- DARK MODE ---------------- */
html[data-theme="dark"] body {
  background-color: #050505 !important;
  color: #e2e8f0 !important;
}

/* Hide Original Cosmic Purple Effects & Geo Overlay */
html[data-theme="dark"] .bg-gradient,
html[data-theme="dark"] #cosmos,
html[data-theme="dark"] .geo-overlay,
html[data-theme="dark"] .orb,
html[data-theme="dark"] .wave-band,
html[data-theme="dark"] .cursor-glow {
  display: none !important;
}

/* Individually Spinning Mandalas Container */
#dark-live-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}
@keyframes spinMandala {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

html[data-theme="dark"] body::before {
  display: none !important;
}

/* Drifting Starry Layer and Nebula Behind Mandalas */
html[data-theme="dark"] body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background-color: #060608;
  background-image: 
    radial-gradient(1px 1px at 25px 5px, rgba(255,255,255,0.8), transparent),
    radial-gradient(1.5px 1.5px at 50px 25px, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 125px 20px, rgba(255,255,255,0.9), transparent),
    radial-gradient(2px 2px at 50px 75px, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 15px 125px, rgba(255,255,255,0.8), transparent),
    radial-gradient(1.5px 1.5px at 110px 140px, rgba(255,255,255,0.5), transparent),
    radial-gradient(circle at 20% 80%, rgba(139, 60, 247, 0.05), transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(139, 60, 247, 0.04), transparent 50%);
  background-size: 150px 150px, 150px 150px, 150px 150px, 150px 150px, 150px 150px, 150px 150px, 100% 100%, 100% 100%;
  animation: darkStars 180s linear infinite;
}
@keyframes darkStars {
  from { background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0; }
  to { background-position: -150px 150px, -150px 150px, -150px 150px, -150px 150px, -150px 150px, -150px 150px, 0 0, 0 0; }
}

/* Nav & Footer */
html[data-theme="dark"] nav {
  background: rgba(15, 15, 15, 0.9) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] .site-footer {
  background: rgba(10, 10, 10, 0.95) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
}
html[data-theme="dark"] .site-footer::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent) !important;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.2)) !important;
}

/* Brand Icon */
html[data-theme="dark"] .nav-brand .brand-icon {
  background: linear-gradient(135deg, #444, #111) !important;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  animation: none !important;
}

/* Cards & Elements */
html[data-theme="dark"] .contact-card,
html[data-theme="dark"] .book-card,
html[data-theme="dark"] .article-card,
html[data-theme="dark"] .setting-card,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .settings-sidebar {
  background: rgba(20, 20, 20, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

html[data-theme="dark"] .article-card:hover,
html[data-theme="dark"] .book-card:hover {
  transform: translateY(-8px) !important;
  border-top-color: rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.8), 0 0 24px rgba(255, 255, 255, 0.1);
}

/* Typography Overrides for Dark Mode */
html[data-theme="dark"] .title-eng,
html[data-theme="dark"] .articles-title,
html[data-theme="dark"] .contact-title,
html[data-theme="dark"] .lib-title {
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.3) !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .nav-links a {
  color: #cbd5e1 !important;
}
html[data-theme="dark"] .nav-links a:hover,
html[data-theme="dark"] .nav-links a.active {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.4) !important;
}

/* Search Bars */
html[data-theme="dark"] .articles-search-bar,
html[data-theme="dark"] .lib-search-bar,
html[data-theme="dark"] .form-input,
html[data-theme="dark"] .form-textarea {
  background: rgba(25, 25, 25, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5), 0 4px 20px rgba(255, 255, 255, 0.05);
  color: #fff !important;
}

html[data-theme="dark"] .articles-search-bar:focus-within,
html[data-theme="dark"] .lib-search-bar:focus-within,
html[data-theme="dark"] .form-input:focus,
html[data-theme="dark"] .form-textarea:focus {
  border-color: rgba(255, 255, 255, 0.5) !important;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5), 0 4px 25px rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .search-icon,
html[data-theme="dark"] i.fas,
html[data-theme="dark"] i.far {
  color: #aaa !important;
}

/* Categories & Pills */
html[data-theme="dark"] .category-chip,
html[data-theme="dark"] .filter-pill,
html[data-theme="dark"] .article-top-category {
  background: rgba(30, 30, 30, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #ddd !important;
}

html[data-theme="dark"] .category-chip:hover,
html[data-theme="dark"] .category-chip.active,
html[data-theme="dark"] .filter-pill:hover,
html[data-theme="dark"] .filter-pill.active,
html[data-theme="dark"] .article-card:hover .article-top-category {
  background: rgba(60, 60, 60, 0.9) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  color: #fff !important;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.15);
}

/* Book Covers */
html[data-theme="dark"] .article-cover,
html[data-theme="dark"] .book-cover {
  background: linear-gradient(135deg, #1a1a1a, #0a0a0a) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.5);
}

/* Card Buttons (Read, Download, Volumes) */
html[data-theme="dark"] .book-btn,
html[data-theme="dark"] .vol-btn,
html[data-theme="dark"] .read-btn,
html[data-theme="dark"] .download-btn,
html[data-theme="dark"] .card-btn,
html[data-theme="dark"] .article-btn {
  background: rgba(30, 30, 35, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #fff !important;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}
html[data-theme="dark"] .book-btn:hover,
html[data-theme="dark"] .vol-btn:hover,
html[data-theme="dark"] .read-btn:hover,
html[data-theme="dark"] .download-btn:hover,
html[data-theme="dark"] .card-btn:hover,
html[data-theme="dark"] .article-btn:hover {
  background: rgba(60, 60, 65, 0.9) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  box-shadow: 0 0 15px rgba(255,255,255,0.2);
  color: #fff !important;
}

/* Buttons */
html[data-theme="dark"] .nav-btn,
html[data-theme="dark"] .action-btn,
html[data-theme="dark"] .sidebar-btn {
  border-color: rgba(255, 255, 255, 0.25) !important;
  background: transparent !important;
  color: #fff !important;
}
html[data-theme="dark"] .nav-btn::before,
html[data-theme="dark"] .action-btn::before {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05)) !important;
}
html[data-theme="dark"] .nav-btn:hover,
html[data-theme="dark"] .action-btn:hover {
  border-color: rgba(255, 255, 255, 0.5) !important;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.15);
}

html[data-theme="dark"] .sidebar-btn:hover,
html[data-theme="dark"] .sidebar-btn.active {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
  font-weight: 700;
}

/* Text Colors */
html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .hero-desc,
html[data-theme="dark"] .stat-label,
html[data-theme="dark"] .contact-subtitle,
html[data-theme="dark"] .footer-copyright,
html[data-theme="dark"] .article-readtime {
  color: #94a3b8 !important;
}

/* Scrollbar */
html[data-theme="dark"] ::-webkit-scrollbar-track {
  background: #050505 !important;
}
html[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2) !important;
  border-color: #050505 !important;
}
html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4) !important;
}

/* Remove purple borders from sliders in settings */
html[data-theme="dark"] .slider {
  border-color: rgba(255, 255, 255, 0.2) !important;
}
html[data-theme="dark"] input:checked + .slider {
  background-color: #444 !important;
  border-color: #888 !important;
}
html[data-theme="dark"] input:checked + .slider:before {
  background-color: #fff !important;
}


/* ========================================================
   MASSIVE GLOBAL OVERRIDES TO STRIP ALL PURPLE IN DARK MODE 
   ======================================================== */
html[data-theme="dark"] .book-card,
html[data-theme="dark"] .article-card,
html[data-theme="dark"] .category-card,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .madhab-card {
  border-color: rgba(255, 255, 255, 0.1) !important;
  border-top-color: rgba(255, 255, 255, 0.25) !important;
  background: rgba(15, 15, 15, 0.6) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

html[data-theme="dark"] .book-card:hover,
html[data-theme="dark"] .article-card:hover,
html[data-theme="dark"] .category-card:hover,
html[data-theme="dark"] .stat-card:hover,
html[data-theme="dark"] .madhab-card:hover {
  border-top-color: rgba(255, 255, 255, 0.6) !important;
  box-shadow: 0 15px 40px rgba(0,0,0,0.8), 0 0 25px rgba(255,255,255,0.15);
}

html[data-theme="dark"] .book-title-en,
html[data-theme="dark"] .book-author,
html[data-theme="dark"] .article-desc,
html[data-theme="dark"] .lib-subtitle,
html[data-theme="dark"] .explore-btn,
html[data-theme="dark"] .madhab-footer,
html[data-theme="dark"] .madhab-card-icon {
  color: #a1a1aa !important;
}

/* All Buttons (Card actions, nav, filters) */
html[data-theme="dark"] .book-action-icon,
html[data-theme="dark"] .action-btn,
html[data-theme="dark"] .nav-btn,
html[data-theme="dark"] .category-chip,
html[data-theme="dark"] .filter-pill,
html[data-theme="dark"] .vol-select {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #a1a1aa !important;
}

html[data-theme="dark"] .book-action-icon:hover,
html[data-theme="dark"] .action-btn:hover,
html[data-theme="dark"] .nav-btn:hover,
html[data-theme="dark"] .category-chip:hover,
html[data-theme="dark"] .category-chip.active,
html[data-theme="dark"] .filter-pill:hover,
html[data-theme="dark"] .filter-pill.active {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  color: #ffffff !important;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

html[data-theme="dark"] .book-open-btn {
  background: linear-gradient(135deg, #2a2a2a, #444) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  color: #ffffff !important;
  box-shadow: none;
}
html[data-theme="dark"] .book-open-btn:hover {
  background: linear-gradient(135deg, #444, #5a5a5a) !important;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

/* Search Bars */
html[data-theme="dark"] .search-wrapper,
html[data-theme="dark"] .lib-search-bar {
  background: rgba(20, 20, 20, 0.8) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  box-shadow: none;
}
html[data-theme="dark"] .search-wrapper:focus-within,
html[data-theme="dark"] .lib-search-bar:focus-within {
  border-color: rgba(255, 255, 255, 0.6) !important;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}
html[data-theme="dark"] .search-icon, 
html[data-theme="dark"] .search-clear {
  color: #a1a1aa !important;
}

/* Text Glows (Titles) */
html[data-theme="dark"] .title-eng,
html[data-theme="dark"] .title-ar,
html[data-theme="dark"] .lib-title,
html[data-theme="dark"] .article-title,
html[data-theme="dark"] h1, 
html[data-theme="dark"] h2,
html[data-theme="dark"] .post-title,
html[data-theme="dark"] .section-title,
html[data-theme="dark"] .madhab-title {
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.15), 0 0 40px rgba(255, 255, 255, 0.05) !important;
  color: #ffffff !important;
}

/* Misc Text and Icons */
html[data-theme="dark"] .stat-icon,
html[data-theme="dark"] .brand-icon {
  color: #e2e8f0 !important;
  fill: #e2e8f0 !important;
  background: #2a2a2a !important;
  box-shadow: none;
  border-color: rgba(255,255,255,0.2) !important;
}
html[data-theme="dark"] .footer-brand svg,
html[data-theme="dark"] .footer-section a:hover {
  color: #ffffff !important;
  text-shadow: 0 0 10px rgba(255,255,255,0.3) !important;
  filter: none !important;
}
html[data-theme="dark"] .site-footer::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent) !important;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4)) !important;
}
html[data-theme="dark"] .site-footer {
  border-top-color: rgba(255,255,255,0.1) !important;
  background: rgba(10, 10, 10, 0.9) !important;
}
/* Article page specific */
html[data-theme="dark"] .article-header {
  border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}
html[data-theme="dark"] .post-container {
  border-color: rgba(255,255,255,0.1) !important;
  box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}

/* Hardcode SVG lines to avoid purple stroke/fill */
html[data-theme="dark"] .category-card svg,
html[data-theme="dark"] .stat-card svg,
html[data-theme="dark"] .book-action-icon svg,
html[data-theme="dark"] .madhab-card-icon svg {
  stroke: #e2e8f0 !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .madhab-card-icon {
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4)) !important;
}

/* ---------------- LIGHT MODE ---------------- */
html[data-theme="light"] body {
  background-color: #f8fafc !important;
  color: #0f172a !important;
}

html[data-theme="light"] #cosmos,
html[data-theme="light"] .geo-overlay,
html[data-theme="light"] .orb,
html[data-theme="light"] .wave-band,
html[data-theme="light"] .cursor-glow {
  display: none !important;
}

html[data-theme="light"] .bg-gradient {
  background: linear-gradient(135deg, #e2e8f0 0%, #f8fafc 100%) !important;
}

html[data-theme="light"] nav,
html[data-theme="light"] .site-footer {
  background: rgba(255, 255, 255, 0.8) !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

html[data-theme="light"] .site-footer::before {
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.2), transparent) !important;
  filter: none !important;
}

html[data-theme="light"] .nav-brand,
html[data-theme="light"] .nav-brand .brand-icon {
  color: #0f172a !important;
}
html[data-theme="light"] .nav-brand .brand-icon {
  background: linear-gradient(135deg, #cbd5e1, #f1f5f9) !important;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border-color: rgba(0, 0, 0, 0.1) !important;
}

html[data-theme="light"] .contact-card,
html[data-theme="light"] .book-card,
html[data-theme="light"] .article-card,
html[data-theme="light"] .setting-card,
html[data-theme="light"] .stat-card,
html[data-theme="light"] .settings-sidebar {
  background: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  border-top: 1px solid rgba(0, 0, 0, 0.15) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

html[data-theme="light"] .article-card:hover,
html[data-theme="light"] .book-card:hover {
  border-top-color: rgba(0, 0, 0, 0.2) !important;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1), 0 0 24px rgba(0, 0, 0, 0.02);
}

html[data-theme="light"] .form-input,
html[data-theme="light"] .form-textarea,
html[data-theme="light"] .lib-search-bar,
html[data-theme="light"] .articles-search-bar {
  background: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid rgba(0, 0, 0, 0.2) !important;
  color: #0f172a !important;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.02);
}
html[data-theme="light"] .lib-search-bar input,
html[data-theme="light"] .articles-search-bar input {
  color: #0f172a !important;
}
html[data-theme="light"] .articles-search-bar:focus-within {
  border-color: rgba(0, 0, 0, 0.4) !important;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.05), 0 4px 25px rgba(0, 0, 0, 0.05);
}

html[data-theme="light"] .search-icon,
html[data-theme="light"] i.fas,
html[data-theme="light"] i.far {
  color: #64748b !important;
}

html[data-theme="light"] .category-chip,
html[data-theme="light"] .filter-pill,
html[data-theme="light"] .article-top-category {
  background: rgba(255, 255, 255, 0.8) !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
  color: #334155 !important;
}

html[data-theme="light"] .category-chip:hover,
html[data-theme="light"] .category-chip.active,
html[data-theme="light"] .filter-pill:hover,
html[data-theme="light"] .filter-pill.active,
html[data-theme="light"] .article-card:hover .article-top-category {
  background: #f1f5f9 !important;
  border-color: rgba(0, 0, 0, 0.3) !important;
  color: #0f172a !important;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

html[data-theme="light"] .article-cover,
html[data-theme="light"] .book-cover {
  background: linear-gradient(135deg, #e2e8f0, #f8fafc) !important;
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
}

html[data-theme="light"] .title-eng,
html[data-theme="light"] .contact-title,
html[data-theme="light"] .lib-title,
html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] .setting-info h3,
html[data-theme="light"] .tab-title,
html[data-theme="light"] .sidebar-title,
html[data-theme="light"] .stat-number,
html[data-theme="light"] .book-title,
html[data-theme="light"] .articles-title {
  text-shadow: none !important;
  color: #1e293b !important;
}

html[data-theme="light"] .nav-links a,
html[data-theme="light"] .sidebar-btn {
  color: #475569 !important;
}
html[data-theme="light"] .nav-links a:hover,
html[data-theme="light"] .nav-links a.active,
html[data-theme="light"] .sidebar-btn:hover,
html[data-theme="light"] .sidebar-btn.active {
  background: rgba(0, 0, 0, 0.05) !important;
  color: #0f172a !important;
  text-shadow: none !important;
}

html[data-theme="light"] .nav-btn,
html[data-theme="light"] .action-btn {
  border-color: rgba(0, 0, 0, 0.2) !important;
  background: rgba(0, 0, 0, 0.05) !important;
  color: #0f172a !important;
}
html[data-theme="light"] .nav-btn::before,
html[data-theme="light"] .action-btn::before {
  background: rgba(0, 0, 0, 0.05) !important;
}
html[data-theme="light"] .nav-btn:hover,
html[data-theme="light"] .action-btn:hover {
  background: rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .text-muted,
html[data-theme="light"] .hero-desc,
html[data-theme="light"] .stat-label,
html[data-theme="light"] .contact-subtitle,
html[data-theme="light"] p,
html[data-theme="light"] .book-author,
html[data-theme="light"] .article-readtime {
  color: #475569 !important;
}

html[data-theme="light"] .footer-section h3 {
  color: #0f172a !important;
}
html[data-theme="light"] .footer-section a {
  color: #475569 !important;
}
html[data-theme="light"] .footer-section a:hover {
  color: #0f172a !important;
  text-shadow: none !important;
}
html[data-theme="light"] .footer-copyright {
  color: #64748b !important;
}

/* Light scrollbar */
html[data-theme="light"] ::-webkit-scrollbar-track {
  background: #f8fafc !important;
}
html[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2) !important;
  border-color: #f8fafc !important;
}
html[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.4) !important;
}

/* Dashboard Links in Footer */
.footer-dashboard-links {
  margin-top: 10px;
  display: flex;
  gap: 12px;
  font-size: var(--font-sm);
  justify-content: flex-start;
}
.site-footer > .footer-dashboard-links {
  justify-content: center;
}
.dashboard-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}
.dashboard-link:hover {
  color: var(--white) !important;
  text-shadow: 0 0 10px rgba(192,132,252,0.6);
}
html[data-theme="light"] .dashboard-link:hover {
  color: #0f172a !important;
  text-shadow: none !important;
}

/* Global Thread Accordions & Content Boxes in Dark Mode */
html[data-theme="dark"] .thread-item::before {
  background: rgba(255, 255, 255, 0.15) !important;
}
html[data-theme="dark"] .thread-item::after {
  background: #000000 !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}
html[data-theme="dark"] .thread-item.open::after {
  background: #ffffff !important;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}
html[data-theme="dark"] .thread-header {
  background: rgba(20, 20, 20, 0.85) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  box-shadow: none;
}
html[data-theme="dark"] .thread-header:hover {
  background: rgba(40, 40, 40, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.45) !important;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.05);
}
html[data-theme="dark"] .accordion-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
}
html[data-theme="dark"] .thread-item.open .accordion-btn {
  background: rgba(255, 255, 255, 0.25) !important;
}
html[data-theme="dark"] .thread-content-inner {
  background: rgba(10, 10, 10, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  box-shadow: none;
}
{
  color: #a1a1aa !important;
  border-top-color: rgba(255, 255, 255, 0.1) !important;
}
html[data-theme="dark"] .zoomable-img {
  border-color: rgba(255, 255, 255, 0.15) !important;
}
html[data-theme="dark"] .zoomable-img:hover {
  border-color: rgba(255, 255, 255, 0.45) !important;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

/* Make sure all inputs, textareas and select dropdowns globally follow dark theme */
html[data-theme="dark"] .lib-search-bar input,
html[data-theme="dark"] .articles-search-bar input,
html[data-theme="dark"] .videos-search-bar input,
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="search"],
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
  color: #ffffff !important;
}
html[data-theme="dark"] ::placeholder {
  color: #52525b !important;
}

/* â”€â”€ GLOBAL ARTICLE COVER & SVG SIZING â”€â”€ */
.article-cover {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  overflow: hidden !important;
}

.article-cover svg {
  width: 52px !important;
  height: 52px !important;
  max-width: 52px !important;
  max-height: 52px !important;
  color: var(--purple-glow) !important;
  filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.6)) !important;
  opacity: 0.95 !important;
  flex-shrink: 0 !important;
}

.article-cover img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   RESPONSIVE LAYOUT & NAVIGATION OVERRIDES
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* Desktop (PC > 1024px): Strictly hide mobile hamburger */
.nav-hamburger {
  display: none !important;
}

.lib-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 24px !important;
  width: 100% !important;
  max-width: 1180px !important;
  margin: 0 auto !important;
}

/* Tablet & iPad Viewport (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .lib-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
    padding: 0 16px !important;
  }
  .articles-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
  }
  .videos-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
  }
  .library {
    margin-top: 110px !important;
    padding: 0 16px 60px !important;
  }
  .hero {
    margin-top: 130px !important;
  }
}

/* Mobile & Tablet / iPad Common Breakpoint (<= 1024px) */
@media (max-width: 1024px) {
  /* Hide standard nav links and Join CTA on navbar */
  .nav-links {
    display: none !important;
  }
  
  nav .nav-btn, .spotlight-nav .nav-btn {
    display: none !important;
  }

  /* Compact nav element for mobile & iPad */
  nav, .spotlight-nav {
    width: auto !important;
    max-width: none !important;
    left: 12px !important;
    right: 12px !important;
    transform: none !important;
    top: 12px !important;
    padding: 8px 14px !important;
    min-height: 52px !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 10px !important;
    border-radius: 30px !important;
  }

  .nav-brand {
    order: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-right: 0 !important;
    flex-shrink: 0 !important;
    font-size: var(--font-sm);
  }

  .nav-auth-group, #navAuthContainer {
    order: 2 !important;
    margin-left: auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
  }

  /* Hamburger Menu Toggle Icon */
  .nav-hamburger {
    order: 3 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    width: 24px !important;
    height: 17px !important;
    cursor: pointer !important;
    z-index: 1000000 !important;
    position: relative !important;
    margin-left: 6px !important;
    flex-shrink: 0 !important;
  }

  .nav-hamburger span {
    display: block !important;
    width: 100% !important;
    height: 2px !important;
    background-color: #ffffff !important;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  html[data-theme="light"] .nav-hamburger span {
    background-color: #1e293b !important;
  }

  /* Hamburger icon animations */
  .nav-hamburger.active span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg) !important;
  }

  .nav-hamburger.active span:nth-child(2) {
    opacity: 0 !important;
  }

  .nav-hamburger.active span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg) !important;
  }

  /* Fullscreen mobile / tablet menu overlay */
  .nav-links.mobile-active {
    display: flex !important;
    flex-direction: column !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    background: #080314 !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    gap: 8px !important;
    z-index: 999998 !important;
    opacity: 0 !important;
    transform: translateY(-10px) !important;
    transition: opacity 0.28s ease, transform 0.28s ease;
    pointer-events: none !important;
    padding: 84px 24px 36px !important;
    margin: 0 !important;
    overflow-y: auto !important;
  }

  html[data-theme="light"] .nav-links.mobile-active {
    background: #ffffff !important;
  }

  .nav-links.mobile-active.show {
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
  }

  .nav-links.mobile-active li {
    width: 100% !important;
    text-align: left !important;
  }

  .nav-links.mobile-active a {
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    padding: 14px 18px !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    max-width: none !important;
    border-radius: 14px !important;
    color: #e2e8f0 !important;
    text-decoration: none !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
  }

  html[data-theme="light"] .nav-links.mobile-active a {
    color: #1e293b !important;
    background: rgba(0, 0, 0, 0.03) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
  }

  .nav-links.mobile-active a.active {
    background: rgba(139, 60, 247, 0.22) !important;
    border-color: rgba(192, 132, 252, 0.4) !important;
    color: #ffffff !important;
  }

  html[data-theme="light"] .nav-links.mobile-active a.active {
    background: rgba(139, 60, 247, 0.12) !important;
    border-color: rgba(139, 60, 247, 0.3) !important;
    color: #7c3aed !important;
  }
}

/* Mobile Viewports (<= 768px) */
@media (max-width: 768px) {
  html, body {
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .lib-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px !important;
    padding: 0 12px !important;
  }

  .library {
    margin-top: 90px !important;
    padding: 0 12px 50px !important;
  }

  .lib-header {
    margin-bottom: 28px !important;
  }

  .lib-title {
    font-size: clamp(2rem, 7vw, 3rem) !important;
    margin-bottom: 10px !important;
  }

  .lib-subtitle {
    font-size: 0.92rem !important;
    margin-bottom: 24px !important;
  }

  .search-container {
    margin-bottom: 24px !important;
    padding: 0 4px !important;
  }

  .search-wrapper {
    padding: 10px 16px !important;
  }

  .categories-container {
    margin-bottom: 28px !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .categories-scroll {
    padding: 6px 12px !important;
    gap: 8px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .category-chip {
    padding: 7px 14px !important;
    font-size: 0.82rem !important;
  }

  .articles-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .videos-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .book-card {
    padding: 10px !important;
    border-radius: 12px !important;
  }

  .book-cover, .book-card img {
    width: 100% !important;
    height: auto !important;
    max-height: 240px !important;
    object-fit: contain !important;
    border-radius: 6px !important;
    margin-bottom: 8px !important;
  }

  .book-title-ar {
    font-size: 1rem !important;
  }

  .book-title-en {
    font-size: 0.78rem !important;
  }

  .hero {
    margin-top: 100px !important;
    padding: 0 16px !important;
  }

  .hero-actions {
    margin-top: 24px !important;
    gap: 10px !important;
  }

  .action-btn {
    padding: 10px 20px !important;
    font-size: 0.88rem !important;
  }

  .stats-container {
    margin-top: 40px !important;
    gap: 12px !important;
  }

  .stat-card {
    min-width: 105px !important;
    height: 105px !important;
    padding: 14px 18px !important;
  }
}

/* Small Mobile Viewports (<= 480px) */
@media (max-width: 480px) {
  .lib-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    padding: 0 6px !important;
  }

  .book-card {
    padding: 8px !important;
    border-radius: 10px !important;
  }

  .book-cover, .book-card img {
    max-height: 190px !important;
    margin-bottom: 6px !important;
  }

  .book-title-ar {
    font-size: 0.92rem !important;
    line-height: 1.3 !important;
  }

  .book-title-en {
    font-size: 0.72rem !important;
  }

  .book-meta {
    gap: 2px !important;
  }

  .book-actions {
    gap: 4px !important;
    margin-top: 6px !important;
  }

  .book-open-btn, .book-share-btn {
    padding: 5px 10px !important;
    font-size: 0.75rem !important;
  }
}

/* ---------------- ABOUT US PAGE DARK MODE OVERRIDES ---------------- */
html[data-theme="dark"] .about-hero .hero-tag {
  background: rgba(40, 40, 45, 0.8) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #f1f5f9 !important;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] .hero-title,
html[data-theme="dark"] .sec-title,
html[data-theme="dark"] .side-title {
  color: #ffffff !important;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.2) !important;
}

html[data-theme="dark"] .hero-arabic,
html[data-theme="dark"] .salam-title {
  color: #e2e8f0 !important;
  text-shadow: none !important;
}

html[data-theme="dark"] .hero-lead,
html[data-theme="dark"] .side-desc,
html[data-theme="dark"] .letter-body {
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .impact-card,
html[data-theme="dark"] .v-card,
html[data-theme="dark"] .pillar-box {
  background: rgba(18, 18, 22, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.22) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

html[data-theme="dark"] .impact-card:hover,
html[data-theme="dark"] .v-card:hover {
  transform: translateY(-6px) !important;
  border-top-color: rgba(255, 255, 255, 0.45) !important;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .impact-card h3,
html[data-theme="dark"] .v-card h3,
html[data-theme="dark"] .pillar-text h4,
html[data-theme="dark"] .alloc-info h4 {
  color: #ffffff !important;
}

html[data-theme="dark"] .impact-card p,
html[data-theme="dark"] .v-card p,
html[data-theme="dark"] .pillar-text p,
html[data-theme="dark"] .alloc-info p {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .impact-icon-box,
html[data-theme="dark"] .alloc-icon,
html[data-theme="dark"] .pillar-icon-wrap {
  background: rgba(35, 35, 42, 0.9) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  color: #f8fafc !important;
}

html[data-theme="dark"] .support-card-hero {
  background: linear-gradient(145deg, rgba(20, 20, 24, 0.9) 0%, rgba(12, 12, 15, 0.95) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
}

html[data-theme="dark"] .hadith-box {
  background: rgba(25, 25, 30, 0.85) !important;
  border-left: 4px solid #f59e0b !important;
  border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
}

html[data-theme="dark"] .hadith-quote {
  color: #f8fafc !important;
}

html[data-theme="dark"] .hadith-explanation {
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .accordion-wrap {
  background: rgba(18, 18, 22, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

html[data-theme="dark"] .accordion-wrap[open] {
  border-color: rgba(255, 255, 255, 0.3) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

html[data-theme="dark"] .accordion-summary:hover {
  background: rgba(255, 255, 255, 0.05) !important;
}

html[data-theme="dark"] .accordion-inner {
  background: rgba(12, 12, 15, 0.9) !important;
  border-top-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-theme="dark"] .support-right {
  background: rgba(18, 18, 22, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

html[data-theme="dark"] .side-badge {
  background: rgba(40, 40, 45, 0.8) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #f1f5f9 !important;
}

html[data-theme="dark"] .btn-hero-donate,
html[data-theme="dark"] .btn-donate-side {
  background: linear-gradient(135deg, #334155, #1e293b) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

html[data-theme="dark"] .btn-hero-donate:hover,
html[data-theme="dark"] .btn-donate-side:hover {
  background: linear-gradient(135deg, #475569, #334155) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.8);
}

html[data-theme="dark"] .btn-hero-discord,
html[data-theme="dark"] .btn-discord-side {
  background: rgba(30, 30, 35, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .btn-hero-discord:hover,
html[data-theme="dark"] .btn-discord-side:hover {
  background: rgba(45, 45, 50, 0.9) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
}

html[data-theme="dark"] .transparency-list {
  border-top-color: rgba(255, 255, 255, 0.12) !important;
}

html[data-theme="dark"] .trans-row {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .trans-row svg,
html[data-theme="dark"] .chevron-icon {
  color: #cbd5e1 !important;
}

/* ---------------- CONTACT PAGE DARK MODE OVERRIDES ---------------- */
html[data-theme="dark"] .contact-title {
  color: #ffffff !important;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.2) !important;
}

html[data-theme="dark"] .contact-subtitle {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .contact-card {
  background: rgba(18, 18, 22, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

html[data-theme="dark"] .contact-card::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent) !important;
}

html[data-theme="dark"] .contact-info {
  border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
}

html[data-theme="dark"] .contact-info-heading {
  color: #64748b !important;
}

html[data-theme="dark"] .contact-info-icon {
  background: rgba(35, 35, 42, 0.9) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  color: #f8fafc !important;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] .contact-info-item:hover .contact-info-icon {
  background: rgba(50, 50, 60, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .contact-info-label {
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .contact-info-value {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .contact-info-value a:hover {
  color: #ffffff !important;
}

html[data-theme="dark"] .form-group label {
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .form-input,
html[data-theme="dark"] .form-textarea {
  background: rgba(25, 25, 30, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .form-input::placeholder,
html[data-theme="dark"] .form-textarea::placeholder {
  color: #64748b !important;
}

html[data-theme="dark"] .form-input:focus,
html[data-theme="dark"] .form-textarea:focus {
  border-color: rgba(255, 255, 255, 0.4) !important;
  background: rgba(35, 35, 42, 0.95) !important;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .send-btn {
  background: linear-gradient(135deg, #334155, #1e293b) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

html[data-theme="dark"] .send-btn:hover {
  background: linear-gradient(135deg, #475569, #334155) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.8);
}

/* ---------------- SETTINGS PAGE DARK MODE OVERRIDES ---------------- */
html[data-theme="dark"] .settings-sidebar {
  background: rgba(18, 18, 22, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

html[data-theme="dark"] .sidebar-title {
  color: #ffffff !important;
}

html[data-theme="dark"] .sidebar-btn {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .sidebar-btn:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .sidebar-btn.active {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
  font-weight: 700;
}

html[data-theme="dark"] .tab-title {
  color: #ffffff !important;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.2) !important;
}

html[data-theme="dark"] .setting-card {
  background: rgba(18, 18, 22, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-top: 2px solid rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

html[data-theme="dark"] .setting-row {
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .setting-info h3 {
  color: #ffffff !important;
}

html[data-theme="dark"] .setting-info p {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .slider {
  background-color: rgba(40, 40, 45, 0.8) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
}

html[data-theme="dark"] input:checked + .slider {
  background-color: #38bdf8 !important;
  border-color: #38bdf8 !important;
}

/* ---------------- ARTICLES & ARTICLES SUBPAGES DARK MODE OVERRIDES ---------------- */
html[data-theme="dark"] .articles-title,
html[data-theme="dark"] .biography-title,
html[data-theme="dark"] .madhab-title,
html[data-theme="dark"] .article-header-title {
  color: #ffffff !important;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.2) !important;
}

html[data-theme="dark"] .articles-search-bar {
  background: rgba(18, 18, 22, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5), 0 4px 20px rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] .articles-search-bar:focus-within {
  border-color: rgba(255, 255, 255, 0.4) !important;
  background: rgba(25, 25, 30, 0.95) !important;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5), 0 4px 25px rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .articles-search-bar input {
  color: #ffffff !important;
}

html[data-theme="dark"] .articles-search-bar input::placeholder {
  color: #64748b !important;
}

html[data-theme="dark"] .category-chip,
html[data-theme="dark"] .filter-chip,
html[data-theme="dark"] .madhab-chip {
  background: rgba(30, 30, 35, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .category-chip:hover,
html[data-theme="dark"] .category-chip.active,
html[data-theme="dark"] .filter-chip:hover,
html[data-theme="dark"] .filter-chip.active {
  background: rgba(50, 50, 60, 0.9) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  color: #ffffff !important;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .article-card,
html[data-theme="dark"] .madhab-card,
html[data-theme="dark"] .section-card,
html[data-theme="dark"] .bio-card,
html[data-theme="dark"] .nav-card {
  background: rgba(18, 18, 22, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

html[data-theme="dark"] .article-card:hover,
html[data-theme="dark"] .madhab-card:hover,
html[data-theme="dark"] .section-card:hover,
html[data-theme="dark"] .bio-card:hover,
html[data-theme="dark"] .nav-card:hover {
  transform: translateY(-6px) !important;
  border-top-color: rgba(255, 255, 255, 0.45) !important;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .article-cover {
  background: linear-gradient(135deg, #18181b, #09090b) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

html[data-theme="dark"] .article-cover svg {
  color: #e2e8f0 !important;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.2)) !important;
}

html[data-theme="dark"] .article-top-category {
  background: rgba(40, 40, 45, 0.8) !important;
  color: #cbd5e1 !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

html[data-theme="dark"] .article-title,
html[data-theme="dark"] .madhab-card-title,
html[data-theme="dark"] .section-card-title {
  color: #ffffff !important;
}

html[data-theme="dark"] .article-readtime,
html[data-theme="dark"] .article-meta,
html[data-theme="dark"] .madhab-card-desc {
  color: #94a3b8 !important;
}

/* Article Reader / Reading Subpages Surface Overrides */
html[data-theme="dark"] .article-container,
html[data-theme="dark"] .article-content,
html[data-theme="dark"] .article-wrapper,
html[data-theme="dark"] .reading-container,
html[data-theme="dark"] .madhab-container {
  background: rgba(15, 15, 18, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #e2e8f0 !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8);
}

html[data-theme="dark"] .article-text,
html[data-theme="dark"] .article-body p,
html[data-theme="dark"] .content-card p {
  color: #cbd5e1 !important;
  line-height: 1.8;
}

html[data-theme="dark"] .article-text strong,
html[data-theme="dark"] .article-body strong,
html[data-theme="dark"] .article-content h1,
html[data-theme="dark"] .article-content h2,
html[data-theme="dark"] .article-content h3,
html[data-theme="dark"] .article-content h4 {
  color: #ffffff !important;
}

html[data-theme="dark"] .quote-block,
html[data-theme="dark"] blockquote {
  background: rgba(24, 24, 28, 0.9) !important;
  border-left: 4px solid var(--purple-bright) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
}

html[data-theme="dark"] .arabic,
html[data-theme="dark"] .arabic-text,
html[data-theme="dark"] .matn-arabic {
  color: #f1f5f9 !important;
  text-shadow: none !important;
}

html[data-theme="dark"] .evidence-box,
html[data-theme="dark"] .proof-box,
html[data-theme="dark"] .hadith-quote-box {
  background: rgba(22, 22, 26, 0.9) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #e2e8f0 !important;
}

/* ---------------- VIDEOS & VIDEO PLAYER DARK MODE OVERRIDES ---------------- */
html[data-theme="dark"] .videos-search-bar,
html[data-theme="dark"] .video-search-bar {
  background: rgba(18, 18, 22, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

html[data-theme="dark"] .videos-search-bar:focus-within,
html[data-theme="dark"] .video-search-bar:focus-within {
  border-color: rgba(255, 255, 255, 0.4) !important;
  background: rgba(25, 25, 30, 0.95) !important;
}

html[data-theme="dark"] .videos-search-bar input,
html[data-theme="dark"] .video-search-bar input {
  color: #ffffff !important;
}

html[data-theme="dark"] .videos-search-bar input::placeholder,
html[data-theme="dark"] .video-search-bar input::placeholder {
  color: #64748b !important;
}

html[data-theme="dark"] .featured-card,
html[data-theme="dark"] .video-card,
html[data-theme="dark"] .player-container,
html[data-theme="dark"] .playlist-card {
  background: rgba(18, 18, 22, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.22) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

html[data-theme="dark"] .featured-card:hover,
html[data-theme="dark"] .video-card:hover,
html[data-theme="dark"] .playlist-card:hover {
  transform: translateY(-6px) !important;
  border-top-color: rgba(255, 255, 255, 0.45) !important;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .featured-video-title,
html[data-theme="dark"] .video-card-title,
html[data-theme="dark"] .player-title {
  color: #ffffff !important;
}

html[data-theme="dark"] .featured-video-desc,
html[data-theme="dark"] .videos-subtitle,
html[data-theme="dark"] .video-card-footer,
html[data-theme="dark"] .video-views,
html[data-theme="dark"] .video-date {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .featured-watch-btn,
html[data-theme="dark"] .play-btn,
html[data-theme="dark"] .video-action-btn {
  background: linear-gradient(135deg, #334155, #1e293b) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

html[data-theme="dark"] .featured-watch-btn:hover,
html[data-theme="dark"] .play-btn:hover,
html[data-theme="dark"] .video-action-btn:hover {
  background: linear-gradient(135deg, #475569, #334155) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.8);
}

html[data-theme="dark"] .card-play-icon,
html[data-theme="dark"] .video-thumb-placeholder {
  background: rgba(30, 30, 35, 0.9) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .featured-category-badge,
html[data-theme="dark"] .video-card-category {
  background: rgba(40, 40, 45, 0.85) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .empty-state-badge,
html[data-theme="dark"] .empty-state-icon {
  background: rgba(25, 25, 30, 0.85) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: #94a3b8 !important;
}

/* ---------------- ALL 13 SECTIONS & SUBPAGES TAILORED DARK MODE OVERRIDES ---------------- */

/* Main Container & Page Layout Surface Overrides */
html[data-theme="dark"] .premium-article-container,
html[data-theme="dark"] .article-glass-card,
html[data-theme="dark"] .biography-page,
html[data-theme="dark"] .biography-hero,
html[data-theme="dark"] .biography-card,
html[data-theme="dark"] .section-heading,
html[data-theme="dark"] .madhab-hero,
html[data-theme="dark"] .maslak-card,
html[data-theme="dark"] .hadith-container,
html[data-theme="dark"] .jurisprudence-container,
html[data-theme="dark"] .principles-container,
html[data-theme="dark"] .maxims-container,
html[data-theme="dark"] .proofs-container,
html[data-theme="dark"] .doubts-container,
html[data-theme="dark"] .creed-container,
html[data-theme="dark"] .theology-container,
html[data-theme="dark"] .opinion-container,
html[data-theme="dark"] .sects-container {
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .premium-article-container,
html[data-theme="dark"] .article-glass-card,
html[data-theme="dark"] .biography-card,
html[data-theme="dark"] .maslak-card,
html[data-theme="dark"] .hadith-container,
html[data-theme="dark"] .jurisprudence-container,
html[data-theme="dark"] .principles-container,
html[data-theme="dark"] .maxims-container,
html[data-theme="dark"] .proofs-container,
html[data-theme="dark"] .doubts-container,
html[data-theme="dark"] .creed-container,
html[data-theme="dark"] .theology-container,
html[data-theme="dark"] .opinion-container,
html[data-theme="dark"] .sects-container {
  background: rgba(18, 18, 22, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8);
}

/* Titles and Headings across all 13 sections */
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6,
html[data-theme="dark"] .section-heading,
html[data-theme="dark"] .section-title,
html[data-theme="dark"] .article-title,
html[data-theme="dark"] .page-title,
html[data-theme="dark"] .biography-title,
html[data-theme="dark"] .madhab-title,
html[data-theme="dark"] .maslak-title,
html[data-theme="dark"] .hadith-title,
html[data-theme="dark"] .fiqh-title,
html[data-theme="dark"] .usul-title,
html[data-theme="dark"] .maxims-title,
html[data-theme="dark"] .proofs-title,
html[data-theme="dark"] .doubts-title,
html[data-theme="dark"] .creed-title,
html[data-theme="dark"] .theology-title,
html[data-theme="dark"] .opinion-title,
html[data-theme="dark"] .sects-title {
  color: #ffffff !important;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.15) !important;
}

/* Article Body Text & Paragraphs */
html[data-theme="dark"] p,
html[data-theme="dark"] .article-text,
html[data-theme="dark"] .bio-text,
html[data-theme="dark"] .translation-text,
html[data-theme="dark"] .explanation-text,
html[data-theme="dark"] .summary-text {
  color: #cbd5e1 !important;
}

html[data-theme="dark"] strong,
html[data-theme="dark"] b {
  color: #ffffff !important;
}

html[data-theme="dark"] em,
html[data-theme="dark"] i {
  color: #e2e8f0 !important;
}

/* Quote Blocks, Notes & Scholarly Evidence Cards */
html[data-theme="dark"] .quote-block,
html[data-theme="dark"] .hadith-box,
html[data-theme="dark"] .evidence-box,
html[data-theme="dark"] .proof-box,
html[data-theme="dark"] .note-box,
html[data-theme="dark"] .notes-box,
html[data-theme="dark"] .scholarly-box,
html[data-theme="dark"] .chain-box,
html[data-theme="dark"] .hadith-quote-box,
html[data-theme="dark"] .scholarly-consensus-card,
html[data-theme="dark"] .maxim-card,
html[data-theme="dark"] .principle-card,
html[data-theme="dark"] .difference-card,
html[data-theme="dark"] .doubt-card,
html[data-theme="dark"] .creed-card,
html[data-theme="dark"] .sect-card {
  background: rgba(24, 24, 28, 0.9) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-left: 4px solid var(--purple-bright) !important;
  color: #f8fafc !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Arabic Text Elements */
html[data-theme="dark"] .arabic,
html[data-theme="dark"] .arabic-text,
html[data-theme="dark"] .matn-text,
html[data-theme="dark"] .matn-arabic,
html[data-theme="dark"] .quran-text {
  color: #f1f5f9 !important;
  text-shadow: none !important;
}

/* Category Chips, Badges and Reference Labels */
html[data-theme="dark"] .ref-badge,
html[data-theme="dark"] .chapter-badge,
html[data-theme="dark"] .source-tag,
html[data-theme="dark"] .topic-badge {
  background: rgba(40, 40, 48, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #cbd5e1 !important;
}

/* Zoomable Article Reference Images */
html[data-theme="dark"] .zoomable-img,
html[data-theme="dark"] img.article-img,
html[data-theme="dark"] .manuscript-img {
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
  border-radius: 12px;
}

/* Sub-navigation Links and Back Buttons */
html[data-theme="dark"] .back-btn,
html[data-theme="dark"] .breadcrumb,
html[data-theme="dark"] .sub-nav-btn {
  background: rgba(30, 30, 36, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .back-btn:hover,
html[data-theme="dark"] .sub-nav-btn:hover {
  background: rgba(45, 45, 55, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
}

/* ---------------- HOME PAGE & BOOKS PAGE DARK MODE OVERRIDES ---------------- */

/* Home Page Hero Section */
html[data-theme="dark"] .hero {
  color: #ffffff !important;
}

html[data-theme="dark"] .title-eng {
  color: #ffffff !important;
  text-shadow: 0 0 35px rgba(255, 255, 255, 0.25), 0 0 70px rgba(168, 85, 247, 0.3) !important;
}

html[data-theme="dark"] .title-ar {
  color: #f8fafc !important;
  text-shadow: 0 0 25px rgba(255, 255, 255, 0.2) !important;
}

html[data-theme="dark"] .hero-desc {
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .action-btn {
  background: rgba(24, 24, 28, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(14px) !important;
}

html[data-theme="dark"] .action-btn:hover {
  background: rgba(45, 45, 55, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  color: #ffffff !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(168, 85, 247, 0.3);
}

/* Stats Cards */
html[data-theme="dark"] .stats-container {
  gap: 20px !important;
}

html[data-theme="dark"] .stat-card {
  background: rgba(18, 18, 22, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(14px) !important;
}

html[data-theme="dark"] .stat-card:hover {
  background: rgba(26, 26, 32, 0.92) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  border-top-color: var(--purple-bright) !important;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.85), 0 0 25px rgba(168, 85, 247, 0.25);
}

html[data-theme="dark"] .stat-number {
  color: #ffffff !important;
}

html[data-theme="dark"] .stat-label {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .stat-icon {
  fill: #cbd5e1 !important;
  color: #cbd5e1 !important;
}

/* Books & Library Page Overview */
html[data-theme="dark"] .lib-title {
  color: #ffffff !important;
  text-shadow: 0 0 35px rgba(255, 255, 255, 0.25), 0 0 70px rgba(168, 85, 247, 0.3) !important;
}

html[data-theme="dark"] .lib-subtitle {
  color: #cbd5e1 !important;
}

/* Books Search Container */
html[data-theme="dark"] .search-wrapper {
  background: rgba(20, 20, 25, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6), 0 6px 24px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(14px) !important;
}

html[data-theme="dark"] .search-wrapper:focus-within {
  border-color: rgba(255, 255, 255, 0.4) !important;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6), 0 0 25px rgba(168, 85, 247, 0.3);
}

html[data-theme="dark"] .search-icon {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .search-wrapper input {
  color: #ffffff !important;
}

html[data-theme="dark"] .search-wrapper input::placeholder {
  color: #64748b !important;
}

html[data-theme="dark"] .search-clear {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .search-clear:hover {
  color: #ffffff !important;
}

/* Category Scroll Chips */
html[data-theme="dark"] .category-chip {
  background: rgba(24, 24, 28, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #cbd5e1 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] .category-chip:hover,
html[data-theme="dark"] .category-chip.active {
  background: rgba(45, 45, 55, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 0 15px rgba(168, 85, 247, 0.3);
}

html[data-theme="dark"] .scroll-btn {
  background: rgba(30, 30, 38, 0.9) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
}

html[data-theme="dark"] .scroll-btn:hover {
  background: rgba(50, 50, 60, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
}

/* Book Cards */
html[data-theme="dark"] .book-card {
  background: rgba(18, 18, 22, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(14px) !important;
}

html[data-theme="dark"] .book-card:hover {
  background: rgba(24, 24, 30, 0.92) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  border-top-color: var(--purple-bright) !important;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.85), 0 0 28px rgba(168, 85, 247, 0.25);
}

html[data-theme="dark"] .book-cover {
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  background: linear-gradient(135deg, #121216, #22222c) !important;
}

html[data-theme="dark"] .book-title-ar {
  color: #ffffff !important;
}

html[data-theme="dark"] .book-title-en {
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .book-author {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .book-card.featured {
  background: linear-gradient(180deg, rgba(35, 25, 55, 0.9), rgba(18, 18, 22, 0.9)) !important;
  border: 1px solid rgba(168, 85, 247, 0.4) !important;
}

html[data-theme="dark"] .featured-tag {
  background: rgba(45, 45, 55, 0.9) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .featured-desc {
  color: #94a3b8 !important;
}

/* Volume Selector & Buttons */
html[data-theme="dark"] .vol-select {
  background: rgba(25, 25, 30, 0.9) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .vol-select option {
  background: #141418 !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .book-actions {
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .book-action-icon {
  background: rgba(30, 30, 38, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .book-action-icon:hover {
  background: rgba(50, 50, 60, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .book-open-btn,
html[data-theme="dark"] .open-btn,
html[data-theme="dark"] .btn-open,
html[data-theme="dark"] .read-btn,
html[data-theme="dark"] .explore-btn,
html[data-theme="dark"] .action-btn {
  background: #202b38 !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 50px;
  color: #ffffff !important;
  font-weight: 600;
  padding: 8px 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.25s ease;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
}

html[data-theme="dark"] .book-open-btn svg,
html[data-theme="dark"] .open-btn svg,
html[data-theme="dark"] .btn-open svg,
html[data-theme="dark"] .read-btn svg,
html[data-theme="dark"] .explore-btn svg,
html[data-theme="dark"] .action-btn svg {
  color: #ffffff !important;
  stroke: #ffffff !important;
}

html[data-theme="dark"] .book-open-btn:hover,
html[data-theme="dark"] .open-btn:hover,
html[data-theme="dark"] .btn-open:hover,
html[data-theme="dark"] .read-btn:hover,
html[data-theme="dark"] .explore-btn:hover,
html[data-theme="dark"] .action-btn:hover {
  background: #2a384a !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
  transform: translateY(-1px) !important;
}

/* PDF Modal Overlay Smooth Transitions & Auto-Hide Bar */
.pdf-modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10000000 !important;
  background: rgba(2, 0, 10, 0.95) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transform: scale(0.98) !important;
}

.pdf-modal-overlay.open {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: scale(1) !important;
  z-index: 10000000 !important;
}

/* Hide Navigation Bar when Book PDF Modal or Video Modal is Open */
body:has(.pdf-modal-overlay.open) .spotlight-nav,
body:has(.video-modal.open) .spotlight-nav,
body.pdf-modal-active .spotlight-nav,
body.video-modal-open .spotlight-nav,
.pdf-modal-overlay.open ~ .spotlight-nav,
.pdf-modal-overlay.open + .spotlight-nav,
.video-modal.open ~ .spotlight-nav,
.video-modal.open + .spotlight-nav,
#videoModal.open ~ .spotlight-nav {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.pdf-modal-container {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  height: 100% !important;
  flex: 1 !important;
  overflow: hidden !important;
}

.pdf-frame {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  z-index: 1 !important;
}

.pdf-bar-trigger {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 6px !important;
  z-index: 9999 !important;
  pointer-events: auto !important;
}

.pdf-bar {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 10005 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 14px 24px;
  background: rgba(14, 14, 18, 0.96) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  gap: 16px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateY(-100%) !important;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.pdf-bar:hover,
.pdf-bar-trigger:hover + .pdf-bar {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;
  z-index: 10005 !important;
}

.pdf-bar-left, .pdf-bar-right {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  position: relative !important;
  z-index: 10010 !important;
}

.pdf-bar-icon, .pdf-close-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  position: relative !important;
  z-index: 10015 !important;
}

html[data-theme="dark"] .pdf-modal-overlay {
  background: rgba(4, 4, 6, 0.95) !important;
}

html[data-theme="dark"] .pdf-bar {
  background: rgba(14, 14, 18, 0.95) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
}

html[data-theme="dark"] .pdf-title-ar {
  color: #ffffff !important;
}

html[data-theme="dark"] .pdf-title-en {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .pdf-close-btn {
  background: rgba(30, 30, 38, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .pdf-close-btn:hover {
  background: rgba(50, 50, 60, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
}

html[data-theme="dark"] .pdf-bar-icon {
  background: rgba(30, 30, 38, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .pdf-bar-icon:hover {
  background: rgba(50, 50, 60, 0.95) !important;
  color: #ffffff !important;
}

/* Additional Book Library Pages Dark Mode Elements */
html[data-theme="dark"] .toast {
  background: rgba(18, 18, 22, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

html[data-theme="dark"] .search-no-results {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .hadith-header {
  color: #ffffff !important;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.15) !important;
  border-bottom-color: rgba(255, 255, 255, 0.12) !important;
}

html[data-theme="dark"] .filter-pill:hover,
html[data-theme="dark"] .filter-pill.active {
  background: rgba(45, 45, 55, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  color: #ffffff !important;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}

/* â”€â”€ TAILORED DARK MODE RULES FOR HOME PAGE RECOMMENDED SECTIONS â”€â”€ */
html[data-theme="dark"] .section-tag {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .section-title {
  background: linear-gradient(135deg, #ffffff 40%, #cbd5e1 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

html[data-theme="dark"] .section-view-all {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .section-view-all:hover {
  background: rgba(255, 255, 255, 0.14) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 18px rgba(255, 255, 255, 0.15);
}

html[data-theme="dark"] .home-article-card,
html[data-theme="dark"] .home-book-card {
  background: linear-gradient(165deg, rgba(22, 22, 28, 0.92) 0%, rgba(12, 12, 16, 0.96) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.75);
}

html[data-theme="dark"] .home-article-card:hover,
html[data-theme="dark"] .home-book-card:hover {
  transform: translateY(-8px) !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.85), 0 0 20px rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .home-article-cover {
  background: radial-gradient(circle at 50% 50%, rgba(45, 45, 55, 0.85), rgba(12, 12, 16, 0.95)) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

html[data-theme="dark"] .home-article-cover svg {
  color: #cbd5e1 !important;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3)) !important;
}

html[data-theme="dark"] .home-article-badge {
  background: rgba(10, 10, 14, 0.88) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  color: #f1f5f9 !important;
}

html[data-theme="dark"] .home-article-title-en,
html[data-theme="dark"] .home-book-title-en {
  color: #ffffff !important;
}

html[data-theme="dark"] .home-article-title-ar,
html[data-theme="dark"] .home-book-title-ar {
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .home-article-meta {
  color: #94a3b8 !important;
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .home-book-cover-wrap {
  background: linear-gradient(135deg, #18181c, #0a0a0d) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  box-shadow: -10px 14px 28px rgba(0, 0, 0, 0.85), 0 0 15px rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .home-book-author {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .home-book-btn {
  background: linear-gradient(135deg, rgba(45, 45, 55, 0.9), rgba(25, 25, 32, 0.9)) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] .home-book-card:hover .home-book-btn {
  background: linear-gradient(135deg, rgba(75, 75, 90, 0.95), rgba(45, 45, 55, 0.95)) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

html[data-theme="dark"] .home-section-divider {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent) !important;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   SPOTLIGHT NAVBAR DESIGN SYSTEM
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.spotlight-nav {
  position: fixed !important;
  top: 18px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: max-content !important;
  max-width: 95vw !important;
  height: auto !important;
  min-height: 52px !important;
  z-index: 999999 !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 6px 14px 6px 18px;
  background: linear-gradient(135deg, rgba(32, 12, 56, 0.92), rgba(18, 6, 36, 0.92)) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border: 1px solid rgba(192, 132, 252, 0.35) !important;
  border-top: 1px solid rgba(216, 180, 254, 0.45) !important;
  border-radius: 9999px;
  box-shadow: 0 12px 36px rgba(12, 4, 28, 0.85), 0 0 25px rgba(168, 85, 247, 0.3), inset 0 1px 0 rgba(216, 180, 254, 0.25);
  box-sizing: border-box !important;
  row-gap: 8px !important;
  column-gap: 12px !important;
  animation: navDrop 0.8s cubic-bezier(0.22, 1, 0.36, 1) both !important;
  
  --spotlight-x: 50%;
  --ambience-x: 50%;
  --spotlight-color: rgba(192, 132, 252, 0.25);
  --ambience-color: var(--purple-glow);
}

@keyframes navDrop {
  from { transform: translate(-50%, -50px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

.nav-spotlight {
  pointer-events: none !important;
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 1 !important;
  opacity: 0 !important;
  transition: opacity 0.25s ease;
  background: radial-gradient(
    110px circle at var(--spotlight-x, 50%) 100%,
    var(--spotlight-color, rgba(192, 132, 252, 0.25)) 0%,
    transparent 60%
  ) !important;
}

nav:hover .nav-spotlight, .spotlight-nav:hover .nav-spotlight {
  opacity: 1 !important;
}

.nav-ambience {
  pointer-events: none !important;
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 2px !important;
  z-index: 2 !important;
  background: radial-gradient(
    55px circle at var(--ambience-x, 50%) 0%,
    var(--ambience-color, var(--purple-glow)) 0%,
    transparent 100%
  ) !important;
}

.nav-brand {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px !important;
  text-decoration: none !important;
  color: #ffffff !important;
  font-weight: 800;
  font-style: italic !important;
  font-size: var(--font-lg);
  z-index: 10 !important;
  position: relative !important;
  margin-right: 10px !important;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  letter-spacing: -0.01em;
  text-shadow: 0 0 12px rgba(192, 132, 252, 0.4) !important;
}

.nav-brand .brand-icon {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50%;
  object-fit: cover !important;
  flex-shrink: 0 !important;
  border: 1.5px solid rgba(192, 132, 252, 0.5) !important;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.5);
}

.nav-links {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  gap: 3px !important;
  list-style: none !important;
  align-items: center !important;
  z-index: 10 !important;
  position: relative !important;
  margin: 0;
  padding: 0;
}

.nav-links li {
  display: inline-flex !important;
  align-items: center !important;
  flex-shrink: 0 !important;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: #e9d5ff !important;
  text-decoration: none !important;
  font-size: var(--font-sm);
  font-weight: 500;
  padding: 6px 14px;
  transition: all 0.2s ease;
  display: inline-flex !important;
  align-items: center !important;
  white-space: nowrap !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none;
  outline: none !important;
}

.nav-links a:hover {
  color: #ffffff !important;
  background: transparent !important;
  text-shadow: 0 0 10px rgba(192, 132, 252, 0.6) !important;
}

.nav-links a.active, .nav-links a:active, .nav-links a:focus {
  color: #ffffff !important;
  font-weight: 700;
  background: transparent !important;
  border: none !important;
  box-shadow: none;
  outline: none !important;
  text-shadow: 0 0 12px rgba(192, 132, 252, 0.8) !important;
}

.nav-btn {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.45), rgba(168, 85, 247, 0.35)) !important;
  border: 1px solid rgba(192, 132, 252, 0.5) !important;
  color: #ffffff !important;
  padding: 6px 18px;
  border-radius: 9999px;
  font-size: var(--font-sm);
  font-weight: 600;
  cursor: pointer !important;
  transition: all 0.25s ease;
  z-index: 10 !important;
  position: relative !important;
  margin-left: 4px !important;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.35);
}

.nav-btn:hover {
  border-color: rgba(216, 180, 254, 0.8) !important;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.65), rgba(168, 85, 247, 0.55)) !important;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.5);
}

/* â”€â”€ DARK THEME SPOTLIGHT NAV OVERRIDES â”€â”€ */
html[data-theme="dark"] .spotlight-nav {
  background: linear-gradient(135deg, rgba(18, 18, 22, 0.95), rgba(10, 10, 14, 0.95)) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.18) !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  --spotlight-color: rgba(255, 255, 255, 0.14);
  --ambience-color: #ffffff;
}

html[data-theme="dark"] .nav-brand { color: #ffffff !important; text-shadow: none !important; }
html[data-theme="dark"] .nav-brand .brand-icon { border: 1.5px solid rgba(255, 255, 255, 0.3) !important; box-shadow: 0 0 10px rgba(255, 255, 255, 0.15); }
html[data-theme="dark"] .nav-links a { color: #cbd5e1 !important; background: transparent !important; border: none !important; box-shadow: none; text-shadow: none !important; }
html[data-theme="dark"] .nav-links a:hover { color: #ffffff !important; background: transparent !important; text-shadow: 0 0 8px rgba(255, 255, 255, 0.3) !important; }
html[data-theme="dark"] .nav-links a.active, html[data-theme="dark"] .nav-links a:active, html[data-theme="dark"] .nav-links a:focus { color: #ffffff !important; background: transparent !important; border: none !important; box-shadow: none; text-shadow: 0 0 10px rgba(255, 255, 255, 0.4) !important; }
html[data-theme="dark"] .nav-btn { background: rgba(255, 255, 255, 0.08) !important; border: 1px solid rgba(255, 255, 255, 0.2) !important; color: #ffffff !important; box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); }
html[data-theme="dark"] .nav-btn:hover { background: rgba(255, 255, 255, 0.18) !important; border-color: rgba(255, 255, 255, 0.4) !important; box-shadow: 0 0 14px rgba(255, 255, 255, 0.2); }

/* â”€â”€ LIGHT / WHITE THEME SPOTLIGHT NAV OVERRIDES â”€â”€ */
html[data-theme="light"] .spotlight-nav {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(245, 247, 250, 0.96)) !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  border-top: 1px solid rgba(0, 0, 0, 0.15) !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 1);
  --spotlight-color: rgba(0, 0, 0, 0.06);
  --ambience-color: #0f172a;
}

html[data-theme="light"] .nav-brand { color: #0f172a !important; text-shadow: none !important; }
html[data-theme="light"] .nav-brand .brand-icon { border: 1.5px solid rgba(0, 0, 0, 0.15) !important; box-shadow: 0 0 8px rgba(0, 0, 0, 0.08); }
html[data-theme="light"] .nav-links a { color: #475569 !important; background: transparent !important; border: none !important; box-shadow: none; text-shadow: none !important; }
html[data-theme="light"] .nav-links a:hover { color: #0f172a !important; background: transparent !important; text-shadow: none !important; }
html[data-theme="light"] .nav-links a.active, html[data-theme="light"] .nav-links a:active, html[data-theme="light"] .nav-links a:focus { color: #0f172a !important; background: transparent !important; border: none !important; box-shadow: none; text-shadow: none !important; }
html[data-theme="light"] .nav-btn { background: rgba(15, 23, 42, 0.06) !important; border: 1px solid rgba(15, 23, 42, 0.2) !important; color: #0f172a !important; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05); }
html[data-theme="light"] .nav-btn:hover { background: rgba(15, 23, 42, 0.12) !important; border-color: rgba(15, 23, 42, 0.35) !important; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   CONTINUE WHERE YOU LEFT OFF â€” DESIGN SYSTEM
   Three themes: original (cosmic purple), dark, light
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* â”€â”€ Section tag â”€â”€ */
.section-tag-purple {
  background: rgba(168, 85, 247, 0.15);
  color: var(--purple-glow);
  border-color: rgba(168, 85, 247, 0.3);
}

/* â”€â”€ Grid layout â”€â”€ */
.continue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 18px;
}

/* â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”
   BASE CARD (Original / Cosmic theme default)
   â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â” */
.continue-card {
  position: relative;
  background: linear-gradient(165deg, rgba(30, 15, 60, 0.75) 0%, rgba(12, 6, 25, 0.9) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(192, 132, 252, 0.3);
  border-top: 2px solid rgba(192, 132, 252, 0.7);
  border-radius: 24px;
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.continue-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--purple-deep), var(--purple-bright), var(--purple-glow));
  opacity: 1;
}

.continue-card:hover {
  transform: translateY(-6px);
  border-color: rgba(216, 180, 254, 0.6);
  box-shadow: 0 22px 45px rgba(0, 0, 0, 0.85), 0 0 30px rgba(168, 85, 247, 0.4);
}

/* ── Card inner parts ── */
.continue-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.continue-card-badge,
.continue-card-badge-blue {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-xs);
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #f3e8ff;
  background: rgba(139, 60, 247, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(192, 132, 252, 0.5);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.3);
  transition: all 0.3s ease;
}

.continue-card-time {
  font-size: var(--font-sm);
  color: var(--purple-glow);
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: color 0.3s ease;
}

.continue-card-title {
  font-size: var(--font-lg);
  font-weight: 800;
  color: #ffffff;
  margin: 10px 0 6px 0;
  line-height: 1.35;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.25);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.3s ease;
}

.continue-card-sub {
  font-size: var(--font-sm);
  color: #cbd5e1;
  margin: 0;
  line-height: 1.55;
  font-weight: 500;
  opacity: 0.95;
  transition: color 0.3s ease;
}

.continue-card-btn,
.continue-card-btn-blue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--purple-deep) 0%, var(--purple-bright) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ffffff !important;
  font-weight: 700;
  font-size: var(--font-sm);
  text-decoration: none !important;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.45), 0 0 14px rgba(168, 85, 247, 0.35);
  cursor: pointer;
  transition: all 0.3s ease;
  width: max-content;
  margin-top: 6px;
}

.continue-card-btn:hover,
.continue-card-btn-blue:hover {
  background: linear-gradient(135deg, #8b5cf6 0%, var(--purple-glow) 100%);
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 10px 28px rgba(168, 85, 247, 0.7), 0 0 20px rgba(192, 132, 252, 0.5);
  transform: translateY(-3px);
}

/* â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”
   LOGGED-OUT BANNER (Original / Cosmic theme default)
   â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â” */
.continue-login-banner {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.04) 0%, rgba(35, 10, 70, 0.18) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 2px solid rgba(168, 85, 247, 0.4);
  border-radius: 24px;
  padding: 28px 32px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.continue-login-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--purple-deep), var(--purple-bright), var(--purple-glow));
}

.continue-login-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 650px;
}

.continue-login-title {
  font-size: var(--font-xl);
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  transition: color 0.25s ease;
}

.continue-login-desc {
  font-size: var(--font-sm);
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
  line-height: 1.55;
  transition: color 0.25s ease;
}

.continue-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(109, 40, 217, 0.45), rgba(124, 58, 237, 0.55));
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.94rem;
  padding: 12px 28px;
  border-radius: 50px;
  text-decoration: none !important;
  border: 1px solid rgba(192, 132, 252, 0.45);
  box-shadow: 0 6px 20px rgba(109, 40, 217, 0.3);
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.continue-login-btn:hover {
  background: linear-gradient(135deg, #6d28d9, #9333ea);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(109, 40, 217, 0.5);
  border-color: rgba(216, 180, 254, 0.7);
}

/* â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”
   LIGHT THEME
   Crisp white cards, purple-tinted badges, solid purple CTAs
   â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â” */
html[data-theme="light"] .section-tag-purple {
  background: rgba(168, 85, 247, 0.1) !important;
  color: #6d28d9 !important;
  border-color: rgba(109, 40, 217, 0.25) !important;
}

html[data-theme="light"] .continue-card {
  background: #ffffff !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1px solid rgba(226, 232, 240, 1) !important;
  border-top: 2px solid rgba(109, 40, 217, 0.35) !important;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06), 0 1px 4px rgba(15, 23, 42, 0.04);
  border-radius: 24px;
}

html[data-theme="light"] .continue-card::before {
  opacity: 0 !important;
}

html[data-theme="light"] .continue-card:hover {
  transform: translateY(-4px) !important;
  border-color: rgba(109, 40, 217, 0.45) !important;
  box-shadow: 0 12px 32px rgba(109, 40, 217, 0.12), 0 2px 8px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .continue-card-badge {
  color: #5b21b6 !important;
  background: rgba(109, 40, 217, 0.1) !important;
  border: 1px solid rgba(109, 40, 217, 0.22) !important;
  border-radius: 20px;
}

html[data-theme="light"] .continue-card-badge-blue {
  color: #5b21b6 !important;
  background: rgba(109, 40, 217, 0.1) !important;
  border: 1px solid rgba(109, 40, 217, 0.22) !important;
  border-radius: 20px;
}

html[data-theme="light"] .continue-card-time {
  color: #64748b !important;
}

html[data-theme="light"] .continue-card-title {
  color: #0f172a !important;
}

html[data-theme="light"] .continue-card-sub {
  color: #475569 !important;
}

html[data-theme="light"] .continue-card-btn {
  background: linear-gradient(135deg, #6d28d9, var(--purple-deep)) !important;
  border: 1px solid rgba(109, 40, 217, 0.3) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(109, 40, 217, 0.25);
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html[data-theme="light"] .continue-card-btn:hover {
  background: linear-gradient(135deg, #5b21b6, #6d28d9) !important;
  box-shadow: 0 8px 22px rgba(91, 33, 182, 0.35);
  transform: translateY(-2px) !important;
}

html[data-theme="light"] .continue-card-btn-blue {
  background: linear-gradient(135deg, #6d28d9, var(--purple-deep)) !important;
  border: 1px solid rgba(109, 40, 217, 0.3) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(109, 40, 217, 0.25);
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html[data-theme="light"] .continue-card-btn-blue:hover {
  background: linear-gradient(135deg, #5b21b6, #6d28d9) !important;
  box-shadow: 0 8px 22px rgba(91, 33, 182, 0.35);
  transform: translateY(-2px) !important;
}

html[data-theme="light"] .continue-login-banner {
  background: #ffffff !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1px solid rgba(226, 232, 240, 1) !important;
  border-top: 2px solid rgba(109, 40, 217, 0.35) !important;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .continue-login-banner::before {
  background: linear-gradient(180deg, #6d28d9, #9333ea, var(--purple-glow)) !important;
}

html[data-theme="light"] .continue-login-title {
  color: #0f172a !important;
}

html[data-theme="light"] .continue-login-desc {
  color: #475569 !important;
}

html[data-theme="light"] .continue-login-btn {
  background: linear-gradient(135deg, #6d28d9, var(--purple-deep)) !important;
  border: 1px solid rgba(109, 40, 217, 0.3) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(109, 40, 217, 0.25);
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html[data-theme="light"] .continue-login-btn:hover {
  background: linear-gradient(135deg, #5b21b6, #6d28d9) !important;
  box-shadow: 0 8px 22px rgba(91, 33, 182, 0.35);
  transform: translateY(-2px) !important;
}

/* â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”
   DARK THEME
   Deep obsidian cards, purple-unified badges, dark glass CTAs
   Matches html[data-theme="dark"] .home-book-btn exactly
   â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â”â” */
/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   DARK THEME — CONTINUE SECTION (Premium Purple Accent)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   DARK THEME — CONTINUE SECTION (Premium Purple Accent)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   DARK THEME — CONTINUE SECTION (Sleek Dark Obsidian)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   DARK THEME — CONTINUE SECTION (Matches Featured Articles & Research Style)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
html[data-theme="dark"] .section-tag-purple {
  background: rgba(168, 85, 247, 0.15) !important;
  border: 1px solid rgba(192, 132, 252, 0.35) !important;
  color: #e9d5ff !important;
}

html[data-theme="dark"] .continue-card {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.05) 0%, rgba(35, 10, 70, 0.12) 100%) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-theme="dark"] .continue-card::before {
  display: none !important;
}

html[data-theme="dark"] .continue-card:hover {
  transform: translateY(-8px) !important;
  border-color: rgba(192, 132, 252, 0.45) !important;
  box-shadow: 0 22px 45px -10px rgba(0, 0, 0, 0.75), 0 0 25px rgba(168, 85, 247, 0.25);
}

html[data-theme="dark"] .continue-card-badge,
html[data-theme="dark"] .continue-card-badge-blue {
  background: rgba(15, 5, 30, 0.75) !important;
  border: 1px solid rgba(192, 132, 252, 0.35) !important;
  color: #e9d5ff !important;
  border-radius: 14px;
  box-shadow: none;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 10px;
}

html[data-theme="dark"] .continue-card-time {
  color: var(--purple-glow) !important;
  font-weight: 600;
}

html[data-theme="dark"] .continue-card-title {
  color: #ffffff !important;
  text-shadow: none !important;
}

html[data-theme="dark"] .continue-card-sub {
  color: rgba(255, 255, 255, 0.6) !important;
  line-height: 1.5;
}

html[data-theme="dark"] .continue-card-btn,
html[data-theme="dark"] .continue-card-btn-blue {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: rgba(168, 85, 247, 0.15) !important;
  border: 1px solid rgba(192, 132, 252, 0.35) !important;
  color: #e9d5ff !important;
  font-size: var(--font-sm);
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 50px;
  text-decoration: none !important;
  box-shadow: none;
  transition: all 0.3s ease;
}

html[data-theme="dark"] .continue-card-btn:hover,
html[data-theme="dark"] .continue-card-btn-blue:hover {
  background: rgba(168, 85, 247, 0.35) !important;
  border-color: rgba(216, 180, 254, 0.6) !important;
  color: #ffffff !important;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.4);
  transform: translateY(-2px) !important;
}

html[data-theme="dark"] .continue-login-banner {
  background: rgba(13, 13, 18, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-top: 2px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.85);
}

html[data-theme="dark"] .continue-login-banner::before {
  display: none !important;
}

html[data-theme="dark"] .continue-login-title {
  color: #ffffff !important;
  text-shadow: none !important;
}

html[data-theme="dark"] .continue-login-desc {
  color: #a1a1aa !important;
}

html[data-theme="dark"] .continue-login-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}

html[data-theme="dark"] .continue-login-btn:hover {
  background: rgba(255, 255, 255, 0.16) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8), 0 0 16px rgba(255, 255, 255, 0.1);
  transform: translateY(-2px) !important;
}

/* â”€â”€ Responsive â”€â”€ */
@media (max-width: 640px) {
  .continue-login-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .continue-login-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ── OWNER & FOUNDER SECTION STYLES WITH GOLDEN GLINT IN DARK MODE ── */
.owner-section-container {
  margin-top: 50px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.owner-card {
  position: relative;
  background: linear-gradient(145deg, rgba(18, 12, 28, 0.95) 0%, rgba(8, 4, 18, 0.98) 100%);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-top: 2px solid rgba(212, 175, 55, 0.85);
  border-radius: 28px;
  padding: 40px 36px;
  display: flex;
  gap: 36px;
  align-items: flex-start;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 35px rgba(212, 175, 55, 0.12), inset 0 1px 0 rgba(255, 223, 118, 0.25);
  overflow: hidden;
  transition: all 0.35s ease;
}

.owner-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(212, 175, 55, 0.03) 35%,
    rgba(255, 223, 118, 0.14) 50%,
    rgba(212, 175, 55, 0.03) 65%,
    transparent 100%
  );
  transform: skewX(-25deg);
  pointer-events: none;
  animation: goldenGlint 8s ease-in-out infinite;
}

@keyframes goldenGlint {
  0% { left: -150%; }
  35% { left: 150%; }
  100% { left: 150%; }
}

.owner-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 55, 0.6);
  border-top-color: rgba(255, 223, 118, 1);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 45px rgba(212, 175, 55, 0.22), inset 0 1px 0 rgba(255, 235, 160, 0.4);
}

.owner-avatar-container {
  position: relative;
  flex-shrink: 0;
}

.owner-avatar-img {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(212, 175, 55, 0.9);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7), 0 0 25px rgba(212, 175, 55, 0.35);
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.owner-card:hover .owner-avatar-img {
  transform: scale(1.04);
  border-color: rgba(255, 223, 118, 1);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), 0 0 35px rgba(212, 175, 55, 0.5);
}

.owner-badge {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #f59e0b 0%, #d4af37 50%, #b48811 100%);
  color: #03010a;
  font-weight: 800;
  font-size: var(--font-xs);
  padding: 5px 14px;
  border-radius: 20px;
  white-space: nowrap;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 245, 200, 0.5);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6), 0 0 12px rgba(212, 175, 55, 0.4);
}

.owner-info {
  flex: 1;
}

.owner-tag {
  display: inline-block;
  font-size: var(--font-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #f59e0b;
  text-transform: uppercase;
  margin-bottom: 6px;
  text-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

.owner-name {
  font-size: 1.7rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
  font-family: 'Plus Jakarta Sans', 'DM Sans', sans-serif;
  line-height: 1.25;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.owner-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: #e9d5ff;
  margin-bottom: 16px;
}

.owner-bio p {
  font-size: 0.94rem;
  color: rgba(230, 220, 250, 0.88);
  line-height: 1.7;
  margin-bottom: 12px;
}
.owner-bio p:last-child {
  margin-bottom: 0;
}

.owner-contact-box {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(212, 175, 55, 0.25);
}

.owner-contact-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--font-sm);
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #f59e0b;
  margin-bottom: 16px;
}

.owner-contact-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.owner-contact-item {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 16px;
  padding: 12px 18px;
  text-decoration: none;
  color: #ffffff;
  position: relative;
  transition: all 0.25s ease;
  cursor: pointer;
  min-width: 210px;
  max-width: 280px;
  width: 100%;
  flex: 1 1 210px;
  box-sizing: border-box;
}

.owner-contact-item:hover {
  background: rgba(212, 175, 55, 0.08);
  border-color: rgba(245, 158, 11, 0.55);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 18px rgba(212, 175, 55, 0.2);
  transform: translateY(-2px);
}

.owner-contact-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.email-icon {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.discord-icon {
  background: rgba(88, 101, 242, 0.18);
  color: #5865f2;
  border: 1px solid rgba(88, 101, 242, 0.35);
}

.telegram-icon {
  background: rgba(42, 171, 238, 0.18);
  color: #2aabee;
  border: 1px solid rgba(42, 171, 238, 0.35);
}

.owner-contact-item:hover .owner-contact-icon {
  transform: scale(1.08);
}

.owner-contact-details {
  display: flex;
  flex-direction: column;
}

.owner-contact-label {
  font-size: var(--font-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #f59e0b;
  margin-bottom: 2px;
}

.owner-contact-value {
  font-size: 0.94rem;
  font-weight: 700;
  color: #ffffff;
}

html[data-theme="dark"] .owner-card {
  background: linear-gradient(145deg, rgba(16, 18, 24, 0.96) 0%, rgba(8, 9, 13, 0.98) 100%) !important;
  border: 1px solid rgba(212, 175, 55, 0.35) !important;
  border-top: 2px solid rgba(255, 215, 0, 0.75) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(212, 175, 55, 0.15), inset 0 1px 0 rgba(255, 223, 118, 0.2);
}

html[data-theme="dark"] .owner-avatar-img {
  border-color: rgba(212, 175, 55, 0.85) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 25px rgba(212, 175, 55, 0.3);
}

html[data-theme="dark"] .owner-badge {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.95), rgba(212, 175, 55, 0.95)) !important;
  color: #050505 !important;
}

html[data-theme="dark"] .owner-name {
  color: #f8fafc !important;
}

html[data-theme="dark"] .owner-title {
  color: var(--purple-glow) !important;
}

html[data-theme="dark"] .owner-bio p {
  color: #cbd5e1 !important;
}

/* ── NO-GOLD CARD VARIATION (STYLISH PURPLE GLASS WITHOUT GOLD GLOW) ── */
.owner-card.no-gold {
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-top: 2px solid rgba(168, 85, 247, 0.75);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(192, 132, 252, 0.2);
}

.owner-card.no-gold::before {
  display: none !important;
}

.owner-card.no-gold:hover {
  transform: translateY(-4px);
  border-color: rgba(168, 85, 247, 0.55);
  border-top-color: rgba(192, 132, 252, 1);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(192, 132, 252, 0.35);
}

.owner-card.no-gold .owner-avatar-img {
  border: 3px solid rgba(168, 85, 247, 0.75);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7);
}

.owner-card.no-gold:hover .owner-avatar-img {
  border-color: rgba(192, 132, 252, 1);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
}

.owner-badge.no-gold {
  background: linear-gradient(135deg, var(--purple-bright) 0%, #7e22ce 100%);
  color: #ffffff;
  border: 1px solid rgba(216, 180, 254, 0.4);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

.owner-tag.no-gold {
  color: var(--purple-glow);
  text-shadow: none;
}

.owner-contact-title.no-gold {
  color: var(--purple-glow);
}

.owner-contact-item.no-gold {
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.owner-contact-item.no-gold:hover {
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(192, 132, 252, 0.6);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.owner-contact-label.no-gold {
  color: var(--purple-glow);
}

html[data-theme="dark"] .owner-card.no-gold {
  background: linear-gradient(145deg, rgba(16, 18, 24, 0.96) 0%, rgba(8, 9, 13, 0.98) 100%) !important;
  border: 1px solid rgba(168, 85, 247, 0.3) !important;
  border-top: 2px solid rgba(168, 85, 247, 0.75) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(192, 132, 252, 0.15);
}

html[data-theme="dark"] .owner-card.no-gold .owner-avatar-img {
  border-color: rgba(168, 85, 247, 0.75) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

html[data-theme="dark"] .owner-badge.no-gold {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.95), rgba(126, 34, 206, 0.95)) !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .staff-acknowledgment-note {
  background: linear-gradient(135deg, rgba(20, 24, 33, 0.9) 0%, rgba(10, 12, 18, 0.95) 100%) !important;
  border: 1px solid rgba(168, 85, 247, 0.3) !important;
  border-left: 4px solid var(--purple-glow) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

html[data-theme="dark"] .staff-acknowledgment-note p {
  color: #cbd5e1 !important;
}

/* ── LIGHT THEME OVERRIDES FOR STAFF CARDS & ACKNOWLEDGMENT NOTE ── */
html[data-theme="light"] .owner-card {
  background: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid rgba(212, 175, 55, 0.4) !important;
  border-top: 2px solid rgba(212, 175, 55, 0.85) !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.06), 0 0 20px rgba(212, 175, 55, 0.08);
}

html[data-theme="light"] .owner-card.no-gold {
  background: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid rgba(147, 51, 234, 0.25) !important;
  border-top: 2px solid rgba(147, 51, 234, 0.65) !important;
  box-shadow: 0 12px 36px rgba(147, 51, 234, 0.06);
}

html[data-theme="light"] .owner-card.no-gold::before {
  display: none !important;
}

html[data-theme="light"] .owner-card.no-gold:hover {
  border-color: rgba(147, 51, 234, 0.5) !important;
  border-top-color: rgba(147, 51, 234, 0.9) !important;
  box-shadow: 0 16px 40px rgba(147, 51, 234, 0.12);
}

html[data-theme="light"] .owner-card.no-gold .owner-avatar-img {
  border-color: rgba(147, 51, 234, 0.65) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .owner-badge.no-gold {
  background: linear-gradient(135deg, #9333ea, #7e22ce) !important;
  color: #ffffff !important;
  border: 1px solid rgba(147, 51, 234, 0.3) !important;
  box-shadow: 0 4px 12px rgba(147, 51, 234, 0.25);
}

html[data-theme="light"] .owner-tag.no-gold {
  color: #7e22ce !important;
  text-shadow: none !important;
}

html[data-theme="light"] .owner-name {
  color: #0f172a !important;
  text-shadow: none !important;
}

html[data-theme="light"] .owner-title {
  color: #6b21a8 !important;
}

html[data-theme="light"] .owner-bio p {
  color: #334155 !important;
}

html[data-theme="light"] .owner-contact-box {
  border-top-color: rgba(0, 0, 0, 0.08) !important;
}

html[data-theme="light"] .owner-contact-title.no-gold {
  color: #7e22ce !important;
}

html[data-theme="light"] .owner-contact-item {
  background: rgba(241, 245, 249, 0.8) !important;
  border-color: rgba(212, 175, 55, 0.35) !important;
  color: #0f172a !important;
}

html[data-theme="light"] .owner-contact-item.no-gold {
  background: rgba(241, 245, 249, 0.8) !important;
  border-color: rgba(147, 51, 234, 0.25) !important;
  color: #0f172a !important;
}

html[data-theme="light"] .owner-contact-item.no-gold:hover {
  background: rgba(147, 51, 234, 0.08) !important;
  border-color: rgba(147, 51, 234, 0.5) !important;
  box-shadow: 0 4px 16px rgba(147, 51, 234, 0.12);
}

html[data-theme="light"] .owner-contact-label {
  color: #b48811 !important;
}

html[data-theme="light"] .owner-contact-label.no-gold {
  color: #7e22ce !important;
}

html[data-theme="light"] .owner-contact-value {
  color: #0f172a !important;
}

.staff-acknowledgment-note {
  margin-top: 15px;
  padding: 24px 30px;
  background: linear-gradient(135deg, rgba(139, 60, 247, 0.08) 0%, rgba(20, 7, 40, 0.6) 100%);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-left: 4px solid var(--purple-bright);
  border-radius: 18px;
  backdrop-filter: blur(12px);
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.staff-acknowledgment-note p {
  font-size: 0.98rem;
  font-style: italic;
  color: rgba(230, 220, 250, 0.92);
  line-height: 1.7;
}

html[data-theme="light"] .staff-acknowledgment-note {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.05) 0%, rgba(255, 255, 255, 0.95) 100%) !important;
  border: 1px solid rgba(147, 51, 234, 0.25) !important;
  border-left: 4px solid #9333ea !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

html[data-theme="light"] .staff-acknowledgment-note p {
  color: #334155 !important;
}

@media (max-width: 860px) {
  .owner-card {
    flex-direction: column;
    text-align: center;
    padding: 30px 22px;
    align-items: center;
  }
  .owner-contact-title {
    justify-content: center;
  }
  .owner-contact-item {
    text-align: left;
  }
}



/* Reference text without any border box or background */


html[data-theme="light"] .thread-ref {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  border-top: none !important;
  border-bottom: none !important;
  border-left: none !important;
  border-right: none !important;
  box-shadow: none;
  outline: none !important;
  color: var(--purple-glow, var(--purple-glow)) !important;
}


/* ABSOLUTE GUARANTEE: Remove all boxes, borders, outlines, backgrounds from references */
.thread-ref,
p.thread-ref,
span.thread-ref,
.quote-block .thread-ref,
.thread-content .thread-ref,
.thread-content-inner .thread-ref,
html[data-theme="dark"] .thread-ref,
html[data-theme="dark"] p.thread-ref,
html[data-theme="dark"] span.thread-ref,
html[data-theme="dark"] .quote-block .thread-ref,
html[data-theme="dark"] .thread-content-inner .thread-ref,
html[data-theme="light"] .thread-ref {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  border-top: none !important;
  border-bottom: none !important;
  border-left: none !important;
  border-right: none !important;
  box-shadow: none;
  outline: none !important;
  padding: 4px 0;
  margin-top: 10px !important;
  color: var(--purple-glow, var(--purple-glow)) !important;
  font-style: italic !important;
  font-size: var(--font-sm);
}


/* ── SITE FOOTER GLOBAL STYLES & BULLET RESET ── */
.site-footer {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1100px;
  margin: 80px auto 0;
  padding: 60px 40px;
  border-top: 1px solid var(--footer-border, rgba(192, 132, 252, 0.25));
  border-top-left-radius: 40px;
  border-top-right-radius: 40px;
  background: radial-gradient(35% 128px at 50% 0%, rgba(139, 60, 247, 0.15), transparent);
  display: grid;
  grid-template-columns: 1fr 3.2fr;
  gap: 40px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}

.footer-copyright {
  color: var(--text-muted, rgba(255, 255, 255, 0.7));
  font-size: var(--font-sm);
  line-height: 1.5;
}

.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.footer-section h3 {
  font-size: var(--font-sm);
  font-family: 'DM Sans', sans-serif;
  color: var(--white, #ffffff);
  margin-bottom: 20px;
  letter-spacing: 0.05em;
  font-weight: 700;
  text-transform: uppercase;
}

.footer-section ul {
  list-style: none !important;
  list-style-type: none !important;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0;
  margin: 0;
}

.footer-section li {
  list-style: none !important;
  list-style-type: none !important;
  margin: 0;
  padding: 0;
}

.footer-section a {
  color: var(--text-muted, rgba(255, 255, 255, 0.7));
  text-decoration: none;
  font-size: var(--font-sm);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-section a:hover {
  color: var(--white, #ffffff);
  transform: translateX(3px);
  text-shadow: 0 0 10px rgba(192, 132, 252, 0.5);
}

@media (max-width: 900px) {
  .site-footer {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 40px 24px;
  }
  .footer-links-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
}

@media (max-width: 500px) {
  .footer-links-grid {
    grid-template-columns: 1fr;
  }
}