.slider-container {
    position: relative;
    width: 55%;
    /* 使用 aspect-ratio 保持固定的寬高比 16:9 */
    aspect-ratio: 16/9;
    max-width: 1280px; /* 最大寬度設置更大以適應大圖 */
    margin: 0 auto;
    overflow: hidden;
    background-color: #000;
}

.slider-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 100%;
    background-color: #000;
}

.slide {
    min-width: 100%;
    height: 100%;
    box-sizing: border-box;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.slider-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    font-size: 18px;
    z-index: 10;
    transition: background-color 0.3s ease;
}

.prev {
    left: 10px;
}

.next {
    right: 10px;
}

.slider-button:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* 響應式設計 - 根據螢幕寬度調整比例 */
@media screen and (max-width: 768px) {
    .slider-container {
        aspect-ratio: 4/3; /* 平板使用更方正的比例 */
    }
    
    .slider-button {
        padding: 10px;
        font-size: 16px;
    }
}

@media screen and (max-width: 480px) {
    .slider-container {
        aspect-ratio: 1/1; /* 手機使用正方形比例 */
    }
    
    .slider-button {
        padding: 8px;
        font-size: 14px;
    }
}