/* ========================================
   BACKGROUND.CSS
   شامل: پس‌زمینه Canvas + کرسر دایره‌ای + اسکرول بار
   ======================================== */

/* ===== CANVAS BACKGROUND ===== */
#canvas-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
}

/* ========================================
   CURSOR CIRCLE (دایره دور کرسر)
   ======================================== */
#cursor-circle {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #00d9ff;
  transform: translate(-50%, -50%);
  transition: width 0.15s ease, height 0.15s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 0 20px rgba(0, 217, 255, 0.15);
  background: radial-gradient(circle, rgba(0, 217, 255, 0.05) 0%, transparent 70%);
  display: none;
}

#cursor-circle .dot {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #00d9ff;
  box-shadow: 0 0 10px rgba(0, 217, 255, 0.8);
}

#cursor-circle .ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(0, 217, 255, 0.1);
  width: 100%;
  height: 100%;
  animation: pulse-ring 2.5s ease-out infinite;
}

#cursor-circle .ring:nth-child(2) {
  animation-delay: 0.8s;
}

@keyframes pulse-ring {
  0% {
    transform: translate(-50%, -50%) scale(0.7);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.6);
    opacity: 0;
  }
}

#cursor-circle.hover {
  width: 60px;
  height: 60px;
  border-color: rgba(0, 217, 255, 0.4);
  box-shadow: 0 0 40px rgba(0, 217, 255, 0.25);
}

#cursor-circle.hover .dot {
  width: 6px;
  height: 6px;
  box-shadow: 0 0 20px rgba(0, 217, 255, 0.9);
}

/* ===== دسکتاپ: کرسر دایره‌ای + کرسر عادی ===== */
@media (pointer: fine) {
  #cursor-circle {
    display: block;
  }
  body {
    cursor: auto !important;
  }
}

/* ===== موبایل: کرسر دایره‌ای مخفی ===== */
@media (pointer: coarse) {
  #cursor-circle {
    display: none !important;
  }
  body {
    cursor: auto !important;
  }
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #00d9ff, #0066ff);
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #00d9ff, #0088ff);
  box-shadow: 0 0 30px rgba(0, 217, 255, 0.5);
}
* {
  scrollbar-width: thin;
  scrollbar-color: #00d9ff rgba(255, 255, 255, 0.02);
}

/* ===== STEP INDICATOR ===== */
#step-indicator {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 5px 14px;
  background: rgba(5, 8, 22, 0.75);
  backdrop-filter: blur(10px);
  border-radius: 40px;
  border: 1px solid rgba(0, 217, 255, 0.06);
}

#step-indicator .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  transition: all 0.5s ease;
  border: 1px solid transparent;
}

#step-indicator .dot.active {
  background: #00d9ff;
  border-color: #00d9ff;
  box-shadow: 0 0 16px rgba(0, 217, 255, 0.35);
  transform: scale(1.2);
}

#step-indicator .dot.done {
  background: rgba(0, 217, 255, 0.2);
  border-color: rgba(0, 217, 255, 0.1);
}

#step-indicator .step-text {
  display: flex;
  align-items: center;
  gap: 2px;
  font-family: 'Vazirmatn', sans-serif;
  direction: ltr;
}

#step-indicator .num {
  color: #94a3b8;
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  font-weight: 700;
}

#step-indicator .num.active-num { color: #00d9ff; }
#step-indicator .sep {
  color: #94a3b8;
  font-size: 8px;
  font-family: 'Vazirmatn', sans-serif;
}
#step-indicator .total {
  color: #94a3b8;
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  font-weight: 700;
}

/* ===== NAV ARROW ===== */
.nav-arrow {
  position: fixed;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99;
  background: rgba(0, 217, 255, 0.06);
  border: 1px solid rgba(0, 217, 255, 0.1);
  color: #00d9ff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

.nav-arrow:hover {
  background: rgba(0, 217, 255, 0.12);
  border-color: rgba(0, 217, 255, 0.2);
  transform: translateX(-50%) scale(1.05);
}

.nav-arrow.hidden {
  opacity: 0;
  pointer-events: none;
}

/* ===== TOAST ===== */
.toast-container {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  background: rgba(0, 217, 255, 0.08);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 217, 255, 0.12);
  padding: 6px 16px;
  border-radius: 60px;
  color: #fff;
  font-weight: 500;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  gap: 5px;
  font-size: clamp(11px, 1.8vw, 12px);
  white-space: nowrap;
  font-family: 'Vazirmatn', sans-serif;
}

.toast-container.show {
  display: flex;
  animation: fadeUp .35s ease;
}

@keyframes fadeUp {
  0% { opacity: 0; transform: translateX(-50%) translateY(15px); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ===== RESPONSIVE ===== */
@media(max-width: 768px) {
  #step-indicator { bottom: 12px; padding: 4px 10px; gap: 6px; }
  #step-indicator .dot { width: 7px; height: 7px; }
  #step-indicator .num { font-size: 9px; }
  #step-indicator .total { font-size: 9px; }
  .nav-arrow { bottom: 62px; width: 36px; height: 36px; font-size: 12px; }
  .toast-container { font-size: clamp(11px, 1.6vw, 12px); padding: 4px 14px; bottom: 65px; }
}

@media(max-width: 480px) {
  #step-indicator { bottom: 8px; padding: 3px 8px; gap: 4px; }
  #step-indicator .dot { width: 6px; height: 6px; }
  #step-indicator .num { font-size: 8px; }
  #step-indicator .total { font-size: 8px; }
  #step-indicator .sep { font-size: 7px; }
  .nav-arrow { bottom: 54px; width: 32px; height: 32px; font-size: 10px; }
  .toast-container { font-size: clamp(10px, 1.6vw, 11px); padding: 4px 12px; bottom: 65px; }
}
/* ===== DISABLE TEXT SELECTION (prevents accidental select on grab/drag) ===== */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
