* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Vazirmatn', system-ui, sans-serif;
  background: #0B0E14;
  color: #e2e8f0;
  -webkit-font-smoothing: antialiased;
}
.font-mono, code { font-family: 'JetBrains Mono', monospace; font-feature-settings: "tnum"; }

.bg-grid {
  background-color: #0B0E14;
  background-image:
    radial-gradient(circle at 15% 10%, rgba(34,211,238,0.05), transparent 40%),
    radial-gradient(circle at 85% 90%, rgba(22,199,132,0.04), transparent 40%);
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #0d1016; }
::-webkit-scrollbar-thumb { background: #2a3240; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #3a4454; }

.spin { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.pulse { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

.shimmer {
  background: linear-gradient(90deg, #1a1f2b 0%, #232a38 50%, #1a1f2b 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.ticker-track {
  animation: ticker 45s linear infinite;
  width: max-content;
}
.ticker-track:hover { animation-play-state: paused; }
@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(50%); }
}

/* RTL fix for ticker direction */
html[dir="rtl"] .ticker-track { animation-name: ticker-rtl; }
@keyframes ticker-rtl {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

input, select, button { font-family: inherit; }
select option { background: #0d1016; }

table { border-collapse: collapse; }

/* smooth view transitions */
main > div { animation: fadein 0.3s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }