/* --- page base --- */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Google Sans', 'Noto Sans', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: #f0f0f0be;
    color: #222;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

/* center column and limit width */
.container,
.content {
    max-width: 1180px;
    margin: auto;
    padding: 20px;
}

/* header */
header {
    text-align: center;
    padding: 20px 0;
    background-color: transparent;
    box-shadow: none;
}

header h1 {
    line-height: 1.3;
}

/* authors */
.authors {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 12px;
    color: #111;
}

.authors a {
    color: #0b5ed7;
    text-decoration: none;
    transition: color 0.2s;
}

.authors a:hover {
    text-decoration: underline;
    color: #094fb8;
}

/* affiliations */
.affiliations {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    color: #444;
    font-size: 0.95rem;
}

/* venue */
.venue-container {
    text-align: center;
    margin-bottom: 14px;
}

.venue-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
    color: #ffffff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3);
}

.venue-tag i {
    font-size: 1rem;
}

/* author notes */
.author-notes {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    color: #555;
    font-size: 0.85rem;
    margin-top: 6px;
    font-style: italic;
}

/* header links (OpenReview, PDF, Benchmark, Code) */
.header-links {
    text-align: center;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.header-links .lnk {
    color: #0b5ed7;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.header-links .lnk i {
    font-size: 20px;
    vertical-align: middle;
}

.header-links .lnk:hover {
    color: #094fb8;
    text-decoration: underline;
}

.link-sep {
    color: #999;
    user-select: none;
}

/* card sections */
.section {
    background-color: #fff;
    padding: 22px;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(16, 24, 40, 0.06), 0 1px 0 rgba(16, 24, 40, 0.02);
    margin-bottom: 20px;
}

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

/* TL;DR */
.tldr {
    text-align: center;
    font-weight: bold;
}

/* main outer container */
.main-container {
    padding: 12px;
    margin: 18px;
    border: 2px solid #247ad5f4;
    border-radius: 12px;
    box-shadow: 0 0 18px rgba(0, 123, 255, 0.06);
}

/* pictures and images */
picture {
    display: block;
    width: 100%;
}

img.full-width {
    width: 99%;
    height: auto;
    border-radius: 8px;
    margin-top: 14px;
    display: block;
}

img.chart-img {
    max-width: 50%;
    margin-left: auto;
    margin-right: auto;
}

/* zoomable image & interactive lightbox */
img.zoomable {
    cursor: zoom-in;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

img.zoomable:hover {
    box-shadow: 0 4px 16px rgba(11, 94, 215, 0.18);
}

/* small icons */
.icon-width {
    width: 48px;
    height: auto;
}

/* comparison blocks responsive */
.comparison-blocks {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

/* qualitative comparison panels */
.panel-card {
    background: #fdfdfe;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 6px;
    padding-bottom: 10px;
    border-bottom: 1px solid #edf2f7;
}

.panel-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-badge {
    background: #e0f2fe;
    color: #0369a1;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
}

.click-hint {
    font-size: 0.82rem;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.click-hint:hover {
    color: #0284c7;
}

/* figure captions */
.figure-caption {
    font-size: 0.95rem;
    color: #444;
    margin-top: 12px;
    line-height: 1.55;
}

/* evaluation charts figure */
.figure-container {
    margin-top: 18px;
}

.charts-row {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
    align-items: flex-start;
    margin-top: 18px;
}

.chart-col {
    flex: 1 1 450px;
    max-width: 540px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chart-col img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.chart-caption {
    font-size: 0.88rem;
    color: #555;
    margin-top: 8px;
    line-height: 1.4;
}

/* lightbox modal */
#lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 24px;
    cursor: zoom-out;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

#lightbox-modal.active {
    display: flex;
    opacity: 1;
}

#lightbox-img {
    max-width: 95vw;
    max-height: 88vh;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    object-fit: contain;
    cursor: default;
}

#lightbox-close {
    position: absolute;
    top: 18px;
    right: 26px;
    color: #f8fafc;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

#lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

#lightbox-caption {
    color: #cbd5e1;
    font-size: 0.92rem;
    margin-top: 12px;
    text-align: center;
    max-width: 900px;
}

/* pre / bibtex */
.bibtex-container {
    display: flex;
    justify-content: center;
    position: relative;
    width: 100%;
}

.bibtex-wrapper {
    position: relative;
    width: 95%;
    max-width: 980px;
}

.bibtex-wrapper pre {
    width: 100%;
    margin: 0;
    padding-right: 90px;
}

.copy-bib-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ffffff;
    border: 1px solid #c0d3eb;
    color: #0b5ed7;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.copy-bib-btn:hover {
    background: #0b5ed7;
    color: #ffffff;
    border-color: #0b5ed7;
}

pre {
    background-color: #e8f0fe;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    padding: 14px;
    white-space: pre-wrap;
    width: 95%;
    max-width: 980px;
    text-align: left;
    overflow-x: auto;
    color: #0b1b2b;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono", "Courier New", monospace;
    font-size: 0.95rem;
}

/* badge styles for table caption */
.badge {
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}

.badge-t2i {
    background: #dceeff;
}

.badge-l2i {
    background: #dff5df;
}

.badge-agentic {
    background: #eadfff;
}

/* table tweaks */
.benchmark-tables {
    overflow-x: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
    margin-top: 16px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    min-width: 820px;
}

th,
td {
    border: 1px solid #d0d9e6;
    padding: 7px 5px;
    text-align: center;
    font-size: 0.86rem;
}

th {
    background-color: #f5f7fb;
    color: #222;
    font-weight: 600;
}

tr:nth-child(even) {
    background-color: #fafbfd;
}

tr:hover {
    background-color: #edf1f7;
}

/* highlight "Ours" row */
tr.ours-row {
    background-color: #e6f2ff;
}

tr.ours-row:hover {
    background-color: #d6e8fc;
}

.ours-best {
    font-weight: 700;
    color: #084298;
}

.second-best {
    text-decoration: underline;
}

/* text utilities */
.text-justify {
    text-align: justify;
    line-height: 1.55;
}

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

/* footer */
.footer-section {
    padding: 14px 22px;
}

.footer-note {
    font-size: 10px;
    color: #666;
    text-align: center;
    margin: 2px 0;
}

.footer-note a {
    color: #0b5ed7;
    text-decoration: none;
}

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

/* responsive: narrow screens */
@media (max-width: 820px) {
    .main-container {
        margin: 8px;
        padding: 8px;
    }

    .container {
        padding: 12px;
    }

    .section {
        padding: 14px;
    }

    .authors {
        gap: 6px;
        font-size: 0.95rem;
    }

    pre {
        width: 100%;
        font-size: 0.85rem;
    }

    img.chart-img {
        max-width: 90%;
    }

    th, td {
        padding: 6px 4px;
        font-size: 0.8rem;
    }

    header h1 {
        font-size: 1.3rem;
    }
}

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

    .authors {
        font-size: 0.85rem;
    }

    .affiliations {
        font-size: 0.85rem;
        gap: 6px;
    }

    .header-links {
        gap: 8px;
    }
}

/* Announcement Banner */
.notice-section {
    padding-top: 10px;
    padding-bottom: 5px;
}

.announcement-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #e8f0fe;
    color: #1967d2;
    border: 1px solid #c2e7ff;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 0.98rem;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    text-align: center;
}

/* Responsive Video Presentation */
.video-container {
    max-width: 880px;
    margin: 20px auto 10px auto;
    width: 100%;
}

.video-responsive {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio fallback */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    background-color: #0f172a;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
}

@supports (aspect-ratio: 16 / 9) {
    .video-responsive {
        height: auto;
        padding-bottom: 0;
        aspect-ratio: 16 / 9;
    }
}

.video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0;
    display: block;
}
