/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 浅色主题 */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --accent-primary: #3b82f6;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #3b82f6, #8b5cf6);
    --blue-skies: linear-gradient(to right, rgb(86, 204, 242), rgb(47, 128, 237));
    --roseanna: linear-gradient(to right, rgb(255, 175, 189), rgb(255, 195, 160));
    /* --radar: linear-gradient(to right, rgb(167, 112, 239), rgb(207, 139, 243), rgb(253, 185, 155)); */
    /* --radar: linear-gradient(to right, rgb(252, 0, 255), rgb(0, 219, 222)); */
    --jshine: linear-gradient(to right, rgb(18, 194, 233), rgb(196, 113, 237), rgb(246, 79, 89));
    --piggy-pink: linear-gradient(to right, rgb(238, 156, 167), rgb(255, 221, 225));
    --azur-lane: linear-gradient(to right, rgb(127, 127, 213), rgb(134, 168, 231), rgb(145, 234, 228));
    --magic: linear-gradient(to right, rgb(89, 193, 115), rgb(161, 127, 224), rgb(93, 38, 193));
    --moon-purple: linear-gradient(to right, rgb(78, 84, 200), rgb(143, 148, 251));
    --slight-ocean: linear-gradient(to right, rgb(168, 192, 255), rgb(63, 43, 150));
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Dark theme removed - only light mode supported */
/* [data-theme="dark"] { ... } */
/* @media (prefers-color-scheme: dark) { ... } */

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Fix for anchor links with fixed navbar */
section {
    scroll-margin-top: 90px; /* navbar height (70px) + extra padding (20px) */
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 60px;
}

/* Theme toggle removed - only light mode supported */



/* 视频对比的核心样式 */
.videoMerge {
    position: relative;
    top: 0;
    left: 0;
    z-index: 10;
    width: 100%; /* 确保填满父容器 */
    height: auto;
    display: block;
    margin: 0 auto;
    background-size: cover;
    cursor: cell; /* 鼠标放上去显示特定图标，可选 col-resize */
}

/* 确保原始视频不占位 */
.video {
    width: 100%;
    /* height 由 JS 控制设为 0 */
}



/* =========================================
   新增/修改的样式：Teaser 和 宽度对齐
   ========================================= */

/* 1. Teaser 视频的留白处理 */
.hero-body {
    padding: 40px; /* 增加四周留白 */
    background: var(--bg-tertiary); /* 保持背景色 */
    border-radius: 20px;
}
#teaser {
    width: 100%;
    height: auto;
    border-radius: 12px; /* 视频本身的圆角 */
    box-shadow: var(--shadow-md);
}

/* 2. 让 Results 区域宽度对齐 Abstract/Pipeline */
.results-list {
    max-width: 900px; /* 从 1200px 缩小到 900px，与 abstract-content 保持一致 */
    margin: 0 auto;
    width: 100%;
}

.result-item {
    width: 100%;
    margin: 0;
    /* 移除之前的固定宽度限制，让它填满 results-list */
}

/* 3. 视频容器填满 Result Item */
.result-video-small {
    width: 100%; /* 填满父容器 */
    max-width: 100%; /* 移除之前的 1200px 限制 */
    margin: 20px auto; /* 上下间距，左右居中 */
    border-radius: 12px;
    border: none; /* 移除边框让视觉更干净 */
    box-shadow: none; /* 移除内部阴影 */
    background: transparent;
    display: block; /* 改为 block */
    line-height: 0; /* 移除行高，防止底部空白 */
    font-size: 0; /* 移除字体大小，防止底部空白 */
    text-align: center; /* 让内容居中 */
}

/* 紧凑型视频容器 - 用于缩小视频显示 */
.result-video-compact {
    max-width: 800px; /* 限制最大宽度为 800px */
    margin: 20px auto; /* 居中显示 */
    display: inline-block; /* 让容器高度贴合内容 */
    vertical-align: top; /* 防止底部空白 */
}

