/* VR游戏解析浏览器 - 全局样式 */
/* main.css - 重置、基础排版、布局、工具类 */

/* ========== 重置样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ========== 基础排版 ========== */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* ========== 布局容器 ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* ========== 动态背景 ========== */
.dynamic-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    pointer-events: none;
}

.dynamic-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.dynamic-background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.dynamic-background video.loaded {
    opacity: 1;
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 0;
    pointer-events: none;
}

/* ========== 通用动画 ========== */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 500px;
        transform: translateY(0);
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ========== 加载状态 ========== */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

/* ========== 响应式断点 - 基础 ========== */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    /* 移动端背景视频使用absolute避免fixed定位bug */
    .dynamic-background {
        position: absolute;
        height: 100%;
        min-height: 100vh;
    }

    .background-overlay {
        position: absolute;
        height: 100%;
        min-height: 100vh;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
}
