/* 引入 Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&family=Montserrat:wght@400;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css');

/* 设置全局样式 */
body {
    font-family:  'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
    display: flex;
    font-size: 16px;
    line-height: 1.6;
}

/* 侧边栏样式 */
.sidebar {
    width: 250px;
    background-color: #ffffff;
    color: #333;
    padding: 20px;
    position: fixed;
    height: 100vh;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    border-right: 1px solid #ddd;
}

.sidebar-title {
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 20px;
    color: #007acc;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
}

.sidebar ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.sidebar ul li {
    margin: 10px 0;
}

.sidebar ul li a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 1em;
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-radius: 8px;
    transition: color 0.3s, background-color 0.3s;
    font-family: 'Montserrat', sans-serif;
}

.sidebar ul li a i {
    margin-right: 10px;
}

.sidebar ul li a:hover,
.sidebar ul li a.active {
    color: #fff;
    background-color: #007acc;
}

.content {
    margin-left: 240px;
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.content > section {
    width: 100%;
    max-width: 1100px;
}

/* Ensure quantitative results appear before qualitative figures in the Results section. */
#results {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#results > ul {
    order: 1;
    margin: 0;
}

#results .quantitative-results {
    order: 2;
    margin-top: 0;
}

#results .hero-image {
    order: 3;
    margin-top: 0;
}

.info-section {
    text-align: left;
    margin: 0;
    padding: 20px;
    background-color: #ffffff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 0.9em;
    font-family: 'Montserrat', sans-serif;
}

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

.contact-us {
    text-align: center;
    font-size: 0.85em;
}

.paper-info h1{
    font-size: 2.5em;
    font-family: 'Montserrat', sans-serif;
}
.paper-citation h2,
.contact-us h2 {
    font-size: 1.8em;
    font-weight: 500;
    margin-bottom: 10px;
    font-family: 'Montserrat', sans-serif;
}

.links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
}

.links p {
    margin: 0;
}

.project-info .links {
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.project-info .links p {
    font-size: 1em;
}

.project-info a {
    color: #007acc;
    text-decoration: none;
    font-weight: 500;
    font-size: 1em;
}

.project-info a:hover {
    text-decoration: underline;
}

.lead {
    font-size: 1em;
    font-weight: 600;
    color: #111;
}

.hero-image {
    margin-top: 20px;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hero-image img.img-60 {
    width: 60%;
    display: block;
    margin: 0 auto;
}

@media (max-width: 640px) {
    .hero-image img.img-60 {
        width: 100%;
    }
}

.image-caption {
    font-size: 0.8em;
    color: #555;
    margin-top: 10px;
}

.hero-image .image-caption {
    text-align: center;
}

/* Gallery: show LQ thumbnails; open modal for slider comparison */
.lq-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 12px;
    overflow: visible;
}

.lq-card {
    appearance: none;
    border: 1px solid #e8e8e8;
    background: #ffffff;
    border-radius: 14px;
    padding: 10px;
    text-align: left;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
    overflow: visible;
    z-index: 0;
}

.lq-card:hover,
.lq-card:focus-visible,
.lq-card:focus-within {
    z-index: 50;
}

.lq-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.10);
    border-color: #d9e9f7;
}

.lq-card img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    cursor: zoom-in;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    transform: scale(1);
    position: relative;
}

.lq-media {
    position: relative;
    border-radius: 12px;
    overflow: visible; /* allow thumbnail to float/zoom like UltraFlux */
    transform: translateY(0) scale(1);
    transform-origin: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.lq-thumb {
    display: block;
}

.lq-hover-compare {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.22s ease 0.18s, transform 0.22s ease 0.18s;
    pointer-events: none;
    z-index: 6;
    border-radius: 12px;
    overflow: hidden; /* keep slider contents clipped */
}

.lq-card:hover .lq-hover-compare,
.lq-card:focus-visible .lq-hover-compare {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.lq-card:hover .lq-media,
.lq-card:focus-visible .lq-media {
    transform: translateY(-3px) scale(1.8);
    z-index: 5;
}

.lq-card:hover .lq-thumb,
.lq-card:focus-visible .lq-thumb {
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.15);
    z-index: 5;
}

.lq-card:focus-visible {
    outline: 3px solid rgba(0, 122, 204, 0.25);
    outline-offset: 3px;
}

.lq-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 4px 2px;
}