/* Input/Output Video Container - 上下布局 */
.input-output-video-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 900px;
    margin: 20px auto;
}

.video-section {
    width: 100%;
}

.video-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-align: center;
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    display: inline-block;
    width: 100%;
    box-sizing: border-box;
}

/* 输入/输出视频容器内的视频保持原始比例 */
.input-output-video-container .result-video-small {
    aspect-ratio: auto !important; /* 移除固定宽高比，让视频保持原始比例 */
    height: auto !important; /* 高度自适应 */
    overflow: visible; /* 允许视频完整显示 */
    width: 100%;
    max-width: 100%;
    margin: 0 auto; /* 左右居中 */
    display: block; /* 改为 block */
    padding: 0; /* 移除所有内边距 */
    line-height: 0; /* 移除行高，防止底部空白 */
    font-size: 0; /* 移除字体大小，防止底部空白 */
    text-align: center; /* 让内容居中 */
}

.input-output-video-container .result-video-small video {
    width: 100%;
    height: auto !important; /* 高度根据视频原始比例自适应 */
    object-fit: contain !important; /* 保持原始比例，不裁剪 */
    display: block;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
}

/* 确保 canvas 容器 div 也贴合内容 */
.input-output-video-container .result-video-small > div {
    display: inline-block; /* 改为 inline-block 以便居中 */
    width: 100%;
    max-width: 100%;
    margin: 0 auto; /* 左右居中 */
    padding: 0;
    line-height: 0; /* 移除行高，防止底部空白 */
    font-size: 0; /* 移除字体大小，防止底部空白 */
    text-align: center; /* 让内容居中 */
}

/* 确保 video 元素不占空间（因为被 canvas 替代） */
.input-output-video-container .result-video-small .video {
    margin: 0;
    padding: 0;
    line-height: 0;
    display: block;
}

/* 确保 canvas 完全贴合，无额外空间 */
.input-output-video-container .result-video-small .videoMerge {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important; /* 左右居中 */
    padding: 0 !important;
    line-height: 0 !important;
}

.analysis-carousel {
    width: 100%;
    padding: 0 20px 30px 20px; /* 给轮播器内部一点间距 */
}

.carousel-content {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-tertiary);
}

/* 4. 图片容器也填满 */
.result-image-large, 
.result-image-middle {
    width: 100%;
    max-width: 100%;
    margin: 20px 0;
    box-shadow: none;
    background: transparent;
    border: none;
}
.image-with-title {
    padding: 0 30px; /* 给内部图片一点左右边距 */
}

/* 5. 确保 Canvas 响应式 */
.videoMerge {
    width: 100% !important; /* 强制填满 */
    height: auto !important;
    display: block;
}



