/* ===== Base Styles ===== */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --bg-secondary: #f9fafb;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --max-width: 900px;
}

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

body {
    font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--bg-color);
}

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

h1, h2, h3 {
    font-weight: 600;
    line-height: 1.3;
}

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

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== Header Section ===== */
.header {
    padding: 60px 0 40px;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-color) 100%);
}

.title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-color);
}

.venue {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 20px;
}

.authors {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.author a {
    color: var(--text-color);
}

.author a:hover {
    color: var(--primary-color);
}

.affiliations {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.affiliation {
    margin: 0 10px;
}

.author-note {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 25px;
}

/* ===== Resource Links ===== */
.links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--text-color);
    color: white;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.btn:hover {
    background: var(--primary-color);
    text-decoration: none;
    transform: translateY(-1px);
}

.btn i {
    font-size: 1.1rem;
}

/* ===== Teaser Section ===== */
.teaser {
    padding: 40px 0;
}

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

.caption {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 15px;
    padding: 0 20px;
}

/* ===== Section Styles ===== */
section {
    padding: 50px 0;
}

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

section h2 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    text-align: center;
    color: var(--text-color);
}

section h3 {
    font-size: 1.3rem;
    margin: 30px 0 15px;
    color: var(--text-color);
}

/* ===== Abstract Section ===== */
.abstract p {
    margin-bottom: 15px;
    text-align: justify;
}

/* ===== Method Section ===== */
.method-figure {
    margin: 30px 0;
}

.method-figure img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
}

.components {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.component-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    transition: box-shadow 0.2s ease;
}

.component-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.component-card h3 {
    font-size: 1.1rem;
    margin: 0 0 12px 0;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.component-card h3 i {
    font-size: 1.2rem;
}

.component-card p {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* ===== Results Section ===== */
.table-wrapper {
    overflow-x: auto;
    margin: 20px 0 30px;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    background: var(--bg-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.05);
}

.results-table th,
.results-table td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.results-table th {
    background: var(--text-color);
    color: white;
    font-weight: 600;
}

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

.results-table tbody tr:hover {
    background-color: var(--bg-secondary);
}

.results-table .average-row {
    background-color: #f0f9ff;
    font-weight: 600;
}

.results-table .average-row:hover {
    background-color: #e0f2fe;
}

.improvement {
    color: var(--success-color);
    font-size: 0.85rem;
}

.latency-table {
    max-width: 700px;
    margin: 20px auto 30px;
}

.visualization {
    margin: 25px 0;
}

.visualization img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
}

/* ===== Depth Visualization Grid ===== */
.depth-visualization {
    margin: 25px 0;
}

.depth-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 15px;
}

.depth-section {
    background: var(--bg-color);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.depth-section h4 {
    text-align: center;
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 15px;
    font-weight: 600;
}

.depth-row {
    display: grid;
    grid-template-columns: 50px repeat(3, 1fr);
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.depth-col {
    text-align: center;
}

.depth-col img {
    width: 100%;
    border-radius: 6px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

.depth-col span {
    display: block;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 4px;
}

.view-label {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-color);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
}

/* ===== Real World Grid ===== */
.real-world-visualization {
    margin: 25px 0;
}

.real-world-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.real-world-task {
    background: var(--bg-color);
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.real-world-task img {
    width: 100%;
    border-radius: 6px;
    margin-bottom: 8px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

.real-world-task img:first-child {
    margin-bottom: 8px;
}

.real-world-task span {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-color);
    margin-top: 8px;
}

@media (max-width: 768px) {
    .depth-grid {
        grid-template-columns: 1fr;
    }

    .real-world-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .real-world-grid {
        grid-template-columns: 1fr;
    }

    .depth-row {
        grid-template-columns: 40px repeat(3, 1fr);
    }
}

/* ===== Video Section ===== */
.videos {
    padding: 50px 0;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    margin: 20px 0;
}

.video-item {
    background: var(--bg-color);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.video-item h3 {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
}

.video-item video {
    width: 100%;
    border-radius: 8px;
}

.video-item.full-width {
    grid-column: 1 / -1;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

/* ===== Citation Section ===== */
.citation {
    padding: 50px 0;
}

.citation p {
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-light);
}

.bibtex {
    position: relative;
    background: #1e293b;
    border-radius: 10px;
    padding: 20px;
    overflow: hidden;
}

.bibtex pre {
    color: #e2e8f0;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.2s ease;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.copy-btn.copied {
    background: var(--success-color);
}

/* ===== Footer ===== */
.footer {
    padding: 30px 0;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
}

.footer a {
    color: var(--primary-color);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .title {
        font-size: 1.6rem;
    }

    .authors {
        font-size: 1rem;
    }

    section {
        padding: 35px 0;
    }

    section h2 {
        font-size: 1.5rem;
    }

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

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

    .results-table {
        font-size: 0.8rem;
    }

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

@media (max-width: 480px) {
    .title {
        font-size: 1.4rem;
    }

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

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