/* ========== 液态玻璃质感 + 动画过渡 ========== */

/* 全局样式 */
body {
    background: linear-gradient(135deg, #f5f7fb 0%, #e9ecef 100%);
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    padding-bottom: 80px;
    min-height: 100vh;
}

/* 玻璃质感卡片 */
.glass-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 28px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.glass-card-dark {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 底部导航栏 */
.bottom-nav {
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 40px;
    padding: 8px 20px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1050;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.nav-item {
    text-align: center;
    flex: 1;
    color: #6c757d;
    transition: all 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    cursor: pointer;
    border-radius: 40px;
    padding: 8px 0;
}

.nav-item i {
    font-size: 1.6rem;
    display: block;
}

.nav-item span {
    font-size: 0.7rem;
    font-weight: 500;
    margin-top: 2px;
}

.nav-item.active {
    color: #0d6efd;
    background: rgba(13, 110, 253, 0.12);
}

.nav-item:active {
    transform: scale(0.95);
}

/* 页面切换动画 - 滑动+淡入（灵魂效果） */
.page-container {
    animation: slideFadeIn 0.35s cubic-bezier(0.2, 0.9, 0.4, 1.1) forwards;
}

.page-container-exit {
    animation: slideFadeOut 0.2s ease forwards;
}

@keyframes slideFadeIn {
    0% {
        opacity: 0;
        transform: translateX(24px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideFadeOut {
    0% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-16px);
    }
}

/* 骨架屏样式 */
.skeleton {
    background: linear-gradient(90deg, #e0e4e8 25%, #f0f2f5 50%, #e0e4e8 75%);
    background-size: 200% 100%;
    animation: skeletonLoading 1.3s ease-in-out infinite;
    border-radius: 16px;
}

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

.skeleton-img {
    width: 100%;
    aspect-ratio: 2/3;
    border-radius: 16px;
}

.skeleton-text {
    height: 14px;
    margin: 8px 0;
    border-radius: 8px;
}

.skeleton-title {
    height: 20px;
    width: 60%;
    border-radius: 10px;
}

/* 搜索框 */
.search-header {
    padding: 12px 16px;
    margin: 12px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-box {
    flex: 1;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 32px;
    padding: 12px 18px;
    border: none;
    outline: none;
    font-size: 0.9rem;
}

.search-box:focus {
    background: white;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.2);
}

.history-btn {
    background: rgba(13, 110, 253, 0.15);
    border-radius: 32px;
    padding: 8px 18px;
    font-size: 0.85rem;
    white-space: nowrap;
    cursor: pointer;
}

/* 分类菜单滚动 */
.category-scroll {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding: 10px 16px;
    margin: 0 12px 20px 12px;
    white-space: nowrap;
    scrollbar-width: thin;
}

.cat-item {
    padding: 8px 22px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.cat-item.active-cat {
    background: #0d6efd;
    color: white;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

/* 轮播图 */
.carousel-container {
    margin: 0 12px 16px 12px;
    border-radius: 28px;
    overflow: hidden;
}

.carousel-item {
    position: relative;
}

.carousel-item img {
    object-fit: cover;
    height: 220px;
    width: 100%;
}

.carousel-caption-custom {
    position: absolute;
    bottom: 16px;
    left: 16px;
    right: auto;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    padding: 6px 16px;
    border-radius: 30px;
    color: white;
    font-size: 0.8rem;
    font-weight: 500;
    z-index: 2;
}

/* 视频网格 */
.vod-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    padding: 0 12px;
}

.vod-card {
    border-radius: 20px;
    overflow: hidden;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.vod-card:active {
    transform: scale(0.97);
}

.vod-card img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
}

.vod-info {
    padding: 8px 8px 10px;
}

.vod-title {
    font-size: 0.78rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vod-remark {
    font-size: 0.7rem;
    color: #6c757d;
    margin-top: 4px;
}

/* 统计信息栏 */
.stats-bar {
    background: rgba(13, 110, 253, 0.08);
    margin: 20px 12px;
    padding: 12px;
    border-radius: 20px;
    text-align: center;
    font-size: 0.8rem;
}

/* 加载状态 */
.loading-spinner {
    display: flex;
    justify-content: center;
    padding: 40px;
}

/* 筛选页面样式 */
.filter-section {
    background: white;
    margin: 12px;
    padding: 16px;
    border-radius: 24px;
}

.filter-title {
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-tag {
    padding: 6px 16px;
    background: #f0f2f5;
    border-radius: 30px;
    font-size: 0.8rem;
    cursor: pointer;
}

.filter-tag.active {
    background: #0d6efd;
    color: white;
}

/* 排行页面 */
.rank-list {
    margin: 12px;
}

.rank-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: white;
    border-radius: 20px;
    margin-bottom: 10px;
}

.rank-number {
    width: 32px;
    height: 32px;
    background: #f0f2f5;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.rank-number.top1 {
    background: linear-gradient(135deg, #ffd700, #ffb347);
    color: white;
}
.rank-number.top2 {
    background: linear-gradient(135deg, #c0c0c0, #a8a8a8);
    color: white;
}
.rank-number.top3 {
    background: linear-gradient(135deg, #cd7f32, #b87333);
    color: white;
}

.rank-img {
    width: 50px;
    height: 70px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-info {
    flex: 1;
}

.rank-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.rank-score {
    font-size: 0.75rem;
    color: #ff9800;
}