/* 视频轮播组件样式 */
.video-carousel-container {
    max-width: 1400px !important; /* 增加容器宽度以容纳更多卡片 */
    margin: 0 auto;
    padding: 20px;
}

.video-carousel-header {
    text-align: center;
    margin-bottom: 30px;
}

.video-carousel-header h2 {
    font-size: 2.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.video-carousel-header p {
    font-size: 1.2rem;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
}

.video-carousel-wrapper {
    position: relative !important;
    overflow: visible !important;
    width: 100%;
    height: 320px;
    padding: 0 70px; /* 增加边距为导航按钮留出更多空间 */
    user-select: none;
    touch-action: pan-y;
}

.video-carousel-wrapper:active {
}

.video-carousel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px; /* 减小卡片间距以容纳更多卡片 */
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    width: max-content;
    min-width: 100%;
    padding: 0 20px; /* 减少内边距 */
    transform-origin: center center;
    pointer-events: auto;
}

.video-card {
    flex: 0 0 auto;
    width: 220px; /* 减小卡片宽度以容纳更多卡片 */
    background: white;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    opacity: 0.7;
    transform: scale(0.9);
    z-index: 1;
    pointer-events: auto;
    touch-action: pan-y;
}

.video-card:active {
}

.video-card:hover {
    transform: scale(0.95) translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
    opacity: 0.9;
}

.video-card.active {
    transform: scale(1);
    opacity: 1;
    z-index: 10;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.video-card.prev, .video-card.next {
    opacity: 0.8;
    transform: scale(0.95);
    z-index: 5;
}

/* 视频卡片滑动状态指示 */
.video-card.sliding {
    transition: all 0.2s ease;
    opacity: 0.9;
}

.video-card.sliding-left {
    transform: translateX(-20px) scale(0.95);
}

.video-card.sliding-right {
    transform: translateX(20px) scale(0.95);
}

.video-thumbnail {
    position: relative;
    height: 180px; /* 减小缩略图高度以适应更小的卡片 */
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.05);
}

