/* Main 内容区域 */
main {
    background-color: #0a0a1a;
    width: 100%;
    margin: 0 auto;
}

/* 轮播容器 - 全屏 */
.news-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    max-height: 100vh; /* 保证不会超出屏幕高度 */
    margin: 0 auto;    /* 居中 */
}

/* 轮播项目 */
.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

.carousel-item.active {
    pointer-events: auto;
    opacity: 1;
}

/* 图片链接容器 */
.image-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

/* 新闻图片 */
.news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

/* 新闻标题容器 */
.title-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    background: linear-gradient(
        to bottom, 
        rgba(0, 0, 0, 0.2) 80%,
        rgba(0, 0, 0, 0.4) 90%,
        rgba(0, 0, 0, 0.7) 100%
    );
}

/* 新闻标题 */
.news-title {
    font-size: 4rem;
    font-weight: 800;
    text-align: center;
    width: 70%;
    color: white;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    line-height: 1.2;
    pointer-events: none;
}

/* 导航按钮 */
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 1.8rem;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-control:hover {
    background: rgba(0, 0, 0, 0.7);
}

.carousel-control.prev {
    left: 2rem;
}

.carousel-control.next {
    right: 2rem;
}

/* 指示器 */
.carousel-indicators {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    z-index: 10;
}

.indicator {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: #FFD700;
    transform: scale(1.3);
}

/* 加载提示 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    font-size: 1.5rem;
    color: #fff;
}

/* 响应式设计 */
@media (min-width: 720px) and (max-width: 1080px){
    .news-title {
        font-size: 3rem;
        width: 80%;
    }
}

@media (max-width: 720px){
    .news-title {
        font-size: 2rem;
    }

    :root {
        --index-width: 720;
    }
    .news-image {
        box-shadow: 0 calc(10 / var(--index-width) * 100vw) calc(30 / var(--index-width) * 100vw) rgba(0, 0, 0, 0.7);
    }
    .news-title {
        text-shadow: calc(2 / var(--index-width) * 100vw) calc(2 / var(--index-width) * 100vw) calc(8 / var(--index-width) * 100vw) rgba(0, 0, 0, 0.8);
    }
    .carousel-control {
        width: calc(60 / var(--index-width) * 100vw);
        height: calc(60 / var(--index-width) * 100vw);
    }
    .carousel-indicators {
        bottom: calc(40 / var(--index-width) * 100vw);
    }
}