/* 文件下载页面样式 */
:root {
    --primary-color: #c7000b;
    --secondary-color: #ffcb05;
    --text-color: #333;
    --light-text: #fff;
    --border-color: #e0e0e0;
    --bg-light: #f5f5f5;
    --bg-dark: #b71c1c;
}

body {
    font-family: "Microsoft YaHei", "SimSun", sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

main {
    flex: 1;
    padding: 20px 0;
}

/* 文件下载标题和上传按钮 */
.download-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.download-header h1 {
    font-size: 24px;
    color: var(--text-color);
    margin: 0;
}

.btn-upload {
    background-color: var(--primary-color);
    color: var(--light-text);
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-upload:hover {
    opacity: 0.9;
}

/* 文件列表样式 */
.file-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.file-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 15px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.file-info {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.file-icon {
    width: 50px;
    height: 50px;
    margin-right: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.file-icon img {
    max-width: 100%;
    max-height: 100%;
}

.file-details {
    flex: 1;
}

.file-name {
    font-size: 16px;
    margin: 0 0 5px 0;
    color: var(--text-color);
}

.file-meta {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: #666;
}

.file-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 10px;
}

.btn-download, 
.btn-delete {
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    border: none;
    color: white;
}

.btn-download {
    background-color: #4caf50;
}

.btn-delete {
    background-color: #e74c3c;
}

.btn-download:hover,
.btn-delete:hover {
    opacity: 0.9;
}

.file-uploader {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
    border-top: 1px solid #f0f0f0;
    padding-top: 10px;
}

/* 无文件时的提示 */
.no-files {
    text-align: center;
    padding: 30px;
    color: #666;
    background-color: white;
    border-radius: 8px;
    margin-top: 20px;
}

/* 加载指示器 */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 500px;
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    color: var(--text-color);
}

.close-modal {
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #888;
}

.close-modal:hover {
    color: var(--text-color);
}

.modal-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--text-color);
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
}

.form-group input[type="file"] {
    display: block;
    margin-top: 5px;
}

.file-preview {
    margin-top: 10px;
    padding: 10px;
    border: 1px dashed var(--border-color);
    border-radius: 4px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.btn-primary,
.btn-secondary {
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-primary:hover,
.btn-secondary:hover {
    opacity: 0.9;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .file-uploader {
        flex-direction: column;
        gap: 5px;
    }
    
    .download-header h1 {
        font-size: 20px;
    }
    
    .file-name {
        font-size: 14px;
    }
    
    .file-icon {
        width: 40px;
        height: 40px;
    }
}

/* 下载状态提示 */
.download-status {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    z-index: 2000;
    animation: fadeIn 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
} 