@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');

/* Theme Variables */
:root {
    --color-text: #33363b;
    --color-text-muted: #666;
    --color-bg: #ffffff;
    --color-bg-alt: #f8f9fa;
    --color-primary: #4E79A7;
    --color-primary-hover: #3d6085;
    --color-accent-purple: #B07AA1;
    --color-accent-orange: #F28E2B;
    --color-accent-green: #76B900;
    --color-border: #e0e0e0;
    --color-shadow: rgba(0, 0, 0, 0.1);
    --color-shadow-md: rgba(0, 0, 0, 0.15);
    --color-shadow-lg: rgba(0, 0, 0, 0.2);
    --color-shadow-xl: rgba(0, 0, 0, 0.3);
    --color-footer-bg: #33363b;
    --color-tab-bg: #e0e0e0;
    --color-tab-hover: #d0d0d0;
    --color-tab-border: #ccc;
    --color-header-gradient: linear-gradient(135deg, #4E79A7 0%, #B07AA1 100%);
    --color-btn-text: #4E79A7;
}

@media (prefers-color-scheme: dark) {
    :root {
        --color-text: #d8dbe0;
        --color-text-muted: #8c8f94;
        --color-bg: #1a1b1e;
        --color-bg-alt: #252629;
        --color-primary: #6a9cc8;
        --color-primary-hover: #5a8ab8;
        --color-accent-purple: #c899b8;
        --color-accent-orange: #f5a04e;
        --color-accent-green: #8cd400;
        --color-border: #3a3d42;
        --color-shadow: rgba(0, 0, 0, 0.3);
        --color-shadow-md: rgba(0, 0, 0, 0.4);
        --color-shadow-lg: rgba(0, 0, 0, 0.5);
        --color-shadow-xl: rgba(0, 0, 0, 0.6);
        --color-footer-bg: #111214;
        --color-tab-bg: #333538;
        --color-tab-hover: #3e4044;
        --color-tab-border: #444649;
        --color-header-gradient: linear-gradient(135deg, #3d6085 0%, #8e6283 100%);
        --color-btn-text: #3d6085;
    }
}

body {
    font-family: "Open Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 300;
    font-style: normal;
    font-size: 17px;
    padding: 0;
    margin: 0;
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
}

* {
    box-sizing: border-box;
}

/* Section Layout */
@media screen and (min-width: 1080px){
    section {
        width: 1080px;
        margin: 0 auto;
        padding: 2em 0;
    }
}

@media not screen and (min-width: 1080px){
    section {
        width: 90%;
        margin: 0 auto;
        padding: 2em 0;
    }
}

/* Header/Title Section */
#title {
    background: var(--color-header-gradient);
    color: white;
    padding: 3em 0;
    text-align: center;
    width: 100%;
    margin: 0;
}

.paper-title1 {
    font-size: 84px;
    font-weight: 700;
    margin-bottom: 0.2em;
    line-height: 1;
}

.paper-title2 {
    font-size: 32px;
    font-weight: 400;
    margin-bottom: 1em;
    line-height: 1.3;
}

@media not screen and (min-width: 1080px){
    .paper-title1 {
        font-size: 48px;
    }
    .paper-title2 {
        font-size: 24px;
    }
}

#authors {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 2em;
}

.author-row-new {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 1em 0;
    gap: 1.5em;
}

.author-row-new a {
    color: white;
    text-decoration: none;
    font-size: 18px;
}

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

.affiliations-new {
    text-align: center;
    font-size: 15px;
    margin: 1em 0;
    line-height: 1.8;
}

.venue {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    margin: 1em 0;
}

/* Buttons */
.paper-btn-parent {
    display: flex;
    justify-content: center;
    gap: 1em;
    margin: 2em 0;
}

.paper-btn {
    background-color: rgba(255, 255, 255, 0.95);
    color: var(--color-btn-text);
    padding: 0.8em 2em;
    font-size: 18px;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.paper-btn:hover {
    background-color: rgba(255, 255, 255, 1);
    border-color: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--color-shadow-xl);
    color: var(--color-btn-text);
    text-decoration: none;
}

