/* 平滑滚动和锚点样式 */
html {
    scroll-behavior: smooth;
}

/* 锚点偏移量，避免被固定导航栏遮挡 */
section[id] {
    scroll-margin-top: 80px;
}

/* 移动端锚点偏移量调整 */
@media (max-width: 768px) {
    section[id] {
        scroll-margin-top: 70px;
    }
}

/* 自定义动画和过渡效果 */
.gradient-text {
    background: linear-gradient(135deg, #3182ce, #2b6cb0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Enhanced Spiderking图标样式 */
.spider-icon {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 3px 8px rgba(37, 99, 235, 0.25)) drop-shadow(0 1px 3px rgba(30, 64, 175, 0.3));
    transform-origin: center;
    will-change: transform, filter;
}

.spider-icon:hover {
    transform: scale(1.12) rotate(6deg);
    filter: drop-shadow(0 8px 16px rgba(37, 99, 235, 0.4)) 
            drop-shadow(0 4px 8px rgba(124, 58, 237, 0.3)) 
            drop-shadow(0 0 12px rgba(252, 211, 77, 0.4));
}

/* Logo容器悬停效果 */
.flex-shrink-0:hover .spider-icon {
    animation: enhancedSpiderDance 1s ease-in-out;
}

/* 增强的蜘蛛舞蹈动画 */
@keyframes enhancedSpiderDance {
    0% { 
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 3px 8px rgba(37, 99, 235, 0.25)) drop-shadow(0 1px 3px rgba(30, 64, 175, 0.3));
    }
    20% { 
        transform: scale(1.08) rotate(-4deg);
        filter: drop-shadow(0 5px 10px rgba(37, 99, 235, 0.35)) 
                drop-shadow(0 2px 6px rgba(124, 58, 237, 0.25)) 
                drop-shadow(0 0 8px rgba(252, 211, 77, 0.3));
    }
    40% { 
        transform: scale(1.15) rotate(4deg);
        filter: drop-shadow(0 8px 16px rgba(37, 99, 235, 0.45)) 
                drop-shadow(0 4px 8px rgba(124, 58, 237, 0.35)) 
                drop-shadow(0 0 14px rgba(252, 211, 77, 0.5));
    }
    60% { 
        transform: scale(1.1) rotate(-2deg);
        filter: drop-shadow(0 6px 12px rgba(37, 99, 235, 0.4)) 
                drop-shadow(0 3px 6px rgba(124, 58, 237, 0.3)) 
                drop-shadow(0 0 10px rgba(252, 211, 77, 0.4));
    }
    80% { 
        transform: scale(1.05) rotate(1deg);
        filter: drop-shadow(0 4px 8px rgba(37, 99, 235, 0.3)) 
                drop-shadow(0 2px 4px rgba(124, 58, 237, 0.2)) 
                drop-shadow(0 0 6px rgba(252, 211, 77, 0.3));
    }
    100% { 
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 3px 8px rgba(37, 99, 235, 0.25)) drop-shadow(0 1px 3px rgba(30, 64, 175, 0.3));
    }
}

/* 增强的响应式适配 */
@media (max-width: 768px) {
    .spider-icon {
        width: 30px;
        height: 30px;
        filter: drop-shadow(0 2px 6px rgba(37, 99, 235, 0.3)) drop-shadow(0 1px 2px rgba(30, 64, 175, 0.4));
    }
    
    .spider-icon:hover {
        transform: scale(1.08) rotate(4deg);
        filter: drop-shadow(0 4px 8px rgba(37, 99, 235, 0.4)) 
                drop-shadow(0 2px 4px rgba(124, 58, 237, 0.3)) 
                drop-shadow(0 0 6px rgba(252, 211, 77, 0.4));
    }
    
    /* 移动端优化动画 */
    @keyframes enhancedSpiderDance {
        0% { 
            transform: scale(1) rotate(0deg);
            filter: drop-shadow(0 2px 6px rgba(37, 99, 235, 0.3)) drop-shadow(0 1px 2px rgba(30, 64, 175, 0.4));
        }
        30% { 
            transform: scale(1.06) rotate(-2deg);
            filter: drop-shadow(0 3px 8px rgba(37, 99, 235, 0.4)) 
                    drop-shadow(0 2px 4px rgba(124, 58, 237, 0.3)) 
                    drop-shadow(0 0 6px rgba(252, 211, 77, 0.4));
        }
        60% { 
            transform: scale(1.1) rotate(2deg);
            filter: drop-shadow(0 4px 10px rgba(37, 99, 235, 0.45)) 
                    drop-shadow(0 3px 6px rgba(124, 58, 237, 0.35)) 
                    drop-shadow(0 0 8px rgba(252, 211, 77, 0.5));
        }
        100% { 
            transform: scale(1) rotate(0deg);
            filter: drop-shadow(0 2px 6px rgba(37, 99, 235, 0.3)) drop-shadow(0 1px 2px rgba(30, 64, 175, 0.4));
        }
    }
}