/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 999;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo h2 {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--accent-primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Banner */
.banner {
    background: var(--slight-ocean);
    color: white;
    padding: 100px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.banner-content {
    position: relative;
    z-index: 1;
}

.banner-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 10px;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.banner-subtitle {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 30px;
    opacity: 0.9;
}

.authors {
    font-size: 1.1rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.authors a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.authors a:hover {
    opacity: 0.8;
}

.banner-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.link-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* 主演示视频 */
.main-demo {
    padding: 40px 0;
    background: var(--bg-secondary);
}

.demo-video-container {
    max-width: 900px;
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    position: relative;
    background: var(--bg-tertiary);
}

.main-video {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.main-video.loaded {
    opacity: 1;
}

/* Video loading indicator */
.video-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    transition: opacity 0.3s ease;
}

.video-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-text {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 15px;
}

.loader-progress {
    width: 200px;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
    margin: 0 auto;
}

.progress-bar {
    height: 100%;
    background: var(--accent-gradient);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 3px;
}

/* TL;DR 内容 */
.tldr-content {
    background: var(--bg-secondary);
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    text-align: center;
    max-width: 900px; /* 从 1200px 缩小到 900px，与 abstract-content 保持一致 */
    margin: 0 auto 30px auto;
}

.tldr-content p {
    font-size: 1.3rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
}

.tldr-content i {
    color: var(--accent-primary);
    margin-right: 8px;
}

.tldr-content strong {
    color: var(--text-primary);
}

/* Abstract 区域 */
.abstract {
    padding: 40px 0;
    background: var(--bg-primary);
}

.abstract-content {
    background: var(--bg-secondary);
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    text-align: center;
    max-width: 900px; /* 从 1200px 缩小到 900px，使内容更紧凑 */
    margin: 0 auto 30px auto;
}

.abstract-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

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

/* 视频限制在 abstract 同款框内，不超出框 */
.abstract-video-wrap {
    margin-top: 20px;
    width: 100%;
    max-width: 100%;
    aspect-ratio: auto; /* 移除固定宽高比，保持视频原始比例 */
    height: auto; /* 高度自适应 */
    border-radius: 12px;
    overflow: visible; /* 允许视频完整显示 */
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.abstract-video-wrap video {
    display: block;
    width: 100%;
    height: auto; /* 高度根据视频原始比例自适应 */
    object-fit: contain; /* 保持原始比例，不裁剪 */
}

/* 性能对比 */
.benchmark-chart {
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.benchmark-image {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 2.5 / 1;
    object-fit: cover;
}

/* 交互式结果 */
.interactive-results {
    padding: 40px 0;
    background: var(--bg-secondary);
}

/* Main display area for interactive examples */
.main-display-container {
    width: 100%;
    max-width: 768px;
    margin: 0 auto 30px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    background: var(--bg-tertiary);
    position: relative;
    aspect-ratio: 16 / 9;
}

.main-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 1;  /* 默认显示，避免加载问题 */
    transition: opacity 0.5s ease;
}

.main-iframe.loaded {
    opacity: 1;
}

/* Iframe loading indicator */
.iframe-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    transition: opacity 0.3s ease;
}

.iframe-loader.hidden {
    opacity: 0;
    pointer-events: none;
    display: none;  /* 完全隐藏，不占据空间 */
}

/* Thumbnail gallery */
.thumbnail-gallery {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.thumbnail-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    border: 2px solid transparent;
    background: var(--bg-primary);
    user-select: none;
}

.thumbnail-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.thumbnail-item:active {
    transform: translateY(-1px) scale(0.98);
}

.thumbnail-item.active {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.thumbnail-item.loading {
    opacity: 0.6;
    pointer-events: none;
}

.thumbnail-item img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.thumbnail-item:hover img {
    transform: scale(1.05);
}

.thumbnail-label {
    padding: 8px;
    text-align: center;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-primary);
    font-size: 0.8rem;
}

.thumbnail-item.active .thumbnail-label {
    color: var(--accent-primary);
}

/* Awesome DA3 Projects styles */
.projects-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.project-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.project-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    border: 2px solid transparent;
    background: var(--bg-primary);
    user-select: none;
}

.project-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

.project-image-container {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.project-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.project-item:hover .project-image-container img {
    transform: scale(1.05);
}

.project-description {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.4;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.3s ease;
}

.project-item:hover .project-description {
    opacity: 1;
    transform: translateY(0);
}

.project-name {
    padding: 12px;
    text-align: center;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-primary);
    font-size: 0.9rem;
}

/* Responsive styles for projects gallery */
@media (max-width: 768px) {
    .projects-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .project-image-container {
        height: 150px;
    }
    
    .project-name {
        padding: 8px;
        font-size: 0.8rem;
    }
    
    .project-description {
        font-size: 0.75rem;
        padding: 8px 10px;
    }
}

.section-title {
    text-align: left;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 60px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 90%;
    margin: 0 auto 40px;
    padding: 0 20px;
}

.section-description a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.section-description a:hover {
    text-decoration: underline;
    text-decoration-color: var(--accent-primary);
    opacity: 0.9;
}
.interactive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
}

.interactive-item {
    background: var(--bg-primary);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.interactive-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.interactive-video-wrapper {
    position: relative;
    height: auto; /* 移除固定宽高比，高度自适应 */
    overflow: visible; /* 允许视频完整显示 */
}

.interactive-video {
    position: relative; /* 改为相对定位 */
    top: auto;
    left: auto;
    width: 100%;
    height: auto; /* 高度根据视频原始比例自适应 */
    object-fit: contain; /* 保持原始比例，不裁剪 */
    display: block;
}

.interactive-info {
    padding: 20px;
}

.interactive-info h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.interactive-info p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Results 区域 - 垂直展示 */
.results-section {
    padding: 40px 0;
    /* background: var(--bg-secondary); */
    background: var(--bg-primary);
}

.comparison-section {
    padding: 40px 0;
    background: var(--bg-secondary); /* 浅灰背景 */
}

.comparison-section .result-item {
    background: var(--bg-primary); /* 纯白卡片 */
    box-shadow: var(--shadow-xl);  /* 可以稍微加重一点阴影，让白卡片在灰底上更突显 */
    border: 1px solid var(--border-color);
}

.comparison-section .result-image-large {
    background: transparent; 
}

/* Comparison Main Display Area */
.comparison-main-display {
    margin: 20px 0 30px;
}

.comparison-main-display .result-image-large {
    margin: 0 auto;
    transition: opacity 0.3s ease;
}

.comparison-main-display .result-image-large img {
    transition: opacity 0.3s ease;
}

/* Comparison Thumbnail Gallery - 复用现有样式但调整布局 */
.comparison-thumbnail-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    max-width: 900px;
    margin: 30px auto 0;
    padding: 0 30px;
}

.comparison-thumbnail-gallery .thumbnail-item {
    cursor: pointer;
}

.comparison-thumbnail-gallery .thumbnail-item.active {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}


.results-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.result-item {
    display: block;
    /* background: var(--bg-primary); */
    background: var(--bg-secondary);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.result-video {
    position: relative;
    height: auto; /* 移除固定宽高比，高度自适应 */
    overflow: visible; /* 允许视频完整显示 */
    background: var(--bg-tertiary);
}

.result-video video {
    position: relative; /* 改为相对定位 */
    top: auto;
    left: auto;
    width: 100%;
    height: auto; /* 高度根据视频原始比例自适应 */
    object-fit: contain; /* 保持原始比例，不裁剪 */
    display: block;
}

.result-info {
    padding: 30px;
}

.result-info h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.result-info h4.result-subtitle {
    font-size: 1.3rem;
    font-weight: 600;
    margin-top: -5px;
    margin-bottom: 15px;
    color: var(--text-secondary);
    font-style: italic;
}

.result-subtitle .highlight-rainy {
    color: #0ea5e9;  /* 天蓝色 - 代表雨天 */
    font-weight: 700;
    font-style: normal;
}

.result-subtitle .highlight-night {
    color: #8b5cf6;  /* 紫色 - 代表夜晚 */
    font-weight: 700;
    font-style: normal;
}

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

.result-info p.text-large {
    font-size: 1.4rem;  /* 更大的字体 */
    line-height: 1.7;
}

/* 带标题的图片容器 */
.image-with-title {
    margin: 20px 0;
}

.image-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 auto 15px;
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    max-width: 1200px;
    padding: 0 30px;
}

.image-title .highlight-rainy {
    color: #0ea5e9;  /* 天蓝色 - 代表雨天 */
    font-weight: 700;
    font-style: normal;
}

.image-title .highlight-night {
    color: #8b5cf6;  /* 紫色 - 代表夜晚 */
    font-weight: 700;
    font-style: normal;
}

/* 紧凑型结果项 - 视频在小框中 */
.result-item-compact {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.result-video-small {
    width: calc(100% - 60px);  /* 减去左右padding */
    /* max-width: 800px;  调大视频尺寸 */
    max-width: 1200px;  /* 调大视频尺寸 */
    margin: 20px auto 30px; /* 左右居中 */
    aspect-ratio: auto; /* 移除固定宽高比，保持视频原始比例 */
    height: auto; /* 高度自适应 */
    overflow: visible; /* 允许视频完整显示 */
    background: var(--bg-tertiary);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    display: block; /* 改为 block 以便居中 */
    padding: 0; /* 移除内边距 */
    line-height: 0; /* 移除行高，防止底部空白 */
    font-size: 0; /* 移除字体大小，防止底部空白 */
    text-align: center; /* 让内容居中 */
}

.result-video-small video {
    width: 100%;
    height: auto; /* 高度根据视频原始比例自适应 */
    object-fit: contain; /* 保持原始比例，不裁剪 */
    display: block;
    position: relative !important;  /* 覆盖 .app-video 的绝对定位 */
    top: auto !important;
    left: auto !important;
    margin: 0 auto; /* 左右居中 */
    padding: 0; /* 移除内边距 */
}

/* 图片容器 - 更大的显示区域 */
.result-image-large {
    width: calc(100% - 60px);  /* 减去左右padding */
    max-width: 1200px;  /* 更大的图片显示区域 */
    margin: 20px auto 30px;
    overflow: hidden;
    background: var(--bg-tertiary);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);  /* 更明显的阴影 */
    border: 1px solid var(--border-color);
}

.result-image-large img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

/* 中等尺寸图片容器 - 用于特定图片 */
.result-image-medium {
    max-width: 900px;  /* 比默认的1200px小 */
}

/* 图片容器 - 更大的显示区域 */
.result-image-middle {
    width: calc(100% - 60px);  /* 减去左右padding */
    max-width: 1200px;  /* 更大的图片显示区域 */
    margin: 20px auto 30px;
    overflow: hidden;
    background: var(--bg-tertiary);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);  /* 更明显的阴影 */
    border: 1px solid var(--border-color);
}

