/* Base Styles */
:root {
    /* Primary colors */
    --primary: #AC37E5;
    --primary-light: #C575ED;
    --primary-dark: #8A2CB7;
    --secondary: #82B366;

    /* Text colors */
    --text-dark: #333;
    --text-light: #666;

    /* Background colors */
    --background: #fff;
    --background-alt: #f5f7fa;
    --border: #ddd;

    /* Semantic colors */
    --success: #4caf50;
    --warning: #ff9800;
    --danger: #f44336;

    /* Component-specific colors */
    --object-color: #2a9d8f;
    --attack-color: #e76f51;

    /* Common properties */
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --box-shadow-hover: 0 4px 15px rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background);
}

/* Work in Progress Banner */
.wip-banner {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe8a0 100%);
    border-bottom: 3px solid #ff9800;
    padding: 16px 0;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.wip-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    max-width: 1500px;
    margin: 0 auto;
    width: 95%;
    padding: 0 20px;
}

.wip-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.wip-text {
    font-size: 14px;
    color: #856404;
    text-align: center;
    font-weight: 500;
}

.container {
    width: 95%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 20px;
}

/* Typography */
h1,
h3,
h4,
h5,
h6 {
    margin-bottom: 1rem;
    line-height: 1.3;
    text-align: center;
}

