/* App stylesheet placeholder to satisfy link rel=stylesheet */
/* You can move real styles here later or remove the CDN Tailwind in favor of PostCSS/CLI setup. */

html, body { height: 100%; }
body { margin: 0; }

body.cyber-dark {
  background: #060914;
  color: #E5E7EB;
}

/* Force a solid dark canvas and hide checkerboard in dark mode */
body.cyber-dark .workspace-root {
  background: #050910 !important;
}
body.cyber-dark .workspace-root > .absolute.inset-0.pointer-events-none {
  display: block !important;
}
body.cyber-dark .workspace-root > div[style*="data:image/svg+xml"] {
  display: block !important;
}
body.cyber-dark .mix-blend-multiply[style*="data:image/svg+xml"],
body.cyber-dark .pointer-events-none[style*="data:image/svg+xml"] {
  display: block !important;
}

body.cyber-dark .workspace-searchbar {
  background: rgba(10, 14, 26, 0.72) !important;
  border: 1px solid rgba(56, 189, 248, 0.22) !important;
  box-shadow:
    0 0 0 1px rgba(168, 85, 247, 0.10) inset,
    0 12px 40px -16px rgba(34, 211, 238, 0.35),
    0 20px 60px -30px rgba(168, 85, 247, 0.35) !important;
}

/* Make common light utility colors dark under cyber theme */
body.cyber-dark .bg-white,
body.cyber-dark .bg-white\/70,
body.cyber-dark .bg-white\/60,
body.cyber-dark .bg-white\/80,
body.cyber-dark .bg-white\/90,
body.cyber-dark .bg-slate-50,
body.cyber-dark .bg-slate-50\/50,
body.cyber-dark .bg-slate-100,
body.cyber-dark .bg-slate-100\/80,
body.cyber-dark .bg-slate-200 {
  background-color: rgba(6, 9, 20, 0.92) !important;
  border-color: rgba(148, 163, 184, 0.18) !important;
}

body.cyber-dark .text-slate-900,
body.cyber-dark .text-slate-800,
body.cyber-dark .text-slate-700,
body.cyber-dark .text-slate-600,
body.cyber-dark .text-slate-500,
body.cyber-dark .text-slate-400 {
  color: rgba(226, 232, 240, 0.92) !important;
}

body.cyber-dark .border-slate-100,
body.cyber-dark .border-slate-200,
body.cyber-dark .border-slate-200\/50,
body.cyber-dark .border-slate-300\/50 {
  border-color: rgba(148, 163, 184, 0.18) !important;
}

body.cyber-dark .shadow-sm,
body.cyber-dark .shadow-md,
body.cyber-dark .shadow-lg {
  box-shadow: 0 18px 55px -28px rgba(0, 0, 0, 0.75) !important;
}

body.cyber-dark .glass-bar {
  background: rgba(10, 14, 26, 0.65) !important;
  border: 1px solid rgba(148, 163, 184, 0.18) !important;
  -webkit-backdrop-filter: blur(26px) !important;
  backdrop-filter: blur(26px) !important;
}

body.cyber-dark .glass-card {
  background: rgba(7, 10, 20, 0.88) !important;
  border: 1px solid rgba(148, 163, 184, 0.18) !important;
  -webkit-backdrop-filter: blur(26px) !important;
  backdrop-filter: blur(26px) !important;
}

body.cyber-dark .glass-node,
body.cyber-dark .simple-node {
  background: rgba(5, 8, 18, 0.92) !important;
  border: 1px solid rgba(148, 163, 184, 0.18) !important;
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.08) inset,
    0 18px 55px -28px rgba(0, 0, 0, 0.75) !important;
}

body.cyber-dark .workspace-home-btn {
  background: rgba(10, 14, 26, 0.75) !important;
  color: #CBD5E1 !important;
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
}

