* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.carousel-container {
    position: relative;
    width: 70%;
    height: 450px;
    overflow: hidden;
    margin: 0 auto;   /* 让轮播区域在屏幕中间（水平居中） */
background-color: #ccc;      /* 灰色背景 */
}
/* 每一屏轮播项本身也设为灰色，避免图片没铺满时露出别的颜色 */
.carousel-item {
    flex: 0 0 100%;
    height: 100%;
    background-color: #black;   /* 单个 item 的空白区域也是灰色 */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 如果你的图片比例不一致，建议用 contain，这样外面灰色能看出来 */
.carousel-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;      /* 不强制裁剪图片，保留灰色背景边缘 */
}
.carousel-list {
    display: flex;
    list-style: none;
    height: 100%;
    transition: transform 1s ease-in-out;
}

.carousel-item {
    flex: 0 0 100%;
    height: 100%;
}

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

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

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

.carousel-prev {
    left: 125px;
}

.carousel-next {
    right: 125px;
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s;
}

.carousel-indicator.active {
    background-color: white;
}
