:root {
    --bg-color: #ffffff;
    --card-bg: #ffffff;
    --text-main: #202124;  /* Deep dark gray for headings */
    --text-muted: #5f6368; /* Medium gray for body text */
    --accent-blue: #1a73e8; /* Google Blue */
    --accent-gradient: linear-gradient(90deg, #ff073a, #9c27b0);
    --border-color: #e0e0e0;
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --font-stack: 'DM Sans', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; scroll-behavior: smooth; }

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-stack);
    line-height: 1.6;
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    position: fixed;
    width: 100%;
    top: 0;
    background: rgba(255, 255, 255, 0.9); /* White transparent */
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.logo { font-weight: 700; font-size: 1.2rem; letter-spacing: -0.5px; color: var(--text-main); }

.nav-links { display: flex; gap: 30px; list-style: none; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-size: 0.95rem; font-weight: 500; transition: color 0.3s; }
.nav-links a:hover { color: var(--accent-blue); }

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: 0.3s;
}
.btn-outline:hover { 
    background: var(--text-main); 
    color: #fff; 
    border-color: var(--text-main);
}

/* Hero Section */
.hero {
    min-height: 100vh; 
    display: flex;
    align-items: center; 
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding-top: 120px; 
    padding-bottom: 60px;
}

.hero-content {
    z-index: 2;
    max-width: 900px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center; 
}

/* Foreground Video in Hero */
.hero-showcase-video {
    margin-top: 50px;
    width: 100%;
    max-width: 800px; 
    border-radius: 16px;
    overflow: hidden;
    /* Soft shadow instead of dark deep shadow */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1); 
    border: 1px solid rgba(0, 0, 0, 0.05); 
    background: #000;
}

.hero-showcase-video video {
    width: 100%;
    display: block;
}

/* Background Video Container */
.hero-background-container {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
    pointer-events: none; 
}

.hero-video {
    width: 100%; height: 100%;
    object-fit: cover;
    /* Increased from 0.15 to 0.4 */
    opacity: 0.4; 
    /* Removed grayscale so original colors show */
    filter: none; 
}

.video-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* Reduced white overlay opacity from 0.8 to 0.6 so more video shines through */
    background: linear-gradient(to bottom, rgba(255,255,255,0.6), rgba(255,255,255,1));
}

.badge {
    background: rgba(0,0,0,0.05); /* Light gray badge */
    color: var(--text-muted);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    display: inline-block;
    border: 1px solid var(--border-color);
}

h1 {
    font-size: 5rem;
    margin: 10px 0;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
    /* Fallback for readability if gradient fails */
    color: var(--text-main);
}

.subtitle { font-size: 2rem; color: var(--text-muted); margin-bottom: 20px; font-weight: 400; }

.authors {
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 30px;
}
.institution { font-size: 0.95rem; color: var(--text-muted); }

.authors a {
    color: var(--accent-blue);
    text-decoration: none; 
    font-weight: 500; 
    transition: opacity 0.3s;
}

.authors a:hover {
    opacity: 0.8;
    text-decoration: underline; 
}

.cta-group { display: flex; gap: 15px; justify-content: center; margin-top: 20px; flex-wrap: wrap;}

.btn-primary {
    /* background: var(--text-main); */
    background: #fff; /* Black button */
    color: #000;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 700;
    text-decoration: none;
    transition: 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.btn-primary:hover { 
    background: var(--accent-blue); 
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(26, 115, 232, 0.2);
}

/* Sections */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.intro { padding: 80px 0; text-align: center; }
.abstract-text { max-width: 800px; margin: 0 auto; color: var(--text-muted); text-align: justify; font-size: 1.05rem;}

/* Features & Diagrams */
.features { padding: 50px 0 100px; }
.section-header { margin-bottom: 40px; border-bottom: 1px solid var(--border-color); padding-bottom: 20px; }

h2 { color: var(--text-main); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 40px; }

.card { 
    background: var(--card-bg); 
    padding: 30px; 
    border-radius: 16px; 
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border-color);
}
.card:hover { 
    transform: translateY(-5px); 
    box-shadow: var(--card-shadow);
}
.card .icon { font-size: 2rem; margin-bottom: 15px; }
.card h4 { margin-bottom: 10px; color: var(--text-main); }
.card p { color: var(--text-muted); font-size: 0.95rem; }

.diagram-container {
    background: #ffffff; 
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    /* In light mode, diagrams need a border to stand out against white bg */
    border: 1px solid var(--border-color);
}
.responsive-img { width: 100%; height: auto; border-radius: 5px; }
.caption { color: var(--text-muted); margin-top: 10px; font-size: 0.9rem; font-style: italic; }

/* Showcase (Results) */
.showcase { padding: 50px 0; }

.showcase-item { 
    display: block; 
    margin-bottom: 100px; 
}

.desc-box { 
    margin-bottom: 25px; 
    max-width: 800px; 
}

.desc-box h3 { color: var(--text-main); margin-bottom: 8px;}

.desc-box p { 
    font-size: 1.1rem; 
    color: var(--text-muted); 
    border-left: 3px solid var(--accent-blue); 
    padding-left: 20px; 
}

/* Gallery Layout */
.gallery-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.main-video-container {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    /* 把 #000 改为 var(--card-bg) 或 transparent */
    background: var(--card-bg); 
    width: 100%;
    aspect-ratio: 16/9;
}

.main-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}

.fade-out {
    opacity: 0 !important; /* 强制完全透明 */
}

/* Thumbnail Strip */
.thumbnail-strip-container {
    display: flex;
    justify-content: center;
    width: 100%;
}

.thumbnail-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
    -ms-overflow-style: none;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.thumbnail-strip::-webkit-scrollbar { display: none; }

.thumb-item {
    flex: 0 0 100px;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6; /* Slightly higher opacity for light mode */
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    background: #000; /* Background for video thumbnails */
}

.thumb-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-item:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.thumb-item.active {
    opacity: 1;
    border-color: var(--accent-blue);
    box-shadow: 0 4px 10px rgba(66, 133, 244, 0.2);
}

/* BibTeX */
.bibtex-section { 
    background: #f8f9fa; /* Light gray section bg */
    padding: 50px 0; 
    margin-top: 50px; 
    border-top: 1px solid var(--border-color);
}
.bibtex-section h3 { margin-bottom: 20px; color: var(--text-main); }

pre {
    background: #ffffff; /* White bg for code */
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    color: var(--text-muted);
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    box-shadow: inset 0 0 5px rgba(0,0,0,0.02);
}

/* Footer */
footer { 
    border-top: 1px solid var(--border-color); 
    padding: 50px 0; 
    margin-top: 0; 
    background: #fff;
}
.footer-content { display: flex; justify-content: space-between; margin-bottom: 30px; }
.footer-logo { font-weight: bold; color: var(--text-main); }
.footer-links a { color: var(--text-muted); text-decoration: none; margin-left: 20px; transition: color 0.2s;}
.footer-links a:hover { color: var(--accent-blue); }

@media (max-width: 768px) {
    h1 { font-size: 3rem; }
    .showcase-item, .showcase-item.reverse { flex-direction: column; }
    .grid-2 { grid-template-columns: 1fr; }
    .nav-links { display: none; }
    .thumbnail-strip { gap: 8px; }
    .thumb-item { flex: 0 0 80px; height: 45px; }
}