/* Info Box */
.infobox {
    background-color: var(--color-bg-alt);
    border-left: 4px solid var(--color-accent-green);
    padding: 1.5em 2em;
    margin: 2em 0;
    border-radius: 4px;
}

.infobox h6 {
    font-size: 1.3em;
    margin-top: 0;
    color: var(--color-primary);
}

.infobox ul {
    line-height: 1.8;
    margin: 0;
    padding-left: 1.5em;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

h2 {
    font-size: 2em;
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 0.3em;
    margin-top: 2em;
}

h3 {
    font-size: 1.5em;
    color: var(--color-primary);
}

h4 {
    font-size: 1.3em;
}

h6 {
    font-size: 1.2em;
}

p {
    margin: 1em 0;
}

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

a:hover {
    color: var(--color-accent-orange);
    text-decoration: underline;
}

/* Two Column Layout */
.container-two-column {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 3em;
    margin: 2em 0;
}

.container-two-column > div:first-child h2 {
    margin-top: 0;
}

@media not screen and (min-width: 1080px){
    .container-two-column {
        grid-template-columns: 1fr;
    }
}

.navigation {
    background-color: var(--color-bg-alt);
    padding: 1.5em;
    border-radius: 4px;
    border-left: 4px solid var(--color-accent-green);
    position: sticky;
    top: 20px;
    height: fit-content;
    margin-top: 0;
}

.navigation h6 {
    margin-top: 0;
    color: var(--color-primary);
}

.navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.navigation li {
    margin: 0.8em 0;
}

.navigation a {
    color: var(--color-text);
    font-weight: 400;
}

.navigation a:hover {
    color: var(--color-accent-orange);
}

/* Figures */
figure {
    margin: 2em 0;
    text-align: center;
}

figure img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px var(--color-shadow);
}

.caption {
    font-size: 0.9em;
    color: var(--color-text-muted);
    margin-top: 1em;
    font-style: italic;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 2em 0;
    background-color: var(--color-bg);
    box-shadow: 0 2px 8px var(--color-shadow);
}

thead {
    background-color: var(--color-primary);
    color: white;
}

th, td {
    padding: 1em;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

th {
    font-weight: 600;
}

tbody tr:hover {
    background-color: var(--color-bg-alt);
}

/* Dataset Cards */
.dataset-card {
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1.5em;
    margin: 1.5em 0;
    box-shadow: 0 2px 4px var(--color-shadow);
    transition: all 0.3s ease;
}

.dataset-card:hover {
    box-shadow: 0 4px 12px var(--color-shadow-md);
}

.dataset-card h3 {
    margin-top: 0;
    color: var(--color-primary);
    border-bottom: 2px solid var(--color-accent-purple);
    padding-bottom: 0.5em;
}

.dataset-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1em;
    margin: 1em 0;
    padding: 1em;
    background-color: var(--color-bg-alt);
    border-radius: 4px;
}

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

.stat-value {
    font-size: 2em;
    font-weight: 700;
    color: var(--color-accent-orange);
    display: block;
}

.stat-label {
    font-size: 0.9em;
    color: var(--color-text-muted);
    display: block;
    margin-top: 0.3em;
}

/* Split Types */
.split-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2em;
    margin: 2.5em 0;
}

.split-type-card {
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-top: 4px solid var(--color-primary);
    padding: 2em;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--color-shadow);
    transition: all 0.3s ease;
}

.split-type-card:hover {
    box-shadow: 0 4px 16px var(--color-shadow-md);
    transform: translateY(-2px);
}

.split-type-card h4 {
    margin-top: 0;
    margin-bottom: 0.8em;
    color: var(--color-primary);
    font-size: 1.4em;
    font-weight: 600;
}

.split-type-card p {
    margin: 0.8em 0;
    line-height: 1.7;
}

.split-type-card p:last-of-type {
    margin-bottom: 0;
}

.split-type-card strong {
    color: var(--color-accent-orange);
    font-weight: 600;
}

/* Downloads Section */
.download-btn {
    display: inline-block;
    background-color: var(--color-primary);
    color: white;
    padding: 0.5em 1em;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9em;
    margin: 0.2em;
    transition: all 0.3s ease;
    border: 2px solid var(--color-primary);
}

.download-btn:hover {
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px var(--color-shadow-lg);
    text-decoration: none;
    color: white;
}