/* Settings pill (top toolbar) */
body.cyber-dark .workspace-settings-pill .glass-bar {
  background: rgba(6, 9, 16, 0.92) !important;
  border: 1px solid rgba(148, 163, 184, 0.25) !important;
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.08) inset,
    0 14px 30px -18px rgba(0, 0, 0, 0.7) !important;
}
body.cyber-dark .workspace-settings-pill button,
body.cyber-dark .workspace-settings-pill label,
body.cyber-dark .workspace-settings-pill .pill {
  background: rgba(12, 16, 28, 0.9) !important;
  border: 1px solid rgba(148, 163, 184, 0.25) !important;
  color: rgba(226, 232, 240, 0.92) !important;
  box-shadow: none !important;
}
body.cyber-dark .workspace-settings-pill button:hover,
body.cyber-dark .workspace-settings-pill label:hover {
  background: rgba(18, 24, 36, 0.95) !important;
  border-color: rgba(34, 211, 238, 0.25) !important;
}
/* Active states (e.g., quality high, selected font/size) */
body.cyber-dark .workspace-settings-pill .bg-green-100,
body.cyber-dark .workspace-settings-pill .text-green-700,
body.cyber-dark .workspace-settings-pill .bg-white {
  background: rgba(20, 40, 30, 0.55) !important;
  color: rgba(163, 230, 53, 0.9) !important;
  border-color: rgba(163, 230, 53, 0.3) !important;
}
body.cyber-dark .workspace-settings-pill .text-slate-700,
body.cyber-dark .workspace-settings-pill .text-slate-600 {
  color: rgba(226, 232, 240, 0.9) !important;
}
body.cyber-dark .workspace-settings-pill .bg-slate-800 {
  background: rgba(15, 23, 42, 0.9) !important;
  color: rgba(226, 232, 240, 0.92) !important;
  border-color: rgba(148, 163, 184, 0.3) !important;
}

/* Arabic font utilities (global to ensure settings apply) */
.font-uthman {
  /* Use widely available Arabic fonts first to ensure visible difference from Amiri */
  font-family: "Traditional Arabic", "Al-QuranAlKareem", "KFGQPC Uthmanic Script HAFS", "Hafs", "Scheherazade New", serif !important;
  line-height: 2.2;
}
.font-amiri {
  font-family: "Amiri Quran", "Amiri", "Scheherazade New", serif !important;
  line-height: 2.0;
}
.font-naskh {
  font-family: "Noto Naskh Arabic", "Arabic Typesetting", "Noto Naskh", "Lateef", "Scheherazade New", serif !important;
  line-height: 2.0;
}

body.cyber-dark input,
body.cyber-dark textarea {
  color: #E5E7EB !important;
}

body.cyber-dark input::placeholder,
body.cyber-dark textarea::placeholder {
  color: rgba(226, 232, 240, 0.45) !important;
}

body.cyber-dark .verse-card {
  background: rgba(6, 9, 20, 0.88) !important;
  border: 1px solid rgba(148, 163, 184, 0.18) !important;
}
body.cyber-dark .verse-card .verse-number,
body.cyber-dark .verse-card .ayah-number,
body.cyber-dark .verse-card button,
body.cyber-dark .verse-card .pill,
body.cyber-dark .verse-card .badge,
body.cyber-dark .verse-card .tag,
body.cyber-dark .verse-card .chip,
body.cyber-dark .verse-card .label,
body.cyber-dark .verse-card .surah-name,
body.cyber-dark .verse-card .menu-dot,
body.cyber-dark .verse-card .menu-dots,
body.cyber-dark .verse-card .three-dots {
  background: rgba(10, 15, 28, 0.92) !important;
  border: 1px solid rgba(148, 163, 184, 0.2) !important;
  color: rgba(226, 232, 240, 0.9) !important;
}
/* Catch any light utility backgrounds inside verse cards */
body.cyber-dark .verse-card .bg-white,
body.cyber-dark .verse-card .bg-slate-50,
body.cyber-dark .verse-card .bg-slate-100,
body.cyber-dark .verse-card .bg-slate-200 {
  background-color: rgba(10, 15, 28, 0.92) !important;
  border-color: rgba(148, 163, 184, 0.2) !important;
  color: rgba(226, 232, 240, 0.9) !important;
}

/* Dark styles for hadith cards and badges */
body.cyber-dark .hadith-card {
  background: rgba(6, 9, 20, 0.9) !important;
  border: 1px solid rgba(148, 163, 184, 0.2) !important;
}
body.cyber-dark .hadith-card .hadith-number,
body.cyber-dark .hadith-card .imam-name,
body.cyber-dark .hadith-card .pill,
body.cyber-dark .hadith-card .badge,
body.cyber-dark .hadith-card .tag,
body.cyber-dark .hadith-card .chip,
body.cyber-dark .hadith-card .label {
  background: rgba(10, 15, 28, 0.92) !important;
  border: 1px solid rgba(148, 163, 184, 0.2) !important;
  color: rgba(226, 232, 240, 0.9) !important;
}
body.cyber-dark .hadith-card p {
  color: rgba(226, 232, 240, 0.92) !important;
  border-color: rgba(148, 163, 184, 0.22) !important;
}

/* Dark styles for hadith card menu buttons and sources */
body.cyber-dark .hadith-card .menu-btn {
  background: rgba(10, 15, 28, 0.8) !important;
  border: 1px solid rgba(148, 163, 184, 0.3) !important;
  color: rgba(226, 232, 240, 0.8) !important;
}

