/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

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

header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header h1 {
    margin: 0;
    font-size: 1.8rem;
}

nav {
    margin-top: 10px;
}

nav a {
    color: #ecf0f1;
    text-decoration: none;
    margin-right: 15px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

nav a:hover {
    background-color: #34495e;
}

main {
    padding: 2rem 0;
}

/* 分类卡片样式 */
.categories {
    margin-bottom: 2rem;
}

.category-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.category-card {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    border-left: 5px solid #3498db;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
}

.category-card h3 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.category-count {
    display: inline-block;
    background-color: #3498db;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    line-height: 30px;
    font-size: 0.9rem;
}

/* 文件列表样式 */
.file-list {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
}

.file-list h2 {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    color: #2c3e50;
}

.file-items {
    padding: 1rem;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #f1f1f1;
    transition: background-color 0.2s;
}

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

.file-item:hover {
    background-color: #f9f9f9;
}

.file-icon {
    font-size: 2rem;
    margin-right: 1rem;
    color: #3498db;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.file-meta {
    font-size: 0.85rem;
    color: #7f8c8d;
}

.file-meta span {
    margin-right: 15px;
}

.file-actions {
    display: flex;
    gap: 10px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #2ecc71;
}

.btn-secondary:hover {
    background-color: #27ae60;
}

/* 上传表单样式 */
.upload-form {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

/* 预览页面样式 */
.preview-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 2rem;
    margin-bottom: 2rem;
}

.preview-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.preview-content {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 1rem;
}

.file-preview {
    max-width: 100%;
    max-height: 600px;
}

/* 响应式样式 */
@media (max-width: 768px) {
    .category-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .file-actions {
        margin-top: 1rem;
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .category-cards {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .file-actions {
        width: 100%;
        justify-content: space-between;
    }
}
    