.placeholder-thumbnail {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #f0f0f0 25%, transparent 25%), 
                linear-gradient(-45deg, #f0f0f0 25%, transparent 25%), 
                linear-gradient(45deg, transparent 75%, #f0f0f0 75%), 
                linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    text-align: center;
    padding: 20px;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px; /* 减小播放按钮尺寸 */
    height: 50px;
    background: rgba(239, 68, 68, 0.92);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
    /* border: 2px solid #007bff; */
    pointer-events: auto;
    z-index: 20;
    touch-action: manipulation;
}

.video-card:hover .play-button,
.video-card.active .play-button {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.video-card:hover .play-button:hover {
    background: white;
    transform: translate(-50%, -50%) scale(1.2);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.video-info {
    padding: 12px; /* 减小内边距 */
}

.video-info h3 {
    font-size: 1rem; /* 减小字体大小 */
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta {
    display: flex;
    align-items: center;
    gap: 8px; /* 减小间距 */
    font-size: 0.8rem; /* 减小字体大小 */
    color: #666;
}

.brand {
    background: #007bff;
    color: white;
    padding: 2px 6px; /* 减小内边距 */
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.75rem; /* 减小字体大小 */
}

.tags {
    color: #666;
    font-size: 0.75rem; /* 减小字体大小 */
}

/* 滑动控制按钮 - 增强版本 */
.carousel-nav {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 50px !important; /* 减小按钮尺寸 */
    height: 50px !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.95) 100%) !important;
    border: 2px solid rgba(0, 123, 255, 0.3) !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15) !important;
    z-index: 1000 !important;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    opacity: 1 !important;
    visibility: visible !important;
    backdrop-filter: blur(10px);
    pointer-events: auto !important;
    touch-action: manipulation;
}

.carousel-nav:hover {
    background: linear-gradient(135deg, white 0%, #f8f9fa 100%) !important;
    transform: translateY(-50%) scale(1.15) !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.25) !important;
    border-color: #007bff !important;
}

.carousel-nav:active {
    transform: translateY(-50%) scale(0.95) !important;
}

.carousel-nav.prev {
    left: 20px !important; /* 调整按钮位置 */
}

.carousel-nav.next {
    right: 20px !important; /* 调整按钮位置 */
}

.carousel-nav svg {
    width: 22px !important; /* 减小图标尺寸 */
    height: 22px !important;
    fill: #007bff !important;
    transition: all 0.3s ease !important;
}

.carousel-nav:hover svg {
    fill: #0056b3 !important;
    transform: scale(1.1);
}


/* 响应式设计 */
@media (max-width: 1200px) {
    .video-carousel-container {
        max-width: 1100px !important;
    }
    
    .video-card {
        width: 190px;
    }
    
    .video-thumbnail {
        height: 150px;
    }
    
    .video-carousel-wrapper {
        padding: 0 60px;
    }
}

@media (max-width: 992px) {
    .video-carousel-container {
        max-width: 900px !important;
    }
    
    .video-card {
        width: 160px;
    }
    
    .video-thumbnail {
        height: 130px;
    }
    
    .video-carousel-wrapper {
        padding: 0 50px;
    }
    
    .video-carousel {
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .video-card {
        width: 200px;
    }
    
    .video-card.active {
        width: 280px;
    }
    
    .video-carousel-wrapper {
        height: 260px;
    }
    
    .video-carousel-header h2 {
        font-size: 1.8rem;
    }
    
    .video-carousel {
        gap: 15px;
        padding: 0 50px;
    }
    
    .carousel-nav {
        width: 45px !important;
        height: 45px !important;
    }
    
    .carousel-nav svg {
        width: 22px !important;
        height: 22px !important;
    }
    
    .carousel-nav.prev {
        left: 15px !important;
    }
    
    .carousel-nav.next {
        right: 15px !important;
    }
}

@media (max-width: 576px) {
    .video-carousel-container {
        max-width: 100% !important;
        padding: 15px;
    }
    
    .video-card {
        width: 110px;
    }
    
    .video-thumbnail {
        height: 90px;
    }
    
    .video-carousel-wrapper {
        padding: 0 35px;
        height: 260px;
    }
    
    .video-carousel {
        gap: 8px;
    }
    
    .video-info {
        padding: 10px;
    }
    
    .video-info h3 {
        font-size: 0.8rem;
    }
    
    .video-meta {
        gap: 6px;
        font-size: 0.7rem;
    }
}

/* 移动端优化 */
@media (max-width: 480px) {
    .video-card {
        width: 95px;
    }
    
    .video-thumbnail {
        height: 80px;
    }
    
    .video-carousel-wrapper {
        padding: 0 30px;
        height: 240px;
    }
    
    .video-carousel {
        gap: 6px;
    }
    
    .play-button {
        width: 40px;
        height: 40px;
    }
    
    .carousel-nav {
        width: 40px !important;
        height: 40px !important;
    }
    
    .carousel-nav svg {
        width: 18px !important;
        height: 18px !important;
    }
}

/* 设备仿真模式特殊处理 */
@media (hover: none) and (pointer: coarse) {
    /* 触摸设备 */
    .carousel-nav {
        width: 60px !important;
        height: 60px !important;
    }
    
    .carousel-nav svg {
        width: 28px !important;
        height: 28px !important;
    }
    
    .video-card:hover {
        transform: scale(0.95);
    }
    
    .video-card:hover .play-button {
        opacity: 0;
    }
    
    .video-carousel-wrapper {
        cursor: pointer; /* 触摸设备使用指针手势 */
    }
    
    /* 触摸设备上的滑动提示 */
    .video-card::after {
        content: "←→ 在此处滑动";
        position: absolute;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0, 123, 255, 0.8);
        color: white;
        padding: 3px 10px;
        border-radius: 15px;
        font-size: 11px;
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
        z-index: 30;
    }
    
    .video-card:hover::after {
        opacity: 0.9;
    }
}

@media (hover: hover) and (pointer: fine) {
    /* 鼠标设备 */
    .video-card:hover .play-button {
        opacity: 1;
    }
    
    .video-carousel-wrapper {
    }
    
    .video-carousel-wrapper:active {
    }
    
    .video-card {
    }
    
    .video-card:active {
    }
}

/* 添加视觉提示 */
.video-carousel-wrapper::before {
    content: "↔ 滑动切换视频";
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 123, 255, 0.8);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 100;
}

.video-carousel-wrapper:hover::before {
    opacity: 0.8;
}

/* 在小屏幕上隐藏提示 */
@media (max-width: 768px) {
    .video-carousel-wrapper::before {
        display: none;
    }
}

/* 中心聚焦式视频画廊样式 */
.video-carousel-container {
    max-width: 1400px !important;
    margin: 0 auto;
    padding: 40px 20px;
}

.gallery-title {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 30px;
    background: linear-gradient(90deg, #60a5fa, #3b82f6, #1d4ed8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-align: center;
    letter-spacing: -0.5px;
}

.video-gallery {
    position: relative;
    width: 100%;
    max-width: 1400px;
    height: 500px;
    display: flex;
    align-items: center;
    overflow: hidden;
    margin-bottom: 28px;
}

.gallery-track {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    width: max-content;
}

.video-item {
    background: rgba(30, 41, 59, 0.92);
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
    /* border: 1px solid rgba(59, 130, 246, 0.25); */
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    flex-shrink: 0;
    cursor: pointer;
    position: relative;
}

.video-item:not(.focus):hover {
    z-index: 15 !important;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.5) !important;
    /* border-color: rgba(96, 165, 250, 0.7) !important; */
    opacity: 0.95 !important;
}

.video-item.focus {
    z-index: 20 !important;
    background: rgba(24, 36, 55, 0.96);
}

.thumbnail {
    width: 100%;
    background: linear-gradient(45deg, #4f46e5, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 42px;
    font-weight: bold;
    position: relative;
    overflow: hidden;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.placeholder-thumbnail {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #4f46e5, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: bold;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(239, 68, 68, 0.92);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 20;
    pointer-events: auto;
}

.video-item:hover .play-button,
.video-item.focus .play-button {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.video-item:hover .play-button:hover {
    background: white;
    transform: translate(-50%, -50%) scale(1.2);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.item-content {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.video-title {
    font-size: 15px;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 10px;
    height: 36px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.video-item.focus .video-title {
    font-size: 19px;
    color: #bfdbfe;
    height: auto;
    -webkit-line-clamp: unset;
}

.brand-tag {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    color: #93c5fd;
    font-weight: 600;
    background: rgba(15, 23, 42, 0.6);
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.controls {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 28px;
}

.nav-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.88);
    border: 2px solid rgba(59, 130, 246, 0.7);
    color: #60a5fa;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    user-select: none;
    touch-action: manipulation;
}

.nav-btn:hover {
    background: rgba(24, 36, 55, 0.95);
    transform: scale(1.15);
    color: #dbeafe;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .video-gallery {
        height: 450px;
    }
    
    .gallery-track {
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .video-gallery {
        height: 400px;
    }
    
    .gallery-track {
        gap: 18px;
    }
    
    .gallery-title {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    .video-gallery {
        height: 420px;
    }
    
    .gallery-track {
        gap: 16px;
    }
    
    .gallery-title {
        font-size: 28px;
        margin-bottom: 24px;
    }
    
    .video-item {
        border-radius: 15px;
    }
    
    .item-content {
        padding: 12px;
    }
    
    .video-title {
        font-size: 14px;
    }
    
    .video-item.focus .video-title {
        font-size: 17px;
    }
    
    .nav-btn {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
}

@media (max-width: 576px) {
    .video-carousel-container {
        padding: 30px 15px;
    }
    
    .gallery-title {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .video-gallery {
        height: 380px;
    }
    
    .gallery-track {
        gap: 12px;
    }
    
    .nav-btn {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .video-gallery {
        height: 350px;
    }
    
    .gallery-track {
        gap: 10px;
    }
    
    .video-item {
        border-radius: 12px;
    }
    
    .item-content {
        padding: 10px;
    }
    
    .video-title {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .video-item.focus .video-title {
        font-size: 16px;
    }
    
    .brand-tag {
        font-size: 12px;
        padding: 3px 8px;
    }
    
    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .video-item:hover .play-button {
        opacity: 0;
    }
    
    .nav-btn {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .video-item::after {
        content: "点击选择视频";
        position: absolute;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(59, 130, 246, 0.8);
        color: white;
        padding: 4px 12px;
        border-radius: 15px;
        font-size: 12px;
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
        z-index: 30;
    }
    
    .video-item:hover::after {
        opacity: 0.9;
    }
}

/* 鼠标设备优化 */
@media (hover: hover) and (pointer: fine) {
    .video-item:hover .play-button {
        opacity: 1;
    }
}

/* 加载状态 */
.video-carousel-container.loading .gallery-track {
    opacity: 0.7;
    pointer-events: none;
}

/* 空状态 */
.video-carousel-empty {
    text-align: center;
    padding: 60px 20px;
    background: rgba(241, 245, 249, 0.5);
    border-radius: 12px;
    margin: 20px;
}

.video-carousel-empty p {
    font-size: 18px;
    color: #64748b;
    margin: 0;
}
