/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --text-color: #1f2937;
    --text-secondary: #6b7280;
    --bg-light: #f9fafb;
    --bg-gray: #e5e7eb;
    --border-color: #d1d5db;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Google Sans', 'Noto Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    font-weight: 300;
}

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

/* Typography */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: center;
    color: var(--text-color);
}

h1.publication-title {
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1.2;
    margin: 1rem auto 1.5rem;
    max-width: 1000px;
    color: var(--text-color);
    font-family: 'Noto Sans', sans-serif;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    color: var(--text-color);
}

h2.subtitle {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 1.5rem;
}

h2.venue {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem;
    color: var(--text-color);
}

/* Header Section */
header {
    text-align: center;
    margin-bottom: 3rem;
    padding-top: 2rem;
}

.paper-logo {
    width: 200px;
    height: 200px;
    margin: 0 auto 1.5rem;
    display: block;
    border-radius: 50%;
    box-shadow: var(--shadow-md);
}

/* Authors Section */
.authors {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1rem;
    margin: 1.5rem auto;
    font-size: 1.2rem;
    max-width: 900px;
    line-height: 1.8;
    font-family: 'Google Sans', 'Noto Sans', sans-serif;
    font-weight: 600;
}

.author-block {
    display: inline;
}

.author-block a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 400;
}

.author-block a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.author-block a:visited {
    color: #2563eb;
}

.author-block sup {
    font-size: 0.75em;
    margin-left: 2px;
}

/* Affiliations */
.affiliations {
    text-align: center;
    margin: 1rem auto;
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.affiliation-block {
    display: inline;
    font-size: large;
    
}

.affiliation-block sup {
    font-size: 0.85em;
    margin-right: 3px;
}

/* Contact Email */
.contact-email {
    margin: 1rem auto;
    text-align: center;
}

.email-block {
    color: var(--text-secondary);
}

.email-block tt {
    font-family: 'Courier New', Courier, monospace;
    background-color: var(--bg-light);
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
}

/* Button Styles */
.button-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 9999px;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.btn-primary {
    background-color: #27272a;
    color: var(--white);
}

.btn-primary:hover {
    background-color: #a1a1aa;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Figures and Images */
.main-figure {
    margin: 3rem 0;
    text-align: center;
}

.overview-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-lg);
}

figcaption {
    margin-top: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-style: italic;
}

/* Abstract Section */
.abstract-section {
    background-color: var(--bg-gray);
    padding: 2rem 1.5rem;
    margin: 3rem 5rem;
    border-radius: 2rem;
}

.abstract-content {
    max-width: 900px;
    margin: 0 auto;
}

.abstract-content h2 {
    margin-top: 0;
    text-align: center;
}

.abstract-content p {
    margin-bottom: 1rem;
    text-align: justify;
}

.abstract-content ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.abstract-content li {
    margin-bottom: 0.5rem;
}

/* Media Sections */
.media-section {
    margin: 4rem 0;
}

.media-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.video-section-container {
    margin: 3rem 0;
    padding: 2rem;
    background-color: var(--bg-light);
    border-radius: 1rem;
}

