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

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: linear-gradient(145deg, #f6f9fc 0%, #eef2f5 100%);
    color: #1a2c3e;
    line-height: 1.5;
    padding: 2rem 1rem;
    min-height: 100vh;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(2px);
    border-radius: 2rem;
    box-shadow: 0 20px 35px -12px rgba(0,0,0,0.1);
    overflow: hidden;
    padding: 2rem 1.5rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

h1 {
    font-size: 2.6rem;
    background: linear-gradient(135deg, #2b6e9e, #1f4e6e);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    letter-spacing: -0.5px;
}

.subtitle {
    color: #4a627a;
    margin-top: 0.5rem;
    font-weight: 500;
}

.search-wrapper {
    max-width: 480px;
    margin: 1.8rem auto 0;
    position: relative;
}

#searchInput {
    width: 100%;
    padding: 0.9rem 1.2rem;
    font-size: 1rem;
    border: 2px solid #dce5ec;
    border-radius: 60px;
    background: white;
    outline: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

#searchInput:focus {
    border-color: #2b6e9e;
    box-shadow: 0 8px 20px rgba(43,110,158,0.12);
}

/* 文件卡片网格 */
.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0 1rem;
}

/* 卡片样式 */
.file-card {
    background: white;
    border-radius: 1.5rem;
    padding: 1.4rem 1.2rem 1.2rem;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 6px 14px rgba(0,0,0,0.03);
    border: 1px solid #e9edf2;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(4px);
    background: rgba(255,255,255,0.9);
}

.file-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 30px -12px rgba(0,0,0,0.12);
    border-color: #cbdde9;
}

.file-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.file-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e4663;
    word-break: break-word;
    margin-bottom: 0.5rem;
}

.file-desc {
    font-size: 0.85rem;
    color: #5b6f82;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    flex: 1;
}

.file-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.8rem;
    color: #6c86a0;
    border-top: 1px solid #edf2f7;
    padding-top: 0.75rem;
    margin-top: 0.5rem;
}

.file-size {
    background: #f0f4f9;
    padding: 0.2rem 0.6rem;
    border-radius: 30px;
    font-family: monospace;
    font-size: 0.75rem;
}

.download-btn {
    background: #2b6e9e;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    margin-top: 0.8rem;
    justify-content: center;
}

.download-btn:hover {
    background: #1f557c;
    transform: scale(0.97);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.download-count {
    font-size: 0.7rem;
    background: #eef3fc;
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
}

/* 加载与空状态 */
.loading-state {
    text-align: center;
    padding: 3rem;
    color: #4f6f8f;
    font-size: 1.1rem;
    grid-column: 1 / -1;
}

.no-result {
    text-align: center;
    padding: 3rem;
    color: #8aa0b5;
    font-size: 1.2rem;
    grid-column: 1 / -1;
}

.hidden {
    display: none;
}

footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 1.5rem;
    font-size: 0.8rem;
    color: #5f7d9c;
    border-top: 1px solid #dce5ec;
}

footer code {
    background: #eef2f8;
    padding: 0.2rem 0.4rem;
    border-radius: 8px;
    font-size: 0.75rem;
}

/* 响应式微调 */
@media (max-width: 640px) {
    .container {
        padding: 1rem;
    }
    h1 {
        font-size: 2rem;
    }
    .file-grid {
        grid-template-columns: 1fr;
    }
}