:root {
    --primary-color: rgba(234, 234, 234, 0.45);
    --secondary-color: rgba(255, 255, 255, 0);
    --ai-color: rgba(255, 107, 107, 0.7);
    --academic-color: rgba(72, 187, 120, 0.7);
    --fenjue-color: rgba(255, 159, 67, 0.7);
    --cs-color: rgba(77, 171, 247, 0.7);
    --other-color: rgba(159, 122, 234, 0.7);
    --border-radius: 15px;
    --box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    line-height: 1.6;
    position: relative;
    min-height: 100vh;
    padding-bottom: 120px;
}

/* 背景图片容器 */
.bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background-image: url('../images/libBJ.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.7;
}

/* 背景遮罩 */
.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
}

header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem 1rem;
    text-align: center;
    box-shadow: var(--box-shadow);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-box {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    font-size: 1rem;
    box-shadow: var(--box-shadow);
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    color: #fff;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.filter-btn:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.25);
}

.stats {
    display: flex;
    justify-content: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 180px;
}

.stat-card i {
    font-size: 2rem;
    opacity: 0.8;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: bold;
    display: block;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

.document-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.document-card {
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    position: relative;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.document-card:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.category-badge {
    position: absolute;
    top: -10px;
    right: 15px;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.category-AI {
    background-color: var(--ai-color);
}

.category-学术 {
    background-color: var(--academic-color);
}

.category-焚诀 {
    background-color: var(--fenjue-color);
}

.category-计算机科学 {
    background-color: var(--cs-color);
}

.category-其他 {
    background-color: var(--other-color);
}

.document-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 0.8rem;
    color: #fff;
    line-height: 1.4;
    flex-grow: 1;
}

.document-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.document-title a:hover {
    color: #a3d5ff;
}

.document-info {
    margin-top: auto;
}

.journal-number {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.journal-number i {
    opacity: 0.7;
}

.link-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.external-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.external-link:hover {
    background-color: var(--primary-color);
    transform: translateX(5px);
}

.copy-link {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 0.3rem;
    border-radius: 4px;
}

.copy-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    grid-column: 1 / -1;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.loading {
    text-align: center;
    padding: 3rem;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    grid-column: 1 / -1;
}

.loading i {
    font-size: 2rem;
    margin-bottom: 1rem;
    animation: spin 1.5s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9em;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    box-shadow: 8px 8px 16px rgba(0, 0, 0, 0.1),
                -8px -8px 16px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 1400px;
}

.footer p {
    margin: 5px 0;
}

.footer a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #fff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .controls {
        flex-direction: column;
    }
    
    .search-box {
        min-width: 100%;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .stats {
        justify-content: center;
    }
    
    .stat-card {
        min-width: 150px;
        flex-grow: 1;
    }
    
    .document-grid {
        grid-template-columns: 1fr;
    }
    
    .footer {
        padding: 15px;
        font-size: 0.8em;
        width: calc(100% - 20px);
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .document-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}