.section-subtitle {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.task-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.task-btn {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    border: 2px solid var(--primary-color);
    background-color: var(--white);
    color: var(--primary-color);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.task-btn:hover {
    background-color: var(--bg-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.task-btn.active {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.single-agent-videos {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
}

.single-agent-videos .task-video-group {
    display: none;
}

.single-agent-videos .task-video-group.active-video {
    display: block;
}

.video-grid-three {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .video-grid-three {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

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

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
}

/* Multi-agent videos have wider aspect ratio */
#video-multi .video-wrapper {
    padding-bottom: 42.86%; /* 21:9 aspect ratio for wider videos */
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Task-specific video zoom and positioning */
#video-reaching .video-wrapper video {
    transform: scale(1.65) translate(2%, 2%);
}

#video-placement .video-wrapper video {
    transform: scale(1.59) translate(0%, 3.5%); 
}

#video-complete .video-wrapper video {
    transform: scale(1.5) translate(0%, 1%); 
}

#video-multi .video-wrapper video {
    transform: scale(1.25) translate(-3%, 4.5%); 
}

.video-placeholder {
    aspect-ratio: 16 / 9;
    background-color: var(--bg-gray);
    border: 2px dashed var(--border-color);
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.video-placeholder p {
    margin: 0.25rem;
}

.hint {
    font-size: 0.875rem;
    font-style: italic;
}

.caption {
    margin-top: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Image Gallery */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.gallery-item {
    text-align: center;
}

.gallery-image {
    width: 75%;
    height: 250px;
    object-fit: cover;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    background-color: var(--bg-gray);
    border: 1px solid var(--border-color);
}

#task .gallery-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    background-color: var(--bg-gray);
    border: 1px solid var(--border-color);
    transform: scale(1) translate(0%, 0%);
}

.plot-image {
    width: 80%;
    height: 250px;
    object-fit: cover;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    background-color: var(--bg-gray);
    border: 1px solid var(--border-color);
}

.gui-image {
    width: 50%;
    height: 500px;
    object-fit: cover;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    background-color: var(--bg-gray);
    border: 1px solid var(--border-color);
}


.gallery-item figcaption {
    margin-top: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Publications Section */
.publications-section {
    margin: 4rem 0;
}

.publication {
    background-color: var(--bg-light);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-color);
}

.publication h3 {
    margin-top: 0;
    font-size: 1.25rem;
}

.authors-list {
    color: var(--text-secondary);
    margin: 0.5rem 0;
}

.venue {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0.5rem 0;
}

.pub-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.link-btn {
    display: inline-block;
    padding: 0.4rem 1rem;
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 0.25rem;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
}

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

/* Citation Section */
.citation-section {
    margin: 4rem 0;
}

.bibtex {
    background-color: #1e1e1e;
    color: #d4d4d4;
    padding: 1.5rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

.bibtex code {
    display: block;
    white-space: pre;
}

/* Contact Section */
.contact-section {
    margin: 4rem 0;
}

.contact-section ul {
    list-style: none;
    padding: 0;
}

.contact-section li {
    margin: 0.5rem 0;
}

.contact-section a {
    color: var(--primary-color);
    text-decoration: none;
}

.contact-section a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    margin-top: 4rem;
    text-align: center;
}

.divider {
    width: 100%;
    height: 1px;
    background-color: var(--border-color);
    margin: 2rem 0;
}

.footer-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.footer-text a {
    color: var(--primary-color);
    text-decoration: none;
}

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

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

    h2 {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 1.125rem;
    }

    .container {
        padding: 2rem 1rem;
    }

    .abstract-section {
        padding: 2rem 1.5rem;
        margin: 2rem -1rem;
    }

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

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

    .button-group {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        justify-content: center;
    }
}

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

    .abstract-section {
        padding: 1.5rem 1rem;
    }
}

/* Code Section Styles */
.code-section {
    background: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-top: 1.5rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #2d2d2d;
    border-bottom: 1px solid #3d3d3d;
}

.code-title {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.95rem;
    color: #61dafb;
    font-weight: 600;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.code-section details {
    background: #1e1e1e;
}

.code-section details[open] summary {
    border-bottom: 1px solid #3d3d3d;
    margin-bottom: 0;
}

.code-section pre {
    margin: 0;
    max-height: 500px;
    overflow: auto;
    background: #1e1e1e;
}

.code-section code {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.8rem;
    line-height: 1.4;
}

/* Prism.js overrides */
pre[class*="language-"] {
    padding: 1rem;
    margin: 0;
    background: #1e1e1e !important;
}

code[class*="language-"] {
    text-shadow: none;
    background: none;
    font-size: 0.8rem;
}

/* Remove line numbers styling */
.code-section .line-numbers .line-numbers-rows {
    display: none;
}

.code-section pre.line-numbers {
    padding-left: 1rem;
}

/* Override any orange/white number styling */
.code-section span.token.number {
    color: #b5cea8;
    background: none;
    border-radius: 0;
    padding: 0;
}

