/* Custom CSS for Yang Mingkai AI Website */

/* Font Family */
.font-inter {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Custom Variables */
:root {
    --primary-blue: #3b82f6;
    --primary-purple: #8b5cf6;
    --secondary-green: #10b981;
    --dark-bg: #111827;
    --darker-bg: #0f172a;
    --card-bg: #1f2937;
    --border-color: #374151;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
}

/* Background Patterns */
.bg-grid-pattern {
    background-image: 
        linear-gradient(rgba(59, 130, 246, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: grid-move 20s linear infinite;
}

@keyframes grid-move {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Gradient Animation */
.animate-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 3s ease-in-out infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Payment Specific Styles */
.payment-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.payment-success-gradient {
    background: linear-gradient(135deg, #10ac84 0%, #00d2d3 100%);
}

.payment-failure-gradient {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

.payment-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.payment-method {
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.payment-method:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.2);
}

.payment-method.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea10, #764ba210);
}

.payment-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    transition: all 0.3s ease;
}

.payment-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.success-pulse {
    animation: successPulse 2s ease-in-out infinite;
}

@keyframes successPulse {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 0 0 0 rgba(16, 172, 132, 0.4); 
    }
    50% { 
        transform: scale(1.05); 
        box-shadow: 0 0 0 20px rgba(16, 172, 132, 0); 
    }
}

.failure-shake {
    animation: failureShake 1s ease-in-out;
}

@keyframes failureShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

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

/* Floating Elements */
.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.floating-element {
    position: absolute;
    background: linear-gradient(45deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.floating-element:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 6s;
}

.floating-element:nth-child(2) {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 10%;
    animation-delay: 2s;
    animation-duration: 8s;
}

.floating-element:nth-child(3) {
    width: 60px;
    height: 60px;
    bottom: 20%;
    left: 60%;
    animation-delay: 4s;
    animation-duration: 7s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 0.6;
    }
}

/* Glow Effects */
.glow-blue {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

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

.glow-green {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

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

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Card Styles */
.ai-card {
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.8), rgba(17, 24, 39, 0.9));
    border: 1px solid rgba(55, 65, 81, 0.5);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.ai-card:hover {
    border-color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
}

/* Button Styles */
.ai-btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
    color: white;
    padding: 12px 24px;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.ai-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.ai-btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
    padding: 12px 24px;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ai-btn-secondary:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    transform: translateY(-2px);
}

/* Navigation Styles */
.nav-blur {
    backdrop-filter: blur(12px);
    background: rgba(17, 24, 39, 0.9);
}

/* Typography */
.text-gradient-blue {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-green {
    background: linear-gradient(135deg, var(--secondary-green), var(--primary-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Statistics Cards */
.stat-card {
    background: rgba(31, 41, 55, 0.5);
    border: 1px solid rgba(55, 65, 81, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.stat-card:hover::before {
    left: 100%;
}

.stat-card:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

/* Service Cards */
.service-card {
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.7), rgba(17, 24, 39, 0.8));
    border: 1px solid rgba(55, 65, 81, 0.5);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(139, 92, 246, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover::after {
    opacity: 1;
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.15);
}

/* Testimonial Cards */
.testimonial-card {
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.6), rgba(17, 24, 39, 0.7));
    border: 1px solid rgba(55, 65, 81, 0.4);
    position: relative;
    overflow: hidden;
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-purple), var(--secondary-green));
}

/* Loading Animation */
.loading-dots {
    display: inline-block;
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* Form Styles */
.form-input {
    background: rgba(31, 41, 55, 0.5);
    border: 1px solid rgba(55, 65, 81, 0.5);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: rgba(31, 41, 55, 0.8);
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* Success Stories Animation */
.success-metric {
    font-weight: 800;
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: counter-up 2s ease-out;
}

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

/* Mobile Menu Animation */
.mobile-menu-slide {
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
}

.mobile-menu-slide.active {
    transform: translateY(0);
}

/* Scroll Indicator */
.scroll-indicator {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate(-50%, 0);
    }
    40%, 43% {
        transform: translate(-50%, -10px);
    }
    70% {
        transform: translate(-50%, -5px);
    }
    90% {
        transform: translate(-50%, -3px);
    }
}

/* Chart Container */
.chart-container {
    background: rgba(31, 41, 55, 0.5);
    border: 1px solid rgba(55, 65, 81, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 24px;
    height: 400px;
}

/* Progress Bar */
.progress-bar {
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-purple));
    height: 6px;
    border-radius: 3px;
    transition: width 1s ease-in-out;
}

/* Image Hover Effects */
.image-hover-effect {
    transition: all 0.3s ease;
    overflow: hidden;
}

.image-hover-effect:hover {
    transform: scale(1.05);
}

.image-hover-effect img {
    transition: all 0.3s ease;
}

.image-hover-effect:hover img {
    transform: scale(1.1);
    filter: brightness(1.1);
}

/* Social Media Icons */
.social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(55, 65, 81, 0.3);
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .floating-element {
        display: none;
    }
    
    .success-metric {
        font-size: 2rem;
    }
    
    .chart-container {
        height: 300px;
        padding: 16px;
    }
}

/* Print Styles */
@media print {
    .floating-elements,
    .bg-grid-pattern {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .ai-card {
        border-width: 2px;
    }
    
    .form-input {
        border-width: 2px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .floating-element {
        display: none;
    }
}