/* Magneton Website */

:root {
    --text: #1a1a1a;
    --text-secondary: #555;
    --bg: #fff;
    --bg-alt: #fafafa;
    --border: #eee;
    --accent: #2563eb;
    --max-width: 900px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 17px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

section {
    padding: 64px 0;
}

section:nth-child(even) {
    background: var(--bg-alt);
}

h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
    letter-spacing: -0.02em;
}

.section-description {
    text-align: center;
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0 auto 28px;
}

/* Hero */
.hero {
    padding: 72px 0 56px;
    text-align: center;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.hero .logo {
    width: 160px;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}

.hero .subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 28px;
    font-weight: 400;
}

.authors {
    margin-bottom: 8px;
}

.author {
    font-size: 1.05rem;
    margin: 0 10px;
}

.author sup {
    color: var(--accent);
    font-size: 0.75em;
}

.affiliations {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 28px;
}

.affiliations sup {
    color: var(--accent);
}

.affiliations .equal-contrib {
    font-size: 0.85rem;
    margin-top: 4px;
}

.buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.15s;
}

.btn:hover {
    opacity: 0.85;
}

.btn-paper {
    background: #dc2626;
    color: #fff;
}

.btn-github {
    background: #1f2937;
    color: #fff;
}

.btn-hf {
    background: #f59e0b;
    color: #fff;
}

/* Abstract */
.abstract p {
    max-width: 720px;
    margin: 0 auto 16px;
    text-align: justify;
}

.abstract p:last-of-type {
    margin-bottom: 24px;
}

.abstract strong {
    font-weight: 600;
}

.abstract h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 24px auto 12px;
    max-width: 720px;
    text-align: left;
    color: var(--text);
}

.abstract .key-points {
    max-width: 720px;
    margin: 0 auto;
    padding-left: 20px;
    list-style: none;
}

.abstract .key-points li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 10px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.abstract .key-points li::before {
    content: "\2022";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

.abstract .key-points li strong {
    color: var(--text);
}

/* Figures */
.figure-container {
    margin: 24px 0;
}

.figure {
    width: 100%;
    max-width: 100%;
    border-radius: 4px;
    border: 1px solid var(--border);
}

.caption {
    margin-top: 12px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.caption strong {
    color: var(--text);
}

/* Features */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 32px;
}

.feature-card {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature-card h3 i {
    color: var(--accent);
    font-size: 1.1rem;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

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

th {
    font-weight: 600;
    background: var(--bg-alt);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* Results Tables */
.results .table-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
    text-align: left;
}

.table-section {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border);
}

.table-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.table-description {
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 16px;
    text-align: justify;
}

.table-caption {
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Data tables styling */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin: 0;
}

.data-table th,
.data-table td {
    padding: 10px 12px;
    text-align: center;
    border: 1px solid var(--border);
}

.data-table th {
    background: #f3f4f6;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text);
}

.data-table td:first-child {
    text-align: left;
    font-weight: 500;
}

.data-table td.scale-cell {
    vertical-align: middle;
}

/* Evaluation Tasks table - center all cells except scale column */
.eval-tasks-table td:first-child:not(.scale-cell) {
    text-align: center;
    font-weight: 400;
}

.data-table .indent {
    padding-left: 24px;
    color: var(--text-secondary);
}

.data-table .st-row {
    background: #f9fafb;
}

.data-table .total-row {
    border-top: 2px solid var(--text-secondary);
    font-weight: 600;
}

.data-table .total-row .small {
    font-weight: 400;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.data-table .best {
    font-weight: 700;
    color: var(--accent);
}

.data-table .highlight-row {
    background: #eff6ff;
}

.data-table .na {
    color: #9ca3af;
    font-style: italic;
}

.data-table code {
    font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.8rem;
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 3px;
}

/* Config table specific styling */
.config-table {
    font-size: 0.8rem;
}

.config-table th,
.config-table td {
    padding: 8px 10px;
}

/* Silhouette table specific styling */
.silhouette-table th,
.silhouette-table td {
    padding: 8px 8px;
    font-size: 0.8rem;
}

/* Citation */
.citation > .container > p {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.bibtex {
    position: relative;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 20px;
    max-width: 640px;
    margin: 0 auto;
}

.bibtex pre {
    margin: 0;
    overflow-x: auto;
}

.bibtex code {
    font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
    font-size: 0.8rem;
    line-height: 1.5;
}

.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.copy-btn:hover {
    opacity: 0.9;
}

/* Footer */
footer {
    padding: 32px 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border);
}

footer p {
    margin: 4px 0;
}

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

footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.25rem;
    }

    .hero .logo {
        width: 120px;
    }

    .author {
        display: block;
        margin: 6px 0;
    }

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

    .btn {
        width: 100%;
        max-width: 240px;
        justify-content: center;
    }

    h2 {
        font-size: 1.5rem;
    }

    section {
        padding: 48px 0;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    th, td {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
}
