/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    min-height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: #f7f8fa;
    color: #333;
    line-height: 1.4;
    font-size: 14px;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

body::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

/* 内容区域滚动容器 */
.page-container {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    position: relative;
    padding-bottom: 60px; /* 更新为适应55px高度的底部导航栏 */
}

/* 隐藏滚动条但保持可滚动 */
.page-container::-webkit-scrollbar {
    display: none;
}

/* 底部导航栏样式 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    height: 55px;
    z-index: 100;
    /* 移除可能冲突的背景和阴影，让styles.css的毛玻璃效果生效 */
    background: rgba(255,255,255,0.85) !important;
    backdrop-filter: blur(4px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(4px) saturate(180%) !important;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.18) !important;
    border-radius: 16px 16px 0 0 !important;
    border: 1px solid rgba(255,255,255,0.18) !important;
    /* 启用硬件加速 */
    transform: translateZ(0) !important;
    will-change: transform !important;
    -webkit-transform: translateZ(0) !important;
    -webkit-will-change: transform !important;
    /* 优化滚动性能 */
    contain: layout style paint !important;
    -webkit-contain: layout style paint !important;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
    text-decoration: none;
    font-size: 12px;
    padding: 6px 0;
}

.nav-item i {
    font-size: 18px;
    margin-bottom: 2px;
}

.nav-item.active {
    color: #1677ff;
}

.nav-item span {
    font-size: 12px;
    margin-top: 2px;
}

/* 适配刘海屏 */
@supports (padding-bottom: constant(safe-area-inset-bottom)) {
    .bottom-nav {
        padding-bottom: constant(safe-area-inset-bottom);
        height: calc(55px + constant(safe-area-inset-bottom));
    }
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .bottom-nav {
        padding-bottom: env(safe-area-inset-bottom);
        height: calc(55px + env(safe-area-inset-bottom));
    }
}

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

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

/* 按钮点击波纹效果 */
.van-button {
    position: relative;
    overflow: hidden;
}

.van-button::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: rgba(255,255,255,0.2);
    transform: scale(0);
    transition: transform 0.3s ease;
    border-radius: 50%;
}

.van-button:active::after {
    transform: scale(2);
}

/* 夜间模式 */
@media (prefers-color-scheme: dark) {
    body {
        background: #121212;
        color: #fff;
    }
    
    .bottom-nav {
        background: rgba(30,30,30,0.85) !important;
        backdrop-filter: blur(4px) saturate(180%) !important;
        -webkit-backdrop-filter: blur(4px) saturate(180%) !important;
        box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3) !important;
        border: 1px solid rgba(255,255,255,0.1) !important;
    }
    
    .nav-item {
        color: rgba(255,255,255,0.7);
    }
    
    .nav-item.active {
        color: #ff758c;
    }
}

/* 响应式布局 */
@media screen and (min-width: 768px) {
    .container {
        max-width: 750px;
        margin: 0 auto;
    }
    
    .grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

[v-cloak] {
    display: none;
} 