@media (max-width: 480px) {
    .spider-icon {
        width: 26px;
        height: 26px;
        filter: drop-shadow(0 1px 4px rgba(37, 99, 235, 0.35)) drop-shadow(0 0 2px rgba(30, 64, 175, 0.5));
    }
    
    .spider-icon:hover {
        transform: scale(1.05) rotate(3deg);
        filter: drop-shadow(0 2px 6px rgba(37, 99, 235, 0.4)) 
                drop-shadow(0 1px 3px rgba(124, 58, 237, 0.3)) 
                drop-shadow(0 0 4px rgba(252, 211, 77, 0.4));
    }
}

/* 增强的脉冲效果 */
@keyframes enhancedCrownPulse {
    0%, 100% { 
        opacity: 0.95; 
        transform: scale(1);
    }
    50% { 
        opacity: 1; 
        transform: scale(1.02);
    }
}

/* 为中心宝石添加增强脉冲效果 */
.spider-icon circle[fill*="crownGradient"] {
    animation: enhancedCrownPulse 2.5s ease-in-out infinite;
    transform-origin: center;
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .spider-icon:hover {
        transform: scale(1.05);
        filter: drop-shadow(0 3px 8px rgba(37, 99, 235, 0.4)) 
                drop-shadow(0 1px 4px rgba(124, 58, 237, 0.3)) 
                drop-shadow(0 0 6px rgba(252, 211, 77, 0.4));
    }
    
    .flex-shrink-0:hover .spider-icon {
        animation: none;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .spider-icon {
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8)) contrast(1.2);
    }
}

/* 减少动画偏好支持 */
@media (prefers-reduced-motion: reduce) {
    .spider-icon {
        transition: transform 0.2s ease;
    }
    
    .spider-icon:hover {
        transform: scale(1.05);
    }
    
    .flex-shrink-0:hover .spider-icon {
        animation: none;
    }
    
    .spider-icon circle[fill*="crownGradient"] {
        animation: none;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .spider-icon {
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    }
}

/* 减少动画偏好支持 */
@media (prefers-reduced-motion: reduce) {
    .spider-icon {
        transition: none;
    }
    
    .spider-icon circle[fill*="crownGradient"] {
        animation: none;
    }
    
    .flex-shrink-0:hover .spider-icon {
        animation: none;
        transform: scale(1.05);
    }
}

/* 视频播放器样式 */
.video-player-container {
    position: relative;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #1f2937, #374151);
}

.video-player-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 播放控制栏样式 */
.video-controls {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-player-container:hover .video-controls {
    opacity: 1;
}

.video-controls.show {
    opacity: 1;
}

/* 进度条样式 */
.progress-bar:hover .progress-handle {
    opacity: 1;
}

.progress-bar:hover {
    height: 6px;
    transition: height 0.2s ease;
}

.progress-fill {
    transition: width 0.1s ease;
}

/* 音量滑块样式 */
.volume-slider {
    background: linear-gradient(to right, #3b82f6 0%, #3b82f6 100%, rgba(255,255,255,0.2) 100%);
}

.volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}



/* 播放覆盖层样式 */
.play-overlay {
    transition: opacity 0.3s ease;
}

.play-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.play-button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.play-button:hover {
    transform: scale(1.1);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.4);
}

/* 加载指示器样式 */
.loading-indicator.show {
    display: flex !important;
}

/* 全屏模式样式 */
.video-player-container:fullscreen {
    background: black;
}

.video-player-container:fullscreen .video-controls {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-player-container:fullscreen:hover .video-controls,
.video-player-container:fullscreen .video-controls.show {
    opacity: 1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .video-controls {
        padding: 12px;
    }
    
    .video-controls .flex {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .volume-slider-container {
        display: none !important;
    }
    
    .time-display {
        font-size: 12px;
    }
    

    
    .play-button {
        padding: 16px;
    }
    
    .play-button svg {
        width: 32px;
        height: 32px;
    }
}

/* FAQ / 帮助中心样式 */
#help {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

/* FAQ 分类按钮 */
.faq-category-btn {
    padding: 12px 24px;
    border: 2px solid #e2e8f0;
    background: white;
    color: #64748b;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 14px;
}

.faq-category-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.faq-category-btn.active {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border-color: #3b82f6;
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* FAQ 项目 */
.faq-item {
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateY(0);
}

.faq-item.hidden {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    height: 0;
    overflow: hidden;
    margin: 0;
}

.faq-question {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.faq-question::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.5s ease;
}

.faq-question:hover::before {
    left: 100%;
}

.faq-question:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.faq-question.active {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-color: transparent;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
}

.faq-question.active h3 {
    color: white;
}

.faq-question.active .faq-icon {
    color: white;
    transform: rotate(180deg);
}

/* FAQ 答案 */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    opacity: 0;
}

.faq-answer.show {
    max-height: 1000px;
    opacity: 1;
}

.faq-answer .text-gray-600 {
    animation: fadeInUp 0.5s ease forwards;
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        max-height: 0;
        opacity: 0;
    }
    to {
        max-height: 1000px;
        opacity: 1;
    }
}

/* FAQ 图标旋转动画 */
.faq-icon {
    transition: transform 0.3s ease;
}

/* 联系客服区域 */
.faq-contact-section {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    position: relative;
    overflow: hidden;
}

.faq-contact-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* FAQ 间距优化 */
.faq-question {
    padding: 16px 24px !important; /* 减少垂直padding从24px到16px */
}

.faq-answer {
    padding-left: 24px !important;
    padding-right: 24px !important;
    padding-bottom: 16px !important; /* 减少底部padding从24px到16px */
}

/* 响应式设计 - FAQ */
@media (max-width: 768px) {
    .faq-category-btn {
        padding: 10px 16px;
        font-size: 12px;
    }
    
    .faq-question {
        padding: 12px 16px !important; /* 移动端进一步减少padding */
    }
    
    .faq-question h3 {
        font-size: 16px;
    }
    
    .faq-answer {
        padding-left: 16px !important;
        padding-right: 16px !important;
        padding-bottom: 12px !important; /* 移动端减少底部padding */
    }
    
    #help .text-3xl {
        font-size: 24px;
    }
    
    #help .text-xl {
        font-size: 16px;
    }
}

