/**
 * AI Stock Analysis System - Additional Styles
 * 
 * This file contains additional custom styles for the AI stock analysis system.
 * It includes animations, hover effects, and responsive design elements.
 * 
 * @author AI Stock Analysis System
 * @version 1.0.0
 */

/* Additional Custom Styles for AI Stock Analysis */

/* Loading States */
.loading-spinner {
    border: 4px solid #f3f4f6;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

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

/* Modal Animations */
.modal-enter {
    animation: modalEnter 0.3s ease-out;
}

@keyframes modalEnter {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Button Hover Effects */
.btn-hover {
    position: relative;
    overflow: hidden;
}

.btn-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-hover:hover::before {
    left: 100%;
}

/* Card Hover Effects */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 102, 204, 0.15);
}

/* Text Selection */
::selection {
    background-color: #0066cc;
    color: white;
}

::-moz-selection {
    background-color: #0066cc;
    color: white;
}

/* Input Focus Effects */
.input-focus {
    transition: all 0.3s ease;
}

.input-focus:focus {
    transform: scale(1.02);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

/* Progress Bar Animation */
.progress-animated {
    position: relative;
    overflow: hidden;
}

.progress-animated::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(
        -45deg,
        rgba(255, 255, 255, 0.2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.2) 75%,
        transparent 75%,
        transparent
    );
    background-size: 50px 50px;
    animation: move 2s linear infinite;
}

@keyframes move {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 50px 50px;
    }
}

/* Testimonial Carousel */
.carousel-container {
    position: relative;
    overflow: hidden;
}

.carousel-slide {
    transition: opacity 0.5s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide:not(.active) {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

/* Stock Waterfall Animation */
.stock-fall {
    animation: stockFall 8s linear infinite;
}

@keyframes stockFall {
    0% {
        transform: translateY(-100px);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(300px);
        opacity: 0;
    }
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass Effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* Shimmer Effect */
.shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

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

/* Mobile Optimizations */
@media (max-width: 480px) {
    .mobile-padding {
        padding: 1rem;
    }
    
    .mobile-text {
        font-size: 0.875rem;
    }
    
    .mobile-button {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .ai-border {
        border-width: 2px;
        border-color: #000;
    }
    
    .text-gray-600 {
        color: #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
