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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Early Draft Banner */
.draft-banner {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
    text-align: center;
    padding: 0.75rem 1rem;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.05em;
    position: relative;
    z-index: 200;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

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

/* Header and Navigation */
header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #3498db;
}

/* Hero Section */
#hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0 2rem;
    text-align: center;
}

.hover-instruction {
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    text-align: center;
    opacity: 0.95;
}

/* Title and Authors Section */
.title-authors-section {
    padding: 3rem 0 2rem;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.title-authors-section h1 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 2rem;
    font-weight: 700;
}

.authors-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem 2.5rem;
    margin-bottom: 1rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.author {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 1.05rem;
}

.author-break {
    flex-basis: 100%;
    height: 0;
}

.author-name {
    color: white;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.author-affiliation {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
}

.affiliation-superscript {
    font-size: 0.75em;
    vertical-align: super;
    color: rgba(255, 255, 255, 0.9);
}

.equal-contribution {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    font-style: italic;
    margin-top: 1rem;
}

#hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

#hero p {
    font-size: 1.25rem;
    margin-bottom: 3rem;
}

/* Demo Showcase */
.demo-showcase {
    margin-top: 0;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.demo-gif-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.demo-gif-item {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    text-decoration: none;
    cursor: pointer;
}

.demo-gif-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.demo-gif-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    transition: opacity 0.2s ease;
}

.demo-gif-item.gif-paused::after {
    content: '▶';
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    z-index: 2;
    padding-left: 3px;
}

.demo-gif-item:hover.gif-paused::after {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.demo-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 0.75rem 0.5rem 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
}

/* Sections */
section {
    padding: 3rem 0;
}

section:nth-child(even) {
    background-color: #f8f9fa;
}

section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

section h3 {
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

section p {
    font-size: 1.1rem;
    color: #555;
}

/* About Section */
.intro-text {
    font-size: 1.3rem;
    color: #667eea;
    font-weight: 500;
    margin-bottom: 2rem;
}

.about-content {
    margin-bottom: 3rem;
}

.about-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    text-align: justify;
}

.about-content ul {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.about-content li {
    margin-bottom: 0.75rem;
    line-height: 1.8;
    font-size: 1.1rem;
    color: #555;
    text-align: justify;
}

/* Challenges Grid */
.challenges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.challenge-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.challenge-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.challenge-card h4 {
    font-size: 1.25rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.challenge-card p {
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

/* Usage Section */
#usage h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

#usage a {
    color: #667eea;
    text-decoration: none;
}

#usage a:hover {
    text-decoration: underline;
}

.code-block {
    margin: 1.5rem 0;
}

.code-block pre {
    padding: 1.5rem !important;
    border-radius: 8px !important;
    overflow-x: auto;
    margin: 0 !important;
    background: #2d3748 !important;
}

.code-block code {
    font-family: 'Monaco', 'Courier New', monospace !important;
    font-size: 0.9rem !important;
    line-height: 1.6 !important;
}

.code-block pre[class*="language-"] {
    padding: 1.5rem !important;
    margin: 0 !important;
}

/* Inline code styling */
#usage code:not([class*="language-"]) {
    background: #e8eaf6;
    color: #667eea;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
}

/* Plain text output (for object-centric state display) */
.code-block pre code:not([class*="language-"]) {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace !important;
    font-size: 0.75rem !important;
    line-height: 1.4 !important;
    color: #f8f9fa !important;
    white-space: pre !important;
    display: block !important;
    background: transparent !important;
}

.code-block pre:has(code:not([class*="language-"])) {
    background: #2d3748 !important;
}

/* Environment Categories Grid */
.env-categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.env-category-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 4px solid #667eea;
}

.env-category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.env-category-card h3 {
    font-size: 1.5rem;
    margin: 0 0 0.75rem 0;
}

.env-category-card h3 a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s;
}

.env-category-card h3 a:hover {
    color: #667eea;
}

.category-desc {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.env-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.env-list li {
    padding: 0.6rem 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.env-list li:last-child {
    border-bottom: none;
}

.env-list a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    flex: 1;
}

.env-list a:hover {
    color: #5568d3;
    text-decoration: underline;
}

.env-count {
    font-size: 0.85rem;
    color: #999;
    font-weight: normal;
    white-space: nowrap;
    margin-left: 1rem;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

/* Collapsible Section */
.collapsible-header {
    cursor: pointer;
    user-select: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.collapsible-header:hover {
    color: #667eea;
}

.toggle-icon {
    font-size: 1rem;
    transition: transform 0.3s ease;
    display: inline-block;
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

/* Comparison Table */
.comparison-table-wrapper {
    overflow-x: auto;
    margin: 2rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.9rem;
}

.comparison-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.comparison-table th {
    padding: 1rem 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.comparison-table th:last-child {
    border-right: none;
}

.comparison-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    text-align: center;
}

.comparison-table td:first-child {
    text-align: left;
    font-weight: 500;
}

.comparison-table td:last-child {
    border-right: none;
}

.comparison-table tbody tr:hover {
    background-color: #f8f9fa;
}

.comparison-table .highlight-row {
    background-color: #e8eaf6;
    font-weight: 600;
}

.comparison-table .highlight-row:hover {
    background-color: #dce0f5;
}

/* References Section */
.references {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.references p {
    margin: 0.5rem 0;
    font-size: 0.85rem;
    line-height: 1.5;
}

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

    .nav-links {
        gap: 1rem;
    }

    .title-authors-section {
        padding: 2rem 0 1.5rem;
    }

    .title-authors-section h1 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }

    .authors-list {
        gap: 1rem 1.5rem;
    }

    .author {
        font-size: 0.95rem;
    }

    .equal-contribution {
        font-size: 0.85rem;
    }

    #hero h2 {
        font-size: 1.8rem;
    }

    #hero p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .demo-showcase {
        padding: 1rem;
    }

    .demo-gif-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }

    .demo-label {
        font-size: 0.75rem;
        padding: 0.75rem 0.5rem 0.35rem;
    }

    section h2 {
        font-size: 1.5rem;
    }

    section p {
        font-size: 1rem;
    }

    .env-categories-grid {
        grid-template-columns: 1fr;
    }
}

/* Results Figure */
.results-figure {
    max-width: 100%;
    width: 100%;
    max-height: 80vh;
    object-fit: contain;
    display: block;
    margin: 2rem auto;
    border-radius: 8px;
}

/* Method Details */
.method-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.method-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.method-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.method-card h4 {
    color: #667eea;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.method-card p {
    color: #555;
    line-height: 1.6;
    margin: 0;
    font-size: 0.9rem;
}

.method-card a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s ease;
}

.method-card a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Real Robots Section */
.real-robots-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
}

.real-robot-demo {
    max-width: 800px;
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.real-robot-demo:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
}

.real-robots-content p {
    text-align: center;
    font-size: 1.15rem;
    line-height: 1.8;
    max-width: 800px;
    color: #555;
}

@media (max-width: 768px) {
    .real-robot-demo {
        max-width: 100%;
        border-radius: 8px;
    }
    
    .real-robots-content p {
        font-size: 1rem;
    }
}

