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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

/* 头部样式 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.main-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    font-size: 16px;
    border: none;
    border-radius: 25px;
    outline: none;
    background: rgba(255,255,255,0.95);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.search-input:focus {
    background: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.clear-btn {
    padding: 12px 20px;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.clear-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

/* 导航样式 */
.navigation {
    background: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-list {
    display: flex;
    list-style: none;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.nav-link {
    display: block;
    padding: 10px 20px;
    color: #555;
    text-decoration: none;
    border-radius: 20px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* 主要内容 */
.main-content {
    padding: 2rem 0 4rem;
}

.stats {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.1rem;
    color: #666;
    font-weight: 500;
}

.stats span {
    margin: 0 10px;
}

/* 分类section */
.category-section {
    background: white;
    margin-bottom: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.category-section:hover {
    transform: translateY(-2px);
}

.category-title {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 1.5rem 2rem;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.references-list {
    padding: 0;
}

/* 参考文献项目 */
.reference-item {
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.reference-item:last-child {
    border-bottom: none;
}

.reference-item:hover {
    background-color: #f8f9ff;
}

.reference-content {
    padding: 1.5rem 2rem;
}

.citation {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    color: #444;
    text-align: justify;
}

.pdf-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(79, 172, 254, 0.3);
}

.pdf-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(79, 172, 254, 0.4);
    text-decoration: none;
    color: white;
}

.no-pdf {
    display: inline-block;
    background: #f8f9fa;
    color: #6c757d;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid #dee2e6;
}

/* 错误和空状态 */
.error,
.no-results {
    text-align: center;
    padding: 3rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    color: #666;
    font-size: 1.1rem;
}

.error {
    background: #fff5f5;
    color: #e53e3e;
    border: 1px solid #feb2b2;
}

/* 底部样式 */
.footer {
    background: #2d3748;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

.footer p {
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.footer p:last-child {
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .search-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-input {
        width: 100%;
    }
    
    .nav-list {
        gap: 0.25rem;
    }
    
    .nav-link {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .category-title {
        padding: 1rem 1.5rem;
        font-size: 1.3rem;
    }
    
    .reference-content {
        padding: 1rem 1.5rem;
    }
    
    .citation {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 1.8rem;
    }
    
    .nav-list {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-link {
        width: 90%;
        text-align: center;
    }
    
    .category-title {
        padding: 1rem;
        font-size: 1.2rem;
    }
    
    .reference-content {
        padding: 1rem;
    }
    
    .citation {
        font-size: 0.9rem;
        line-height: 1.6;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

/* 加载动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-section {
    animation: fadeIn 0.6s ease-out;
}

/* 高亮搜索结果 */
.highlight {
    background: linear-gradient(135deg, #ffeaa7 0%, #fab1a0 100%);
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 500;
}