.speed-control {
    margin-top: 12px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.speed-btn {
    background: rgba(255,255,255,0.08);
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.4);
    padding: 6px 16px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    backdrop-filter: blur(6px);
    transition: all 0.25s ease;
}

.speed-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.05);
}

/* 当前选中高亮 */
.speed-btn.active {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

.ai {
    font-family: 'Academicons';
    font-weight: 400;
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
}

.ai-arxiv:before {
    content: "\e974";
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #ffffff;
    background-color: #000000;
    overflow-x: hidden;
}

.section-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    padding: 0.9rem 1rem 0;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-18px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

body.nav-visible .section-nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top-wrap {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 55;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.back-to-top {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.1rem;
    height: 3.1rem;
    padding: 0 1rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(8, 8, 8, 0.78);
    color: #ffffff;
    backdrop-filter: blur(14px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    transition: width 0.24s ease, background 0.2s ease, border-color 0.2s ease;
}

.back-to-top i {
    flex: 0 0 auto;
    font-size: 0.95rem;
}

.back-to-top-label {
    max-width: 0;
    margin-left: 0;
    overflow: hidden;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(6px);
    font-size: 0.9rem;
    font-weight: 600;
    transition: max-width 0.24s ease, margin-left 0.24s ease, opacity 0.18s ease, transform 0.18s ease;
}

.back-to-top:hover,
.back-to-top:focus-visible {
    width: 8.8rem;
    background: linear-gradient(135deg, rgba(90, 168, 255, 0.42), rgba(243, 163, 200, 0.38));
    border-color: rgba(255, 255, 255, 0.28);
    box-shadow:
        0 16px 34px rgba(0, 0, 0, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.back-to-top:hover .back-to-top-label,
.back-to-top:focus-visible .back-to-top-label {
    max-width: 6rem;
    margin-left: 0.55rem;
    opacity: 1;
    transform: translateX(0);
}

.back-to-top:focus-visible {
    outline: 2px solid rgba(90, 168, 255, 0.7);
    outline-offset: 3px;
}

body.back-to-top-visible .back-to-top-wrap {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.section-nav-inner {
    display: flex;
    gap: 0.65rem;
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: 0.7rem;
    overflow-x: auto;
    background: rgba(8, 8, 8, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    backdrop-filter: blur(14px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
    pointer-events: auto;
    scrollbar-width: none;
}

.section-nav-inner::-webkit-scrollbar {
    display: none;
}

.section-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.74);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.section-nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: translateY(-1px);
}

.section-nav-link.active {
    background: linear-gradient(90deg, rgba(90, 168, 255, 0.36), rgba(243, 163, 200, 0.32));
    color: #ffffff;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.14),
        0 10px 22px rgba(0, 0, 0, 0.22);
}

/* Hero Section with Video Grid */
/* Hero Section with Single Video Background */
.hero-section {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    display: block;
}
.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 1200px;
    padding: 0 2rem;
    margin: 0 auto;
    min-height: 100vh;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    animation: fadeInUp 1s ease-out;
}


@keyframes zoomOut {

    0%,
    60% {
        transform: scale(2);
    }

    100% {
        transform: scale(1);
    }
}

.video-cell {
    position: relative;
    overflow: hidden;
}

.video-cell video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    transition: opacity 0.1s ease;
}

.video-cell:hover video {
    opacity: 0.8;
}

/* Center 4x4 videos (demo1-16) - positions 19-22, 27-30, 35-38, 43-46 in 8x8 grid */
.video-cell:nth-child(n+19):nth-child(-n+22),
.video-cell:nth-child(n+27):nth-child(-n+30),
.video-cell:nth-child(n+35):nth-child(-n+38),
.video-cell:nth-child(n+43):nth-child(-n+46) {
    z-index: 10;
}

/* Overlay for better text readability */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
    rgba(0,0,0,0.2) 0%,
    rgba(0,0,0,0.2) 50%,
    rgba(0,0,0,0.2) 100%
    );
    z-index: 2;
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 1200px;
    padding: 0 2rem;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    margin-bottom: 2rem;
}

.main-title {
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: normal;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg,
            #ff6b6b, #4ecdc4, #45b7d1, #96ceb4,
            #feca57, #ff9ff3, #54a0ff, #5f27cd);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    letter-spacing: 0.05em;
    animation: gradientShift 3s ease-in-out infinite;
    text-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.subtitle {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1rem, 2.5vw, 1.6rem);
    font-weight: 600;
    color: #e8e8e8;
    line-height: 1.3;
    letter-spacing: 0.02em;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #cccccc;
    margin-bottom: 2rem;
    font-weight: 300;
}

.authors {
    margin-bottom: 1.5rem;
}

.author-row {
    margin-bottom: 0.5rem;
}

.author-link {
    color: #ffffff;
    text-decoration: none;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
    font-weight: 500;
}

.author-link:hover {
    color: #4fc3f7;
}

.affiliations {
    font-size: 0.9rem;
    color: #ffffff;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.link-button {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    color: #000000 !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.link-button:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
    color: #000000 !important;
}

.link-button i {
    margin-right: 0.5rem;
    font-size: 1.1rem;
    color: #000000 !important;
}

/* Content Sections */
.content-section {
    padding: 4rem 0;
    background: #000000;
    scroll-margin-top: 5.5rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    font-family: 'Source Sans Pro', 'Orbitron', sans-serif;
    font-size: 3rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 3rem;
    color: #ffffff;
    letter-spacing: 0.02em;
}

.content-text {
    font-family: 'Source Sans Pro', 'Inter', sans-serif;
    font-size: 1.2rem;
    line-height: 1.75;
    color: #e8e8e8;
    margin-bottom: 2rem;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.section-description {
    font-size: 1.1rem;
    color: #aaa;
    margin: 0 auto;
    line-height: 1.7;
    text-align: left;
}

.manipulation-caption {
    max-width: 1000px;
    margin-top: 0;
    font-size: 1rem;
    color: #aaa;
    line-height: 1.6;
    text-align: left;
}

.tldr-card {
    margin-bottom: 2.5rem;
    padding: 1.5rem 1.75rem;
    border: 1px solid rgba(138, 180, 255, 0.42);
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(90, 168, 255, 0.3), rgba(243, 163, 200, 0.24)),
        rgba(255, 255, 255, 0.06);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.tldr-label {
    display: inline-block;
    margin-right: 0.45rem;
    padding: 0.16rem 0.6rem;
    border-radius: 999px;
    background: linear-gradient(90deg, #5aa8ff 0%, #f3a3c8 100%);
    color: #ffffff;
    font-family: 'Source Sans Pro', 'Inter', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow:
        0 10px 22px rgba(125, 120, 255, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.tldr-text {
    margin: 0;
    color: #fbfbfb;
    font-family: 'Source Sans Pro', 'Inter', sans-serif;
    font-size: 1.2rem;
    line-height: 1.7;
    font-weight: 500;
}

.tldr-emphasis {
    display: inline;
    color: #ffffff;
    font-weight: 700;
    background-image: linear-gradient(
        to top,
        rgba(90, 168, 255, 0.78) 0%,
        rgba(90, 168, 255, 0.78) 0.16em,
        rgba(90, 168, 255, 0.18) 0.22em,
        transparent 0.32em
    );
    background-repeat: no-repeat;
    background-size: 100% 0.5em;
    background-position: 0 100%;
    padding: 0 0.04em 0.06em;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

.method-image {
    width: 100%;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.result-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.result-item:hover {
    transform: translateY(-5px);
}

.result-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* Video Carousel */
.comparison-section {
    text-align: center;
    margin: 3rem 0;
}

.comparison-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 2rem;
    letter-spacing: 0.02em;
}

.video-note {
    text-align: center;
    color: #888888;
    font-size: 1rem;
    margin-top: 0.5rem;
    margin-bottom: 2rem;
    font-style: italic;
}

.video-carousel-wrapper {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 80px;
    /* Space for navigation arrows */
}

.video-carousel {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    overflow: hidden;
}

.video-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.video-slide.active {
    opacity: 1;
}

.video-slide video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Changed from cover to contain to show full video */
    background: #000000;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    font-size: 1.5rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50%;
    z-index: 10;
}

.carousel-nav:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav.prev {
    left: -60px;
}

.carousel-nav.next {
    right: -60px;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    /* Moved outside the video container */
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: white;
    transform: scale(1.2);
}

/* Long-term Memory Section Styles */
.memory-section {
    background: #000000;
    padding: 4rem 0;
}

.memory-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.memory-section-title {
    font-family: 'Source Sans Pro', 'Orbitron', sans-serif;
    font-size: 3rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1rem;
    color: #ffffff;
    letter-spacing: 0.02em;
}

.memory-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: #cccccc;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 300;
}

.memory-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.memory-video-pair {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.memory-video-pair:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.memory-video-container {
    margin-bottom: 1rem;
}

.memory-video-container:last-child {
    margin-bottom: 0;
}

.memory-video-label {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    text-align: center;
    font-family: 'Inter', sans-serif;
}

.memory-gt-label {
    background-color: rgba(76, 175, 80, 0.2);
    color: #81c784;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.memory-output-label {
    background-color: rgba(33, 150, 243, 0.2);
    color: #64b5f6;
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.memory-video {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    background: #111111;
    pointer-events: none;
    /* 禁用视频的默认点击事件 */
}

.memory-video:hover {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}

/* Additional videos section */
.memory-additional-videos {
    display: none;
}

.memory-additional-videos.show {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Show more button */
.memory-show-more-wrapper {
    text-align: center;
    margin-top: 2rem;
}

.memory-show-more-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 2rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.memory-show-more-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
}

.memory-show-more-btn i {
    margin-left: 0.5rem;
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.memory-show-more-btn.expanded i {
    transform: rotate(180deg);
}

.memory-controls-hint {
    text-align: center;
    color: #888888;
    font-size: 1rem;
    margin-top: 0.5rem;
    margin-bottom: 2rem;
    font-style: italic;
}

/* Citation Section */
.citation-section {
    background: rgba(255, 255, 255, 0.03);
    padding: 3rem 0;
}

.citation-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.citation-title {
    margin-bottom: 0;
    text-align: left;
}

.citation-copy-btn {
    flex-shrink: 0;
    padding: 0.7rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.citation-copy-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.28);
    transform: translateY(-1px);
}

.citation-copy-btn:disabled {
    cursor: default;
    opacity: 0.75;
    transform: none;
}

.citation-code {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1.5rem;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
    color: #e0e0e0;
    overflow-x: auto;
    white-space: pre;
}

/* Footer */
.footer {
    background: rgba(255, 255, 255, 0.02);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer p {
    color: #888888;
    font-size: 0.9rem;
}

.footer a {
    color: #4fc3f7;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Loading indicator styles */
.loading-indicator {
    position: fixed;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 12px;
    z-index: 1000;
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(4, 1fr);
        animation: zoomOutMobile 10s ease-in-out forwards;
    }

    @keyframes zoomOutMobile {

        0%,
        60% {
            transform: scale(1.5);
        }

        100% {
            transform: scale(1);
        }
    }

    .hero-content {
        padding: 0 1rem;
    }

    .section-nav {
        padding-top: 0.7rem;
    }

    .section-nav-inner {
        gap: 0.5rem;
        padding: 0.55rem;
        border-radius: 20px;
    }

    .section-nav-link {
        font-size: 0.86rem;
        padding: 0.5rem 0.8rem;
    }

    .main-title {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
        margin-bottom: 1.2rem;
    }

    .subtitle {
        font-size: clamp(0.8rem, 3.5vw, 1.2rem);
    }

    .links {
        flex-direction: column;
        align-items: center;
    }

    .link-button {
        width: 200px;
        justify-content: center;
    }

    .video-carousel-wrapper {
        padding: 0 60px;
    }

    .carousel-nav {
        font-size: 1.2rem;
        padding: 0.5rem 0.75rem;
    }

    .carousel-nav.prev {
        left: -45px;
    }

    .carousel-nav.next {
        right: -45px;
    }

    .memory-video-grid,
    .memory-additional-videos.show {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .citation-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .video-carousel-wrapper {
        padding: 0 40px;
    }

    .carousel-nav.prev {
        left: -35px;
    }

    .carousel-nav.next {
        right: -35px;
    }

    .memory-video-grid,
    .memory-additional-videos.show {
        grid-template-columns: 1fr;
    }

    .memory-container {
        padding: 0 1rem;
    }

    .memory-section-title {
        font-size: 2rem;
    }
}
