﻿body {
    margin: 0;
    font-family: Arial, sans-serif;
}

header {
    background: #333;
    color: #fff;
    padding: 10px 0;
}

.top-menu ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center; /* 水平居中 */
}

    .top-menu ul li {
        margin: 0 15px;
    }

        .top-menu ul li a {
            color: #fff;
            text-decoration: none;
        }

.container {
    display: flex; /* 使用Flexbox */
    flex-direction: row; /* 子元素水平排列 */
}

.left-menu {
    width: 200px; /* 或者使用百分比 */
    background: #f4f4f4; /* 背景色 */
    padding: 20px; /* 内边距 */
}

    .left-menu ul {
        list-style: none; /* 无列表样式 */
        padding: 0; /* 无内边距 */
    }

        .left-menu ul li {
            margin-bottom: 10px; /* 菜单项间距 */
        }

            .left-menu ul li a {
                text-decoration: none; /* 无下划线 */
                color: #333; /* 字体颜色 */
            }

.content {
    flex-grow: 1; /* 占据剩余空间 */
    padding: 20px; /* 内边距 */
}


.carousel-container {
    position: relative;
    width: 90%;
    max-width: 800px;
    margin: 2rem auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.carousel-slides {
    position: relative;
    width: 100%;
    height: 400px;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

    .slide.active {
        opacity: 1;
    }

    .slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: var(--text-color);
    font-size: 1.2rem;
    text-align: center;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.3);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

    .carousel-control:hover {
        background-color: rgba(255, 255, 255, 0.7);
        color: var(--primary-color);
    }

    .carousel-control.prev {
        left: 20px;
    }

    .carousel-control.next {
        right: 20px;
    }

.indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

    .indicators span {
        display: block;
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background-color: rgba(255, 255, 255, 0.5);
        cursor: pointer;
        transition: all 0.3s ease;
    }

        .indicators span.active {
            background-color: var(--primary-color);
            transform: scale(1.2);
        }

@media (max-width: 768px) {
    .carousel-container {
        width: 95%;
    }

    .carousel-slides {
        height: 300px;
    }

    .caption {
        font-size: 1rem;
        padding: 0.8rem;
    }
}
