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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    padding: 20px;
}

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

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 60px;
}

.main-title {
    font-size: 3.5em;
    font-weight: 700;
    margin-bottom: 20px;
    color: #1a1a1a;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 1.5em;
    font-weight: 400;
    color: #555;
    margin-bottom: 40px;
    line-height: 1.4;
}

/* Authors */
.authors {
    margin: 40px 0;
}

.author-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.author-emails {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.author-link {
    color: #0066cc;
    text-decoration: none;
    font-size: 1.1em;
    transition: color 0.2s;
}

.author-link:hover {
    color: #004499;
    text-decoration: underline;
}

.author-name {
    color: #333;
    text-decoration: none;
    font-size: 1.1em;
}

.author-email {
    color: #0066cc;
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.2s;
}

.author-email:hover {
    color: #004499;
    text-decoration: underline;
}

.affiliations {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 15px;
    font-size: 0.95em;
    color: #666;
}

.affil {
    white-space: nowrap;
}

/* Links */
.links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.link-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    background-color: #f5f5f5;
    border: 2px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.2s;
    gap: 6px;
    min-width: 80px;
}

.link-btn i {
    font-size: 1.5em;
}

.link-btn span {
    font-size: 0.85em;
    font-weight: 500;
}

.link-btn:hover {
    background-color: #e8e8e8;
    border-color: #bbb;
    transform: translateY(-2px);
}

.link-btn.paper {
    background-color: #0066cc;
    color: white;
    border-color: #0066cc;
}

.link-btn.paper:hover {
    background-color: #0052a3;
    border-color: #0052a3;
}

.link-btn.code {
    background-color: #24292e;
    color: white;
    border-color: #24292e;
}

.link-btn.code:hover {
    background-color: #1a1e22;
    border-color: #1a1e22;
}

.link-btn.data {
    background-color: #28a745;
    color: white;
    border-color: #28a745;
}

.link-btn.data:hover {
    background-color: #218838;
    border-color: #218838;
}

.link-btn.lab {
    background-color: #6c757d;
    color: white;
    border-color: #6c757d;
}

.link-btn.lab:hover {
    background-color: #5a6268;
    border-color: #5a6268;
}

/* Teaser Image */
.teaser {
    text-align: center;
    margin: 60px 0;
}

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

/* Content Sections */
.content-section {
    margin: 60px 0;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.content-section h2 {
    font-size: 2em;
    font-weight: 600;
    margin-bottom: 25px;
    color: #1a1a1a;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.content-section p {
    font-size: 1.1em;
    line-height: 1.8;
    margin-bottom: 20px;
    color: #444;
}

/* Method Diagram */
.method-diagram {
    text-align: center;
    margin: 40px 0;
}

.method-diagram img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Formula */
.formula {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 30px 0;
    text-align: center;
    font-size: 1.3em;
    font-family: 'Courier New', monospace;
    border-left: 4px solid #0066cc;
}

.formula sub {
    font-size: 0.7em;
    vertical-align: sub;
}

/* Lists */
.features-list,
.results-list {
    list-style: none;
    padding-left: 0;
    margin: 20px 0;
}

.features-list li,
.results-list li {
    padding: 12px 0;
    padding-left: 30px;
    position: relative;
    font-size: 1.05em;
    line-height: 1.6;
}

.features-list li::before,
.results-list li::before {
    content: "•";
    position: absolute;
    left: 10px;
    color: #0066cc;
    font-weight: bold;
    font-size: 1.2em;
}

.content-section ul:not(.features-list):not(.results-list) {
    margin: 20px 0;
    padding-left: 30px;
}

.content-section ul:not(.features-list):not(.results-list) li {
    margin: 10px 0;
    font-size: 1.05em;
    line-height: 1.6;
}

/* Results Gallery */
.results-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.results-gallery img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.results-gallery img:hover {
    transform: scale(1.02);
}

/* Video Gallery */
.video-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.video-item {
    width: 100%;
}

.video-item video {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background-color: #000;
}

/* Plant expandable buttons – full-width bar: text left, chevron right */
.plant-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 30px 0;
}

.plant-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 20px 24px;
    font-size: 1.25em;
    font-weight: 600;
    color: #1a1a1a;
    background: #f5f5f5;
    border: 2px solid #ddd;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: left;
}

.plant-btn:hover {
    background: #eee;
    border-color: #bbb;
}

.plant-btn[aria-expanded="true"] {
    background: #e8f0fe;
    border-color: #0066cc;
    color: #0066cc;
}

.plant-btn-icon {
    transition: transform 0.25s ease;
    font-size: 0.9em;
    flex-shrink: 0;
}

.plant-btn[aria-expanded="true"] .plant-btn-icon {
    transform: rotate(180deg);
}

.plant-btn-label {
    font-weight: 600;
}