h2 {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 0.5rem 2rem;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(172, 55, 229, 0.3);
    margin-bottom: 2rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

p {
    margin-bottom: 1rem;
}

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

a:hover {
    text-decoration: underline;
}

/* Monospace code/model names */
code,
.mono {
    font-family: 'Roboto Mono', 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: 0.95em;
    letter-spacing: -0.3px;
}

/* Common Elements */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

.button:hover {
    background-color: var(--primary-dark);
    text-decoration: none;
}

.nav-button {
    white-space: nowrap;
    background-color: var(--primary-light);
}

.nav-button:hover {
    background-color: var(--primary);
}

.feedback-button {
    border-radius: 20px;
    padding: 10px 40px;
    background-color: #d9d9d9;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.feedback-button:hover {
    background-color: #bebebe;
}

.accepted-button {
    border-radius: 20px;
    padding: 10px 40px;
    background-color: #2ecc40;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.accepted-button:hover {
    background-color: #27ae38;
}

/* Header */
.header {
    background-color: var(--background-alt);
    padding: 50px 0;
    text-align: center;
}

.header h1 {
    font-size: 2.5rem;
    max-width: 900px;
    margin: 0 auto 1.5rem;
}

.header sup {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-left: 0.2rem;
}

.header-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

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

.affiliations {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.teaser-text {
    text-align: center;
    margin-bottom: 3rem;
    margin-top: -2rem;
}

/* Section Styles (common) */
.abstract,
.methodology,
.key-findings,
.citation {
    padding: 50px 0;
    background-color: var(--background-alt);
}

.dataset,
.results,
.resources,
.key-contributions {
    padding: 30px 0 50px 0;
    background-color: var(--background);
}

/* Key Contributions Section */
.key-contributions ul {
    max-width: 900px;
    margin: 0 auto;
    padding-left: 0;
    list-style: none;
}

.key-contributions li {
    margin-bottom: 1rem;
    padding: 1rem 1.25rem;
    background-color: var(--background-alt);
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

/* Pipeline Section */
.pipeline {
    padding: 50px 0;
    background-color: var(--background);
}

.pipeline-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

.pipeline-stages {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pipeline-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 200px;
    text-align: center;
}

.stage-image {
    width: 170px;
    height: 170px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background-color: #000;
    margin-bottom: 0.75rem;
}

.stage-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stage-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.stage-number {
    background-color: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-family: 'Roboto Mono', monospace;
}

.stage-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
    text-align: left;
}

.stage-description {
    font-size: 0.8rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.3;
}

.pipeline-arrow {
    font-size: 2rem;
    color: var(--primary);
    font-weight: 700;
    margin-top: 60px;
    user-select: none;
}

/* Abstract Section */
.abstract h3 {
    margin-top: 3rem;
}

.abstract p {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: justify;
}

.abstract ul {
    max-width: 800px;
    margin: 1.5rem auto;
    padding-left: 2rem;
}

.abstract li {
    margin-bottom: 0.8rem;
}

/* Dataset Section */
.dataset p {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    margin-bottom: 2rem;
}

.dataset-variants {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.variant-image {
    height: 250px;
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.variant-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.variant p {
    padding: 1rem;
    text-align: center;
    margin-bottom: 0;
}

.placeholder-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #e0e0e0;
}

/* Dataset Stats */
.dataset-stats {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-box {
    display: flex;
    justify-content: space-around;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 40px;
    width: 100%;
    max-width: 800px;
}

.stat {
    text-align: center;
    width: 150px;
    flex: 0 0 auto;
}

.stat h4 {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 0.3rem;
}

.dataset-comparison {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.comparison-image {
    max-width: 500px;
    margin: 0 auto 1rem;
    box-shadow: var(--box-shadow);
    border-radius: 8px;
    overflow: hidden;
}

.comparison-image img {
    width: 100%;
    object-fit: contain;
}

/* Methodology Section */
.methodology-container {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.methodology-vlm,
.methodology-lvlm {
    flex: 1;
    min-width: 350px;
    background-color: var(--background);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--box-shadow);
}

.methodology-vlm img,
.methodology-lvlm img {
    width: 100%;
    height: 8em;
    object-fit: contain;
    margin-bottom: 1.5rem;
    border-radius: 8px;
}

/* Results Section */
.result-section {
    margin-bottom: 3rem;
}

.result-figure {
    max-width: 800px;
    margin: 0 auto 1.5rem;
    background-color: var(--background-alt);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
}

.result-figure img {
    width: 100%;
    object-fit: contain;
}

.result-section p {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* Key Findings Section */
.findings {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.finding {
    flex: 1;
    min-width: 250px;
    max-width: 350px;
    background-color: var(--background);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    text-align: center;
}

.finding .icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* Resources Section */
.resource-links {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.resource {
    flex: 1;
    min-width: 250px;
    max-width: 350px;
    text-align: center;
    padding: 20px;
    background-color: var(--background-alt);
    border-radius: 8px;
    box-shadow: var(--box-shadow);
}

.resource .icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* Citation Section */
.citation-box {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--background);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--box-shadow);
    position: relative;
}

.citation-box pre {
    background-color: #f0f0f0;
    padding: 20px;
    border-radius: 4px;
    white-space: pre-wrap;
    margin-bottom: 0;
    font-family: monospace;
    font-size: 0.9rem;
}

.citation-box button {
    position: absolute;
    top: 25px;
    right: 25px;
    background-color: #808080;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.citation-box button:hover {
    background-color: #666666;
}

/* Logos Section */
.logos {
    padding: 30px 0;
    background-color: var(--background);
}

.logo-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
    flex-wrap: wrap;
}

.logo-row a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 220px;
    height: 110px;
    padding: 18px;
    background-color: var(--background-alt);
    border-radius: 8px;
    transition: opacity 0.2s ease, box-shadow 0.2s ease;
}

.logo-row a:hover {
    opacity: 0.8;
    box-shadow: var(--box-shadow);
}

.logo-row img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Acknowledgement & Funding */
.acknowledgement {
    padding: 30px 0;
    background-color: var(--background);
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-light);
}

.ack-funding {
    margin-bottom: 0.5rem;
    font-weight: 500;
}



/* Footer */
footer {
    padding: 20px 0;
    background-color: var(--background-alt);
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
}

/* Interactive Examples Section */
/* Interactive Benchmark Section */
.interactive-benchmark {
    padding: 20px 0 20px 0;
    background-color: var(--background);
}

.interactive-benchmark .container {
    max-width: 1300px;
}

.benchmark-interface {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    align-items: flex-start;
}

.column {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.column h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
}

.column h3::before {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
}

.image-selector-column h3::before {
    content: "1";
}

.model-selector-column h3::before {
    content: "2";
}

.results-column h3::before {
    content: "3";
}

.image-selector-column {
    flex: 1 1 320px;
    max-width: 420px;
}

.model-selector-column {
    flex: 1 1 280px;
    max-width: 350px;
}

.model-columns-wrapper {
    display: flex;
    gap: 15px;
}

.model-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.results-column {
    flex: 1 1 400px;
}

.framed-box {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    box-shadow: var(--box-shadow);
}

.results-box {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    box-shadow: var(--box-shadow);
    height: 650px;
    /* Fixed height - increased to account for labels */
    overflow: visible;
    /* Allow zoom to overflow */
    display: flex;
    flex-direction: column;
}

.image-group {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    position: relative;
}

.image-group:last-child {
    margin-bottom: 0;
}

.group-label {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    padding: 10px 5px;
    margin-right: 10px;
    text-align: center;
}

.synthetic-label {
    color: var(--primary);
}

.real-label {
    color: var(--secondary);
}

.synthetic-group .image-grid {
    border: 3px solid var(--primary);
    border-radius: 8px;
    padding: 10px;
}

.real-group .image-grid {
    border: 3px solid var(--secondary);
    border-radius: 8px;
    padding: 10px;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.image-thumb {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: transform 0.1s ease, box-shadow 0.1s ease, border-color 0.2s ease;
    /* Fast OUT */
}

.image-thumb:hover {
    transform: scale(3.5);
    z-index: 100;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease 0.8s, box-shadow 0.2s ease 0.8s, border-color 0.2s ease;
    /* 0.8s delay before zoom IN */
}

.image-thumb.active {
    border-color: #FFD700;
    /* Gold/Yellow highlight */
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

.image-thumb.active:hover {
    transform: scale(3.5);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 8px rgba(255, 215, 0, 0.6);
    transition: transform 0.2s ease 0.8s, box-shadow 0.2s ease 0.8s;
}

.model-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.model-group-header {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 5px 3px 5px;
    border-bottom: 1px solid var(--border);
    margin-top: 6px;
}

.model-group-header:first-child {
    margin-top: 0;
}

.model-btn {
    padding: 6px 10px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.model-name-container {
    flex: 1;
}

.model-name-text {
    position: relative;
    display: inline;
    /* Only as wide as the text */
    cursor: default;
    font-family: 'Roboto Mono', 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: 0.8rem;
    letter-spacing: -0.3px;
}

.model-name-text:hover .model-tooltip {
    display: block;
}

/* iOS-style HPO Toggle Switch */
.hpo-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    z-index: 10;
}

.hpo-toggle input {
    display: none;
}

.hpo-slider {
    width: 28px;
    height: 16px;
    background-color: #ccc;
    border-radius: 16px;
    position: relative;
    transition: background-color 0.2s ease;
}

.hpo-slider::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background-color: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.hpo-toggle input:checked+.hpo-slider {
    background-color: var(--primary);
}

.hpo-toggle input:checked+.hpo-slider::before {
    transform: translateX(12px);
}

.hpo-label {
    font-size: 0.65rem;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
}

.hpo-toggle input:checked~.hpo-label {
    color: var(--primary);
}

/* HPO Disclaimer Box */
.hpo-disclaimer {
    margin-top: 12px;
    padding: 10px 12px;
    background-color: var(--background-alt);
    border-left: 3px solid var(--primary);
    border-radius: 0 6px 6px 0;
    font-size: 0.75rem;
    color: var(--text-light);
    line-height: 1.5;
}

.hpo-disclaimer strong {
    color: var(--primary);
}

.hpo-disclaimer a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-style: dotted;
}

.hpo-disclaimer a:hover {
    text-decoration-style: solid;
}

/* Zoom hint */
.zoom-hint {
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--text-light);
    text-align: center;
    font-style: italic;
}

.model-btn:hover {
    background-color: var(--background-alt);
    border-color: var(--primary);
}

.model-btn.active {
    background-color: #FFF9C4;
    /* Light yellow bg */
    border-color: #FFD700;
    color: #333;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Model Tooltip Styles */
.model-tooltip {
    display: none;
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: #333;
    color: #fff;
    padding: 12px 15px;
    border-radius: 8px;
    width: 250px;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-weight: normal;
}

.model-tooltip::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    border: 8px solid transparent;
    border-right-color: #333;
    border-left: none;
}

.tooltip-desc {
    font-size: 0.85rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.tooltip-links {
    display: flex;
    gap: 12px;
}

.tooltip-links a {
    color: #82B366;
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.2s;
}

.tooltip-links a:hover {
    color: #a5d48a;
    text-decoration: underline;
}

.results-grid {
    display: grid;
    gap: 10px;
    flex: 1;
    min-height: 0;
    /* Allow grid to shrink */
    align-content: stretch;
    /* Default fallback */
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    grid-auto-rows: 1fr;
    overflow: visible;
    /* Allow zoom to overflow */
}

/* Dynamic Grid Layouts based on item count - prefer vertical layout (more rows, fewer cols) */
.results-grid[data-count="1"] {
    grid-template-columns: 1fr;
}

.results-grid[data-count="2"] {
    grid-template-columns: 1fr 1fr;
}

/* Disable hover zoom when only 1 image - it's already large enough */
.results-grid[data-count="1"] .result-item img:hover {
    transform: none;
    box-shadow: none;
    cursor: default;
}

.results-grid[data-count="3"] {
    grid-template-columns: 1fr 1fr;
}

/* 2 cols, 2 rows */
.results-grid[data-count="4"] {
    grid-template-columns: 1fr 1fr;
}

/* 2 cols, 2 rows */
.results-grid[data-count="5"] {
    grid-template-columns: 1fr 1fr;
}

/* 2 cols, 3 rows */
.results-grid[data-count="6"] {
    grid-template-columns: 1fr 1fr;
}

/* 2 cols, 3 rows */
.results-grid[data-count="7"] {
    grid-template-columns: 1fr 1fr;
}

/* 2 cols, 4 rows */
.results-grid[data-count="8"] {
    grid-template-columns: 1fr 1fr;
}

/* 2 cols, 4 rows */
.results-grid[data-count="9"] {
    grid-template-columns: repeat(3, 1fr);
}

/* 3 cols, 3 rows */
.results-grid[data-count="10"] {
    grid-template-columns: repeat(3, 1fr);
}

/* 3 cols, 4 rows */

.result-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    animation: fadeIn 0.3s ease;
    width: 100%;
    min-height: 0;
    /* Allow item to shrink */
    overflow: visible;
    /* Allow zoom to overflow */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-item img {
    width: 100%;
    max-height: calc(100% - 20px);
    object-fit: contain;
    border-radius: 4px;
    border: none;
    margin-bottom: 3px;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    /* Fast OUT */
}

.result-item img:hover {
    transform: scale(2.2);
    z-index: 100;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease 0.8s, box-shadow 0.2s ease 0.8s;
    /* 0.8s delay before zoom IN */
}

.result-item span {
    font-size: 0.8rem;
    color: var(--text-dark);
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    font-family: 'Roboto Mono', 'SF Mono', 'Consolas', 'Monaco', monospace;
    letter-spacing: -0.3px;
}

.placeholder-text {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-style: italic;
    height: 100%;
    font-size: 1.1rem;
}

/* Object and attack colors - consolidated */
#scam-object-bar,
#noscam-object-bar,
#synthscam-object-bar {
    background-color: var(--object-color);
}

#scam-attack-bar,
#noscam-attack-bar,
#synthscam-attack-bar {
    background-color: var(--attack-color);
}

.score-labels span:first-child {
    font-weight: 600;
    color: #333;
}

.score-labels span:first-child .object-term {
    color: var(--object-color);
}

.score-labels span:first-child .attack-term {
    color: var(--attack-color);
}

/* Navigation controls */
.navigation-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    gap: 1rem;
}

.example-counter {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: bold;
    padding: 0 0.5rem;
}

/* Benchmark Layout - side by side */
.benchmark-layout {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
}

.benchmark-explanation {
    flex: 0 0 380px;
    max-width: 380px;
}

.benchmark-explanation h3 {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    margin-top: 1.5rem;
    text-align: left;
}

.benchmark-explanation h3:first-child {
    margin-top: 0;
}

.benchmark-explanation p {
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
    text-align: left;
}

.benchmark-explanation ul {
    margin: 0.5rem 0 1rem 1.2rem;
    font-size: 0.95rem;
}

.benchmark-explanation li {
    margin-bottom: 0.4rem;
}

.benchmark-tables-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.benchmark-note {
    margin-top: 1.5rem;
    padding: 10px 12px;
    background-color: var(--background-alt);
    border-radius: 6px;
    font-size: 0.85rem !important;
}

/* Table Styles */
.benchmark-table-container {
    overflow-x: auto;
    margin: 0;
}

.benchmark-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    background-color: #fff;
    box-shadow: var(--box-shadow);
}

