html {
    box-sizing: border-box;
    overflow-x: hidden;
    width: 100%;
}
*, *:before, *:after {
box-sizing: inherit;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f8f8;
    margin: 0;
    padding-top: 20px; /* Add padding to body to avoid content jumping behind sticky nav */
    overflow-x: hidden;
    width: 100%;
    word-wrap: break-word;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
}
.wrapper {
    display: flex;
}
.main-content {
    flex-grow: 1;
    padding: 0;
}
section {
    width: 100%;
    margin-bottom: 0;
    padding: 20px 0;
    box-sizing: border-box;
}
.content-container {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 20px;
}
.white-bg {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.grey-bg {
    background-color: #f3f7fa;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
h1, h2, h3 {
    margin-bottom: 20px;
    text-align: center;
}
h1 {
    font-size: 2.5em;
    margin-bottom: 30px;
}
/* --- CHANGE: Set title color to black --- */
h1.main-title {
    color: #000000;
    margin-top: -15px
}
h2 {
    font-size: 2em;
}
h3 {
    font-size: 1.5em;
}
.author-list {
    text-align: center;
    margin-top: -15px;
    margin-bottom: 20px;
    font-size: 1.1em;
    color: #555;
}
.org-logos {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.org-logo img {
    height: 55px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 特别调整INSAIT logo的大小 */
.org-logo img[src*="insait_logo"] {
    height: 40px;
    max-width: 160px;
}
.button-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}
/* --- CHANGE: Button style adjustments --- */
.action-button {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    min-width: 150px; /* Minimum width for buttons */
    background-color: #e0e0e0; /* Grey background */
    color: #333; /* Dark text for contrast */
    text-decoration: none;
    border-radius: 40px; /* More rounded corners */
    font-weight: bold;
    transition: background-color 0.3s ease;
    white-space: nowrap;
    justify-content: center;
    border: 1px solid #ccc;
}
.action-button:hover {
    background-color: #cccccc; /* Darker grey on hover */
    color: #333;
}
.action-button img {
    height: 20px;
    width: 20px;
    margin-right: 8px;
    vertical-align: middle;
    /* filter property removed to show normal images */
}
.summary-text {
    font-size: 0.9em;
    text-align: center;
    margin-bottom: 0;
    line-height: 1.8;
    color: #444;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}
table {
    width: 70%;
    max-width: 70%;
    border-collapse: collapse;
    margin: 25px auto;
    font-size: 0.9em;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow-x: auto;
    /* overflow: hidden; */
    
}

table thead tr {
    background-color: #0079AF;
    color: #ffffff;
    text-align: left;
}
table th,
table td {
    padding: 12px 15px;
    border: 1px solid #ddd;
}
table tbody tr {
    border-bottom: 1px solid #dddddd;
}
table tbody tr:nth-of-type(even) {
    background-color: #fcfcfc;
}
table tbody tr:last-of-type {
    border-bottom: 2px solid #0079AF;
}
.figure-placeholder {
    background-color: #f0f0f0;
    border: 1px dashed #ccc;
    min-height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #888;
    margin: 20px auto;
    border-radius: 5px;
    font-style: italic;
    max-width: 700px;
}
.citation-block {
    background-color: #e8f2fe;
    border-left: 5px solid #0079AF;
    padding: 20px;
    margin-top: 40px;
    border-radius: 8px;
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.95em;
    color: #333;
    overflow-x: auto;
    width: 100%;
}

/* --- NEW: Sticky Navbar Styles --- */
.sticky-nav {
    position: fixed;
    top: -100px; /* Initially hidden above the screen */
    left: 0;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: top 0.3s ease-in-out;
}
.sticky-nav.visible {
    top: 0; /* Slides into view */
}
.sticky-nav .nav-title {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
}
.sticky-nav .nav-links {
    display: flex;
    gap: 15px;
}
.sticky-nav .nav-links .action-button {
  padding: 8px 15px; /* Smaller buttons for the nav bar */
  font-size: 0.9em;
}
.hamburger {
    display: none; /* Hidden by default */
    font-size: 24px;
    background: none;
    border: none;
    color: #333;
    cursor: pointer;
}

/* --- NEW: Media Queries for Mobile Friendliness --- */
@media (max-width: 768px) {
    .sticky-nav .nav-links {
        display: none;
        position: absolute;
        top: 60px; /* Position below the navbar */
        left: 0;
        width: 100%;
        background-color: #fff;
        flex-direction: column;
        padding: 10px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }
    .sticky-nav .nav-links.active {
        display: flex; /* Show when active */
    }
    .hamburger {
        display: block; /* Show hamburger on mobile */
    }
}

/* --- Dataset Statistics Section Styles --- */
.stats-cards-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin: 40px 0;
}
.stat-card {
    background-color: #f3f7fa;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    min-width: 200px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid #e0e0e0;
}
.stat-value {
    font-size: 2.5em;
    font-weight: bold;
    color: #0079AF;
}
.stat-label {
    font-size: 1.1em;
    color: #555;
    margin-top: 5px;
}
.chart-container {
    margin-top: 10px;
    width: 100%;
    max-width: 800px;
    min-height: 300px;
    margin-left: auto;
    margin-right: auto;
}

/* Chart legend styling for better horizontal layout */
.chart-container canvas {
    position: relative;
}

/* Ensure chart legends display in a single row */
@media (min-width: 768px) {
    .chart-container {
        min-height: 350px; /* Slightly more height to accommodate legend */
    }
}
.chart-container h3 {
    text-align: center;
    margin-bottom: 10px;
    color: #333;
}

/* 1. Make the pie chart container smaller */
.pie-chart-container {
    max-width: 500px; /* Reduced from 800px to make it smaller */
  }
  
  /* 2. Media query for desktop screens to place charts side-by-side */
@media (min-width: 992px) {
.charts-row {
    display: flex;
    gap: 15px; /* Space between the two charts */
    align-items: flex-start;
}
.charts-row > .chart-container {
    flex: 1; /* Allows both charts to grow and share the space */
    min-width: 0; /* Important for flex items to shrink properly */
}
}

/* Performance Analysis Section Styles */
.performance-analysis {
    margin: 40px 0 0 0;
}

.performance-findings-list {
    list-style: disc;
    padding-left: 20px;
    margin: 20px 0;
}

.performance-findings-list li {
    margin: 10px 0;
    line-height: 1.6;
    color: #333;
}

.performance-findings-list li strong {
    color: #2c3e50;
    font-weight: 600;
}

/* Key Findings Section Styles */
.key-findings-section {
    margin: 50px 0 0 0;
}

.findings-list {
    list-style: disc;
    padding-left: 20px;
    margin: 20px 0 0 0;
    color: #333;
}

.findings-list li {
    margin: 15px 0;
    line-height: 1.6;
    color: #333;
}

.findings-list li strong {
    color: #2c3e50;
    font-weight: 600;
}

/* Benchmark Design Styles */
.design-levels {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin: 30px 0;
}

.level-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-left: 5px solid #0079AF;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.level-card.level-1 {
    border-left-color: #28a745;
}

.level-card.level-2 {
    border-left-color: #ffc107;
}

.level-card.level-3 {
    border-left-color: #dc3545;
}

.level-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.level-number {
    background: #0079AF;
    color: white;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
    flex-shrink: 0;
}

.level-card.level-1 .level-number {
    background: #28a745;
}

.level-card.level-2 .level-number {
    background: #ffc107;
    color: #333;
}

.level-card.level-3 .level-number {
    background: #dc3545;
}

.level-card h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.3em;
    font-weight: 600;
}

.level-card p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Toggle buttons for examples */
.level-example-toggle, .capability-example-toggle {
    background: #e3f2fd;
    border: 1px solid #0079AF;
    border-radius: 6px;
    padding: 10px 15px;
    margin-top: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
    color: #0079AF;
}

.level-example-toggle:hover, .capability-example-toggle:hover {
    background: #bbdefb;
    transform: translateY(-1px);
}

.toggle-arrow {
    transition: transform 0.3s ease;
    font-size: 0.9em;
    color: #0079AF;
}

.toggle-arrow.rotated {
    transform: rotate(180deg);
}

.level-example, .capability-example {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
    border-left: 3px solid #0079AF;
    font-size: 0.95em;
    color: #444;
    overflow: hidden;
    transition: all 0.3s ease;
}

.level-card.level-1 .level-example {
    border-left-color: #28a745;
}

.level-card.level-2 .level-example {
    border-left-color: #ffc107;
}

.level-card.level-3 .level-example {
    border-left-color: #dc3545;
}

.capability-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin: 30px 0;
}

