/* =========== 基础重置 =========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* =========== Hero Section =========== */
.hero {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    height: 80vh; /* 降低高度到80% */
    width: 100vw;
    background-color: #000;
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: heroFadeIn 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* =========== 轮播图容器 =========== */
.slideshow-container {
    width: 100%;
    height: 80vh; /* 确保高度为80vh */
    position: relative;
    overflow: hidden;
    background: #000;
}

/* 轮播图片区域 */
.slideshow {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.slideshow img {
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
    opacity: 0;
    transition: all 1.2s cubic-bezier(0.645, 0.045, 0.355, 1);
    will-change: transform, opacity;
    filter: brightness(0.9);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.slideshow img.active {
    opacity: 1;
    z-index: 1;
}

/* =========== 导航按钮 =========== */
.slideshow-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    z-index: 2;
}

.slideshow-nav button {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 20px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transform: translateX(20px);
}

.slideshow-nav button:hover {
    background: rgba(128, 128, 128, 0.9);
    transform: scale(1.1);
}

.slideshow-container:hover .slideshow-nav button {
    opacity: 1;
    transform: translateX(0);
}

.prev {
    margin-left: 20px;
    border-radius: 0 24px 24px 0;
}

.next {
    margin-right: 20px;
    border-radius: 24px 0 0 24px;
}

/* =========== 标题样式 =========== */
#slide-title {
    position: absolute;
    left: 10%;
    top: 50%;
    transform: translateY(-50%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 50px;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    width: 60%;
    z-index: 2;
    opacity: 0;
    animation: fadeInTitle 0.8s ease-out forwards;
}

/* =========== 底部按钮组 =========== */
.buttons {
    position: absolute;
    bottom: 10%;
    display: flex;
    justify-content: center;
    gap: 30px;
    z-index: 2;
}

.btn-left, .btn-right {
    padding: 16px 36px;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1.5px solid rgba(255, 255, 255, 0.8);
    background-color: transparent;
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(8px);
}

.btn-left {
    background: rgba(255, 255, 255, 0.1);
}

.btn-right {
    background: rgba(255, 255, 255, 0.95);
    color: black;
}

.btn-left:hover, .btn-right:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* =========== 底部控制点 =========== */
.slideshow-controls {
    position: absolute;
    bottom: 5%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 12px;
    width: 100%;
    z-index: 2;
    padding: 20px 0;
}

.control-btn {
    width: 8px;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.3);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center center;
    position: relative;
}

.control-btn::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0);
    transition: transform 0.4s ease;
}

.control-btn:hover::before {
    transform: scale(1);
}

.control-btn:hover {
    background-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.3);
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.control-btn.active {
    width: 24px;
    border-radius: 4px;
    background: #fff;
    transform: scale(1.2);
    border-color: #ffffff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

/* 添加平滑过渡效果 */
.control-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s ease-out;
}

.control-btn:hover::after {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
}

/* =========== 动画效果 =========== */
@keyframes fadeInTitle {
    from {
        opacity: 0;
        transform: translate3d(0, 30px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, -50%, 0);
    }
}

/* 添加页面载入动画 */
@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========== 响应式适配 =========== */
@media (max-width: 768px) {
    #slide-title {
        font-size: 36px;
        width: 80%;
    }

    .buttons {
        flex-direction: column;
        gap: 10px;
    }

    .slideshow-nav button {
        padding: 10px 15px;
        font-size: 18px;
    }

    .control-btn {
        width: 12px;
        height: 12px;
    }
}

/* =========== 性能优化 =========== */
.slideshow img {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    perspective: 1000;
    transform: translate3d(0,0,0);
}

.slideshow-container {
    -webkit-transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    -webkit-perspective: 1000;
}

/* =========== 触摸设备优化 =========== */
@media (hover: none) {
    .slideshow-nav {
        display: none; /* 在触摸设备上隐藏箭头导航 */
        opacity: 1;
        transform: none;
    }

    .btn-left, .btn-right {
        padding: 18px 40px;
    }

    .control-btn {
        width: 10px;
        height: 10px;
    }
}