.benchmark-table-compact {
    font-size: 0.8rem;
}

.benchmark-table-compact th,
.benchmark-table-compact td {
    padding: 0.25rem 0.3rem;
}

.benchmark-table-compact .model-name {
    white-space: nowrap;
}

.benchmark-table th,
.benchmark-table td {
    padding: 0.4rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.benchmark-table th {
    background-color: var(--background-alt);
    font-weight: 600;
}

.benchmark-table .model-name {
    text-align: left;
    font-weight: 500;
}

.benchmark-table .group-header {
    background-color: rgba(172, 55, 229, 0.08);
    /* Light purple tint */
    font-weight: bold;
    text-align: left;
    padding-left: 1rem;
    color: var(--primary-dark);
}

.benchmark-table .group-header td {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.benchmark-table .hpo-row {
    background-color: rgba(0, 0, 0, 0.02);
    /* Black!5 equivalent */
}

.benchmark-table .winner-row {
    background-color: rgba(255, 215, 0, 0.15);
}

@media (max-width: 900px) {
    .benchmark-layout {
        flex-direction: column;
    }

    .benchmark-explanation {
        max-width: 100%;
    }
}


.benchmark-table tr td.best-score {
    font-weight: bold;
    color: var(--primary-dark);
}

.benchmark-table caption {
    caption-side: top;
    text-align: left;
    margin-bottom: 1rem;
    font-style: italic;
    color: var(--text-light);
}

/* Benchmark Table Styles */
.table-container {
    overflow-x: auto;
    margin: 20px 0;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
}

.benchmark-table {
    width: auto;
    margin: 0 auto;
    border-collapse: collapse;
    font-size: 0.9rem;
    background-color: white;
    /* min-width: 800px; */
}

.benchmark-table th,
.benchmark-table td {
    padding: 6px 8px;
    text-align: center;
    border-bottom: 1px solid rgba(172, 55, 229, 0.1);
}

.benchmark-table th {
    background-color: rgba(172, 55, 229, 0.15);
    font-weight: 600;
    color: var(--primary-dark);
    border-bottom: 2px solid var(--primary);
}

.benchmark-table th[rowspan="2"] {
    vertical-align: middle;
    border-right: 1px solid #eee;
}

.benchmark-table td:first-child {
    text-align: left;
    font-weight: 500;
    border-right: 1px solid #eee;
    padding-left: 15px;
}

.benchmark-table .group-header td {
    background-color: #eef2f7;
    color: #2c3e50;
    font-weight: 600;
    text-align: left;
    padding: 8px 15px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.benchmark-table .hpo-row td {
    background-color: #fafafa;
    color: #555;
}

.benchmark-table .hpo-row td:first-child {
    padding-left: 25px;
    font-style: italic;
    color: #666;
}

.benchmark-table tr:hover td {
    background-color: #f0f7ff;
}

.table-caption {
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    margin-top: 10px;
    font-style: italic;
}

/* Responsive adjustments for table */
@media (max-width: 768px) {
    .benchmark-table {
        font-size: 0.8rem;
    }

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

/* Inter-annotator row style */
.benchmark-table .inter-annotator-row td {
    background-color: #e8f5e9;
    /* Light green */
    color: #2e7d32;
    font-weight: 500;
}

.benchmark-table .inter-annotator-row td:first-child {
    font-style: italic;
}

/* Layout for multiple benchmark tables */
.benchmark-table-container {
    flex: 1;
    min-width: 300px;
    overflow-x: auto;
    max-width: 100%;
}

.benchmark-table-title {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #444;
    font-weight: 600;
}

/* Responsive Design */

/* Tablet breakpoint */
@media (max-width: 1100px) {
    .pipeline-stages {
        gap: 0.25rem;
    }

    .pipeline-stage {
        max-width: 140px;
    }

    .stage-image {
        width: 120px;
        height: 120px;
    }

    .pipeline-arrow {
        font-size: 1.5rem;
        margin-top: 45px;
    }

    .benchmark-interface {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        gap: 25px;
    }

    .image-selector-column {
        flex: 1 1 auto !important;
        width: 100% !important;
        max-width: 100% !important;
        grid-column: 1;
        grid-row: 1;
    }

    .model-selector-column {
        flex: 1 1 auto !important;
        width: 100% !important;
        max-width: 100% !important;
        grid-column: 2;
        grid-row: 1;
    }

    .results-column {
        flex: 1 1 auto !important;
        width: 100% !important;
        max-width: 100% !important;
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .results-box {
        height: auto;
        min-height: 300px;
        max-height: 500px;
    }

    /* Reduce zoom scale on tablet */
    .image-thumb:hover {
        transform: scale(2.5);
    }

    .image-thumb.active:hover {
        transform: scale(2.5);
    }

    .result-item img:hover {
        transform: scale(1.8);
    }
}

/* Mobile breakpoint */
@media (max-width: 768px) {
    .pipeline-stages {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .pipeline-stage {
        max-width: 220px;
    }

    .stage-image {
        width: 160px;
        height: 160px;
    }

    .pipeline-arrow {
        transform: rotate(90deg);
        margin: 0;
        font-size: 1.5rem;
    }

    .header h1 {
        font-size: 1.8rem;
    }

    .benchmark-interface {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px;
    }

    .image-selector-column,
    .model-selector-column,
    .results-column {
        flex: 1 1 auto !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Horizontal labels instead of vertical on mobile */
    .image-group {
        flex-direction: column;
        align-items: stretch;
    }

    .group-label {
        writing-mode: horizontal-tb;
        transform: none;
        padding: 8px 12px;
        margin-right: 0;
        margin-bottom: 8px;
        text-align: left;
        border-radius: 6px 6px 0 0;
    }

    .synthetic-label {
        background-color: rgba(172, 55, 229, 0.1);
    }

    .real-label {
        background-color: rgba(130, 179, 102, 0.1);
    }

    .synthetic-group .image-grid,
    .real-group .image-grid {
        border-radius: 0 0 8px 8px;
    }

    /* Larger image grid for touch */
    .image-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    /* Model selector: single column on mobile */
    .model-columns-wrapper {
        flex-direction: column;
        gap: 10px;
    }

    /* Larger touch targets for model buttons */
    .model-btn {
        padding: 12px 14px;
        font-size: 0.9rem;
    }

    .model-name-text {
        font-size: 0.85rem;
    }

    /* HPO toggle larger for touch */
    .hpo-slider {
        width: 36px;
        height: 20px;
    }

    .hpo-slider::before {
        width: 16px;
        height: 16px;
    }

    .hpo-toggle input:checked+.hpo-slider::before {
        transform: translateX(16px);
    }

    /* Results box auto height on mobile */
    .results-box {
        height: auto;
        min-height: 250px;
        max-height: none;
        overflow: auto;
    }

    /* Disable hover zoom on touch devices - it doesn't work anyway */
    .image-thumb:hover,
    .image-thumb.active:hover {
        transform: none;
        box-shadow: none;
    }

    .image-thumb.active {
        box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
    }

    .result-item img:hover {
        transform: none;
        box-shadow: none;
    }

    /* Hide zoom hints on mobile */
    .zoom-hint {
        display: none;
    }

    /* Results grid: 2 columns on mobile */
    .results-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .results-grid[data-count="1"] {
        grid-template-columns: 1fr !important;
    }

    .variant,
    .methodology-vlm,
    .methodology-lvlm,
    .finding,
    .resource {
        min-width: 100%;
    }

    .dataset-variant,
    .result {
        width: 12em;
    }

    .variant-header-container {
        width: 11em;
    }

    .image-container {
        width: 10em;
        height: 10em;
    }

    /* Tooltips: show below on mobile instead of to the right */
    .model-tooltip {
        left: 0;
        top: calc(100% + 10px);
        transform: none;
        width: calc(100vw - 80px);
        max-width: 280px;
    }

    .model-tooltip::before {
        left: 20px;
        top: -8px;
        transform: none;
        border: 8px solid transparent;
        border-bottom-color: #333;
        border-top: none;
    }

    /* Container padding */
    .container {
        width: 95%;
        padding: 15px;
    }

    /* Section padding */
    .interactive-benchmark {
        padding: 15px 0 30px 0;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .header h1 {
        font-size: 1.4rem;
    }

    .links {
        flex-direction: column;
        align-items: center;
    }

    .button {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }

    /* Even larger touch targets */
    .model-btn {
        padding: 14px 16px;
    }

    .image-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .framed-box {
        padding: 12px;
    }

    /* Results: single column on very small screens if many items */
    .results-grid[data-count="1"],
    .results-grid[data-count="2"] {
        grid-template-columns: 1fr !important;
    }

    .hpo-disclaimer {
        font-size: 0.7rem;
        padding: 8px 10px;
    }

    .column h3 {
        font-size: 0.9rem;
    }

    .column h3::before {
        width: 22px;
        height: 22px;
        font-size: 0.75rem;
    }
}

/* Touch device detection - disable hover effects */
@media (hover: none) and (pointer: coarse) {

    .image-thumb:hover,
    .image-thumb.active:hover {
        transform: none;
        box-shadow: none;
    }

    .image-thumb.active {
        box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
    }

    .result-item img:hover {
        transform: none;
        box-shadow: none;
    }

    .zoom-hint {
        display: none;
    }
}

/* Legacy responsive rules for other sections */
@media (max-width: 992px) {
    .explorer-container {
        overflow: scroll;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto auto auto;
        gap: 20px;
    }

    .dataset-images {
        grid-row: 1;
        grid-column: 1;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .dataset-variant {
        flex-direction: column;
        height: 100%;
    }

    .dataset-variant h3 {
        text-align: center;
    }

    .variant-header-container {
        width: 13em;
        height: 5em;
        padding: 5px;
        text-align: center;
    }

    .image-container {
        height: 12em;
        width: 12em;
    }

    .left-arrows {
        display: none;
    }

    .model-processor {
        grid-row: 3;
        grid-column: 1;
        max-width: 100%;
    }

    .right-arrows {
        display: none;
    }

    .similarity-results {
        grid-row: 5;
        grid-column: 1;
    }

    .results-container {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .dataset-variant,
    .result {
        width: 14em;
    }
}

@media (max-width: 826px) {

    .dataset-variant,
    .result {
        width: 13em;
    }

    .variant-header-container {
        width: 12em;
    }

    .image-container {
        width: 11em;
        height: 11em;
    }
}

@media (max-width: 450px) {
    .citation-box {
        word-break: break-all;
    }
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s;
}

#lightbox-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
    font-family: 'Roboto Mono', monospace;
    font-size: 1.1rem;
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2001;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

@keyframes zoomIn {
    from {
        transform: scale(0)
    }

    to {
        transform: scale(1)
    }
}

/* Pipeline Overview */
.pipeline-overview {
    padding: 50px 0;
    background-color: var(--background);
}

.pipeline-overview-content {
    text-align: center;
}

/* Benchmark Section */
.benchmark {
    padding: 50px 0;
    background-color: var(--background-alt);
}
