/* 骨架屏样式 */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-image {
    height: 200px;
    margin-bottom: 16px;
}

.skeleton-button {
    height: 40px;
    width: 120px;
    margin-top: 16px;
}

/* 加载动画样式 */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background-color: rgba(255, 255, 255, 0.9);
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-dots {
    display: flex;
    gap: 8px;
}

.loading-dot {
    width: 10px;
    height: 10px;
    background-color: #3498db;
    border-radius: 50%;
    animation: dot-pulse 1.5s infinite ease-in-out;
}

.loading-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dot:nth-child(3) {
    animation-delay: 0.4s;
}

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

@keyframes dot-pulse {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* 页面过渡效果 */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    z-index: 9999;
    transition: transform 0.5s ease-in-out;
    transform: translateX(100%);
}

.page-transition.enter {
    transform: translateX(0);
}

.page-transition.exit {
    transform: translateX(-100%);
}

/* 平滑过渡效果 */
.transition-smooth {
    transition: all 0.3s ease-in-out;
}

/* 按钮悬停效果 */
.btn {
    transition: all 0.3s ease-in-out;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 卡片悬停效果 */
.vr-item, .product-item, .feature-item {
    transition: all 0.3s ease-in-out;
}

.vr-item:hover, .product-item:hover, .feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* 表单验证动画 */
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    transition: all 0.3s ease-in-out;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.form-group input.error {
    border-color: #e74c3c;
    animation: shake 0.5s ease-in-out;
}

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

/* 移动端适配优化 */
@media (max-width: 768px) {
    /* 触摸反馈 */
    .btn, .nav-links a, .vr-item, .product-item {
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* 增大点击区域 */
    .btn {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .nav-links a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
    
    /* 平滑滚动 */
    html {
        scroll-behavior: smooth;
    }
    
    /* 避免字体大小调整 */
    body {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
}

/* 响应式字体大小 */
@media (max-width: 480px) {
    h1 {
        font-size: 24px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    h3 {
        font-size: 18px;
    }
    
    p {
        font-size: 14px;
    }
}

/* 骨架屏容器 */
.skeleton-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.skeleton-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 加载状态管理 */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    z-index: 10;
}

/* 页面加载动画 */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-in-out;
}

.page-loader.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* 微交互动画 */
.micro-interaction {
    transition: all 0.2s ease-in-out;
}

.micro-interaction:active {
    transform: scale(0.95);
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

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

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