.lq-title {
    font-weight: 700;
    color: #0f3f66;
}

.lq-sub {
    font-size: 0.85em;
    color: #666;
}

@media (max-width: 1024px) {
    .lq-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .lq-gallery {
        grid-template-columns: 1fr;
    }
}

/* Modal + slider (ported interaction style from LucidFlux) */
.gallery-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 9999;
}

.gallery-modal.is-open {
    display: block;
}

.gallery-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.gallery-modal__panel {
    position: relative;
    z-index: 1;
    width: min(1100px, calc(100vw - 40px));
    max-height: calc(100vh - 40px);
    overflow: auto;
    margin: 20px auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.25);
    padding: 16px;
}

.gallery-modal__close {
    position: sticky;
    top: 0;
    margin-left: auto;
    display: block;
    border: none;
    background: rgba(0, 0, 0, 0.06);
    color: #111;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 22px;
    cursor: pointer;
}

.gallery-modal__close:hover {
    background: rgba(0, 0, 0, 0.10);
}

.gallery-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 8px 0 12px;
    flex-wrap: wrap;
}

.gallery-comparison-block + .gallery-comparison-block {
    margin-top: 16px;
}

.gallery-comparison-title {
    font-weight: 700;
    color: #333;
    margin: 6px 0 8px;
    text-align: center;
}

.gallery-modal__title {
    font-weight: 800;
    font-size: 1.1em;
    color: #0f3f66;
}

.gallery-modal__toggles {
    display: inline-flex;
    border: 1px solid #e6e6e6;
    border-radius: 999px;
    overflow: hidden;
}

.gallery-toggle {
    border: none;
    background: #ffffff;
    padding: 8px 12px;
    cursor: pointer;
    font-weight: 700;
    color: #333;
    font-size: 0.9em;
}

.gallery-toggle.active {
    background: #007acc;
    color: #fff;
}

.image-comparison {
    position: relative;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: #f6f7f8;
}

.image-comparison .before-image,
.image-comparison .after-image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 16px;
    user-select: none;
    -webkit-user-drag: none;
}

.image-comparison .after-image {
    position: absolute;
    inset: 0;
    clip-path: polygon(50% 0%, 100% 0%, 100% 100%, 50% 100%);
}

.comparison-slider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 0;
    cursor: ew-resize;
    z-index: 5;
}

.comparison-slider::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 1px;
    background: rgba(255, 255, 255, 0.65);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.slider-handle {
    position: absolute;
    top: 50%;
    left: -20px;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-arrow {
    font-size: 12px;
    color: rgba(17, 17, 17, 0.65);
    letter-spacing: 1px;
    user-select: none;
}

.compare-tag {
    position: absolute;
    bottom: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    color: #fff;
    font-weight: 800;
    font-size: 0.8em;
    letter-spacing: 0.02em;
    z-index: 6;
    user-select: none;
}

.compare-tag.before {
    left: 12px;
}

.compare-tag.after {
    right: 12px;
}

.inline-comparison {
    height: 100%;
}

.inline-comparison .before-image,
.inline-comparison .after-image {
    height: 100%;
    width: 100%;
    object-fit: contain;
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-top: 18px;
}

.table-wrapper table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
    font-size: 0.9em;
}

.table-wrapper .num {
    text-align: center;
    font-variant-numeric: tabular-nums;
}

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

.table-wrapper td.center {
    vertical-align: middle;
}

.table-wrapper caption {
    caption-side: top;
    text-align: center;
    font-weight: 400;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.5;
    font-size: 0.82em;
    font-style: italic;
}

