/* Additional Animations and Effects for MEXC Trading Platform */

/* ===== ENHANCED ANIMATIONS ===== */

/* Page Load Animations */
@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation Classes */
.animate-slide-in-top {
    animation: slideInFromTop 0.6s ease-out;
}

.animate-slide-in-left {
    animation: slideInFromLeft 0.6s ease-out;
}

.animate-slide-in-right {
    animation: slideInFromRight 0.6s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.5s ease-out;
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

/* Staggered Animations */
.animate-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease-out forwards;
}

.animate-stagger > *:nth-child(1) { animation-delay: 0.1s; }
.animate-stagger > *:nth-child(2) { animation-delay: 0.2s; }
.animate-stagger > *:nth-child(3) { animation-delay: 0.3s; }
.animate-stagger > *:nth-child(4) { animation-delay: 0.4s; }
.animate-stagger > *:nth-child(5) { animation-delay: 0.5s; }
.animate-stagger > *:nth-child(6) { animation-delay: 0.6s; }

/* ===== HOVER EFFECTS ===== */

/* Card Hover Effects */
.card-hover-lift {
    transition: all var(--transition-normal);
}

.card-hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.card-hover-glow {
    transition: all var(--transition-normal);
}

.card-hover-glow:hover {
    box-shadow: 0 0 30px rgba(255, 107, 53, 0.3);
}

/* Button Hover Effects */
.btn-hover-scale {
    transition: all var(--transition-normal);
}

.btn-hover-scale:hover {
    transform: scale(1.05);
}

.btn-hover-bounce {
    transition: all var(--transition-normal);
}

.btn-hover-bounce:hover {
    transform: translateY(-3px);
    animation: bounce 0.6s ease-in-out;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(-3px);
    }
    40% {
        transform: translateY(-6px);
    }
    60% {
        transform: translateY(-4px);
    }
}

/* ===== LOADING STATES ===== */

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--bg-glass) 25%, var(--bg-glass-hover) 50%, var(--bg-glass) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: var(--border-radius-sm);
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-text:last-child {
    width: 60%;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-button {
    height: 40px;
    width: 120px;
}

/* Pulse Animation */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

/* ===== INTERACTIVE ELEMENTS ===== */

/* Ripple Effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::before {
    width: 300px;
    height: 300px;
}

/* Focus Ring */
.focus-ring:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.3);
}

/* ===== SCROLL ANIMATIONS ===== */

/* Reveal on Scroll */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ===== MICRO-INTERACTIONS ===== */

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 50px;
    height: 24px;
    background: var(--bg-glass-hover);
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 1px solid var(--glass-border);
}

.toggle-switch.active {
    background: var(--gradient-primary);
}

.toggle-switch::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    transition: all var(--transition-normal);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch.active::before {
    transform: translateX(26px);
}

/* Progress Indicator */
.progress-indicator {
    position: relative;
    width: 100%;
    height: 4px;
    background: var(--bg-glass-hover);
    border-radius: 2px;
    overflow: hidden;
}

.progress-indicator::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: width var(--transition-normal);
}

/* ===== NOTIFICATION ENHANCEMENTS ===== */

.notification-slide-in {
    animation: slideInFromRight 0.3s ease-out;
}

.notification-slide-out {
    animation: slideOutToRight 0.3s ease-in forwards;
}

@keyframes slideOutToRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* ===== FORM ENHANCEMENTS ===== */

/* Floating Labels */
.floating-label {
    position: relative;
}

.floating-label input {
    padding-top: 1.5rem;
}

.floating-label label {
    position: absolute;
    top: 0.5rem;
    left: 0.75rem;
    color: var(--text-tertiary);
    transition: all var(--transition-normal);
    pointer-events: none;
    font-size: 0.9rem;
}

.floating-label input:focus + label,
.floating-label input:not(:placeholder-shown) + label {
    top: 0.25rem;
    font-size: 0.75rem;
    color: var(--mexc-orange);
}

/* Input Validation States */
.form-control.is-valid {
    border-color: #10B981;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2310B981' d='m2.3 6.73.94-.94 1.89 1.89 3.78-3.78.94.94-4.72 4.72z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
}

.form-control.is-invalid {
    border-color: #EF4444;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3e%3cpath fill='%23EF4444' d='M6 0C2.7 0 0 2.7 0 6s2.7 6 6 6 6-2.7 6-6-2.7-6-6-6zM9 8.5L8.5 9 6 6.5 3.5 9 3 8.5 5.5 6 3 3.5 3.5 3 6 5.5 8.5 3 9 3.5 6.5 6 9 8.5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
}

/* ===== RESPONSIVE ENHANCEMENTS ===== */

/* Mobile Optimizations */
@media (max-width: 768px) {
    .animate-stagger > * {
        animation-delay: 0s !important;
    }
    
    .card-hover-lift:hover {
        transform: translateY(-4px);
    }
    
    .btn-hover-scale:hover {
        transform: scale(1.02);
    }
}

/* ===== ACCESSIBILITY ENHANCEMENTS ===== */

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .glass-card {
        border: 2px solid var(--text-primary);
    }
    
    .btn-primary {
        border: 2px solid var(--text-primary);
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .background-effects,
    .floating-shapes,
    .navbar,
    .btn,
    .glass-card {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .card {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }
}


