/* ==========================================================================
   Pulse Hooshiwa (pulse.hooshiwa.ir) - Enterprise Design System v6.0
   Typography: DanaFaNum (Regular 400, Bold 700, Black 900)
   Zero Emojis | Pure Vector Icons | Protected Player DRM Styling
   ========================================================================== */

@font-face {
  font-family: 'Dana';
  src: url('../fonts/DanaFaNum-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Dana';
  src: url('../fonts/DanaFaNum-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Dana';
  src: url('../fonts/DanaFaNum-Black.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #475569;
  --border-color: #e2e8f0;
  --pulse-emerald: #10b981;
  --pulse-indigo: #4f46e5;
  --pulse-cyan: #06b6d4;
}

html.dark {
  --bg-main: #090d16;
  --bg-card: #0f172a;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: #1e293b;
}

*, *::before, *::after {
  box-sizing: border-box;
  font-family: 'Dana', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

html {
  scroll-behavior: smooth;
  direction: rtl;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  line-height: 1.7;
}

[x-cloak] {
  display: none !important;
}

/* Top Progress Bar */
#pulseTopProgress {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  z-index: 9999;
  pointer-events: none;
}

#pulseTopProgress .bar {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #06b6d4, #6366f1);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.7);
  transition: width 0.25s ease, opacity 0.25s ease;
}

/* Glassmorphism Header & Panels */
.glass-header {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

html.dark .glass-header {
  background: rgba(9, 13, 22, 0.88);
}

/* Protected Video Player & Moving Anti-Piracy Watermark */
.pulse-protected-player {
  position: relative;
  background: #020617;
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden;
  border-radius: 1.25rem;
}

.pulse-protected-player video {
  width: 100%;
  display: block;
  max-height: 520px;
  background: #020617;
  pointer-events: auto;
}

.drm-watermark-floating {
  position: absolute;
  z-index: 25;
  pointer-events: none;
  padding: 4px 12px;
  border-radius: 9999px;
  background: rgba(2, 6, 23, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  backdrop-filter: blur(4px);
  animation: pulseWatermarkFloat 18s infinite alternate ease-in-out;
}

@keyframes pulseWatermarkFloat {
  0%   { top: 10%; right: 8%; }
  25%  { top: 72%; right: 58%; }
  50%  { top: 22%; right: 62%; }
  75%  { top: 68%; right: 12%; }
  100% { top: 38%; right: 36%; }
}

/* LinkedIn-Style Nested Q&A Indentation (Depth Capped at 3) */
.qa-depth-0 { margin-right: 0; }
.qa-depth-1 { margin-right: 1.25rem; padding-right: 0.75rem; border-right: 2px solid rgba(16, 185, 129, 0.35); }
.qa-depth-2 { margin-right: 2.25rem; padding-right: 0.75rem; border-right: 2px solid rgba(6, 182, 212, 0.35); }
.qa-depth-3 { margin-right: 3rem; padding-right: 0.75rem; border-right: 2px solid rgba(99, 102, 241, 0.35); }

@media (max-width: 640px) {
  .qa-depth-1 { margin-right: 0.75rem; }
  .qa-depth-2 { margin-right: 1.35rem; }
  .qa-depth-3 { margin-right: 1.85rem; }

  .mobile-sheet-modal {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    margin-top: auto !important;
    max-height: 92vh !important;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(16, 185, 129, 0.65);
}

.scrollbar-none::-webkit-scrollbar {
  display: none;
}
.scrollbar-none {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.dir-ltr {
  direction: ltr;
  text-align: left;
}

@media print {
  .no-print {
    display: none !important;
  }
}