.capability-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.capability-icon {
    font-size: 3em;
    margin-bottom: 15px;
    display: block;
}

.capability-card h4 {
    color: #2c3e50;
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 15px;
}

.capability-card p {
    color: #555;
    line-height: 1.6;
    font-size: 0.95em;
}

/* Medium screens - tablets */
@media (max-width: 992px) {
    .design-levels {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .data-sources {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .variants-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 15px;
    }
}

/* Small screens - mobile */
@media (max-width: 768px) {
    .key-findings-section {
        margin: 25px 0 0 0;
    }
    
    .findings-list li {
        font-size: 0.9em;
        padding-left: 20px;
        margin-bottom: 18px;
    }
    
    .findings-list li::before {
        font-size: 1.1em;
    }
    
    .org-logo img {
        height: 45px;
        max-width: 160px;
    }
    
    /* 移动设备上的INSAIT logo调整 */
    .org-logo img[src*="insait_logo"] {
        height: 35px;
        max-width: 130px;
    }
    
    .org-logos {
        gap: 20px;
    }
    
    /* Benchmark Design响应式调整 */
    .capability-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .level-example-toggle, .capability-example-toggle {
        padding: 8px 12px;
        font-size: 0.85em;
    }
    
    .capability-card {
        padding: 20px;
    }
    
    .capability-icon {
        font-size: 2.5em;
        margin-bottom: 12px;
    }
    
    .design-levels {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .level-card {
        padding: 20px;
    }
    
    .level-header {
        gap: 12px;
    }
    
    .level-number {
        width: 35px;
        height: 35px;
        min-width: 35px;
        min-height: 35px;
        font-size: 1.1em;
    }
    
    .level-card h4 {
        font-size: 1.2em;
    }
    
    .level-example {
        padding: 12px;
        font-size: 0.9em;
    }
    
    /* Dataset Construction responsive adjustments */
    .data-sources {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .source-card {
        padding: 20px;
    }
    
    .source-icon {
        font-size: 2.5em;
        margin-bottom: 12px;
    }
    
    .variants-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .variant-card {
        padding: 15px;
    }
    
    .variants-image img {
        max-width: 100% !important;
    }
}

/* Dataset Construction Styles */
.data-sources {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin: 30px 0;
}

.source-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.source-icon {
    font-size: 3em;
    margin-bottom: 15px;
    display: block;
}

.source-card h4 {
    color: #2c3e50;
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 15px;
}

.source-card p {
    color: #555;
    line-height: 1.6;
    margin: 0;
}

.problem-variants-container {
    margin: 40px 0;
}

.variants-image {
    text-align: center;
    margin: 30px 0 40px 0;
}

.variants-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.variant-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e9ecef;
    transition: transform 0.3s ease;
}

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

.variant-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.variant-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    flex-shrink: 0;
}

.variant-color.original {
    background: #f5f5dc; /* Light beige */
}

.variant-color.perturbed {
    background: #b0d4f1; /* Light blue */
}

.variant-color.knowledge {
    background: #f4c2c2; /* Light pink */
}

.variant-color.abstraction {
    background: #c8e6c9; /* Light green */
}

.variant-card h4 {
    color: #2c3e50;
    font-size: 1.1em;
    font-weight: 600;
    margin: 0;
}

.variant-card p {
    color: #666;
    font-size: 0.9em;
    line-height: 1.4;
    margin: 0;
}

/* Media query for screens less than 720px */
@media (max-width: 719px) {
    .cost-column {
      display: none;
    }
    table {
        width: 95%;
        max-width: 95%;
    }
  }