.table-wrapper th,
.table-wrapper td {
    padding: 10px 12px;
    border-bottom: 1px solid #e5e5e5;
    vertical-align: top;
}

.table-wrapper th {
    background-color: #f8fbff;
    color: #0f3f66;
    font-weight: 700;
    text-align: center;
}

.table-wrapper th.left,
.table-wrapper td.left {
    text-align: left;
}

.table-wrapper tbody tr:hover {
    background-color: #fafcff;
}

.grid-gallery h2 {
    text-align: center;
    margin-bottom: 8px;
}

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

.gallery-grid img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    transform: scale(1);
    position: relative;
}

.gallery-grid img:hover {
    transform: translateY(-3px) scale(1.8);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.15);
    z-index: 5;
}

@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}


.authors {
    margin-bottom: 10px;
    font-size: 1em;
    line-height: 1.6;
}

.authors p {
    margin: 5px 0;
}

.author {
    margin: 0 6px;
}

.author a {
    color: #007acc;
    text-decoration: none;
    font-weight: 400;
}

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

.affiliation {
    font-size: 0.9em;
    color: #555;
    margin: 0 6px;
}

.contrib-note {
    font-size: 0.8em;
    color: #555;
    margin-top: 10px;
}

.info-section ul,
.info-section ol {
    padding-left: 20px;
    margin: 10px 0;
}

.paper-info a {
    color: #007acc;
    text-decoration: none;
    font-weight: 400;
    font-size: 1.2em;
}

.paper-info a:hover {
    text-decoration: underline;
}

.comparison-section {
    margin-bottom: 40px;
    margin-top: 40px;
}

.comparison-section h2 {
    font-size: 1.5em;
    font-weight: 800;
    margin-bottom: 10px;
    font-family: 'Montserrat', sans-serif;
    text-align: center;
}

.comparison-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5em;
    font-weight: 600;
}

.comparison-note {
    text-align: center;
    color: #888;
    font-size: 0.9em;
    font-style: italic;
    margin-bottom: 20px;
    font-family: 'Montserrat', sans-serif;
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(1000px, 1fr));
    gap: 40px;
    padding: 30px;
    justify-items: center;
}

.comparison-item {
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.comparison-item:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Academic Three-Line Table Styles (scoped; avoid leaking into .table-wrapper) */
.quantitative-results {
    margin-bottom: 40px;
}

.quantitative-results h3 {
    font-size: 1.3em;
    margin-bottom: 15px;
    text-align: center;
    color: #333;
    font-weight: 600;
}

.table-container {
    overflow-x: auto;
    margin: 0 auto;
    max-width: 100%;
    padding: 10px 0;
}

.table-container caption {
    caption-side: top;
    text-align: center;
    font-weight: 400;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.5;
    font-size: 0.82em;
    font-style: italic;
}

.table-container table {
    border-collapse: collapse;
    width: 70%;
    min-width: 800px;
    max-width: 1000px;
    font-size: 0.85em;
    font-family: 'Times New Roman', Times, serif;
    line-height: 1.2;
    margin: 0 auto;
}

/* Three-line table styling */
.table-container table {
    border-top: 2px solid #333;
    border-bottom: 2px solid #333;
}

.table-container th,
.table-container td {
    padding: 2px 4px;
    text-align: center;
    border: none;
    vertical-align: middle;
}

/* Header row styling */
.table-container thead tr {
    border-bottom: 1px solid #333;
}

.table-container th {
    font-weight: 600;
    color: #333;
    background-color: transparent;
}

/* Benchmark column styling */
.benchmark-col {
    text-align: left;
    font-weight: 600;
    vertical-align: middle;
}

/* Metric column styling */
.metric-col {
    text-align: left;
    font-family: 'Times New Roman', Times, serif;
}

/* Give metric column a bit more breathing room in quantitative tables. */
.table-container .metric-col {
    min-width: 160px;
    white-space: nowrap;
}

/* Method column styling */
.method-col {
    font-family: 'Times New Roman', Times, serif;
}

/* Best result highlighting */
.best-result {
    font-weight: bold;
}

.delta {
    font-size: 0.75em;
    color: #555;
    white-space: nowrap;
}

/* Row separators for different benchmarks */
.table-container thead tr:first-child {
    border-bottom: 1px solid #333;
}

.table-container thead tr:last-child {
    border-bottom: 1px solid #333;
}

/* Separator between RealSR and RealLQ250 benchmarks */
.benchmark-separator {
    border-top: 1px solid #333;
    border-bottom: none;
}

/* Remove row hover effects for academic look */
.table-container tbody tr:hover {
    background-color: transparent;
}

.table-container .benchmark-separator td {
    padding: 0;
    height: 8px;
    border-top: 1px solid #333;
}

/* Caption styling */
.table-caption {
    text-align: center;
    font-size: 0.8em;
    color: #666;
    margin-top: 10px;
    font-style: italic;
}

/* Table number styling */
.table-number {
    font-weight: 400;
    margin-right: 5px;
}

/* Comparison grid layout for qualitative results */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(1000px, 1fr));
    gap: 40px;
    padding: 30px;
    justify-items: center;
}

