/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fafafa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    min-height: 100vh;
}

/* Header样式 */
.header {
    text-align: center;
    padding: 40px 0 60px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 40px;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #2c3e50;
    line-height: 1.2;
}

.subtitle {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-bottom: 30px;
    font-weight: 400;
}

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

.author {
    margin: 0 15px;
    display: inline-block;
}

.author a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.author a:hover {
    color: #2980b9;
    text-decoration: underline;
}

.author sup {
    color: #e74c3c;
    font-weight: 600;
}

.affiliations {
    margin-bottom: 30px;
    color: #7f8c8d;
    font-size: 1rem;
}

.affiliation {
    margin: 0 20px;
    display: inline-block;
}

.affiliation sup {
    color: #e74c3c;
    font-weight: 600;
}

/* 链接按钮样式 */
.links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.link-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.link-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.link-button.paper-link {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
}

.link-button.code-link {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
}

.link-button.data-link {
    background: linear-gradient(135deg, #45b7d1 0%, #96c93d 100%);
}

.link-button.leaderboard-link {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

/* 各个section的通用样式 */
section {
    margin-bottom: 50px;
    padding: 0 20px;
}

section h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: #2c3e50;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
}

/* TL;DR样式 */
.tldr {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin: 40px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.tldr h2 {
    color: white;
    border-bottom: 3px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 20px;
}

.tldr p {
    font-size: 1.1rem;
    line-height: 1.7;
}

/* 图片样式 */
.main-figure {
    text-align: center;
    margin: 50px 0;
}

/* 双栏图片布局 */
.dual-figure {
    margin: 50px 0;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.figure-row {
    display: flex !important;
    flex-direction: row !important;
    gap: 40px;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: nowrap; /* 防止换行 */
    width: 100%;
}

.figure-item {
    flex: 0 0 calc(50% - 20px); /* 固定宽度，不允许伸缩 */
    text-align: center;
    max-width: calc(50% - 20px);
    min-width: calc(50% - 20px);
    width: calc(50% - 20px);
    box-sizing: border-box;
}

.figure-item .figure-img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.figure-caption {
    margin-top: 15px;
    font-style: italic;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.figure-img, .method-img, .result-img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.figure-img:hover, .method-img:hover, .result-img:hover {
    transform: scale(1.02);
}

.figure-caption, .result-caption {
    margin-top: 15px;
    font-style: italic;
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* 摘要样式 */
.abstract p {
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: justify;
    color: #444;
}

/* 方法部分样式 */
.method-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.method-text p {
    margin-bottom: 20px;
    font-size: 1.05rem;
    line-height: 1.7;
}

.method-text ul {
    list-style-type: none;
    padding-left: 0;
}

.method-text li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    font-size: 1.05rem;
}

.method-text li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: #3498db;
    font-weight: bold;
}

/* 结果网格样式 */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.result-item {
    text-align: center;
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.result-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* 引用样式 */
.citation-box {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 25px;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    margin-bottom: 20px;
    position: relative;
    overflow-x: auto;
}

.citation-box pre {
    margin: 0;
    white-space: pre-wrap;
}

.citation-box code {
    font-size: 0.9rem;
    line-height: 1.5;
}

.copy-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 auto;
}

.copy-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

/* Footer样式 */
.footer {
    text-align: center;
    padding: 30px 0;
    border-top: 1px solid #eee;
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .links {
        flex-direction: column;
        align-items: center;
    }
    
    .method-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    section {
        padding: 0 10px;
    }
    
    section h2 {
        font-size: 1.5rem;
    }
}

/* 只在很小的屏幕（手机）上才变为单栏 */
@media (max-width: 480px) {
    /* 双栏图片在小手机上变为单栏 */
    .figure-row {
        flex-direction: column !important;
        gap: 30px;
    }
    
    .figure-item {
        flex: none !important;
        max-width: 100% !important;
        min-width: 100% !important;
        width: 100% !important;
    }
}

/* 强制双栏布局的额外保护 */
@media (min-width: 481px) {
    .dual-figure .figure-row {
        display: flex !important;
        flex-direction: row !important;
    }
    
    .dual-figure .figure-item {
        flex: 0 0 calc(50% - 20px) !important;
        width: calc(50% - 20px) !important;
        max-width: calc(50% - 20px) !important;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.8rem;
    }
    
    .authors {
        font-size: 1rem;
    }
    
    .author {
        margin: 5px 10px;
        display: block;
    }
    
    .affiliation {
        margin: 5px 10px;
        display: block;
    }
}