body.cyber-dark .hadith-card .menu-btn:hover {
  background: rgba(30, 41, 59, 0.9) !important;
  border-color: rgba(59, 130, 246, 0.5) !important;
  color: rgba(147, 197, 253, 0.9) !important;
}

body.cyber-dark .hadith-card .source {
  background: rgba(10, 15, 28, 0.7) !important;
  color: rgba(226, 232, 240, 0.8) !important;
  border: 1px solid rgba(148, 163, 184, 0.2) !important;
}

/* Dark styles for dropdown menus (verse and hadith) */
body.cyber-dark .glass-panel {
  background: rgba(6, 9, 20, 0.95) !important;
  border: 1px solid rgba(148, 163, 184, 0.3) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  backdrop-filter: blur(12px) !important;
}

body.cyber-dark .glass-panel .text-slate-400 {
  color: rgba(203, 213, 225, 0.7) !important;
  border-color: rgba(148, 163, 184, 0.2) !important;
}

body.cyber-dark .glass-panel button {
  background: transparent !important;
  color: rgba(226, 232, 240, 0.9) !important;
}

body.cyber-dark .glass-panel button:hover {
  background: rgba(30, 41, 59, 0.6) !important;
}

body.cyber-dark .glass-panel .text-slate-700 {
  color: rgba(226, 232, 240, 0.9) !important;
}

body.cyber-dark .glass-panel .text-green-700 {
  color: rgba(134, 239, 172, 0.9) !important;
}

body.cyber-dark .glass-panel .text-red-600 {
  color: rgba(248, 113, 113, 0.9) !important;
}

body.cyber-dark .glass-panel .text-purple-700 {
  color: rgba(196, 181, 253, 0.9) !important;
}

body.cyber-dark .glass-panel .text-sky-500 {
  color: rgba(125, 211, 252, 0.9) !important;
}

body.cyber-dark .glass-panel .h-px {
  background: rgba(148, 163, 184, 0.2) !important;
}

/* Audio playback indicator animation */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes audio-wave {
  0%, 100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
}

.animate-fade-in {
  animation: fade-in 0.3s ease-out;
}

.animate-audio-wave {
  animation: audio-wave 1.5s ease-in-out infinite;
}

/* Darken scroll tracks/thumbs inside verse cards and custom scrolls */
body.cyber-dark .verse-card .custom-scroll::-webkit-scrollbar-track,
body.cyber-dark .custom-scroll::-webkit-scrollbar-track {
  background: rgba(8, 12, 20, 0.6);
}
body.cyber-dark .verse-card .custom-scroll::-webkit-scrollbar-thumb,
body.cyber-dark .custom-scroll::-webkit-scrollbar-thumb {
  background: rgba(34, 211, 238, 0.45);
}
body.cyber-dark .verse-card .custom-scroll::-webkit-scrollbar-thumb:hover,
body.cyber-dark .custom-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(34, 211, 238, 0.65);
}

body.cyber-dark .word-interactive:hover {
  background: rgba(34, 211, 238, 0.10) !important;
}

body.cyber-dark .highlight-match {
  background: transparent !important;
  box-shadow: none !important;
  color: #22d3ee !important;
}

/* Workspace checkerboard background overlay (inline SVG)
   - Light mode: keep it visible and refined
   - Dark mode: navy-on-navy (no white)
*/
.workspace-root > .absolute.inset-0.pointer-events-none {
  mix-blend-mode: normal !important;
  opacity: 0.08 !important;
  filter: saturate(1.05) contrast(1.05) !important;
}

body.cyber-dark .workspace-root > .absolute.inset-0.pointer-events-none {
  background-image:
    linear-gradient(90deg, rgba(15, 26, 46, 0.28) 25%, transparent 25%, transparent 75%, rgba(15, 26, 46, 0.28) 75%),
    linear-gradient(90deg, rgba(7, 12, 22, 0.24) 25%, transparent 25%, transparent 75%, rgba(7, 12, 22, 0.24) 75%);
  background-size: 40px 40px, 40px 40px;
  background-position: 0 0, 20px 20px;
  mix-blend-mode: normal !important;
  opacity: 0.28 !important;
  filter: none !important;
}

/* Hard override for the inline data-URI checkerboard (some browsers ignore filters on it) */
body.cyber-dark .workspace-root > div[style*="data:image/svg+xml"] {
  background-image:
    linear-gradient(90deg, rgba(15, 26, 46, 0.28) 25%, transparent 25%, transparent 75%, rgba(15, 26, 46, 0.28) 75%),
    linear-gradient(90deg, rgba(7, 12, 22, 0.24) 25%, transparent 25%, transparent 75%, rgba(7, 12, 22, 0.24) 75%);
  background-size: 40px 40px, 40px 40px;
  background-position: 0 0, 20px 20px;
  mix-blend-mode: normal !important;
  opacity: 0.28 !important;
  filter: none !important;
}

