/* Custom styles for MFAnalysis */

/* Smooth scrolling behavior */
html {
  scroll-behavior: smooth;
}

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

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #818cf8;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #6366f1;
}

/* Custom animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.slide-up {
  animation: slideUp 0.5s ease-out;
}

/* Custom utility classes */
.glass-effect {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

/* Hover effects for cards */
.hover-scale {
  transition: transform 0.3s ease;
}

.hover-scale:hover {
  transform: scale(1.03);
}

/* Custom button styles */
.time-period-btn {
  transition: all 0.2s ease;
}

.time-period-btn.active {
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Loading spinner */
.spinner {
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top: 3px solid #6366f1;
  width: 24px;
  height: 24px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Chart container styles */
.chart-container {
  position: relative;
  margin: auto;
  height: 300px;
  width: 100%;
}

/* Tooltip styles */
.custom-tooltip {
  position: absolute;
  background: rgba(255, 255, 255, 0.95);
  color: #334155;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
  pointer-events: none;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  z-index: 10;
  max-width: 250px;
}

/* Custom media queries for better responsiveness */
@media (max-width: 768px) {
  .chart-container {
    height: 250px;
  }
}

@media (max-width: 640px) {
  .chart-container {
    height: 200px;
  }
}

/* Fund performance indicators */
.performance-up {
  color: #10b981;
}

.performance-down {
  color: #ef4444;
}

/* Custom input focus styles */
input:focus, select:focus, textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
} 