* {
    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-size: 2.8em;
    font-weight: 500;
    margin-bottom: 18px;
    line-height: 1.2;
}

h1 .title-lda {
    font-family: 'Playfair Display', 'Garamond', 'Times New Roman', serif;
    font-weight: 700;
    font-style: italic;
    font-size: 1em;
    transform: scaleX(1.12);
    transform-origin: left center;
    display: inline-block;
    margin-right: 0.12em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.15);
    color: #2c2c2c;
}

.authors {
    font-size: 1.1em;
    margin-bottom: 10px;
    line-height: 1.45;
    color: #333;
}

.authors .author-name {
    color: #2563eb;
}

.authors a.author-name {
    text-decoration: none;
}

.authors a.author-name:hover {
    text-decoration: underline;
}

.authors sup {
    color: #333;
}

.author {
    display: inline;
    margin-right: 8px;
}

.author::after {
    content: ", ";
}

.author:last-child::after {
    content: "";
}

.affiliations {
    font-size: 0.95em;
    color: #666;
    margin-top: 6px;
    margin-bottom: 8px;
    line-height: 1.1;
}

.affiliation {
    display: block;
    margin: 0px 0;
}

/* Navigation Buttons */
.nav-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 2px 0 4px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 0.9em;
    background: #000 !important;
    background-color: #000 !important;
    border: none;
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: none;
}

.btn .icon {
    display: inline-flex;
    align-items: center;
    font-size: 1em;
}

.btn:hover {
    background: #000 !important;
    background-color: #000 !important;
    box-shadow: none;
    transform: translateY(-1px);
}

.btn.disabled {
    background: #000 !important;
    background-color: #000 !important;
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

/* 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;
}

/* Sharpa videos: 2 in first row (centered), 3 in second row */
.video-grid-sharpa {
    margin: 40px 0;
}

/* Galbot 前两个视频并排占满屏 */
.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-sharpa {
        grid-template-columns: 1fr;
    }
    
    .video-grid-sharpa .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;
}

/* Make model and dataset sections equal height without whitespace */
#model-dataset .two-column-grid {
    align-items: stretch;
    grid-template-columns: 1.2fr 0.8fr;
}

#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: 280px;
    border-radius: 8px;
    margin: 4px 0 10px 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: 1 1 auto;
    min-height: 6.5em;
}

@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;
}

/* 2:1 side-by-side layout */
.result-figure-row-2-1 {
    display: flex;
    flex-direction: row;
    gap: 24px;
    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: 2 1 1287px;
    min-width: 0;
}

.result-figure-row-2-1 .result-figure-cell-1 {
    flex: 1 1 640px;
    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%;
    flex-shrink: 0;
    border-radius: 8px;
}

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

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

@media (max-width: 900px) {
    .result-figure-row-2-1 {
        flex-direction: column;
        gap: 28px;
    }

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

.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-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;
}

/* 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;
    }

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

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