/**
 * 新功能樣式
 * NAS 儲存、微軟整合、私有分享等功能的專用樣式
 */

/* 新功能章節樣式 */
.new-features {
    padding: 4rem 2rem;
    background: var(--secondary-bg);
}

.new-features-container {
    max-width: 1200px;
    margin: 0 auto;
}

.new-feature-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #ff6b35, #ffd700);
    color: #000;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.new-features h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    background: linear-gradient(120deg, #2196F3, #64B5F6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.new-feature-card {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

.new-feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.new-feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #2196F3, #64B5F6);
    border-radius: 16px;
    font-size: 2rem;
    color: white;
    flex-shrink: 0;
}

.new-feature-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.new-feature-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .new-feature-card {
        flex-direction: column;
        text-align: center;
    }
}

/**
 * 影片輪播區樣式
 * 全圖片卡片設計，帶3D效果和選中狀態
 */

/* 影片輪播區樣式 */
.video-carousel-section {
    padding: 4rem 2rem;
    background: var(--secondary-bg);
}

.carousel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.carousel-header h2 {
    font-size: 2.5rem;
    background: linear-gradient(120deg, #2196F3, #64B5F6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* 一體化切換按鈕容器 */
.carousel-tabs {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 4px;
    gap: 0;
    position: relative;
    overflow: hidden;
}

/* 切換按鈕樣式 - 融為一體 */
.carousel-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
    white-space: nowrap;
    min-width: 120px;
}

.carousel-tab:hover:not(.active) {
    color: rgba(255, 255, 255, 0.8);
}

/* 選中狀態 - 滑動背景效果 */
.carousel-tab.active {
    background: linear-gradient(135deg, #2196F3, #64B5F6);
    color: white;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.4);
    z-index: 2;
}

/* 選中狀態的圖標和文字 */
.carousel-tab.active i {
    color: white;
}

/* 未選中狀態的圖標 */
.carousel-tab:not(.active) i {
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.3s ease;
}

.carousel-tab:not(.active):hover i {
    color: rgba(255, 255, 255, 0.9);
}

/* 自動輪播切換按鈕 */
.carousel-auto-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.carousel-auto-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.carousel-auto-toggle.active {
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    border-color: #4CAF50;
    color: white;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.carousel-auto-toggle.active:hover {
    background: linear-gradient(135deg, #43A047, #5CB660);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
}

.carousel-auto-toggle i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.carousel-auto-toggle:hover i {
    transform: scale(1.1);
}

.carousel-container {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
}

.carousel-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}

/* 3D容器 - 添加透視效果 */
.carousel-content {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 2rem 1rem;
    perspective: 1000px;
    transform-style: preserve-3d;
}

.carousel-content::-webkit-scrollbar {
    display: none;
}

.carousel-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
    gap: 1rem;
}

.carousel-loading i {
    font-size: 2rem;
    color: var(--accent-color);
}

/* 全圖片卡片樣式 */
.carousel-item {
    flex: 0 0 320px;
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    transform-style: preserve-3d;
    transform: translateZ(0) scale(1);
    opacity: 1;
}

/* 未選中狀態 - 透明效果 */
.carousel-item:not(.selected) {
    opacity: 0.4;
    transform: translateZ(-10px) scale(0.95);
    filter: blur(1px);
}

/* 選中狀態 - 放大和3D效果 */
.carousel-item.selected {
    opacity: 1;
    transform: translateZ(20px) scale(1.15) rotateY(-5deg);
    border-color: rgba(33, 150, 243, 0.8);
    box-shadow: 0 20px 40px rgba(33, 150, 243, 0.4),
                0 0 30px rgba(33, 150, 243, 0.3),
                inset 0 0 20px rgba(33, 150, 243, 0.1);
    z-index: 10;
    filter: blur(0);
}

/* 懸停效果 */
.carousel-item:hover:not(.selected) {
    opacity: 0.7;
    transform: translateZ(5px) scale(1.02);
    filter: blur(0.5px);
}

.carousel-item.selected:hover {
    transform: translateZ(25px) scale(1.18) rotateY(-7deg);
    box-shadow: 0 25px 50px rgba(33, 150, 243, 0.5),
                0 0 40px rgba(33, 150, 243, 0.4),
                inset 0 0 25px rgba(33, 150, 243, 0.15);
}

/* 圖片樣式 - 全圖片覆蓋 */
.carousel-item-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-item.selected .carousel-item-image {
    transform: scale(1.05);
}

/* 文字覆蓋層 - 絕對定位在底部 */
.carousel-item-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, 
        rgba(0, 0, 0, 0.9) 0%, 
        rgba(0, 0, 0, 0.7) 50%, 
        rgba(0, 0, 0, 0) 100%);
    transform: translateZ(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-item.selected .carousel-item-info {
    padding: 2rem;
    background: linear-gradient(to top, 
        rgba(0, 0, 0, 0.95) 0%, 
        rgba(0, 0, 0, 0.8) 50%, 
        rgba(0, 0, 0, 0) 100%);
}

.carousel-item-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: all 0.4s ease;
}

.carousel-item.selected .carousel-item-title {
    font-size: 1.25rem;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 1),
                 0 0 20px rgba(33, 150, 243, 0.5);
}

.carousel-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.carousel-item.selected .carousel-item-meta {
    font-size: 0.95rem;
    color: #fff;
}

/* 選中標記 - 複製連結按鈕 */
.carousel-item.selected .carousel-copy-link-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #2196F3, #64B5F6);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.6);
    z-index: 25;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.carousel-item.selected .carousel-copy-link-btn:hover {
    background: linear-gradient(135deg, #1976D2, #0288D1);
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(33, 150, 243, 0.8);
}

.carousel-item.selected .carousel-copy-link-btn:active {
    transform: scale(0.95);
}

.carousel-item:not(.selected) .carousel-copy-link-btn {
    display: none;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(33, 150, 243, 0.6);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 6px 20px rgba(33, 150, 243, 0.9);
        transform: scale(1.1);
    }
}

/* 導航按鈕 */
.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(33, 150, 243, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
    backdrop-filter: blur(10px);
}

.carousel-nav-btn:hover {
    background: rgba(33, 150, 243, 1);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 16px rgba(33, 150, 243, 0.6);
}

.carousel-nav-btn.prev-btn {
    left: -25px;
}

.carousel-nav-btn.next-btn {
    right: -25px;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .carousel-nav-btn {
        display: none;
    }

    .carousel-header {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
    }

    .carousel-tabs {
        width: 100%;
        max-width: 100%;
    }

    .carousel-tab {
        flex: 1;
        justify-content: center;
        min-width: auto;
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .carousel-tab i {
        font-size: 0.85rem;
    }

    .carousel-auto-toggle {
        width: 100%;
        justify-content: center;
    }

    .carousel-auto-toggle span {
        display: none;
    }

    .carousel-auto-toggle {
        width: 45px;
        height: 45px;
        padding: 0;
        border-radius: 50%;
        justify-content: center;
    }

    .carousel-item {
        flex: 0 0 280px;
    }

    .carousel-item.selected {
        transform: translateZ(15px) scale(1.1) rotateY(-3deg);
    }

    .carousel-content {
        perspective: 800px;
    }
}