.plant-expand {
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.plant-expand[hidden] {
    display: none !important;
}

.plant-expand:not([hidden]) {
    display: block !important;
    max-height: 6000px;
    opacity: 1;
    margin-bottom: 20px;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.raw-dataset-intro {
    margin-bottom: 24px;
    color: #555;
    font-size: 1.05em;
}

.raw-plant-block {
    margin-bottom: 36px;
}

.raw-plant-block:last-child {
    margin-bottom: 0;
}

.raw-plant-title {
    font-size: 1.35em;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #eee;
}

/* Four bands only (no pseudo RGB) */
.spectral-channels.four-bands {
    grid-template-columns: repeat(4, 1fr);
}

/* Spectral Channels */
.spectral-channels {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin: 40px 0;
}

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

.channel-item h4 {
    font-size: 1.1em;
    margin-bottom: 15px;
    color: #333;
    font-weight: 600;
}

.channel-item img,
.channel-item video {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    background-color: #000;
}

/* Aligned Images Grid - for image1 directory and similar */
.aligned-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 40px 0;
    align-items: start;
}

.aligned-image-item {
    text-align: center;
}

.aligned-image-item img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    display: block;
    margin: 0 auto;
}

/* Ensure all images in a row have the same height */
.image-row {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    margin: 40px 0;
}

.image-row-item {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
    text-align: center;
}

.image-row-item img {
    width: 100%;
    height: 400px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    display: block;
}

.animated-gif {
    display: block;
    image-rendering: auto;
}

.animated-video {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    background-color: #000;
}

.channel-item img:hover,
.channel-item video:hover {
    transform: scale(1.05);
}

/* Pseudo RGB View */
.pseudo-rgb-view {
    margin: 50px 0;
    text-align: center;
}

.pseudo-rgb-view h3 {
    font-size: 1.5em;
    margin-bottom: 20px;
    color: #1a1a1a;
}

.pseudo-rgb-view img {
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Comparison Section */
.comparison-grid-inline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.comparison-section {
    margin: 50px 0;
    padding: 30px;
    background-color: #fafafa;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.comparison-section-inline {
    padding: 20px;
    background-color: #fafafa;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.comparison-section h3,
.comparison-section-inline h3 {
    font-size: 1.5em;
    margin-bottom: 20px;
    color: #1a1a1a;
    text-align: center;
    text-transform: capitalize;
}

/* Comparison Slider */
.comparison-slider-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.comparison-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    cursor: ew-resize;
    user-select: none;
    background-color: #000;
    aspect-ratio: 1600 / 1063;
    max-height: 500px;
}

.slider-before {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
}

.slider-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    clip-path: inset(0 50% 0 0);
    transition: clip-path 0.05s ease-out;
}

.comparison-slider img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
}

.slider-label {
    position: absolute;
    top: 15px;
    padding: 8px 16px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    font-weight: 600;
    font-size: 0.9em;
    border-radius: 4px;
    z-index: 10;
    pointer-events: none;
}

.slider-label.left {
    left: 15px;
}

.slider-label.right {
    right: 15px;
}

.slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background-color: white;
    z-index: 3;
    cursor: ew-resize;
    transform: translateX(-50%);
}

.slider-line {
    width: 100%;
    height: 100%;
    background-color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

.slider-arrow.left-arrow {
    left: -20px;
}

.slider-arrow.right-arrow {
    right: -20px;
}

.comparison-slider:hover .slider-handle {
    background-color: #0066cc;
}

.comparison-slider:hover .slider-arrow {
    background-color: #0066cc;
    color: white;
}

/* Citation */
.citation-section {
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    margin-top: 60px;
}

.citation {
    background-color: #fff;
    padding: 20px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.95em;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    border: 1px solid #ddd;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.5em;
    }
    
    .subtitle {
        font-size: 1.2em;
    }
    
    .author-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .links {
        flex-direction: row;
        align-items: center;
        justify-content: center;
    }
    
    .link-btn {
        min-width: 70px;
        padding: 10px 12px;
    }
    
    .link-btn i {
        font-size: 1.3em;
    }
    
    .link-btn span {
        font-size: 0.75em;
    }
    
    .results-gallery {
        grid-template-columns: 1fr;
    }
    
    .video-gallery {
        grid-template-columns: 1fr;
    }
    
    .spectral-channels {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .channel-item video {
        max-height: 200px;
    }
    
    .comparison-section {
        padding: 20px;
    }
    
    .comparison-grid-inline {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .comparison-section-inline {
        padding: 15px;
    }
    
    .comparison-section-inline h3 {
        font-size: 1.3em;
        margin-bottom: 15px;
    }
    
    .slider-label {
        font-size: 0.8em;
        padding: 6px 12px;
    }
    
    .slider-arrow {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    .slider-arrow.left-arrow {
        left: -15px;
    }
    
    .slider-arrow.right-arrow {
        right: -15px;
    }
    
    .content-section {
        padding: 0 10px;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2em;
    }
    
    .subtitle {
        font-size: 1em;
    }
    
    .content-section h2 {
        font-size: 1.5em;
    }
}
