/* Custom Styles for Forecastphenomarket */

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-on-scroll {
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-on-scroll.visible {
    animation: fadeIn 0.6s ease-out forwards;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* TradingView Widget Container */
.tradingview-widget-container {
    width: 100%;
    height: 100%;
}

.tradingview-widget-container__widget {
    width: 100%;
    height: 100%;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1f2937;
}

::-webkit-scrollbar-thumb {
    background: #dc2626;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #991b1b;
}

/* Button Hover Effects */
.btn-hover-scale {
    transition: transform 0.2s ease-in-out;
}

.btn-hover-scale:hover {
    transform: scale(1.05);
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s ease-in-out;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Loading Animation */
.loading-spinner {
    border: 3px solid rgba(220, 38, 38, 0.1);
    border-top: 3px solid #dc2626;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Glass Morphism Effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Gradient Backgrounds */
.bg-gradient-red {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
}

.bg-gradient-dark {
    background: linear-gradient(135deg, #111827 0%, #000000 100%);
}

/* Custom Focus Styles */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    ring: 2px;
    ring-color: #dc2626;
    border-color: #dc2626;
}

/* Responsive Tables */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Print Styles */
@media print {
    header, footer, .no-print {
        display: none;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .text-gray-600 {
        color: #000000;
    }

    .text-gray-400 {
        color: #666666;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.5rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles if needed */
}

/* Custom Utility Classes */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.box-shadow-xl {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.border-gradient {
    border-image: linear-gradient(135deg, #dc2626, #991b1b) 1;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #111827;
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
    z-index: 1000;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Form Error States */
.input-error {
    border-color: #dc2626 !important;
    background-color: rgba(220, 38, 38, 0.05);
}

.error-message {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Success States */
.input-success {
    border-color: #10b981 !important;
    background-color: rgba(16, 185, 129, 0.05);
}

/* Loading State */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #dc2626;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