@media (max-width: 640px) {
    .faq-category-btn {
        padding: 8px 12px;
        font-size: 11px;
    }
    
    .flex-wrap.justify-center {
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .video-controls {
        padding: 8px;
    }
    
    .progress-container {
        margin-bottom: 8px;
    }
    
    .play-pause-btn svg {
        width: 24px;
        height: 24px;
    }
    
    .volume-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .fullscreen-btn svg {
        width: 20px;
        height: 20px;
    }
}

/* 增强的卡片悬停效果 */
.card-hover {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.card-hover:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.card-hover:hover::before {
    left: 100%;
}

.card-hover:hover .feature-icon {
    transform: scale(1.2) rotate(5deg);
    color: #3182ce;
}

.btn-gradient {
    background: linear-gradient(135deg, #3182ce, #2b6cb0);
    transition: all 0.3s ease;
}

.btn-gradient:hover {
    background: linear-gradient(135deg, #2b6cb0, #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(49, 130, 206, 0.3);
}

.hero-bg {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
}

.feature-icon {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Tab 切换样式 */
.tab-content {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.tab-button {
    transition: all 0.3s ease;
    position: relative;
}

.tab-button::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(135deg, #3182ce, #2b6cb0);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.tab-button.active::after {
    width: 100%;
}

.tab-button:hover {
    color: #3182ce;
    transform: translateY(-2px);
}

/* SVG 图标动画 */
.icon-animate {
    transition: all 0.3s ease;
}

.icon-animate:hover {
    transform: scale(1.1) rotate(5deg);
}

/* 响应式导航菜单 */
.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-menu.active {
    max-height: 500px;
}

/* 脉冲动画 */
.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* 更多功能卡片增强动画 */
.more-features-card {
    transition: all 0.3s ease-in-out;
    position: relative;
    overflow: hidden;
}

.more-features-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.icon-container-hover {
    transition: all 0.3s ease-in-out;
    position: relative;
    overflow: hidden;
}

.icon-container-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1), rgba(255,255,255,0.3));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

.more-features-card:hover .icon-container-hover {
    transform: scale(1.1) rotate(5deg);
}

.more-features-card:hover .icon-container-hover::before {
    opacity: 1;
}

.more-features-card:hover .icon-container-hover.bg-thunder-orange {
    background-color: #f56500 !important;
}

.more-features-card:hover .icon-container-hover.bg-purple-100 {
    background-color: #9f7aea !important;
}

.more-features-card:hover .icon-container-hover.bg-green-100 {
    background-color: #48bb78 !important;
}

.more-features-card:hover .icon-container-hover.bg-blue-100 {
    background-color: #4299e1 !important;
}

.more-features-card:hover .icon-container-hover.bg-thunder-green {
    background-color: #38a169 !important;
}

.icon-bounce {
    transition: all 0.3s ease-in-out;
}

.more-features-card:hover .icon-bounce {
    transform: scale(1.2) rotate(15deg);
    filter: brightness(1.2);
}

/* 卡片内容动画 */
.more-features-card .card-content {
    transition: all 0.3s ease-in-out;
}

.more-features-card:hover .card-content {
    transform: translateY(-2px);
}

/* 标签动画 */
.more-features-card .feature-tag {
    transition: all 0.2s ease-in-out;
}

.more-features-card:hover .feature-tag {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 应用场景卡片动画 */
.scenario-card {
    transition: all 0.3s ease-in-out;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.scenario-card:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.scenario-card:active {
    transform: translateY(-6px) scale(0.98);
    transition: all 0.1s ease-in-out;
}

/* 应用场景卡片图标动画 */
.scenario-icon-container {
    transition: all 0.3s ease-in-out;
}

.scenario-card:hover .scenario-icon-container {
    transform: scale(1.1) rotate(5deg);
}

.scenario-icon {
    transition: all 0.3s ease-in-out;
}

.scenario-card:hover .scenario-icon {
    transform: scale(1.1);
    filter: brightness(1.2);
}

/* 不同颜色主题的图标容器悬停效果 */
.scenario-card:hover .scenario-icon-container.bg-blue-100 {
    background-color: #3b82f6 !important;
}

.scenario-card:hover .scenario-icon-container.bg-green-100 {
    background-color: #10b981 !important;
}

.scenario-card:hover .scenario-icon-container.bg-purple-100 {
    background-color: #8b5cf6 !important;
}

.scenario-card:hover .scenario-icon-container.bg-orange-100 {
    background-color: #f97316 !important;
}

.scenario-card:hover .scenario-icon-container.bg-teal-100 {
    background-color: #14b8a6 !important;
}

.scenario-card:hover .scenario-icon-container.bg-indigo-100 {
    background-color: #6366f1 !important;
}

.scenario-card:hover .scenario-icon-container.bg-pink-100 {
    background-color: #ec4899 !important;
}

.scenario-card:hover .scenario-icon-container.bg-yellow-100 {
    background-color: #eab308 !important;
}

.scenario-card:hover .scenario-icon-container.bg-cyan-100 {
    background-color: #06b6d4 !important;
}

.scenario-card:hover .scenario-icon-container.bg-red-100 {
    background-color: #ef4444 !important;
}

.scenario-card:hover .scenario-icon-container.bg-emerald-100 {
    background-color: #10b981 !important;
}

.scenario-card:hover .scenario-icon-container.bg-violet-100 {
    background-color: #8b5cf6 !important;
}

/* 应用场景卡片图标颜色变化 */
.scenario-card:hover .scenario-icon-container.bg-blue-100 .scenario-icon {
    color: white !important;
}

.scenario-card:hover .scenario-icon-container.bg-green-100 .scenario-icon {
    color: white !important;
}

.scenario-card:hover .scenario-icon-container.bg-purple-100 .scenario-icon {
    color: white !important;
}

.scenario-card:hover .scenario-icon-container.bg-orange-100 .scenario-icon {
    color: white !important;
}

.scenario-card:hover .scenario-icon-container.bg-teal-100 .scenario-icon {
    color: white !important;
}

.scenario-card:hover .scenario-icon-container.bg-indigo-100 .scenario-icon {
    color: white !important;
}

.scenario-card:hover .scenario-icon-container.bg-pink-100 .scenario-icon {
    color: white !important;
}

.scenario-card:hover .scenario-icon-container.bg-yellow-100 .scenario-icon {
    color: white !important;
}

.scenario-card:hover .scenario-icon-container.bg-cyan-100 .scenario-icon {
    color: white !important;
}

.scenario-card:hover .scenario-icon-container.bg-red-100 .scenario-icon {
    color: white !important;
}

.scenario-card:hover .scenario-icon-container.bg-emerald-100 .scenario-icon {
    color: white !important;
}

.scenario-card:hover .scenario-icon-container.bg-violet-100 .scenario-icon {
    color: white !important;
}

/* 应用场景卡片内容动画 */
.scenario-content {
    transition: all 0.3s ease-in-out;
}

.scenario-card:hover .scenario-content {
    transform: translateY(-2px);
}

/* 移动设备优化 */
@media (max-width: 768px) {
    .scenario-card:hover {
        transform: translateY(-4px) scale(1.02);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }
    
    .scenario-card:active {
        transform: translateY(-2px) scale(0.99);
    }
}

/* ===== 视频模态弹框样式 ===== */

/* 模态弹框基础样式 */
.video-modal {
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease-out;
}

.video-modal.hidden {
    display: none !important;
}

.video-modal.closing {
    animation: fadeOut 0.3s ease-in;
}

/* 背景遮罩层 */
.modal-overlay {
    cursor: pointer;
}

/* 模态内容容器 */
.modal-content {
    animation: modalSlideIn 0.3s ease-out;
    max-height: 95vh;
    overflow: hidden;
    /* 确保内容有足够的内边距，避免贴边 */
    margin: 2rem;
    /* 添加滚动支持，防止内容被截断 */
    overflow-y: auto;
}

.video-modal.closing .modal-content {
    animation: modalSlideOut 0.3s ease-in;
}

/* 关闭按钮样式 */
.modal-close {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 60;
    /* 确保关闭按钮始终在视口内 */
    top: 12px;
    right: 12px;
    position: fixed;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.9) 100%);
    backdrop-filter: blur(12px);
    border: 2px solid rgba(79, 70, 229, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.1);
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    transform: scale(1.05) rotate(90deg);
    box-shadow: 0 8px 30px rgba(79, 70, 229, 0.25), 0 4px 12px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(248, 250, 252, 0.95) 100%);
    border-color: rgba(79, 70, 229, 0.4);
}

.modal-close:active {
    transform: scale(0.95) rotate(90deg);
    transition: all 0.1s ease;
}

/* 视频播放器容器样式 */
.video-modal .video-player-container {
    position: relative;
    aspect-ratio: 16/9;
    /* 确保视频容器不会占用过多空间 */
    max-height: 70vh;
    flex-shrink: 1;
}

.video-modal .video-player-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 视频描述区域样式优化 */
.video-modal .modal-content > div:last-child {
    /* 确保描述区域始终可见 */
    flex-shrink: 0;
    min-height: fit-content;
}

/* 模态内容使用flex布局确保合理分配空间 */
.video-modal .modal-content {
    display: flex;
    flex-direction: column;
}

/* 自定义控制栏样式 */
.video-modal .video-controls {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-modal .video-player-container:hover .video-controls {
    opacity: 1;
}

/* 进度条样式 */
.video-modal .progress-bar:hover .progress-handle {
    opacity: 1;
}

/* 播放按钮覆盖层 */
.video-modal .play-overlay {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.video-modal .play-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* 加载指示器 */
.video-modal .loading-indicator {
    z-index: 10;
}

/* 动画关键帧 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes modalSlideOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .modal-content {
        max-width: 90%;
    }
}

@media (max-width: 768px) {
    .modal-content {
        max-width: 95%;
        margin: 1rem;
        max-height: 90vh;
        /* 确保在移动端有足够的滚动空间 */
        overflow-y: auto;
    }
    
    .modal-close {
        /* 移动端关闭按钮位置调整 */
        top: 1rem;
        right: 1rem;
        padding: 0.75rem;
        /* 增大移动端点击区域 */
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .modal-close svg {
        width: 1.5rem;
        height: 1.5rem;
    }
    
    /* 移动端视频控制栏调整 */
    .video-modal .video-controls {
        padding: 0.75rem;
    }
    
    .video-modal .video-controls .flex {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .video-modal .time-display {
        font-size: 0.75rem;
    }
    
    .video-modal .play-pause-btn svg {
        width: 1.5rem;
        height: 1.5rem;
    }
    
    .video-modal .volume-control {
        display: none;
    }
    

}

@media (max-width: 480px) {
    .modal-content {
        max-width: 98%;
        margin: 0.5rem;
        border-radius: 1rem;
        /* 小屏幕设备优化高度 */
        max-height: 95vh;
        /* 确保内容可以滚动 */
        overflow-y: auto;
    }
    
    .video-modal .video-player-container {
        border-radius: 1rem;
        /* 确保视频容器不会过高 */
        max-height: 60vh;
    }
    
    /* 移动端全屏样式 */
    .video-modal .modal-content {
        max-height: 95vh;
    }
    
    .video-modal .video-controls {
        padding: 0.5rem;
        /* 确保控制栏在小屏幕上可见 */
        position: relative;
        background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 50%, transparent 100%);
    }
    
    .video-modal .progress-container {
        margin-bottom: 0.5rem;
    }
    
    /* 视频描述区域调整 - 确保完整显示 */
    .video-modal .modal-content > div:last-child {
        padding: 1.5rem 1rem;
        /* 确保描述区域有足够空间 */
        min-height: auto;
        flex-shrink: 0;
    }
    
    .video-modal .modal-content h3 {
        font-size: 1.125rem;
        line-height: 1.4;
        margin-bottom: 0.75rem;
    }
    
    .video-modal .modal-content p {
        font-size: 0.875rem;
        line-height: 1.5;
        /* 确保文本不会被截断 */
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* 关闭按钮在小屏幕上的优化 */
    .modal-close {
        top: 1rem;
        right: 1rem;
        width: 56px;
        height: 56px;
        border-width: 2.5px;
    }
    
    .modal-close svg {
        width: 2rem;
        height: 2rem;
    }
}

/* 防止页面滚动 */
body.modal-open {
    overflow: hidden;
    padding-right: 15px; /* 防止滚动条消失导致的页面跳动 */
}

/* 高对比度和可访问性 */
@media (prefers-reduced-motion: reduce) {
    .video-modal,
    .modal-content,
    .modal-close {
        animation: none !important;
        transition: none !important;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .modal-close {
        background-color: #374151;
        color: #f9fafb;
    }
    
    .modal-close:hover {
        background-color: #4b5563;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .video-modal .video-controls {
        opacity: 1;
    }
    
    .modal-close {
        padding: 0.75rem;
    }
    
    .video-modal .play-pause-btn,
    .video-modal .volume-btn,
    .video-modal .fullscreen-btn {
        padding: 0.5rem;
        min-width: 44px;
        min-height: 44px;
    }
}

/* 键盘导航支持 */
.modal-close:focus,
.video-modal button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}



/* 音量滑块样式 */
.video-modal .volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.video-modal .volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 进度条拖拽样式 */
.video-modal .progress-bar {
    cursor: pointer;
}

.video-modal .progress-handle {
    cursor: grab;
}

.video-modal .progress-handle:active {
    cursor: grabbing;
    transform: translate(-50%, -50%) scale(1.2);
}

/* 全屏模式下的样式调整 */
.video-modal:-webkit-full-screen .modal-content {
    max-width: 100%;
    max-height: 100%;
    margin: 0;
    border-radius: 0;
}

.video-modal:-moz-full-screen .modal-content {
    max-width: 100%;
    max-height: 100%;
    margin: 0;
    border-radius: 0;
}

.video-modal:fullscreen .modal-content {
    max-width: 100%;
    max-height: 100%;
    margin: 0;
    border-radius: 0;
}

/* 语言切换下拉菜单样式 */
.language-switcher {
    position: relative;
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    min-width: 120px;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.language-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-dropdown button {
    display: block;
    width: 100%;
    padding: 8px 16px;
    text-align: left;
    color: #374151;
    font-size: 14px;
    border: none;
    background: none;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

.language-dropdown button:hover {
    background-color: #f3f4f6;
}

.language-dropdown button:first-child {
    border-radius: 8px 8px 0 0;
}

.language-dropdown button:last-child {
    border-radius: 0 0 8px 8px;
}

.language-dropdown button:only-child {
    border-radius: 8px;
}

/* 语言切换按钮样式 */
.language-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.language-toggle:hover {
    background-color: #f9fafb;
    border-color: #d1d5db;
}

.language-toggle svg {
    width: 16px;
    height: 16px;
    color: #6b7280;
}

/* 移动端语言切换样式 */
@media (max-width: 768px) {
    .mobile-language-switcher {
        border-top: 1px solid #e5e7eb;
        padding-top: 16px;
        margin-top: 16px;
    }
    
    .mobile-language-switcher .language-option {
        display: block;
        width: 100%;
        padding: 12px 16px;
        text-align: left;
        color: #374151;
        font-size: 16px;
        font-weight: 500;
        border: none;
        background: none;
        cursor: pointer;
        transition: background-color 0.15s ease-in-out;
    }
    
    .mobile-language-switcher .language-option:hover {
        background-color: #f3f4f6;
    }
}