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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    line-height: 1.4;
    color: #333;
    background-color: #fff;
    padding: 40px 56px;
}

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

/* Header */
header {
    text-align: center;
    padding: 16px 0 6px;
}

h1 {
    font-family: 'Google Sans', sans-serif;
    font-size: 2.8em;
    font-weight: 500;
    margin-bottom: 18px;
    line-height: 1.2;
}

h1 .title-project {
    font-family: 'Playfair Display', 'Garamond', 'Times New Roman', serif;
    font-weight: 700;
    font-style: italic;
    font-size: 1em;
    display: inline-block;
    margin-right: 0.08em;
    letter-spacing: 0.01em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.15);
    color: #2c2c2c;
}

.rss-venue {
    margin: 20px 0 12px;
    color: #7a828d;
    font-size: 2em;
    font-weight: 400;
    line-height: 1.15;
    text-align: center;
}

.rss-venue-accent {
    color: #8b171a;
    font-weight: 700;
}

/* Sections */
section {
    margin: 22px 0;
}

h2 {
    font-size: 2.3em;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

h3 {
    font-size: 1.6em;
    font-weight: 600;
    margin: 20px 0 15px;
}

section p {
    line-height: 1.5;
}

/* Abstract */
.abstract {
    background-color: #f8f9fa;
    padding: 18px 22px;
    border-radius: 10px;
    font-size: 1.02em;
    line-height: 1.45;
    text-align: justify;
}

/* Images - make them smaller and more compact */
section img {
    max-width: 85%;
    height: auto;
    display: block;
    margin: 10px auto;
}

#teaser img {
    max-width: 90%;
    margin: 12px auto 20px;
    display: block;
}

/* Make teaser section closer to buttons above and content below */
#teaser {
    margin: 0 0 12px;
}

/* Image placeholders */
.image-placeholder {
    width: 100%;
    background-color: #e9ecef;
    border: 2px dashed #adb5bd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    margin: 30px 0;
    color: #6c757d;
    font-size: 1.1em;
}

.teaser-image {
    min-height: 500px;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

/* DINO videos in 2x2 grid - updated 2026-02-10 */
.video-grid-row {
    grid-template-columns: repeat(2, 1fr) !important;
    max-width: 100%;
    gap: 20px;
}

/* Align video items in the same row - keep original aspect ratio */
.video-grid-row .video-item {
    display: flex;
    flex-direction: column;
}

.video-grid-row .video-item video {
    width: 100%;
    height: auto;
}

/* Featured videos: 2 in the first row, 3 in the second row */
.video-grid-featured {
    margin: 40px 0;
}

/* Two wide video cards share the first row */
.row-first-full {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    width: 100%;
    margin-bottom: 30px;
}

.row-first-full .video-item {
    max-width: none;
}

.row-center {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

.row-center .video-item {
    flex: 0 0 calc((100% - 60px) / 3); /* 和第二行3列布局时的宽度一致 */
    max-width: calc((100% - 60px) / 3);
}

.row-full {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

@media (max-width: 768px) {
    .video-grid-row {
        grid-template-columns: 1fr !important;
    }
    
    .video-grid-featured {
        grid-template-columns: 1fr;
    }
    
    .video-grid-featured .video-item:nth-child(n) {
        grid-column: 1;
    }
}

/* Two column grid for scaling curves and model/dataset */
.two-column-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 20px 0;
    align-items: stretch;
    width: 100%;
}

.column-item {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
}

.column-item h3 {
    font-size: 1.3em;
    margin-bottom: 10px;
    color: #333;
}

.column-item img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    margin: 0 auto;
    display: block;
}

/* Scaling section images — fill row: full width, intrinsic aspect ratio */
#scaling .column-item img {
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 20px 0 10px 0;
    display: block;
    border-radius: 8px;
}

/* Stack the two method figures vertically at full width */
#model-dataset .two-column-grid {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 36px;
}

#model-dataset .column-item {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

