/* ============================================
   Magis Trade - Custom Styles & Animations
   ============================================ */

/* Base */
body {
  background-color: #0a0e1a;
  color: #f3f4f6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0a0e1a; }
::-webkit-scrollbar-thumb { background: #1e3a5f; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #53b7e8; }

/* Selection color */
::selection { background: rgba(83, 183, 232, 0.3); color: #fff; }

/* Radial gradient utility */
.bg-gradient-radial {
  background: radial-gradient(circle, var(--tw-gradient-stops));
}

/* ---- Keyframes ---- */

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  50% { transform: translateY(-40px) rotate(180deg); }
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 5px rgba(83,183,232,0.3), 0 0 10px rgba(83,183,232,0.1); }
  50% { box-shadow: 0 0 20px rgba(83,183,232,0.6), 0 0 40px rgba(83,183,232,0.2), 0 0 60px rgba(83,183,232,0.1); }
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scanline {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(15px, -20px) scale(1.05); }
  50% { transform: translate(-10px, 10px) scale(0.95); }
  75% { transform: translate(20px, 15px) scale(1.02); }
}

@keyframes stream-up {
  0% { transform: translateY(0); opacity: 0; }
  5% { opacity: 1; }
  95% { opacity: 1; }
  100% { transform: translateY(-110vh); opacity: 0; }
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes pulse-ring {
  0% { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(2); opacity: 0; }
}

@keyframes matrix-drop {
  0% { transform: translateY(-100%); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(100vh); opacity: 0; }
}

@keyframes hex-flicker {
  0%, 100% { opacity: 0.1; }
  20% { opacity: 0.4; }
  40% { opacity: 0.1; }
  60% { opacity: 0.6; }
  80% { opacity: 0.2; }
}

/* ---- Animation classes ---- */
.animate-float { animation: float linear infinite; }
.animate-glow { animation: glow-pulse 3s ease-in-out infinite; }
.animate-slide-up { animation: slide-up 0.6s ease-out forwards; }
.animate-blink { animation: blink 0.8s step-end infinite; }
.animate-stream-up { animation: stream-up linear forwards; }
.animate-fade-in-up { animation: fade-in-up 0.7s ease-out both; }
.animate-shimmer { background-size: 200% auto; animation: shimmer 3s linear infinite; }
.animate-pulse-ring { animation: pulse-ring 2s ease-out infinite; }
.animate-matrix-drop { animation: matrix-drop linear infinite; }
.animate-hex-flicker { animation: hex-flicker 2s ease-in-out infinite; }

/* Scanline effect */
.scanline { position: relative; }
.scanline::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(83,183,232,0.4), transparent);
  animation: scanline 6s linear infinite;
  z-index: 2;
  pointer-events: none;
}

/* Canvas containers */
.canvas-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.canvas-container.interactive {
  pointer-events: auto;
}

/* Smooth page transitions */
.page-enter {
  opacity: 0;
  transform: translateY(20px);
}
.page-enter-active {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}
