* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f3ff 0%, #ffffff 50%, #faf5ff 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
}

h1 {
    color: #711a5f;
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(113, 26, 95, 0.1);
}

.subtitle {
    color: #8b2a75;
    font-size: 1.1rem;
}

/* 筛选区域 */
.filter-section {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(113, 26, 95, 0.1);
    margin-bottom: 30px;
    border: 2px solid #f0d5e8;
}

.filter-title {
    color: #711a5f;
    font-size: 1.3rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-label {
    display: block;
    color: #8b2a75;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-tag {
    padding: 8px 16px;
    border: 2px solid #daafd0;
    border-radius: 20px;
    background: white;
    color: #711a5f;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    user-select: none;
}

.filter-tag:hover {
    background: #fce8f5;
    border-color: #c589b8;
}

.filter-tag.active {
    background: #711a5f;
    color: white;
    border-color: #711a5f;
}

.filter-tag.hidden {
    display: none;
}

.clear-filters {
    display: inline-block;
    padding: 10px 25px;
    background: #8b2a75;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.95rem;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.clear-filters:hover {
    background: #711a5f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(113, 26, 95, 0.3);
}

/* 结果计数 */
.results-count {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background: linear-gradient(135deg, #f9edf5 0%, #fdf5fb 100%);
    border-radius: 10px;
    border: 1px solid #f0d5e8;
}

.results-count span {
    color: #711a5f;
    font-size: 1.3rem;
    font-weight: 700;
}

/* 论文卡片网格 */
.papers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.paper-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(113, 26, 95, 0.08);
    border: 2px solid #fce8f5;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.paper-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #711a5f 0%, #c589b8 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.paper-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(113, 26, 95, 0.2);
    border-color: #daafd0;
}

.paper-card:hover::before {
    opacity: 1;
}

.paper-title {
    color: #5a1549;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.paper-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #711a5f;
    font-size: 0.9rem;
    padding: 5px 12px;
    background: #fce8f5;
    border-radius: 15px;
}

.meta-icon {
    font-weight: bold;
}

.paper-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.tag {
    padding: 5px 12px;
    background: linear-gradient(135deg, #f9edf5 0%, #fdf5fb 100%);
    color: #8b2a75;
    border-radius: 12px;
    font-size: 0.85rem;
    border: 1px solid #f0d5e8;
    transition: all 0.2s ease;
}

.paper-card:hover .tag {
    background: linear-gradient(135deg, #f4e0ee 0%, #fce8f5 100%);
    border-color: #daafd0;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #8b2a75;
    font-size: 1.2rem;
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .papers-grid {
        grid-template-columns: 1fr;
    }

    .filter-section {
        padding: 20px;
    }
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 60px;
    color: #711a5f;
    font-size: 1.2rem;
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Tag折叠功能样式 */
.tag-toggle-btn {
    padding: 8px 20px;
    background: #f9edf5;
    color: #711a5f;
    border: 2px solid #daafd0;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    user-select: none;
    font-weight: 600;
}

.tag-toggle-btn:hover {
    background: #fce8f5;
    border-color: #c589b8;
}

/* 数据库关联筛选样式 */
.database-filter {
    display: flex;
    gap: 10px;
    align-items: center;
}

.database-option {
    padding: 8px 16px;
    border: 2px solid #daafd0;
    border-radius: 20px;
    background: white;
    color: #711a5f;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    user-select: none;
}

.database-option:hover {
    background: #fce8f5;
    border-color: #c589b8;
}

.database-option.active {
    background: #711a5f;
    color: white;
    border-color: #711a5f;
}

/* 底线提示 */
.bottom-line {
    text-align: center;
    padding: 30px;
    color: #c589b8;
    font-size: 1rem;
    font-style: italic;
    margin-bottom: 20px;
}

/* 加载更多指示器 */
.loading-more {
    text-align: center;
    padding: 20px;
    color: #8b2a75;
    font-size: 1rem;
}

.loading-more::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}
