:root {
    --primary-color: #007bff;
    --bg-color: #f8f9fa;
    --text-color: #333;
    --card-bg: #fff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

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

/* 按钮导航样式 */
.topic-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
    justify-content: center;
}

.topic-btn {
    padding: 8px 18px;
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
    outline: none;
}

.topic-btn.active {
    background: var(--primary-color);
    color: white;
}

.topic-btn:hover {
    background: #e7f1ff;
}

.topic-btn.active:hover {
    background: #0056b3;
}

/* 论文卡片样式 */
.paper-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s;
}

.paper-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.paper-card h3 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.paper-meta {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 10px;
}

.paper-authors {
    font-weight: 500;
    margin-bottom: 10px;
}

.paper-abstract {
    font-size: 0.9rem;
    color: #555;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.hidden { display: none; }

.modal-content {
    background: white;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    border-radius: 12px;
    overflow-y: auto;
    padding: 30px;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
}

.analysis-section {
    margin-bottom: 20px;
}

.analysis-section h3 {
    border-left: 4px solid var(--primary-color);
    padding-left: 10px;
    font-size: 1.1rem;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 50px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hidden { display: none; }