.result-image-middle img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

/* 应用场景轮播 */
.applications {
    padding: 40px 0;
    background: var(--bg-secondary);
}

.applications-carousel {
    position: relative;
}

.carousel-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.carousel-btn {
    background: var(--accent-gradient);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    color: white;
    font-size: 18px;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.carousel-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

.carousel-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.carousel-content {
    flex: 1;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: var(--bg-primary);
    box-shadow: var(--shadow-lg);
}

.application-slide,
.analysis-slide {
    display: none;
    padding: 40px;
}

.application-slide.active,
.analysis-slide.active {
    display: block;
}

.application-video,
.analysis-video-wrapper {
    position: relative;
    height: auto; /* 移除固定宽高比，高度自适应 */
    overflow: visible; /* 允许视频完整显示 */
    border-radius: 15px;
    margin-bottom: 30px;
    background: var(--bg-tertiary);
}

.app-video,
.analysis-video-player {
    position: relative; /* 改为相对定位 */
    top: auto;
    left: auto;
    width: 100%;
    height: auto; /* 高度根据视频原始比例自适应 */
    object-fit: contain; /* 保持原始比例，不裁剪 */
    opacity: 0;
    transition: opacity 0.5s ease;
    display: block;
}

.app-video.loaded,
.analysis-video-player.loaded {
    opacity: 1;
}

/* Video loaders for app and analysis sections */
.app-video-loader,
.analysis-video-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    transition: opacity 0.3s ease;
}

