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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Vazirmatn', sans-serif;
  background: #0a0a0a;
  color: #ffffff;
  line-height: 1.6;
}

/* RTL Specific */
[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] .space-x-2 > *:not([hidden]) ~ * {
  --tw-space-x-reverse: 1;
}

[dir="rtl"] .space-x-3 > *:not([hidden]) ~ * {
  --tw-space-x-reverse: 1;
}

[dir="rtl"] .space-x-4 > *:not([hidden]) ~ * {
  --tw-space-x-reverse: 1;
}

/* Persian Number Support */
.persian-num {
  font-feature-settings: "numr" 1;
}

/* Neon Effects */
.neon-glow-pink {
  box-shadow: 0 0 5px #ff00ff, 0 0 10px #ff00ff, 0 0 20px #ff00ff;
}

.neon-glow-purple {
  box-shadow: 0 0 5px #8b5cf6, 0 0 10px #8b5cf6, 0 0 20px #8b5cf6;
}

.neon-glow-cyan {
  box-shadow: 0 0 5px #00ffff, 0 0 10px #00ffff, 0 0 20px #00ffff;
}

/* Glassmorphism */
.glass {
  background: rgba(26, 26, 46, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animations */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.float-animation {
  animation: float 3s ease-in-out infinite;
}

@keyframes pulse-border {
  0%, 100% {
    border-color: rgba(255, 0, 255, 0.5);
  }
  50% {
    border-color: rgba(255, 0, 255, 1);
  }
}

.pulse-border {
  animation: pulse-border 2s ease-in-out infinite;
}

/* Custom Input Styles */
.neon-input {
  background: rgba(10, 10, 10, 0.8);
  border: 2px solid rgba(255, 0, 255, 0.3);
  transition: all 0.3s ease;
}

.neon-input:focus {
  outline: none;
  border-color: #ff00ff;
  box-shadow: 0 0 15px rgba(255, 0, 255, 0.3);
}

.neon-input::placeholder {
  color: #666;
}

/* Button States */
.btn-active:active {
  transform: scale(0.95);
}

/* Loading Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 0, 255, 0.3);
  border-top-color: #ff00ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ff00ff, #8b5cf6);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ff00ff, #ff00ff);
}

/* Selection */
::selection {
  background: rgba(255, 0, 255, 0.3);
  color: #fff;
}

/* Grid Background */
.grid-bg {
  background-image: 
    linear-gradient(rgba(255, 0, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 0, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
}

/* Card Hover Effects */
.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 40px rgba(255, 0, 255, 0.2);
}

/* Status Indicators */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-active {
  background: #00ff00;
  box-shadow: 0 0 10px #00ff00;
}

.status-inactive {
  background: #ff4444;
}

/* Print Styles */
@media print {
  body {
    background: white;
    color: black;
  }
  
  .no-print {
    display: none !important;
  }
  
  .print-only {
    display: block !important;
  }
}

/* Mobile Optimizations */
@media (max-width: 640px) {
  .mobile-full {
    width: 100vw;
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Focus Visible */
:focus-visible {
  outline: 2px solid #ff00ff;
  outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}