/* 筛选栏样式 */
.filter-bar {
    background: var(--secondary);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 2rem 0;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.filter-group h3 {
    color: var(--primary);
    font-size: 1rem;
    min-width: 60px;
}

.filter-options {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.filter-btn {
    /* 基础样式 */
    display: inline-block;
    /* 关键属性 */
    padding: 0.3rem 0.6rem;
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    /* 移除下划线 */

    /* 链接状态 */
    &:visited {
        color: var(--primary);
    }

    /* 交互状态 */
    &.active,
    &:hover,
    &:focus {
        background: var(--primary);
        color: var(--secondary);
        text-decoration: none;
    }

    /* 禁用状态（可选） */
    &.disabled {
        opacity: 0.6;
        pointer-events: none;
    }
}

/* 视频列表样式 */
.video-list {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.video-item {
    display: flex;
    background: var(--secondary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: var(--text-primary);
}

.video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.thumbnail {
    position: relative;
    flex: 0 0 160px;
    height: 240px;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 新增简介样式 */
.description {
    /* 文字样式 */
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;

    /* 布局控制 */
    margin: 0.5rem 0;
    max-height: 3.2em;
    /* 两行高度 */

    /* 多行截断 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;

    /* 过渡效果 */
    transition: all 0.3s ease;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .description {
        font-size: 0.8rem;
        line-height: 1.3;
        -webkit-line-clamp: 1;
        /* 移动端只显示1行 */
        max-height: 1.3em;
    }
}

/* 悬停显示完整内容 */
.video-item:hover .description {
    -webkit-line-clamp: unset;
    max-height: none;
    overflow: visible;
}

.duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--secondary);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.video-info {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.meta {
    display: flex;
    gap: 0.8rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.category {
    background: var(--hover-bg);
    color: var(--primary);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
    gap: 1rem;
}

.page-prev,
.page-next,
.page-item {
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--primary);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 100px;
    text-align: center;
}

/* 数字分页 */
.page-item {
    color: var(--primary);
    background: transparent;
}

/* 上下页按钮 */
.page-prev,
.page-next {
    color: var(--secondary);
    background: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 激活/悬停状态 */
.page-item.active,
.page-item:hover {
    background: var(--primary);
    color: var(--secondary);
}

.page-prev:hover,
.page-next:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* 禁用状态 */
.page-prev.disabled,
.page-next.disabled {
    background: #ddd;
    border-color: #ddd;
    color: #666;
    pointer-events: none;
}

/* 数字分页容器 */
.page-numbers {
    display: flex;
    gap: 0.8rem;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .filter-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .video-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .video-item {
        flex-direction: column;
    }

    .thumbnail {
        flex: none;
        height: 180px;
    }

    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }

    .page-prev,
    .page-next {
        min-width: auto;
        font-size: 0.9rem;
        padding: 0.6rem;
    }

    .page-numbers {
        order: 0;
        width: 100%;
        justify-content: center;
        margin-bottom: 1rem;
    }

    .page-prev,
    .page-next,
    .page-item {
        min-width: 90px;
    }
}


@media (max-width: 480px) {
    .filter-options {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
    }

    .page-prev,
    .page-next,
    .page-item {
        min-width: 50px;
    }
}