/* Custom styles for TradeMaster */

.font-inter {
    font-family: 'Inter', sans-serif;
}

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

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

::-webkit-scrollbar-track {
    background: #1e293b;
}

::-webkit-scrollbar-thumb {
    background: #10b981;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #059669;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out;
}

/* Gradient backgrounds */
.bg-gradient-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.bg-gradient-secondary {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Button animations */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary::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-primary:hover::before {
    left: 100%;
}

/* Loading spinner */
.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

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

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

/* Chart background pattern */
.chart-bg {
    background-image: 
        linear-gradient(45deg, rgba(16, 185, 129, 0.1) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(16, 185, 129, 0.1) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(16, 185, 129, 0.1) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(16, 185, 129, 0.1) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

/* Text gradient */
.text-gradient {
    background: linear-gradient(135deg, #10b981 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass morphism effect */
.glass {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Pulse animation for CTA buttons */
.pulse-primary {
    animation: pulsePrimary 2s infinite;
}

@keyframes pulsePrimary {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
}

/* Responsive text */
@media (max-width: 640px) {
    .text-responsive {
        font-size: 2rem;
    }
}

@media (min-width: 641px) {
    .text-responsive {
        font-size: 3rem;
    }
}

@media (min-width: 1024px) {
    .text-responsive {
        font-size: 4rem;
    }
}

/* Custom focus styles */
.focus-primary:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Enhanced animations for sections */
@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.animate-slideInLeft {
    animation: slideInFromLeft 0.8s ease-out;
}

.animate-slideInRight {
    animation: slideInFromRight 0.8s ease-out;
}

.animate-slideInBottom {
    animation: slideInFromBottom 0.8s ease-out;
}

/* Staggered animations */
.animate-stagger-1 {
    animation-delay: 0.1s;
}

.animate-stagger-2 {
    animation-delay: 0.2s;
}

.animate-stagger-3 {
    animation-delay: 0.3s;
}

.animate-stagger-4 {
    animation-delay: 0.4s;
}

/* Enhanced hover effects */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Gradient text animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

/* Floating animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Glow effect */
.glow-primary {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.glow-secondary {
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

/* Enhanced button effects */
.btn-enhanced {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-enhanced::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.6s;
}

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

.btn-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Table responsive */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Status badges */
.status-completed {
    background-color: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-pending {
    background-color: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.status-failed {
    background-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Mobile Navigation Improvements */
@media (max-width: 1024px) {
    /* Mobile header container */
    .container.mx-auto {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }
    
    /* Reduce header padding on mobile */
    header {
        padding: 0 !important;
    }
    
    /* Mobile header layout fix */
    .flex.justify-between.items-center {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-direction: row !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Mobile menu button */
    #mobile-menu-toggle {
        transition: all 0.3s ease;
        padding: 0.5rem;
        border-radius: 0.375rem;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-width: 44px;
        min-height: 44px;
    }
    
    #mobile-menu-toggle:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    /* Mobile menu */
    #mobile-menu {
        transition: all 0.3s ease;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
    }
    
    #mobile-menu:not(.hidden) {
        max-height: 500px;
        opacity: 1;
    }
    
    /* Mobile menu links */
    #mobile-menu a {
        transition: all 0.2s ease;
        border-radius: 0.375rem;
        margin: 0.25rem 0;
    }
    
    #mobile-menu a:hover {
        background-color: rgba(16, 185, 129, 0.1);
        transform: translateX(0.25rem);
    }
    
    /* Mobile menu animations */
    #mobile-menu .flex-col {
        animation: slideDown 0.3s ease-out;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* Mobile Footer Improvements */
@media (max-width: 1024px) {
    footer .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    footer .flex-col {
        align-items: center;
        text-align: center;
    }
    
    footer .flex-col > div:first-child {
        margin-bottom: 1rem;
    }
    
    footer .flex-col > div:last-child {
        margin-top: 1rem;
    }
}

@media (max-width: 640px) {
    /* Mobile header container for small screens */
    .container.mx-auto {
        padding-top: 0.25rem !important;
        padding-bottom: 0.25rem !important;
    }
    
    /* Mobile navigation improvements for small screens */
    #mobile-menu {
        margin-top: 0.25rem;
        padding: 0.5rem 0;
    }
    
    #mobile-menu a {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        border-radius: 0.5rem;
    }
    
    #mobile-menu-toggle {
        padding: 0.75rem;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0;
    }
    
    /* Ensure mobile header layout is correct */
    .flex.justify-between.items-center.lg\\:hidden {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100%;
    }
    
    .flex.justify-between.items-center.lg\\:hidden > div:first-child {
        flex: 1;
        display: flex;
        align-items: center;
    }
    
    .flex.justify-between.items-center.lg\\:hidden > button {
        flex-shrink: 0;
        margin-left: 1rem;
    }
    
    /* Ensure mobile menu is properly positioned */
    .lg\:hidden {
        display: block !important;
    }
    
    @media (min-width: 1024px) {
        .lg\:hidden {
            display: none !important;
        }
    }
    
    footer {
        padding: 1.5rem 0;
    }
    
    footer .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    footer .flex-wrap {
        justify-content: center;
        gap: 0.75rem;
    }
    
    footer .flex-wrap a {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    
    footer .text-sm {
        font-size: 0.75rem;
        line-height: 1.4;
    }
    
    /* Premium Package Badge Mobile */
    .bg-gradient-to-r.from-primary.to-secondary {
        font-size: 0.875rem !important;
        padding: 0.5rem 1.5rem !important;
        min-width: 200px !important;
        white-space: nowrap !important;
    }
    
    .bg-gradient-to-r.from-primary.to-secondary i {
        font-size: 0.75rem !important;
    }
    
    /* Performance Table Mobile Improvements */
    .overflow-x-auto {
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: #10b981 #1e293b;
    }
    
    .overflow-x-auto::-webkit-scrollbar {
        height: 6px;
    }
    
    .overflow-x-auto::-webkit-scrollbar-track {
        background: #1e293b;
        border-radius: 3px;
    }
    
    .overflow-x-auto::-webkit-scrollbar-thumb {
        background: #10b981;
        border-radius: 3px;
    }
    
    .overflow-x-auto::-webkit-scrollbar-thumb:hover {
        background: #059669;
    }
    
    /* Mobile table header and content centering */
    .performance-table-mobile th:nth-child(2),
    .performance-table-mobile th:nth-child(3) {
        text-align: center !important;
    }
    
    .performance-table-mobile td:nth-child(2),
    .performance-table-mobile td:nth-child(3) {
        text-align: center !important;
    }
}