/* ============ 全局基础设置 ============ */
body {
    background-color: #0a0a0a;
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    overflow-x: hidden;
    margin: 0; /* 补充：防止默认边距导致的滚动条 */
}

/* 隐藏滚动条 */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ============ 动画定义 (建议提至全局) ============ */
@keyframes bounceZoom {
    0% { opacity: 0; transform: scale(0.6); }
    60% { opacity: 1; transform: scale(1.02); }
    100% { opacity: 1; transform: scale(1); }
}
@keyframes slideInLeft {
    0% { opacity: 0; transform: translateX(-200px); }
    100% { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
    0% { opacity: 0; transform: translateX(200px); }
    100% { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInDown {
    0% { opacity: 0; transform: translateY(-50px); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes shine { 
    100% { left: 100%; } 
}

/* ============ PC 端样式 (>= 1024px) ============ */
@media (min-width: 1024px) {
    body { 
        height: 100vh; 
        overflow: hidden; 
        display: flex; 
        flex-direction: column; 
    }
    
    .mobile-only { display: none !important; }

    /* 动画应用类 */
    .anim-header { animation: fadeInDown 0.8s ease-out forwards; }
    .anim-main-zoom { animation: bounceZoom 1s cubic-bezier(0.22, 1, 0.36, 1) forwards; opacity: 0; }
    .anim-slide-left { animation: slideInLeft 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards; opacity: 0; animation-delay: 0.3s; }
    .anim-grid-zoom { animation: bounceZoom 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards; opacity: 0; animation-delay: 0.4s; }
    .anim-slide-right { animation: slideInRight 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards; opacity: 0; animation-delay: 0.5s; }

    /* 玻璃遮罩交互 - 修复 Safari 兼容性 */
    .pc-glass-mask {
        background: rgba(0, 0, 0, 0.65);
        -webkit-backdrop-filter: blur(6px); /* 修复 iOS/Mac Safari */
        backdrop-filter: blur(6px);
        transition: all 0.4s ease;
    }
    
    .grid-item { position: relative; overflow: hidden; cursor: pointer; }
    .grid-item:hover .pc-glass-mask { opacity: 0; }
    
    .grid-item img.bg-img { transition: transform 0.6s ease; }
    .grid-item:hover img.bg-img { transform: scale(1.05); }

    /* 右侧悬浮面板 */
    .pc-qr-panel {
        background: rgba(30, 30, 30, 0.8);
        -webkit-backdrop-filter: blur(12px); /* 修复 */
        backdrop-filter: blur(12px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
        animation: bounceZoom 1s ease-out forwards;
        animation-delay: 0.6s;
        opacity: 0;
    }
}

/* ============ 移动端样式 (< 1024px) ============ */
@media (max-width: 1023px) {
    .pc-only { display: none !important; }

    /* 动态背景 - 修复 inset 兼容性 */
    #dynamic-bg {
        position: fixed; 
        inset: 0;
        top: 0; left: 0; right: 0; bottom: 0; /* 兼容旧浏览器 */
        z-index: -1;
        background-size: 150%; 
        background-position: center;
        transition: background-image 0.6s ease-in-out;
    }
    
    #dynamic-bg::after {
        content: ''; 
        position: absolute; 
        inset: 0;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(10, 10, 10, 0.5);
        -webkit-backdrop-filter: blur(3px); /* 修复 */
        backdrop-filter: blur(3px);
    }

    /* 顶部轮播样式 */
    .mobile-top-swiper { padding-top: 20px; padding-bottom: 30px; }
    .mobile-top-swiper .swiper-slide {
        width: 70%; 
        aspect-ratio: 1 / 1;
        border-radius: 12px; 
        overflow: hidden;
    }

    /* 跑马灯匀速动画核心 */
    .linear-scroll .swiper-wrapper { transition-timing-function: linear; }

    /* 霓虹按钮 */
    .neon-btn {
        background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
        box-shadow: 0 0 20px rgba(255, 165, 0, 0.4);
        position: relative; 
        overflow: hidden;
    }
    
    .neon-btn::after {
        content: ''; 
        position: absolute; 
        top: 0; 
        left: -100%; 
        width: 100%; 
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
        animation: shine 2.5s infinite;
    }
}