/* 首页样式 */
/* 轮播图容器 */
.carousel-container {
    display: flex;
    height: 550px;
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

/* 主图区域 */
.carousel-main {
    flex: 0 0 80%;
    position: relative;
}

.carousel-slides {
    position: relative;
    height: 100%;
}

.carousel-slides .slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.carousel-slides .slide.active {
    opacity: 1;
}

.carousel-slides img {
    width: 100%;
    height: 100%;
}

/* 右侧列表 */
.carousel-list {
    flex: 0 0 20%;
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    overflow-y: auto;
}

.list-item {
    padding: 15px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.list-item a {
    display: inline-block;
    text-decoration: none;
    height: 26px;
    overflow: hidden;
}

.list-item.active {
    background: var(--primary-color);
}

.list-item h3 {
    color: white;
    font-size: 1rem;
    margin-bottom: 5px;
}

.list-item p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
}


.video-section {
    margin: 3rem 0;
}

.section-title {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.5rem;
}

.video-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.video-card:hover {
    transform: translateY(-5px);
}

.video-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.video-card h3 {
    max-height: 70px;
    min-height: 70px;
    overflow: hidden;
    padding: 0.8rem;
    font-size: 1.1rem;
    color: #333;
}

.video-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.video-link:hover h3 {
    color: var(--primary-color);
}

.video-card .views {
    padding: 0 0.8rem 0.8rem;
    color: #666;
    font-size: 0.9rem;
}

.friend-links {
    margin-top: 3rem;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.links-container {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.links-container a {
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--primary-color);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.links-container a:hover {
    background: var(--primary-color);
    color: white;
}

@media (max-width: 768px) {

    /* 轮播容器改为垂直布局 */
    .carousel-container {
        flex-direction: column;
        height: auto;
    }

    /* 主图区域设置 */
    .carousel-main {
        flex: none;
        width: 100%;
        height: 50vh;
        min-height: 300px;
    }

    /* 右侧列表样式调整 */
    .carousel-list {
        display: none;
        flex: none;
        width: 100%;
        height: auto;
        max-height: 40vh;
        overflow-y: auto;
        background: rgba(0, 0, 0, 0.9);
    }

    /* 列表项间距优化 */
    .list-item {
        padding: 12px;
        margin-bottom: 8px;
    }

    /* 调整视频网格布局 */
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    /* 调整友情链接布局 */
    .links-container {
        gap: 1rem;
    }
}

@media (max-width: 480px) {

    /* 进一步优化小屏幕显示 */
    .carousel-main {
        height: 40vh;
        min-height: 250px;
    }

    .list-item h3 {
        font-size: 0.9rem;
    }

    .list-item p {
        font-size: 0.7rem;
    }
}

/* 移动端隐藏PC端文字 */
@media (max-width: 480px) {
    .list-item p {
        display: none;
    }
}

/* 触摸反馈优化 */
.list-item {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

/* 防止移动端图片缩放 */
.carousel-slides img {
    pointer-events: none;
}