/* ============ Global ============ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: "Google Sans", "Noto Sans", sans-serif;
    background: #fafbfc;
    color: #222;
    margin: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: #2d5fb0; text-decoration: none; }
a:hover { text-decoration: underline; }
h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0 0 1rem;
    color: #1a1a1a;
    border-bottom: 2px solid #eaeaea;
    padding-bottom: 0.5rem;
}
h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 1.2rem 0 0.6rem;
    color: #1a1a1a;
}

/* ============ Hero ============ */
.hero {
    background: linear-gradient(180deg, #ffffff 0%, #f0f3f8 100%);
    padding: 3.5rem 1.5rem 2rem;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
}
.hero-content { max-width: 960px; margin: 0 auto; }

.paper-title {
    font-size: 2.4rem;
    font-weight: 600;
    line-height: 1.25;
    margin: 0 0 1.5rem;
    color: #1a1a1a;
    letter-spacing: -0.5px;
}

.authors {
    font-size: 1.1rem;
    margin: 0.75rem 0;
}
.author { margin: 0 0.6rem; color: #333; }
.author a { color: #2d5fb0; }
.affiliations {
    font-size: 0.95rem;
    color: #555;
    margin: 0.5rem 0;
}
.affiliations span { margin: 0 0.6rem; }
.footnote-marks {
    font-size: 0.82rem;
    color: #888;
    margin-top: 0.3rem;
}

/* Badges */
.badge-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.75rem;
}
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 1.1rem;
    background: #1a1a1a;
    color: #fff !important;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.15s;
    text-decoration: none !important;
}
.badge:hover { background: #333; }
.badge-icon { font-size: 1rem; margin-right: 0.3rem; }
.badge-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

/* Teaser */
.teaser-container {
    max-width: 1200px;
    margin: 2.5rem auto 0;
    padding: 0 1rem;
}
.teaser-img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.08);
    border: 1px solid #e8e8e8;
}

/* ============ Sections ============ */
.section {
    padding: 3rem 1.5rem;
}
.section-alt { background: #f5f7fa; }
.container { max-width: 1100px; margin: 0 auto; }

.abstract {
    text-align: justify;
    font-size: 1.05rem;
    color: #333;
    line-height: 1.75;
}
.note {
    font-size: 0.92rem;
    color: #666;
    font-style: italic;
    padding: 0.5rem 0.75rem;
    background: #f9f6ef;
    border-left: 3px solid #d0b464;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

/* Figures */
.figure {
    text-align: center;
    margin: 1.5rem 0;
}
.figure img {
    max-width: 100%;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.caption {
    text-align: justify;
    font-size: 0.92rem;
    color: #555;
    margin: 0.75rem auto 0;
    max-width: 900px;
    line-height: 1.55;
}

/* Highlight grid (3 key ideas) */
.highlight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 2rem;
}
.highlight {
    background: #fff;
    padding: 1.25rem 1.4rem;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}
.highlight h3 {
    margin-top: 0;
    color: #2d5fb0;
    font-size: 1.1rem;
}
.highlight p {
    margin: 0;
    font-size: 0.95rem;
    color: #444;
}

/* ============ Results Grid ============ */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
}
.result-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.result-card-header {
    padding: 0.55rem 1rem;
    background: #f4f6f9;
    font-weight: 600;
    font-size: 0.95rem;
    color: #2d5fb0;
    border-bottom: 1px solid #e5e7eb;
}
.result-card-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 280px;
}
.result-card-body > div {
    min-height: 280px;
    position: relative;
    background: #1a1a1a;
}
.result-card-body .input-col {
    border-right: 1px solid #eaeaea;
    display: flex;
    align-items: center;
    justify-content: center;
}
.result-card-body video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.result-card-body .mesh-col {
    display: flex;
    flex-direction: column;
}
.scene-area {
    flex: 1;
    position: relative;
    cursor: grab;
    min-height: 240px;
}
.scene-area:active { cursor: grabbing; }

.panel-label {
    position: absolute;
    top: 8px;
    left: 8px;
    color: #fff;
    background: rgba(0,0,0,0.7);
    padding: 3px 9px;
    font-size: 11px;
    border-radius: 4px;
    z-index: 5;
    pointer-events: none;
    letter-spacing: 0.3px;
}
.panel-label.right { left: auto; right: 8px; }

.card-controls {
    background: #1a1a1a;
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    gap: 0.5rem;
    border-top: 1px solid #333;
    grid-column: 1 / -1;
}
.card-controls .frame-num {
    color: #4facfe;
    font-family: "Courier New", monospace;
    font-size: 0.85rem;
    min-width: 48px;
}
.card-controls input[type=range] {
    flex: 1;
    cursor: pointer;
    accent-color: #4facfe;
    height: 4px;
}
.card-controls button {
    background: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 0.85rem;
}
.card-controls button:hover { background: #4facfe; }

@media (max-width: 720px) {
    .result-card-body {
        grid-template-columns: 1fr;
    }
    .result-card-body .input-col {
        border-right: none;
        border-bottom: 1px solid #eaeaea;
    }
}

/* ============ Tables ============ */
.result-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.95rem;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}
.result-table th, .result-table td {
    padding: 0.65rem 0.9rem;
    text-align: center;
    border-bottom: 1px solid #eaeaea;
}
.result-table th {
    background: #f4f6f9;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #d5dae0;
}
.result-table tr:last-child td { border-bottom: none; }
.result-table tr.highlight-row {
    background: #fff8e1;
}

/* BibTeX */
.bibtex {
    background: #f5f5f5;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    line-height: 1.5;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 1rem 3rem;
    color: #888;
    font-size: 0.88rem;
    border-top: 1px solid #eaeaea;
    background: #fafbfc;
}