.comparison-grid .comparison-item {
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.comparison-grid .comparison-item:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.comparison-grid .comparison-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    max-height: 600px;
}

.framework-section {
    margin-bottom: 40px;
    margin-top: 40px;
}

.framework-section h2 {
    font-size: 1.5em;
    font-weight: 800;
    margin-bottom: 20px;
    font-family: 'Montserrat', sans-serif;
    text-align: center;
}

.framework-content {
    text-align: center;
    padding: 20px;
}

.framework-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}



.resolution {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 2px 5px;
    font-size: 0.9em;
    border-radius: 3px;
    font-family: 'Montserrat', sans-serif;
}




/* Overview section styles */
.overview-section {
    margin-bottom: 40px;
    margin-top: 30px;
}

.overview-section h2 {
    font-size: 1.4em;
    font-weight: 700;
    margin-bottom: 30px;
    font-family: 'Montserrat', sans-serif;
    text-align: center;
}

.overview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 50px;
    padding: 20px;
}

.overview-item {
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 600px;
    position: relative;
}

.overview-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.overview-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .overview-container {
        padding: 15px;
        gap: 20px;
    }
    
    .overview-item {
        max-width: 100%;
    }
}

/* Individual styles section */
.styles-section {
    margin-bottom: 30px;
    margin-top: 30px;
}

.styles-section h2 {
    font-size: 1.4em;
    font-weight: 700;
    margin-bottom: 20px;
    font-family: 'Montserrat', sans-serif;
    text-align: center;
}

.styles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 0 15px;
}

@media (max-width: 1200px) {
    .styles-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

.style-showcase {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.style-showcase h3 {
    font-size: 1.4em;
    font-weight: 600;
    margin-bottom: 15px;
    color: #007acc;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    border-bottom: 2px solid #007acc;
    padding-bottom: 10px;
}

.style-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.style-display:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.style-container {
    position: relative;
    width: 100%;
    height: 350px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.style-container .style-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    transition: opacity 0.4s ease;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.style-container .style-image.active {
    opacity: 1;
}

.style-nav-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding: 0 5px;
}

.nav-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.nav-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.image-indicator {
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    min-width: 40px;
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
        font-size: 15px;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        flex-direction: column;
        align-items: center;
        padding: 15px;
    }

    .sidebar-title {
        font-size: 1.4em;
        margin-bottom: 10px;
    }

    .sidebar ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .sidebar ul li {
        margin: 0;
    }

    .sidebar ul li a {
        font-size: 0.9em;
        padding: 8px 12px;
    }

    .content {
        margin-left: 0;
        padding: 20px;
    }
}