/* Code Blocks */
pre {
    background-color: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 1em;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    line-height: 1.4;
}

code {
    background-color: var(--color-bg-alt);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

pre code {
    background-color: transparent;
    padding: 0;
}

/* Collapsible Sections */
.collapsible {
    background-color: var(--color-primary);
    color: white;
    cursor: pointer;
    padding: 1em;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 1.1em;
    font-weight: 600;
    border-radius: 4px;
    margin: 0.5em 0;
    transition: all 0.3s ease;
}

.collapsible:hover {
    background-color: var(--color-accent-orange);
}

.collapsible:after {
    content: '\002B';
    color: white;
    font-weight: bold;
    float: right;
    margin-left: 5px;
}

.collapsible.active:after {
    content: "\2212";
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: var(--color-bg-alt);
    border-left: 4px solid var(--color-primary);
    border-right: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.collapsible-content-inner {
    padding: 1.5em;
}

/* Citation */
.citation-box {
    background-color: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 1.5em;
    padding-top: 3em;
    margin: 2em 0;
    position: relative;
}

.copy-btn {
    position: absolute;
    top: 0.75em;
    right: 0.75em;
    background-color: var(--color-primary);
    color: white;
    border: none;
    padding: 0.5em 1.2em;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 600;
    transition: all 0.3s ease;
    z-index: 10;
}

.copy-btn:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px var(--color-shadow-lg);
}

/* Footer */
footer {
    background-color: var(--color-footer-bg);
    color: white;
    text-align: center;
    padding: 2em;
    margin-top: 4em;
}

footer a {
    color: var(--color-accent-orange);
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 2em;
}

.mb-2 {
    margin-bottom: 2em;
}

/* Responsive adjustments */
@media not screen and (min-width: 768px){
    .dataset-stats {
        grid-template-columns: 1fr;
    }
    
    .split-type-grid {
        grid-template-columns: 1fr;
    }
    
    .split-type-card {
        padding: 1.5em;
    }
    
    .author-row-new {
        flex-direction: column;
        align-items: center;
        gap: 0.5em;
    }
}

@media screen and (min-width: 768px) and (max-width: 1079px) {
    .split-type-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

/* 3D Molecular Viewer Styles */
.dataset-with-viewer {
    display: block;
}

.viewer-container {
    float: left;
    width: 350px;
    height: 350px;
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    margin-right: 2rem;
    margin-bottom: 1rem;
}

.dataset-content {
    display: block;
    overflow: auto;
}

.dataset-content::after {
    content: "";
    display: table;
    clear: both;
}

/* Hydrophobic Core special viewer with tabs */
.viewer-container-hydro {
    float: left;
    width: 350px;
    margin-right: 2rem;
    margin-bottom: 1rem;
}

.hydro-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0;
}

.hydro-tab {
    flex: 1;
    background-color: var(--color-tab-bg);
    color: var(--color-text);
    border: 1px solid var(--color-tab-border);
    border-bottom: none;
    padding: 0.5em 0.5em;
    cursor: pointer;
    font-size: 0.75em;
    font-weight: 600;
    transition: all 0.2s ease;
    border-radius: 8px 8px 0 0;
}

.hydro-tab:hover {
    background-color: var(--color-tab-hover);
}

.hydro-tab.active {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.hydro-viewers {
    position: relative;
    width: 350px;
    height: 350px;
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

.hydro-viewer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.hydro-viewer.active {
    opacity: 1;
    visibility: visible;
}

/* Responsive layout for viewers */
@media (max-width: 968px) {
    .viewer-container {
        float: none;
        width: 100%;
        max-width: 500px;
        margin: 0 auto 1.5rem auto;
    }
    
    .viewer-container-hydro {
        float: none;
        width: 100%;
        max-width: 500px;
        margin: 0 auto 1.5rem auto;
    }
    
    .hydro-viewers {
        width: 100%;
        max-width: 500px;
    }
    
    .hydro-tabs {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .dataset-content {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .viewer-container {
        height: 300px;
    }
    
    .hydro-viewers {
        height: 300px;
    }
    
    .hydro-tab {
        font-size: 0.7em;
        padding: 0.4em 0.3em;
    }
}
