:root {
    --primary-color: #2c3e50;
    --accent-color: #3498db;
    --text-color: #333;
    --bg-color: #fdfdfd;
    --light-gray: #f4f4f4;
    --border-color: #e0e0e0;
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Roboto Slab', serif;
}

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

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

header {
    text-align: center;
    padding: 60px 0 40px;
}

h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-top: 40px;
    margin-bottom: 20px;
    color: var(--primary-color);
    border-bottom: 2px solid var(--light-gray);
    padding-bottom: 10px;
}

.authors {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.author {
    display: inline-block;
    margin: 0 10px;
    color: var(--accent-color);
    font-weight: 500;
}

.affiliations {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 30px;
}

.affiliation {
    display: inline-block;
    margin: 0 10px;
}

.note {
    display: block;
    margin-top: 5px;
    font-size: 0.85rem;
    font-style: italic;
}

.links {
    margin-top: 20px;
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    margin: 0 10px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: var(--accent-color);
}

.btn.disabled {
    background-color: #bdc3c7;
    cursor: default;
}

.btn.disabled:hover {
    background-color: #bdc3c7;
}

.demo-video,
.tldr {
    margin-top: 30px;
    max-width: 800px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.demo-video {
    text-align: center;
}

.tldr {
    font-size: 1.05rem;
    color: #444;
    background-color: #e8f0f5;
    padding: 25px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #5a9fd4;
    box-sizing: border-box; /* include padding within width for mobile */
}

.demo-video-player {
    width: 100%;
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hero {
    text-align: center;
    margin-bottom: 40px;
}

.hero .container {
    text-align: center;
}

.teaser-img {
    max-width: 90%;
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: block;
    margin: 0 auto;
}

.caption {
    font-size: 0.95rem;
    color: #555;
    margin-top: 15px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    display: block;
    max-width: 800px;
}

.abstract h2 {
    text-align: center;
}

.abstract p {
    font-size: 1.05rem;
    text-align: justify;
    margin-bottom: 15px;
}

.abstract > .container:first-of-type {
    text-align: left;
}

.abstract > .container:last-of-type {
    text-align: center;
}

.abstract > .container:last-of-type {
    text-align: center;
}

.abstract > .container:last-of-type .caption {
    font-size: 0.95rem;
    text-align: center !important;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

.demo,
.robot-execution,
.reasoning_visualization {
    text-align: center;
}

.demo-img,
.reasoning-visualization-img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.robot-execution .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.robot-images {
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: center;
    margin-bottom: 20px;
}

.robot-demo {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.robot-img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
}

.robot-caption {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    margin: 0;
    font-style: italic;
}

.results h2 {
    text-align: center;
}

.approach {
    text-align: center;
}

.approach h2 {
    text-align: center;
}

.approach-subsection {
    margin-bottom: 50px;
    text-align: left;
}

.approach-highlight-box {
    background-color: var(--light-gray);
    padding: 25px 30px;
    margin: 40px auto;
    border-radius: 8px;
    max-width: 1100px;
    text-align: center;
}

.approach-highlight-box p {
    font-size: 1.05rem;
    color: var(--text-color);
    margin: 0;
    text-align: center;
    font-style: italic;
}

.approach-subsection h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--primary-color);
    text-align: left;
}

.approach-subsection p {
    font-size: 1.05rem;
    text-align: justify;
    margin-bottom: 15px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.approach-subsection .caption {
    font-size: 0.95rem;
    text-align: center;
}

.approach-steps {
    max-width: 800px;
    margin: 20px auto;
    text-align: left;
    font-size: 1.05rem;
    line-height: 1.8;
}

.approach-steps li {
    margin-bottom: 15px;
}

.approach-img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.toolshed-images {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    align-items: stretch;
    margin: 20px 0;
}

.toolshed-images .approach-img {
    flex: 0 1 calc(50% - 10px);
    min-width: 300px;
    margin: 0;
    height: 400px;
    object-fit: contain;
    object-position: center;
}

/* Table Styles */
.table-responsive {
    overflow-x: auto;
    margin-bottom: 20px;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.results-table th,
.results-table td {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.results-table th {
    background-color: var(--light-gray);
    font-weight: 600;
    color: var(--primary-color);
}

.results-table th a {
    color: var(--primary-color);
    text-decoration: none;
}

.results-table th a:hover {
    text-decoration: underline;
}

.results-table .group-header td {
    background-color: #f9f9f9;
    font-weight: 600;
    text-align: left;
    color: #555;
}

.results-table .highlight-row td {
    background-color: #e8f4fc;
}

.bold {
    font-weight: 700;
}

.underline {
    text-decoration: underline;
}

.citation h2 {
    text-align: center;
}

.citation-block {
    max-width: 900px;
    margin: 30px auto;
}

.citation pre {
    background-color: #f8f9fa;
    padding: 25px 30px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.8;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin: 0;
}

.citation code {
    font-family: 'Courier New', Courier, monospace;
    white-space: pre;
    display: block;
}

/* Citation syntax highlighting */
.citation .cite-type {
    color: #6f42c1;
    font-weight: 600;
}

.citation .cite-key {
    color: #005cc5;
}

.citation .cite-field-wrap {
    display: inline-flex;
    width: 14ch;
    align-items: baseline;
}

.citation .cite-field {
    color: #d73a49;
    font-weight: 500;
    flex: 0 0 auto;
}

.citation .cite-operator {
    color: #6a737d;
    margin-left: auto;
    flex-shrink: 0;
}

.citation .cite-brace {
    color: #24292e;
}

.citation .cite-punct {
    color: #6a737d;
}

.citation .cite-title {
    color: #032f62;
    font-weight: 500;
}

.citation .cite-author {
    color: #22863a;
}

.citation .cite-value {
    color: #005cc5;
}

.citation .cite-url {
    color: #0366d6;
    text-decoration: underline;
}

footer {
    text-align: center;
    padding: 40px 0;
    margin-top: 60px;
    color: #888;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

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

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

    .results-table {
        font-size: 0.8rem;
    }

    .results-table th,
    .results-table td {
        padding: 6px 8px;
    }

    .robot-images {
        gap: 30px;
    }

    .toolshed-images {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
    }

    .toolshed-images .approach-img {
        flex: 1 1 calc(50% - 10px);
        min-width: 0;
        height: auto;
    }

    .tldr {
        padding: 20px 15px; /* reduce padding on small screens */
        font-size: 1rem;
    }
}