/* ============================================
   Banner Animations CSS
   Banner入场动画和切换效果
   ============================================ */

/* Banner Overlay 默认遮罩层样式 */
.banner-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    background-color: var(--overlay-bg, #000000);
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    pointer-events: none;
}

/* Active 状态 - 使用 CSS 变量 */
.banner-overlay.active {
    opacity: var(--overlay-opacity, 0.3);
}

/* Banner Slide 基础样式 */
.banner-slide {
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    pointer-events: none;
}

.banner-slide.active {
    opacity: 1;
    pointer-events: auto;
}

/* Banner Content 容器 */
.banner-content-container {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.banner-content {
    position: absolute;
    left: var(--position-h, 50%);
    top: var(--position-v, 50%);
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1400px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.banner-content.active {
    position: absolute;
    opacity: 1;
    visibility: visible;
}

/* Banner 标题入场动画 */
.banner-title {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    color: #ffffff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.banner-content.active .banner-title {
    opacity: 1;
    transform: translateY(0);
}

/* Banner 副标题入场动画（延迟） */
.banner-subtitle {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.15s,
                transform 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.15s;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.banner-content.active .banner-subtitle {
    opacity: 1;
    transform: translateY(0);
}

/* Banner 按钮入场动画（更延迟） */
.banner-buttons {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.3s,
                transform 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
}

.banner-content.active .banner-buttons {
    opacity: 1;
    transform: translateY(0);
}

/* Banner 导航按钮 */
.banner-prev,
.banner-next {
    opacity: 0.7;
    transition: all 0.3s ease;
}

.banner-prev:hover,
.banner-next:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

/* Banner 指示器 */
.banner-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.banner-dot:hover {
    background: rgba(255, 255, 255, 0.7);
}

.banner-dot.active {
    background: white;
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* 视频加载指示器 */
.banner-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 15;
}

.banner-loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: banner-spin 1s linear infinite;
}

@keyframes banner-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Banner 切换时的淡出效果 */
.banner-content.exiting {
    opacity: 0;
    transform: translateY(-50%) scale(0.95);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .banner-title {
        font-size: 2rem;
        transform: translateY(30px);
    }
    
    .banner-subtitle {
        font-size: 1rem;
        transform: translateY(20px);
    }
    
    .banner-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .banner-buttons .btn {
        width: 100%;
        text-align: center;
    }
    
    .banner-prev,
    .banner-next {
        width: 40px;
        height: 40px;
    }
    
    .banner-dot {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .banner-title {
        font-size: 1.75rem;
    }
    
    .banner-subtitle {
        font-size: 0.875rem;
    }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    .banner-title,
    .banner-subtitle,
    .banner-buttons,
    .banner-slide,
    .banner-content {
        transition: opacity 0.3s ease;
        transform: none !important;
    }
    
    .banner-content.active .banner-title,
    .banner-content.active .banner-subtitle,
    .banner-content.active .banner-buttons {
        transform: none !important;
    }
}