/* Fallback: if the overlay isn't a direct child, still force it dark */
body.cyber-dark .mix-blend-multiply[style*="data:image/svg+xml"],
body.cyber-dark .pointer-events-none[style*="data:image/svg+xml"] {
  background-image:
    linear-gradient(90deg, rgba(15, 26, 46, 0.28) 25%, transparent 25%, transparent 75%, rgba(15, 26, 46, 0.28) 75%),
    linear-gradient(90deg, rgba(7, 12, 22, 0.24) 25%, transparent 25%, transparent 75%, rgba(7, 12, 22, 0.24) 75%);
  background-size: 40px 40px, 40px 40px;
  background-position: 0 0, 20px 20px;
  mix-blend-mode: normal !important;
  opacity: 0.28 !important;
  filter: none !important;
}

body.cyber-dark #article-content-body {
  background: rgba(6, 9, 20, 0.92) !important;
  color: #E5E7EB !important;
}

body.cyber-dark #article-content-body::-webkit-scrollbar-track {
  background: rgba(148, 163, 184, 0.10);
}

body.cyber-dark #article-content-body::-webkit-scrollbar-thumb {
  background: rgba(34, 211, 238, 0.35);
}

body.cyber-dark #article-content-body::-webkit-scrollbar-thumb:hover {
  background: rgba(34, 211, 238, 0.55);
}

/* Custom Scrollbar for Article */
#article-content-body::-webkit-scrollbar {
  width: 8px;
}

#article-content-body::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 0;
}

#article-content-body::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 0;
}

#article-content-body::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Article Styles - Minimal Design */
.article-root {
  font-family: 'Abar', 'Nasim', sans-serif;
  line-height: 1.8;
  text-align: justify;
  direction: rtl;
  color: #333333;
  font-size: 16px;
}

.article-root .fa {
  font-family: 'Abar', 'Nasim', sans-serif !important;
}

.article-root .ar {
  font-family: 'Amiri Quran', 'Amiri', serif !important;
  font-size: 1.1em;
}

.article-root h1,
.article-root h2,
.article-root h3 {
  font-family: 'Doran', 'Abar', sans-serif !important;
  font-weight: bold;
  margin: 1.5em 0 1em 0;
  color: #2c2c2c;
}

.article-root h1 {
  font-size: 2em;
}

.article-root h2 {
  font-size: 1.5em;
}

.article-root h3 {
  font-size: 1.3em;
}

.article-root .ayah-block {
  background: #f9f9f9;
  border-left: 3px solid #e0e0e0;
  border-radius: 0;
  padding: 1em 1.5em;
  margin: 1.5em 0;
}

.article-root .ayah-block .ar {
  display: block;
  font-size: 1.2em;
  color: #444444;
  margin-bottom: 0.5em;
  text-align: right;
}

.article-root .ayah-block .fa {
  display: block;
  color: #555555;
  font-size: 0.95em;
}

.article-root .hadith-block {
  background: #f8f8f8;
  border-left: 3px solid #d0d0d0;
  border-radius: 0;
  padding: 1em 1.5em;
  margin: 1.5em 0;
}

.article-root .hadith-block .ar {
  display: block;
  font-size: 1.1em;
  color: #444444;
  margin-bottom: 0.5em;
  text-align: right;
}

.article-root .hadith-block .fa {
  display: block;
  color: #555555;
  font-size: 0.95em;
}

.article-root p {
  margin: 1em 0;
  text-indent: 2em;
  line-height: 1.9;
}

.article-root .references {
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 0;
  padding: 1em 1.5em;
  margin-top: 2em;
}

.article-root .references h3 {
  color: #2c2c2c;
  font-size: 1.1em;
  margin-bottom: 0.5em;
}

.article-root .references ul {
  list-style-type: none;
  padding-right: 0;
}

.article-root .references li {
  margin: 0.5em 0;
  font-size: 0.9em;
  color: #666666;
}

/* Fallback fonts */
@font-face {
  font-family: 'Abar';
  src: local('Abar'), local('Nasim'), local('Tahoma'), sans-serif;
}

@font-face {
  font-family: 'Doran';
  src: local('Doran'), local('Abar'), local('Nasim'), local('Tahoma'), sans-serif;
}

@font-face {
  font-family: 'Amiri Quran';
  src: local('Amiri Quran'), local('Amiri'), serif;
}
