/* === ANIMATIONS & MOTION === */

/* Fade in up */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes pulse-ring {
  0%   { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.6); opacity: 0; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}
@keyframes orb-move-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(60px, -40px) scale(1.1); }
  66%       { transform: translate(-40px, 60px) scale(0.95); }
}
@keyframes orb-move-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(-80px, 40px) scale(1.05); }
  66%       { transform: translate(50px, -60px) scale(1.1); }
}
@keyframes orb-move-3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%       { transform: translate(40px, 40px) scale(1.15); }
}
@keyframes progress-stripe {
  0%   { background-position: 0 0; }
  100% { background-position: 40px 0; }
}
@keyframes badge-pop {
  0%   { transform: scale(0.8); opacity: 0; }
  60%  { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes border-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(124,58,237,0); }
  50%       { box-shadow: 0 0 16px 2px rgba(124,58,237,0.3); }
}

/* === UTILITY ANIMATION CLASSES === */
.anim-fade-in    { animation: fadeIn 0.4s ease both; }
.anim-fade-up    { animation: fadeInUp 0.4s ease both; }
.anim-slide-left { animation: slideInLeft 0.35s ease both; }
.anim-scale-in   { animation: scaleIn 0.3s ease both; }
.anim-float      { animation: float 3s ease-in-out infinite; }

/* Staggered children */
.stagger-children > *:nth-child(1)  { animation-delay: 0ms; }
.stagger-children > *:nth-child(2)  { animation-delay: 60ms; }
.stagger-children > *:nth-child(3)  { animation-delay: 120ms; }
.stagger-children > *:nth-child(4)  { animation-delay: 180ms; }
.stagger-children > *:nth-child(5)  { animation-delay: 240ms; }
.stagger-children > *:nth-child(6)  { animation-delay: 300ms; }

/* === ANIMATED BACKGROUND ORBS (Login / Dashboard) === */
.orb-bg {
  position: fixed; inset: 0;
  pointer-events: none; overflow: hidden; z-index: 0;
}
.orb {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: 0.12;
}
.orb-1 {
  width: 500px; height: 500px;
  background: #7c3aed;
  top: -100px; left: -100px;
  animation: orb-move-1 18s ease-in-out infinite;
}
.orb-2 {
  width: 400px; height: 400px;
  background: #c026d3;
  bottom: -80px; right: -80px;
  animation: orb-move-2 22s ease-in-out infinite;
}
.orb-3 {
  width: 300px; height: 300px;
  background: #0d9488;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: orb-move-3 15s ease-in-out infinite;
}

/* === SIDEBAR MOTION === */
.sidebar { animation: slideInLeft 0.3s ease; }
.nav-item {
  transition: background 0.15s, color 0.15s, padding-left 0.15s;
}
.nav-item:hover { padding-left: 18px; }
.nav-item.active { padding-left: 14px; }

/* === CARD HOVER MOTION === */
.tool-card {
  transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  border-color: #3a3a3a;
}
.card {
  transition: border-color 0.2s;
}

/* Tool icon float on hover */
.tool-card:hover .tool-icon {
  animation: float 2s ease-in-out infinite;
}

/* === STAT CARD MOTION === */
.stat-card {
  transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

/* === BUTTON MOTION === */
.btn { transition: all 0.15s ease; position: relative; overflow: hidden; }
.btn::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.08);
  opacity: 0; transition: opacity 0.15s;
}
.btn:hover::after { opacity: 1; }
.btn:active { transform: scale(0.97); }

/* === SHIMMER SKELETON === */
.skeleton {
  background: linear-gradient(90deg, #1a1a1a 25%, #222 50%, #1a1a1a 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}

/* === SPINNER === */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.15);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
.spinner-lg {
  width: 36px; height: 36px;
  border-width: 3px;
}

/* === PROGRESS BAR ANIMATED === */
.progress-fill-animated {
  background: linear-gradient(90deg, var(--accent-purple), #c026d3);
  background-size: 40px 100%;
  animation: progress-stripe 0.6s linear infinite, border-glow 2s ease-in-out infinite;
}

/* === PULSE DOT (live indicator) === */
.pulse-dot {
  position: relative;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #22c55e;
  display: inline-block;
}
.pulse-dot::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse-ring 1.5s ease-out infinite;
}

/* === NAV ACTIVE GLOW === */
.nav-item.active::before {
  box-shadow: 0 0 8px rgba(124,58,237,0.8);
}

/* === MODAL === */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.2s ease;
}
.modal {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 28px;
  width: 90%; max-width: 500px;
  animation: scaleIn 0.25s ease;
  position: relative;
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none;
  color: var(--text-muted); font-size: 18px;
  cursor: pointer; transition: color 0.15s;
}
.modal-close:hover { color: var(--text-primary); }
.modal-title { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.modal-subtitle { font-size: 13px; color: var(--text-secondary); margin-bottom: 20px; }

/* === TOAST === */
.toast-container {
  position: fixed; top: 20px; right: 20px;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  display: flex; align-items: center; gap: 10px;
  animation: slideInLeft 0.3s ease, fadeIn 0.3s ease;
  min-width: 260px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.toast-success { border-left: 3px solid #22c55e; }
.toast-error   { border-left: 3px solid #ef4444; }
.toast-info    { border-left: 3px solid var(--accent-purple); }

/* === INPUT FOCUS GLOW === */
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 2px rgba(124,58,237,0.12);
}

/* === VIDEO CARD HOVER === */
.video-card {
  transition: transform 0.2s, box-shadow 0.2s;
}
.video-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.5);
}

/* === HERO BADGE === */
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 18px;
  border: 1px solid #2a2a2a;
  border-radius: 24px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  animation: fadeInUp 0.5s ease;
}
.hero-badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-purple);
  animation: pulse-ring 1.5s ease-out infinite;
}

/* === PAGE TRANSITIONS === */
.page-enter {
  animation: fadeInUp 0.35s ease both;
}
