* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.upload-section, .files-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
}

.upload-section h2, .files-section h2 {
    margin-bottom: 20px;
    color: #4a5568;
}

.upload-area {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

#fileInput {
    flex: 1;
    min-width: 200px;
    padding: 12px;
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    background: #f7fafc;
    font-size: 16px;
    transition: all 0.3s;
}

#fileInput:hover {
    border-color: #667eea;
    background: #edf2f7;
}

#uploadBtn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
    min-width: 120px;
}

#uploadBtn:hover:not(:disabled) {
    background: #5a6fd8;
}

#uploadBtn:disabled {
    background: #a0aec0;
    cursor: not-allowed;
}

/* 线状进度条样式 */
.progress-container {
    margin-top: 20px;
    padding: 0;
    background: transparent;
    border: none;
    display: none;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    font-size: 12px;
    color: #718096;
    margin-top: 5px;
    font-weight: 500;
}

.success-message {
    background: #c6f6d5;
    color: #22543d;
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    border-left: 4px solid #48bb78;
}

.error-message {
    background: #fed7d7;
    color: #742a2a;
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    border-left: 4px solid #e53e3e;
}

.file-list {
    display: grid;
    gap: 15px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    transition: transform 0.2s;
}

.file-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.file-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.file-name {
    font-weight: bold;
    color: #2d3748;
    font-size: 16px;
}

.file-size {
    color: #718096;
    font-size: 14px;
}

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

.download-btn {
    background: #48bb78;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: background 0.3s;
}

.download-btn:hover {
    background: #3da368;
}

.delete-btn {
    background: #e53e3e;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.delete-btn:hover:not(:disabled) {
    background: #c53030;
}

.delete-btn:disabled {
    background: #a0aec0;
    cursor: not-allowed;
    opacity: 0.5;
}

.loading {
    text-align: center;
    color: #718096;
    padding: 40px;
    font-size: 18px;
}

/* 临时消息样式 */
#tempMessage {
    animation: fadeOut 5s forwards;
}

@keyframes fadeOut {
    0% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; display: none; }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    header p {
        font-size: 1rem;
    }
    
    .upload-area {
        flex-direction: column;
        align-items: stretch;
    }
    
    #fileInput {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .file-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .upload-section, .files-section {
        padding: 20px;
    }
}
/* 文件列表滚动容器 */
.files-scroll-container {
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    background: #f8fafc;
}

.files-scroll-container .file-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.files-scroll-container::-webkit-scrollbar {
    width: 8px;
}

.files-scroll-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.files-scroll-container::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

.files-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* 右上角通知样式 */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
}

.notification {
    background: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin-bottom: 10px;
    border-left: 4px solid #48bb78;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.hide {
    transform: translateX(400px);
    opacity: 0;
}

.notification.success {
    border-left-color: #48bb78;
    background: #f0fff4;
}

.notification.error {
    border-left-color: #e53e3e;
    background: #fed7d7;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-icon {
    font-size: 20px;
}

.notification-message {
    flex: 1;
    font-weight: 500;
    color: #2d3748;
}

/* 文件项在滚动容器中的样式调整 */
.files-scroll-container .file-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #667eea;
}

.files-scroll-container .file-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 空状态样式 */
.files-scroll-container .loading {
    text-align: center;
    padding: 60px 20px;
    color: #718096;
    background: white;
    border-radius: 8px;
    border: 2px dashed #e2e8f0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .files-scroll-container {
        max-height: 500px;
        padding: 10px;
    }
    
    .files-scroll-container .file-item {
        padding: 12px;
    }
    
    .notification-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .notification {
        margin-bottom: 8px;
    }
}