/* Enhanced animations and real-time styles */
@keyframes scroll {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
  }
}

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

@keyframes glow {
  0% {
    box-shadow: 0 0 5px rgba(0, 191, 255, 0.5);
  }
  100% {
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.8), 0 0 30px rgba(0, 191, 255, 0.4);
  }
}

@keyframes priceUpdate {
  0% {
    transform: scale(1);
    background-color: transparent;
  }
  50% {
    transform: scale(1.02);
    background-color: rgba(0, 212, 170, 0.3);
  }
  100% {
    transform: scale(1);
    background-color: transparent;
  }
}

@keyframes signalAlert {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.03);
  }
}

@keyframes bounce {
  0%, 20%, 53%, 80%, 100% {
    transform: translate3d(0, 0, 0);
  }
  40%, 43% {
    transform: translate3d(0, -8px, 0);
  }
  70% {
    transform: translate3d(0, -4px, 0);
  }
  90% {
    transform: translate3d(0, -2px, 0);
  }
}

@keyframes liveData {
  0% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.7;
  }
}

.animate-scroll {
  animation: scroll 45s linear infinite;
}

.animate-pulse-slow {
  animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-glow {
  animation: glow 2s ease-in-out infinite alternate;
}

.animate-price-update {
  animation: priceUpdate 0.6s ease-out;
}

.animate-signal-alert {
  animation: signalAlert 1.5s ease-in-out infinite;
}

.animate-live-data {
  animation: liveData 2s ease-in-out infinite;
}

/* Live price ticker styles */
.price-ticker {
  background: linear-gradient(90deg, transparent 0%, rgba(0, 212, 170, 0.1) 50%, transparent 100%);
  animation: liveData 3s ease-in-out infinite;
}

/* Enhanced scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #2c2c2c;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(45deg, #00d4aa, #00bfff);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(45deg, #00ff88, #44ddff);
}

/* Live chart enhancements */
canvas {
  image-rendering: crisp-edges;
  image-rendering: -moz-crisp-edges;
  image-rendering: -webkit-crisp-edges;
}

/* Button hover effects */
button {
  transition: all 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

/* Live indicator styles */
.live-indicator {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.live-indicator::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00d4aa;
  margin-right: 8px;
  animation: pulse 2s ease-in-out infinite;
}

/* Signal confidence bar */
.confidence-bar {
  background: linear-gradient(90deg, #ff4757 0%, #ffd700 50%, #00d4aa 100%);
  height: 4px;
  border-radius: 2px;
  transition: all 0.5s ease;
}

/* Market status indicators */
.market-open {
  color: #00d4aa;
}

.market-closed {
  color: #ff4757;
}

.market-pre {
  color: #ffd700;
}

/* Connection status */
.connection-good {
  color: #00d4aa;
}

.connection-poor {
  color: #ffd700;
}

.connection-lost {
  color: #ff4757;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .lg\:col-span-3 {
    grid-column: span 1;
  }
  
  .lg\:col-span-4 {
    grid-template-columns: 1fr;
  }
  
  .animate-scroll {
    animation-duration: 30s;
  }
  
  canvas {
    min-height: 300px;
  }
}

@media (max-width: 640px) {
  .price-update-mobile {
    font-size: 0.8rem;
  }
  
  .signal-mobile {
    padding: 0.5rem;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .animate-pulse,
  .animate-bounce,
  .animate-glow,
  .animate-price-update,
  .animate-signal-alert {
    animation: none;
  }
  
  .animate-scroll {
    animation-duration: 120s;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .bg-card-bg {
    background-color: #000;
    border: 2px solid #fff;
  }
  
  .text-gray-400 {
    color: #fff;
  }
}

/* Special Fartcoin effects */
.fartcoin-special {
  position: relative;
}

.fartcoin-special::after {
  content: '🚀';
  position: absolute;
  top: -10px;
  right: -10px;
  animation: bounce 2s ease-in-out infinite;
}

.fartcoin-pump {
  background: linear-gradient(45deg, #ff6b35, #ffd700);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: bold;
}

/* Performance optimizations */
.gpu-accelerated {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

/* Loading states */
.skeleton {
  background: linear-gradient(90deg, 
    rgba(255, 255, 255, 0.05) 25%, 
    rgba(255, 255, 255, 0.1) 50%, 
    rgba(255, 255, 255, 0.05) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 2s infinite;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Live data glow effects */
.live-glow-green {
  box-shadow: 0 0 10px rgba(0, 212, 170, 0.5);
  border: 1px solid rgba(0, 212, 170, 0.3);
}

.live-glow-red {
  box-shadow: 0 0 10px rgba(255, 71, 87, 0.5);
  border: 1px solid rgba(255, 71, 87, 0.3);
}

.live-glow-blue {
  box-shadow: 0 0 10px rgba(0, 191, 255, 0.5);
  border: 1px solid rgba(0, 191, 255, 0.3);
}