.app-video-loader.hidden,
.analysis-video-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.application-info h3,
.analysis-info h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.application-info p,
.analysis-info p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: var(--accent-primary);
    transform: scale(1.2);
}

/* Abilities section with tab buttons instead of arrows */
/* 标题行容器：标题在左，按钮在右 */
.abilities-tabs .title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.abilities-tabs .title-row .section-title {
    margin-bottom: 0;
}

.abilities-tabs .carousel-indicators {
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 0;
    margin-bottom: 0;
}

.abilities-tabs .carousel-indicators .indicator {
    width: auto;
    height: auto;
    padding: 12px 28px;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 1.05rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.abilities-tabs .carousel-indicators .indicator:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.abilities-tabs .carousel-indicators .indicator.active {
    background: var(--accent-primary);
    color: #ffffff;
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
    transform: none;
}

/* 技术分析 */
.analysis {
    padding: 40px 0;
    background: var(--bg-primary);
}


/* 引用 */
.citation {
    padding: 40px 0;
    background: var(--bg-primary);
}

.citation-box {
    background: var(--bg-secondary);
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    max-width: 800px;
    margin: 0 auto;
}

.citation-box pre {
    background: var(--bg-tertiary);
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-primary);
}

/* 页脚 */
.footer {
    background: var(--bg-tertiary);
    padding: 40px 0;
    text-align: center;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    .banner {
        padding: 80px 0 40px;
    }
    
    .banner-title {
        font-size: 2.5rem;
    }
    
    .banner-subtitle {
        font-size: 1.2rem;
    }
    
    .banner-links {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
    }
    
    .link-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
        margin-bottom: 10px;
    }
    
    .nav-links {
        display: none;
    }
    
    .main-demo,
    .abstract,
    .interactive-results,
    .applications,
    .analysis,
    .citation {
        padding: 30px 0;
    }
    
    .tldr-content,
    .abstract-content {
        max-width: 100%;
        padding: 20px;
    }
    
    .tldr-content p {
        font-size: 1.1rem;
    }
    
    .demo-video-container {
        max-width: 100%;
    }
    
    .interactive-grid {
        grid-template-columns: 1fr;
    }
    
    .carousel-container {
        flex-direction: column;
        position: relative;
    }
    
    .carousel-btn {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .prev-btn {
        left: 10px;
    }
    
    .next-btn {
        right: 10px;
    }
    
    /* Responsive thumbnail gallery */
    .thumbnail-gallery {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .thumbnail-item img {
        height: 70px;
    }
    
    /* Comparison thumbnail gallery responsive */
    .comparison-thumbnail-gallery {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        padding: 0 20px;
    }
    
    .comparison-thumbnail-gallery .thumbnail-item img {
        height: 70px;
    }
    
    .thumbnail-label {
        padding: 6px;
        font-size: 0.7rem;
    }
    
    /* Input/Output Video Container responsive */
    .input-output-video-container {
        gap: 20px;
        padding: 0 20px;
    }
    
    .video-label {
        font-size: 0.9rem;
        padding: 6px 12px;
    }
    
    .main-display-container {
        aspect-ratio: 4 / 3;
    }
}

/* 视频占位符样式 */
.video-placeholder {
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.2rem;
    font-weight: 500;
    border: 2px dashed var(--border-color);
    border-radius: 15px;
    min-height: 200px;
}

.video-placeholder i {
    font-size: 3rem;
    margin-bottom: 10px;
    display: block;
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-secondary);
}



/* =========================================
   修复：Blind Spot Comparison 底部空白问题
   ========================================= */

/* 1. 针对隐藏的源视频 (class="video") 进行特殊处理 */
/* 必须使用 !important 覆盖之前全局设置的 height: auto 和 position: relative */
.input-output-video-container .result-video-small video.video {
    position: absolute !important; /* 绝对定位，使其脱离文档流，不再占据空间 */
    top: 0;
    left: 0;
    width: 100% !important;        /* 保持宽度，确保 JS 能正确读取分辨率 */
    height: 0 !important;          /* 强制高度为 0 */
    opacity: 0 !important;         /* 确保不可见 */
    z-index: -1;                   /* 放在最底层 */
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: none;          /* 禁止鼠标交互 */
}

/* 2. 确保 Canvas 正常显示 */
.input-output-video-container .result-video-small .videoMerge {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    z-index: 10;
}

/* 3. 确保包裹它们的相对定位容器表现正常 */
.input-output-video-container .result-video-small > div {
    display: block; /* 确保是块级元素 */
    width: 100%;
    line-height: 0; /* 消除行内元素间隙 */
}