#model-dataset .column-item h3 {
    margin-bottom: 2px;
    flex-shrink: 0;
}

#model-dataset .column-item img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 8px 0 12px 0;
    display: block;
    flex-shrink: 0;
    object-fit: contain;
    object-position: center;
}

#model-dataset .column-item p {
    line-height: 1.5;
    text-align: justify;
    flex: 0 1 auto;
    min-height: 0;
}

#motion-pattern-analysis {
    margin-top: 40px;
}

#motion-pattern-analysis .motion-pattern-copy {
    margin: 0 0 28px;
    text-align: justify;
}

.motion-pattern-grid {
    margin-top: 0;
}

@media (max-width: 1024px) {
    .two-column-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    #model-dataset .column-item img {
        height: auto;
        object-fit: contain;
    }
}

/* Real-World Results: bar chart figures */
#real-world-results {
    margin-top: 28px;
}

/* Stack the qualitative and generalization figures at full width */
.result-figure-row-2-1 {
    display: flex;
    flex-direction: column;
    gap: 36px;
    align-items: flex-start;
    margin: 28px 0;
    width: 100%;
    box-sizing: border-box;
}

.result-figure-row-2-1 .result-figure-cell {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.result-figure-row-2-1 .result-figure-cell-2 {
    flex: 0 1 auto;
    width: 100%;
    min-width: 0;
}

.result-figure-row-2-1 .result-figure-cell-1 {
    flex: 0 1 auto;
    width: 100%;
    min-width: 0;
}

.result-figure-row-2-1 .result-figure-title {
    font-weight: 600;
    font-size: 1.3em;
    margin-bottom: 8px;
    color: #333;
}

.result-figure-row-2-1 .result-figure-img-wrap {
    width: 100%;
    height: auto;
    flex-shrink: 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-figure-row-2-1 .result-figure-img {
    width: 100%;
    height: auto;
    max-width: none;
    object-fit: contain;
    display: block;
    vertical-align: middle;
    border-radius: 8px;
}

.result-figure-row-2-1 .result-figure-cell-1 .result-figure-img {
    width: 100%;
    margin: 0 auto;
}

.result-figure-row-2-1 .result-figure-caption {
    margin-top: 12px;
    line-height: 1.5;
    text-align: justify;
    font-size: 0.98em;
    color: #333;
}

.result-figure {
    margin: 28px 0;
}

.result-figure-wide {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.result-figure-wide .result-figure-img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.result-figure-wide .result-figure-caption {
    line-height: 1.5;
    text-align: justify;
}

.result-figure-side {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 24px;
    margin: 32px 0;
}

.result-figure-side .result-figure-img-wrap {
    flex: 0 0 52%;
    min-width: 0;
}

.result-figure-side .result-figure-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.result-figure-side .result-figure-caption {
    flex: 1 1 48%;
    line-height: 1.5;
    text-align: justify;
}

.result-figure-caption {
    font-size: 0.98em;
    color: #333;
}

@media (max-width: 768px) {
    .result-figure-side {
        flex-direction: column;
        gap: 16px;
    }

    .result-figure-side .result-figure-img-wrap {
        flex: 1 1 auto;
        width: 100%;
    }
}

.video-item {
    background-color: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

.video-placeholder-card {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #eceff3 0%, #dce2e9 100%);
    color: #6b7280;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
}

.video-placeholder-card i {
    font-size: 2em;
    color: #4a90e2;
}

.video-placeholder-card span {
    font-weight: 600;
    letter-spacing: 0.02em;
}

.section-intro {
    max-width: 980px;
    margin: 20px auto 30px;
    line-height: 1.55;
    text-align: justify;
}

.paired-task-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    margin: 32px 0;
}

.paired-task-card {
    padding: 20px;
    border: 1px solid #e1e5ea;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(25, 42, 70, 0.08);
}

.featured-task-card {
    border-color: #c9d9f2;
    background: linear-gradient(180deg, #fbfdff 0%, #f5f9ff 100%);
}

.paired-task-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.paired-task-header h3,
.video-section .paired-task-header h3 {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 1.25em;
    text-align: left;
}

.embodiment-tag {
    flex: 0 0 auto;
    padding: 5px 10px;
    border-radius: 999px;
    background: #eaf2ff;
    color: #245b9d;
    font-size: 0.78em;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.paired-video-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.paired-video-column {
    min-width: 0;
}

.paired-video {
    width: 100%;
    aspect-ratio: 4 / 3;
    display: block;
    border-radius: 8px;
    background: #000;
    object-fit: contain;
}

.motion-pattern-grid .paired-video {
    aspect-ratio: 16 / 9;
}

/* Keep the poster above the video until its first frame is presented. */
.video-preview {
    position: relative;
    width: 100%;
    border-radius: 8px;
}

.video-preview > .video-startup-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    object-fit: contain;
    border-radius: inherit;
    pointer-events: none;
    /* Leave the native playback controls visible and usable. */
    clip-path: inset(0 0 44px 0);
    visibility: hidden;
}

.video-preview.is-starting .video-startup-poster {
    visibility: visible;
}

.paired-video-label {
    margin-bottom: 8px;
    color: #4b5563;
    font-size: 0.88em;
    font-weight: 700;
    text-align: center;
}

.benchmark-task-list {
    margin-top: 24px;
}

.video-placeholder-wide {
    aspect-ratio: 16 / 9;
}

.video-caption {
    padding: 15px;
    font-size: 0.95em;
    text-align: center;
    font-weight: 500;
}

.video-column-caption {
    display: flex;
    justify-content: space-between;
    font-size: 0.8em;
    color: #777;
    margin: 6px 0 2px 0;
    padding: 0 4%;
}

/* Video sections by platform */
.video-section {
    margin: 50px 0;
}

.video-section h3 {
    text-align: left;
    border-bottom: 2px solid #4a90e2;
    padding-bottom: 10px;
}

.video-description {
    margin: 20px 0;
    color: #555;
    line-height: 1.45;
}

/* Results/Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.stat-card {
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stat-number {
    font-size: 3em;
    font-weight: 700;
    color: #4a90e2;
    display: block;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1.1em;
    color: #555;
}

.result-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #e1e5ea;
    border-radius: 8px;
    background: #fff;
}

.result-table {
    width: 100%;
    min-width: 1050px;
    border-collapse: collapse;
    font-size: 0.84em;
    line-height: 1.35;
}

.result-table th,
.result-table td {
    padding: 10px 9px;
    border-bottom: 1px solid #e9ecef;
    text-align: center;
    white-space: nowrap;
}

.result-table th:first-child,
.result-table td:first-child {
    text-align: left;
    font-weight: 600;
}

.result-table thead th {
    background: #f2f4f7;
    color: #333;
    font-weight: 700;
}

.result-table tbody tr:last-child td {
    border-bottom: 0;
}

.result-table .ours-row td {
    background: #eaf2ff;
    color: #174a88;
    font-weight: 700;
}

.compact-table-wrap {
    margin: 20px 0 0;
}

.compact-table {
    min-width: 0;
    font-size: 0.9em;
}

.main-results-table-wrap {
    margin-top: 30px;
    overflow-x: hidden;
}

.main-results-table-wrap .result-table {
    min-width: 0;
    table-layout: fixed;
    font-size: clamp(0.68rem, 1vw, 0.9rem);
}

.main-results-table-wrap .result-table th,
.main-results-table-wrap .result-table td {
    padding: 9px 3px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.main-results-table-wrap .result-table th:first-child {
    width: 9.5%;
}

.main-results-table-wrap .result-table th:nth-child(2) {
    width: 6.5%;
}

.full-results-table tbody .method-start td {
    border-top: 2px solid #d9dee5;
}

.full-results-table tbody td[rowspan] {
    vertical-align: middle;
}

.full-results-table tbody td.setting-cell {
    text-align: center;
    font-weight: 400;
}

.table-note {
    margin-top: 10px;
    color: #555;
    font-size: 0.92em;
    text-align: center;
}

@media (max-width: 768px) {
    .compact-table {
        min-width: 520px;
    }

    .paired-video-grid {
        grid-template-columns: 1fr;
    }

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

/* Citation */
.robot-setup img {
    max-width: 72%;
    max-height: 260px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.citation {
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin: 40px 0;
}

.citation h3 {
    margin-top: 0;
    text-align: left;
}

.citation pre {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    line-height: 1.4;
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 0;
    color: #666;
    font-size: 0.9em;
    border-top: 1px solid #e9ecef;
    margin-top: 80px;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 1.8em;
    }

    h2 {
        font-size: 1.5em;
    }

    .rss-venue {
        font-size: 1.35em;
    }

    .video-grid {
        grid-template-columns: 1fr;
    }

}

/* Reserve image space and reveal only the fully decoded figure. */
.image-loading .priority-image:not(.is-decoded) {
    visibility: hidden;
}

/* Citation follows the project page's restrained red accent. */
.citation-section {
    margin-top: 64px;
    padding-top: 32px;
    border-top: 1px solid #e9ecef;
}
.citation-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.citation-header h2 {
    margin: 0;
    text-align: left;
}
.copy-bibtex {
    padding: 11px 18px;
    border: 1px solid #8b171a;
    border-radius: 8px;
    background: #fff;
    color: #8b171a;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.copy-bibtex:hover { background: #fff5f5; }
.copy-bibtex:focus-visible { outline: 3px solid #8b171a; outline-offset: 3px; }
.copy-bibtex:disabled { cursor: wait; opacity: 0.65; }
.citation-note { margin: 18px 0 24px; color: #666; }
.bibtex-block {
    padding: 24px;
    border: 1px solid #e3e7eb;
    border-radius: 10px;
    background: #f8f9fa;
    overflow-x: auto;
    white-space: pre;
    overflow-wrap: normal;
    font: 15px/1.75 ui-monospace, SFMono-Regular, Consolas, monospace;
    color: #333;
}
.copy-status { min-height: 24px; margin-top: 10px; color: #8b171a; font-size: 14px; }
@media (max-width: 600px) {
    .citation-section { margin-top: 40px; }
    .bibtex-block { padding: 18px; font-size: 13px; }
}

/* Author order and affiliation markers match the paper. */
.paper-authors { margin: 26px auto 10px; font-size: 18px; line-height: 1.8; }
.author-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 22px; }
.paper-author { white-space: nowrap; }
.paper-author sup { margin-left: 3px; font-size: 0.65em; }
.equal-contributors { font-weight: 600; }
.author-notes, .paper-affiliations { display: flex; justify-content: center; flex-wrap: wrap; }
.author-notes { gap: 4px 22px; font-size: 14px; color: #666; margin: 10px 0 14px; }
.paper-affiliations { gap: 6px 24px; font-size: 17px; }
.paper-affiliations sup { font-size: 0.7em; }
@media (max-width: 600px) {
    .paper-authors { font-size: 16px; margin-top: 22px; }
    .author-row { gap: 4px 14px; }
    .paper-affiliations { font-size: 15px; gap: 6px 16px; }
}

.prediction-protocol { color: #666; font-size: 15px; margin: 12px 0 24px; }
.prediction-list { display: grid; gap: 24px; }
.prediction-card h3 { margin: 0 0 16px; }
.prediction-comparison-labels { display: grid; grid-template-columns: 1fr 1fr; text-align: center; gap: 12px; font-weight: 600; color: #535a63; margin-bottom: 8px; }
.prediction-video { display: block; width: 100%; height: auto; aspect-ratio: 6 / 1; object-fit: contain; background: #fff; border-radius: 8px; }
@media (max-width: 600px) {
    .prediction-comparison-labels { font-size: 13px; }
}
