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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 3px solid #4a90e2;
}

.navbar {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 16px 0;
    margin: 0 auto 24px;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.15);
    border-bottom: 1px solid #dfe6ee;
}

.navbar-menu {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

.navbar-start {
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-item,
.navbar-link {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: white;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.navbar-item:hover,
.navbar-link:hover {
    background: #4a90e2;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

.navbar-item.has-dropdown {
    position: relative;
}

.navbar-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    min-width: 220px;
    padding: 8px;
    z-index: 10;
}

.navbar-item.has-dropdown:hover .navbar-dropdown {
    display: block;
}

.navbar-item.has-dropdown.is-active .navbar-dropdown {
    display: block;
}

.navbar-item.has-dropdown.is-active .navbar-link {
    background: #4a90e2;
    color: white;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

.dropdown-caret {
    font-size: 0.85em;
    opacity: 0.8;
}

.navbar-dropdown .navbar-item {
    width: 100%;
    justify-content: flex-start;
    background: transparent;
    color: #2c3e50;
    box-shadow: none;
    transform: none;
}

.navbar-dropdown .navbar-item:hover {
    background: #4a90e2;
    color: white;
}

.navbar-burger {
    display: none;
}

.nav-bar {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 25px 30px;
    border-radius: 10px;
    margin-bottom: 40px;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.15);
    border-left: 5px solid #4a90e2;
}

.nav-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
}

.nav-row:last-child {
    margin-bottom: 0;
}

.nav-section-num {
    font-weight: 700;
    font-size: 1.15em;
    color: #2980b9;
    min-width: 35px;
    text-align: left;
}

.nav-link {
    padding: 6px 14px;
    background: white;
    color: #2c3e50;
    text-decoration: none;
    border-radius: 999px;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9em;
    display: inline-block;
    line-height: 1.2;
    white-space: nowrap;
}

.nav-link:hover {
    background: #4a90e2;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

.nav-section-title {
    font-weight: 700;
    font-size: 1.1em;
    color: #2980b9;
    margin-bottom: 8px;
}

.nav-section {
    margin-bottom: 15px;
}

.nav-subsection {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.nav-subsection > span {
    flex-basis: 100%;
    padding: 4px 0;
    line-height: 1.2;
}

h1 {
    font-size: 2.5em;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 700;
}

.authors {
    font-size: 1.2em;
    color: #7f8c8d;
    margin-bottom: 10px;
    font-style: normal;
}

.author a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.author a:hover {
    color: #4a90e2;
}

.author a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 50%;
    background-color: #4a90e2;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.author a:hover::after {
    width: 100%;
}


.conference {
    font-size: 1.1em;
    color: #95a5a6;
    margin-bottom: 25px;
}

.links {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
    flex-wrap: wrap;
}

.button {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
    font-size: 0.95em;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
    background: linear-gradient(135deg, #357abd 0%, #2868a8 100%);
}

.abstract {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 35px;
    border-radius: 12px;
    margin-bottom: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-left: 5px solid #4a90e2;
}

.abstract h2 {
    color: #2980b9;
    font-size: 1.8em;
    margin-bottom: 20px;
    border-bottom: none;
}

.abstract p {
    font-size: 1.05em;
    line-height: 1.8;
    color: #2c3e50;
    text-align: justify;
}

.tldr-section {
    margin: 35px 0;
}

.tldr-box {
    background: linear-gradient(135deg, #f6fbff 0%, #eef7ff 45%, #eafaf3 100%);
    padding: 22px 28px;
    border-radius: 14px;
    border: 1px solid #d6e9ff;
    border-left: 6px solid #4a90e2;
    box-shadow: 0 8px 20px rgba(44, 62, 80, 0.12);
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
}

.tldr-box::after {
    content: '';
    position: absolute;
    top: -45px;
    right: -45px;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(74, 144, 226, 0.25) 0%, rgba(74, 144, 226, 0) 70%);
}

.tldr-box > * {
    position: relative;
    z-index: 1;
}

.tldr-label {
    font-size: 0.95em;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #4a90e2 0%, #1cbf91 100%);
    box-shadow: 0 6px 14px rgba(74, 144, 226, 0.35);
}

.tldr-text {
    font-size: 1.05em;
    color: #1f2d3d;
    line-height: 1.7;
    flex: 1;
    min-width: 300px;
}

.teaser {
    margin: 40px 0;
}

.teaser-container {
    text-align: center;
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.teaser-gif {
    width: 80%;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.teaser-caption {
    margin-top: 20px;
    font-size: 1.05em;
    color: #555;
    font-style: italic;
    line-height: 1.6;
}

.overview {
    margin: 50px 0;
}

.overview h2 {
    color: #2980b9;
    font-size: 2em;
    margin-bottom: 40px;
    text-align: center;
}

.method-subsection {
    margin-bottom: 50px;
}

.method-subsection h3 {
    color: #34495e;
    font-size: 1.5em;
    margin-bottom: 25px;
    text-align: center;
}

.method-subsection.split h3 {
    text-align: left;
    margin-top: 0;
}

.method-split {
    display: flex;
    gap: 30px;
    align-items: center;
}

.method-split.reverse {
    flex-direction: row-reverse;
}

.method-text {
    flex: 1;
}

.method-split .figure-container {
    flex: 1;
    max-width: 50%;
}

.figure-col {
    flex: 0 0 50%;
    max-width: 50%;
    display: flex;
    justify-content: center;
}

.figure-container {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.method-figure {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin-bottom: 15px;
}

.figure-caption {
    color: #555;
    font-size: 0.95em;
    line-height: 1.6;
    text-align: left;
    margin-top: 15px;
    padding: 0 10px;
}

.figure-compact {
    width: 80%;
    max-width: 80%;
    margin: 0 auto;
}

.figure-compact-img {
    max-width: 100%;
}

.highlights {
    margin-bottom: 50px;
}

.highlights h2 {
    color: #2980b9;
    font-size: 2em;
    margin-bottom: 30px;
    text-align: center;
}

.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.highlight-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-left: 4px solid #4a90e2;
    text-align: center;
}

.highlight-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.15);
}

.highlight-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.highlight-card h3 {
    color: #2c3e50;
    font-size: 1.2em;
    margin: 15px 0;
}

.highlight-card p {
    color: #555;
    font-size: 0.95em;
    line-height: 1.6;
}

.author {
    display: inline-block;
    margin: 0 5px;
}

.affiliations {
    font-size: 1em;
    color: #7f8c8d;
    margin: 10px 0 20px 0;
}

.affiliations sup {
    margin-right: 5px;
}

.bibtex {
    background: #f8f9fa;
    padding: 35px;
    border-radius: 12px;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.bibtex h2 {
    color: #2980b9;
    font-size: 1.8em;
    margin-bottom: 20px;
    border-bottom: none;
}

.bibtex > p {
    color: #555;
    margin-bottom: 20px;
    font-size: 1.05em;
}

.bibtex-box {
    background: #2c3e50;
    border-radius: 8px;
    padding: 20px;
    position: relative;
    overflow-x: auto;
}

.bibtex-box pre {
    margin: 0;
    color: #ecf0f1;
    font-family: 'Courier New', monospace;
    font-size: 0.95em;
    line-height: 1.6;
}

.bibtex-box code {
    color: #ecf0f1;
}

.copy-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 8px 16px;
    background: #4a90e2;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.3s ease;
    z-index: 10;
}

.copy-btn:hover {
    background: #357abd;
    transform: translateY(-2px);
}

.copy-btn:active {
    transform: translateY(0);
}

.tldr {
    background: #e8f4f8;
    padding: 20px 30px;
    border-left: 5px solid #4a90e2;
    margin: 30px 0;
    border-radius: 5px;
}

.tldr h3 {
    color: #2980b9;
    margin-bottom: 10px;
    font-size: 1.3em;
}

.tldr p {
    color: #34495e;
    font-size: 1.05em;
    line-height: 1.8;
}

section {
    margin-bottom: 60px;
}

h2 {
    font-size: 2em;
    color: #2c3e50;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ecf0f1;
}

h3 {
    font-size: 1.5em;
    color: #34495e;
    margin-bottom: 20px;
    margin-top: 30px;
}

.subsection-title {
    font-size: 1.4em;
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 15px;
}

.subsubsection-title {
    font-size: 1.2em;
    color: #2f6fa1;
    margin-top: 0;
    margin-bottom: 12px;
}

h4 {
    font-size: 1.2em;
    color: #555;
    margin-bottom: 15px;
    margin-top: 20px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.video-grid-2x3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.video-grid-2x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.video-grid-4col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.video-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.video-container {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.video-container video {
    width: 100%;
    border-radius: 5px;
    background: #000;
}

.video-label {
    text-align: center;
    margin-top: 10px;
    font-weight: 600;
    color: #555;
    font-size: 0.95em;
}

.small-labels .video-label {
    font-size: 0.85em;
}

.comparison-grid {
    display: grid;
    grid-template-columns: 100px repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 40px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
}

.method-header {
    text-align: center;
    font-weight: 600;
    color: #2c3e50;
    padding: 8px 10px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    border: 2px solid #9cc3ea;
    border-radius: 999px;
    margin-bottom: 8px;
    box-shadow: 0 2px 6px rgba(44, 62, 80, 0.12);
}

.data-label-left {
    font-weight: 600;
    color: #2c3e50;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    min-width: 44px;
    background: linear-gradient(135deg, #f8f9fa 0%, #eef3f7 100%);
    border: 2px solid #9cc3ea;
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(44, 62, 80, 0.12);
    justify-self: center;
}

.data-label {
    font-weight: 600;
    color: #2c3e50;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    min-width: 44px;
    background: linear-gradient(135deg, #f8f9fa 0%, #eef3f7 100%);
    border: 2px solid #9cc3ea;
    border-radius: 999px;
    margin-bottom: 8px;
    box-shadow: 0 2px 6px rgba(44, 62, 80, 0.12);
}

.subsection {
    background: #fafafa;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    border-left: 4px solid #4a90e2;
}

.subsection.subsubsection {
    margin-left: 18px;
    padding: 20px;
    border-left: 3px solid #b8d7f2;
    background: #fdfdfd;
}

.subsection p {
    margin-bottom: 20px;
    color: #555;
}

.subsection p.note {
    color: #777;
    font-style: italic;
}

.row-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.sync-controls {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

/* Adjust button position for comparison-grid (4-column layout) */
.comparison-grid.sync-group .sync-controls {
    left: calc(50% + 50px);
    bottom: 10px;
}

.sync-btn {
    padding: 8px 12px;
    font-size: 1em;
    font-weight: 600;
    border: 2px solid #4a90e2;
    background: white;
    color: #4a90e2;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.sync-btn:hover {
    background: #4a90e2;
    color: white;
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
}

.sync-btn:active {
    transform: scale(0.95);
}

footer {
    text-align: center;
    margin-top: 60px;
    padding: 30px;
    border-top: 2px solid #ecf0f1;
    color: #7f8c8d;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    font-size: 0.95em;
}

footer p {
    margin: 5px 0;
}

footer a {
    color: #4a90e2;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #2868a8;
    text-decoration: underline;
}

@media (max-width: 1024px) {
    .video-grid, .video-grid-2x3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .comparison-grid {
        grid-template-columns: 80px repeat(2, 1fr);
    }
    
    .highlights-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .video-grid, .video-grid-2x3 {
        grid-template-columns: 1fr;
    }
    
    .comparison-grid {
        grid-template-columns: 1fr;
    }
    
    .highlights-grid {
        grid-template-columns: 1fr;
    }
    
    .links {
        flex-direction: column;
        align-items: center;
    }
    
    .button {
        width: 80%;
        text-align: center;
    }
    
    h1 {
        font-size: 1.8em;
    }
    
    h2 {
        font-size: 1.5em;
    }
    
    .container {
        padding: 20px;
    }
    
    .abstract, .highlights, .overview {
        padding: 20px;
    }
    
    .tldr-box {
        flex-direction: column;
        text-align: center;
    }
    
    .tldr-text {
        min-width: unset;
    }
    
    .teaser-container {
        padding: 15px;
    }
    
    .figure-container {
        padding: 15px;
    }
    
    .figure-caption {
        font-size: 0.9em;
    }

    .method-split {
        flex-direction: column;
    }

    .method-subsection.split h3 {
        text-align: center;
    }

    .method-split .figure-container {
        max-width: 100%;
    }

    .figure-col {
        max-width: 100%;
        flex: 0 0 100%;
    }
}
