/* 页面基础样式 */
body {
    background-color: #141428;
    color: #fff;
    padding: 90px 15px 20px;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-overflow-scrolling: touch;
    padding-top: 120px; /* 顶部导航 + 分类导航的高度 */
}

/* 顶部导航 */
.video-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #141428;
    display: flex;
    align-items: center;
    padding: 0 15px;
    z-index: 100;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.back-btn {
    background: none;
    border: none;
    color: #888893;
    font-size: 20px;
    padding: 10px;
    cursor: pointer;
    margin-right: 15px;
}

.video-header h1 {
    color: #ffffff;
    font-size: 18px;
    font-weight: normal;
}

/* 分类导航 */
.category-nav {
    position: sticky;
    top: 60px; /* 顶部导航栏高度 */
    background: #141428;
    z-index: 99;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding: 12px 0;
}

/* 分类导航容器 */
.category-nav {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    padding: 15px;
}

/* 隐藏滚动条 */
.category-nav::-webkit-scrollbar {
    display: none;
}

/* 导航项样式 */
.category-nav .nav-item {
    display: inline-block;
    padding: 8px 20px;
    margin-right: 12px;
    color: #888893;
    text-decoration: none;
    background: #202033;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid #202033;
}

/* 最后一个导航项去除右边距 */
.category-nav .nav-item:last-child {
    margin-right: 0;
}

/* 激活状态 */
.category-nav .nav-item.active {
    background: rgba(64, 224, 208, 0.15);
    color: #40ffff;
    border-color: rgba(64, 224, 208, 0.3);
}

/* 悬停效果 */
.category-nav .nav-item:hover {
    transform: translateY(-1px);
    background: rgba(64, 224, 208, 0.1);
    color: #40ffff;
}

/* 点击效果 */
.category-nav .nav-item:active {
    transform: translateY(0);
    opacity: 0.8;
}

/* 响应式调整 */
@media (min-width: 768px) {
    .category-nav {
        padding: 15px 20px;
    }

    .category-nav .nav-item {
        padding: 10px 24px;
        font-size: 15px;
    }
}

/* 视频列表容器 */
.video-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
}

/* 视频项目样式 */
.video-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
}

.video-cover {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 比例 */
}

.video-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-icon i {
    color: #fff;
    font-size: 20px;
}

.video-info {
    padding: 15px;
}

.video-title {
    font-size: 16px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 12px;
    object-fit: cover;
}

.author-name {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.video-stats {
    display: flex;
    gap: 15px;
}

.video-stats span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    gap: 4px;
}

.video-stats i {
    font-size: 12px;
}

/* 分类数量样式 */
.category-nav .nav-item .count {
    font-size: 12px;
    opacity: 0.7;
    margin-left: 2px;
}

/* 激活状态下的数量样式 */
.category-nav .nav-item.active .count {
    opacity: 0.9;
}

/* 适配刘海屏 */
@supports (padding-top: env(safe-area-inset-top)) {
    .video-header {
        padding-top: env(safe-area-inset-top);
        height: calc(50px + env(safe-area-inset-top));
    }
    
    body {
        padding-top: calc(90px + env(safe-area-inset-top));
    }
    
    .category-nav {
        top: calc(50px + env(safe-area-inset-top));
    }
} 