/* 木林电竞 - 额外样式和动画效果 */

/* 动画关键帧 */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(90deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
    75% { transform: translateY(-10px) rotate(270deg); }
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px var(--accent-color); }
    50% { box-shadow: 0 0 20px var(--accent-color), 0 0 30px var(--accent-color); }
}

/* 滚动动画类 */
.animate-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-in.slide-left {
    animation: slideInLeft 0.6s ease-out forwards;
}

.animate-in.slide-right {
    animation: slideInRight 0.6s ease-out forwards;
}

/* 导航栏滚动效果 */
.nav-scrolled {
    background: rgba(26, 46, 26, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-medium);
}

/* 表单错误样式 */
.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #ff4444;
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.3);
}

.error-message {
    color: #ff4444;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    display: block;
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-right: 0.5rem;
}

/* 悬浮下单按钮 */
.floating-order-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    background: linear-gradient(135deg, #ff6b35, #ff4757);
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    box-shadow: 0 5px 20px rgba(255, 71, 87, 0.4);
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: float-pulse 2s infinite;
}

.floating-order-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 71, 87, 0.6);
}

.floating-order-btn::before {
    content: '🛒';
    font-size: 1.4rem;
}

@keyframes float-pulse {
    0%, 100% {
        transform: translateY(0);
        box-shadow: 0 5px 20px rgba(255, 71, 87, 0.4);
    }
    50% {
        transform: translateY(-5px);
        box-shadow: 0 15px 30px rgba(255, 71, 87, 0.6);
    }
}

/* 适配移动端 */
@media (max-width: 768px) {
    .floating-order-btn {
        bottom: 20px;
        right: 20px;
        padding: 12px 24px;
        font-size: 1rem;
    }
}

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

/* 通知系统样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 400px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    box-shadow: var(--shadow-heavy);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 9999;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    border-color: #4CAF50;
}

.notification-error {
    border-color: #f44336;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.notification-icon {
    font-size: 1.2rem;
    font-weight: bold;
}

.notification-success .notification-icon {
    color: #4CAF50;
}

.notification-error .notification-icon {
    color: #f44336;
}

.notification-message {
    flex: 1;
    color: var(--text-primary);
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-close:hover {
    color: var(--text-primary);
}

/* 粒子容器样式 */
.particle-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

/* 按钮悬停效果增强 */
.cta-btn:hover,
.pricing-btn:hover,
.submit-btn:hover {
    animation: pulse 0.6s ease-in-out;
}

/* 服务卡片悬停增强 */
.service-card:hover {
    animation: glow 2s ease-in-out infinite;
}

/* 评价卡片动画 */
.review-card {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.review-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* FAQ 动画 */
.faq-item {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.4s ease;
}

.faq-item.animate-in {
    opacity: 1;
    transform: translateX(0);
}

/* 统计数据动画 */
.stat-card {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.6s ease;
}

.stat-card.animate-in {
    opacity: 1;
    transform: scale(1);
}

/* 联系方式悬停效果 */
.contact-method:hover .contact-icon {
    animation: pulse 0.6s ease-in-out;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .particle-container {
        display: none; /* 移动端隐藏粒子效果以提升性能 */
    }
    
    .animate-in {
        animation-duration: 0.4s; /* 移动端缩短动画时间 */
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    :root {
        --border-color: #ffffff;
        --text-secondary: #ffffff;
        --text-muted: #cccccc;
    }
}

/* 减少动画偏好支持 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .particle-container {
        display: none;
    }
}

/* 打印样式 */
@media print {
    .nav,
    .particle-container,
    .notification {
        display: none;
    }
    
    .hero {
        background: none;
        color: black;
    }
    
    .service-card,
    .pricing-card,
    .review-card {
        border: 1px solid black;
        background: white;
        color: black;
        box-shadow: none;
    }
}