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

:root {
    --primary-color: #667eea;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-color: #f093fb;
    --success-color: #4facfe;
    --danger-color: #ff6b6b;
    --warning-color: #feca57;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --border-color: #e1e8ed;
    --shadow-light: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-medium: 0 8px 30px rgba(0,0,0,0.12);
    --shadow-heavy: 0 15px 35px rgba(0,0,0,0.1);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--dark-color);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* 头部样式 */
.header {
    background: white;
    padding: 25px 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.header h1 {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 28px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header h1::before {
    content: "☁️";
    font-size: 32px;
}

/* 头部操作区域 */
.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* 统一的按钮基础样式 */
.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.9);
    color: #374151;
    border: 1px solid rgba(209, 213, 219, 0.8);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
}

.action-btn:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 16px;
    line-height: 1;
}

.btn-text {
    font-size: 13px;
    font-weight: 600;
}

/* 主要按钮样式 */
.action-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.action-btn.primary:hover {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
    transform: translateY(-3px);
}

/* 激活状态 */
.action-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* 全局搜索按钮特殊样式 */
.global-search-btn {
    min-width: 44px;
    padding: 10px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
    color: #059669;
}

.global-search-btn:hover {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.5);
}

.global-search-btn.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

/* 搜索组合 */
.search-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.95);
    padding: 4px;
    border-radius: 14px;
    border: 1px solid rgba(209, 213, 219, 0.5);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.search-container {
    display: flex;
    align-items: center;
    background: transparent;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: none;
}

.search-input {
    border: none;
    padding: 10px 14px;
    font-size: 14px;
    outline: none;
    background: transparent;
    width: 180px;
    transition: all 0.3s ease;
    color: #374151;
}

.search-input:focus {
    width: 220px;
}

.search-input::placeholder {
    color: #9ca3af;
}

.search-btn, .clear-btn {
    border: none;
    background: transparent;
    color: #6b7280;
    padding: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    min-width: 32px;
    height: 32px;
}

.search-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

.clear-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* 视图切换组合 */
.view-group {
    display: flex;
    background: rgba(255, 255, 255, 0.95);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid rgba(209, 213, 219, 0.5);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.view-group .action-btn {
    border: none;
    background: transparent;
    margin: 0;
    border-radius: 8px;
    min-width: 70px;
}

.view-group .action-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    transform: none;
    box-shadow: none;
}

.view-group .action-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-actions {
        gap: 12px;
        justify-content: center;
    }
    
    .action-btn .btn-text {
        display: none;
    }
    
    .action-btn {
        min-width: 44px;
        padding: 10px;
    }
    
    .search-input {
        width: 140px;
    }
    
    .search-input:focus {
        width: 160px;
    }
    
    .view-group .action-btn {
        min-width: 44px;
    }
}

@media (max-width: 480px) {
    .header-actions {
        gap: 8px;
    }
    
    .search-group {
        order: -1;
        width: 100%;
        margin-bottom: 8px;
    }
    
    .search-input {
        width: 100%;
        flex: 1;
    }
    
    .search-input:focus {
        width: 100%;
    }
}

/* 搜索结果提示优化 */
.search-result-info {
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
    border-left: 4px solid #6366f1;
    margin-bottom: 20px;
    font-size: 14px;
    color: #4b5563;
    border-radius: 0 12px 12px 0;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.btn, .config-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-primary, .config-btn {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-light);
}

.btn-primary:hover, .config-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-secondary {
    background: white;
    color: var(--dark-color);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--light-color);
    transform: translateY(-1px);
}

/* 配置面板 */
.config-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.config-form {
    background: white;
    padding: 40px;
    border-radius: var(--border-radius);
    width: 450px;
    max-width: 90%;
    box-shadow: var(--shadow-heavy);
    transform: scale(0.9);
    animation: slideUp 0.3s ease forwards;
}

.config-form h2 {
    margin-bottom: 25px;
    text-align: center;
    color: var(--dark-color);
    font-size: 24px;
    font-weight: 600;
}

.config-input {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: var(--transition);
    background: #fafbfc;
}

.config-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 面包屑导航 */
.breadcrumb {
    background: white;
    padding: 18px 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255,255,255,0.2);
}

.breadcrumb-item {
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: var(--transition);
    font-weight: 500;
    color: var(--dark-color);
}

.breadcrumb-item:hover {
    background: var(--primary-gradient);
    color: white;
    transform: translateY(-1px);
}

.breadcrumb-separator {
    color: #bdc3c7;
    font-weight: 300;
}

/* 主内容区域 */
.main-content {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.2);
}

.toolbar {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #fafbfc 0%, #f8f9fa 100%);
}

.view-controls {
    display: flex;
    gap: 8px;
    background: white;
    padding: 4px;
    border-radius: 8px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.view-controls button {
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    color: #6c757d;
}

.view-controls button.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-light);
}

.search-box {
    position: relative;
}

.search-box input {
    padding: 12px 45px 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    width: 280px;
    font-size: 14px;
    transition: var(--transition);
    background: white;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-box i {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

/* 文件网格 */
.file-grid {
    padding: 25px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    min-height: 400px;
}

.file-item {
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    background: white;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-light);
    position: relative;
}

.file-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-color);
}

.file-item.folder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.file-item.folder:hover {
    transform: translateY(-5px) scale(1.02);
}

.file-icon {
    width: 100%;
    height: 160px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.file-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    border-radius: 0;
    transition: var(--transition);
}

.file-item:hover .file-icon img {
    transform: scale(1.05);
}

.file-item.folder .file-icon {
    background: transparent;
    font-size: 64px;
    color: rgba(255,255,255,0.9);
}

.file-name {
    padding: 15px;
    font-weight: 600;
    text-align: center;
    word-break: break-word;
    flex-shrink: 0;
    background: white;
    color: var(--dark-color);
}

.file-item.folder .file-name {
    background: transparent;
    color: white;
}

.file-actions {
    padding: 10px 15px 15px;
    display: flex;
    justify-content: center;
    gap: 12px;
    background: white;
}

.file-actions button {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: var(--transition);
    box-shadow: var(--shadow-light);
}

.file-actions button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    max-width: 90%;
    max-height: 90%;
    box-shadow: var(--shadow-heavy);
    position: relative;
    animation: slideUp 0.3s ease;
}

/* 图片预览模态框 */
.preview-content {
    background: transparent;
    padding: 0;
    max-width: 95%;
    max-height: 95%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.preview-content h3 {
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 15px 25px;
    border-radius: 25px;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.preview-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-heavy);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.9);
    color: var(--dark-color);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-medium);
}

.close-btn:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: var(--shadow-heavy);
}

/* 加载动画 */
#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(5px);
    display: none; /* 默认隐藏 */
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

#loading.show {
    display: flex; /* 需要显示时添加show类 */
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 拖拽效果 */
.file-grid.drag-over {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 2px dashed var(--primary-color);
    border-radius: var(--border-radius);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .toolbar {
        flex-direction: column;
        gap: 15px;
    }
    
    .file-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
        padding: 20px;
    }
    
    .search-box input {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .file-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .config-form {
        padding: 25px;
    }
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #667eea 100%);
}

/* 搜索容器 */
.search-container {
    display: flex;
    align-items: center;
    position: relative;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    overflow: hidden;
}

.search-input {
    border: none;
    padding: 12px 16px;
    font-size: 14px;
    outline: none;
    background: transparent;
    width: 200px;
    transition: all 0.3s ease;
}

.search-input:focus {
    width: 250px;
}

.search-btn, .clear-btn {
    border: none;
    background: var(--primary-color);
    color: white;
    padding: 12px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid var(--border-color);
}

.search-btn:hover {
    background: var(--border-color);
}

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

.search-btn:hover {
    background: var(--primary-dark);
}

.clear-btn {
    background: var(--danger-color);
    padding: 8px;
    font-size: 12px;
}

.clear-btn:hover {
    background: #c82333;
}

/* 搜索结果提示 */
.search-result-info {
    padding: 12px 20px;
    background: var(--light-color);
    border-left: 4px solid var(--primary-color);
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--text-secondary);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}
/* 上传模态框样式 */
.upload-modal {
    width: 600px;
    max-width: 90vw;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin: -30px -30px 30px -30px;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header .close-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-header .close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.upload-container {
    margin-bottom: 30px;
}

.upload-area {
    border: 3px dashed #cbd5e1;
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.6s;
}

.upload-area:hover::before {
    left: 100%;
}

.upload-area:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.15);
}

.upload-area.drag-over {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    transform: scale(1.02);
}

.upload-icon {
    position: relative;
    margin-bottom: 20px;
    display: inline-block;
}

.upload-cloud {
    font-size: 48px;
    color: #667eea;
    animation: float 3s ease-in-out infinite;
}

.upload-arrow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    color: white;
    animation: bounce 2s infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translate(-50%, -50%) translateY(0); }
    40% { transform: translate(-50%, -50%) translateY(-10px); }
    60% { transform: translate(-50%, -50%) translateY(-5px); }
}

.upload-text h4 {
    margin: 0 0 10px 0;
    color: #1e293b;
    font-size: 18px;
    font-weight: 600;
}

.upload-text p {
    margin: 5px 0;
    color: #64748b;
    font-size: 14px;
}

.file-limit {
    font-size: 12px !important;
    color: #94a3b8 !important;
}

.browse-btn {
    margin-top: 20px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.browse-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

/* 文件预览区域 */
.file-preview {
    margin-top: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.file-preview h4 {
    margin: 0 0 15px 0;
    color: #1e293b;
    font-size: 16px;
    font-weight: 600;
}

.preview-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.preview-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.preview-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.preview-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
}

.preview-item .file-info {
    flex: 1;
}

.preview-item .file-name {
    font-weight: 500;
    color: #1e293b;
    font-size: 14px;
}

.preview-item .file-size {
    color: #64748b;
    font-size: 12px;
}

.preview-item .remove-btn {
    background: #ef4444;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.preview-item .remove-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* 上传进度条 */
.upload-progress {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    color: #1e293b;
    font-size: 14px;
    font-weight: 500;
}

/* 模态框按钮优化 */
.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 0;
}

.modal-actions .btn-primary,
.modal-actions .btn-secondary {
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.modal-actions .btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.modal-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.6);
}

.modal-actions .btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.modal-actions .btn-secondary:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

/* 响应式设计 */
@media (max-width: 640px) {
    .upload-modal {
        width: 95vw;
        margin: 20px;
    }
    
    .modal-header {
        padding: 20px;
        margin: -30px -30px 20px -30px;
    }
    
    .upload-area {
        padding: 30px 15px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions .btn-primary,
    .modal-actions .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* 列表视图样式 */
.file-grid.list-view {
    display: flex;
    flex-direction: column;
    gap: 12px;
    grid-template-columns: none;
}

.file-grid.list-view .file-item {
    flex-direction: row;
    align-items: center;
    padding: 15px 20px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: all 0.3s ease;
}

.file-grid.list-view .file-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.file-grid.list-view .file-item.folder {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-color: rgba(102, 126, 234, 0.3);
}

.file-grid.list-view .file-item.folder:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    transform: translateX(8px);
}

.file-grid.list-view .file-icon {
    width: 60px;
    height: 60px;
    min-width: 60px;
    border-radius: 8px;
    margin-right: 15px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.file-grid.list-view .file-icon img {
    border-radius: 6px;
}

.file-grid.list-view .file-icon .folder-icon {
    font-size: 28px;
}

.file-grid.list-view .file-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.file-grid.list-view .file-name {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-grid.list-view .file-item.folder .file-name {
    color: #667eea;
}

.file-grid.list-view .file-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #64748b;
    font-size: 13px;
}

.file-grid.list-view .file-size,
.file-grid.list-view .file-date {
    white-space: nowrap;
}

.file-grid.list-view .file-actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.file-grid.list-view .file-item:hover .file-actions {
    opacity: 1;
}

.file-grid.list-view .action-btn {
    padding: 6px 8px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.file-grid.list-view .action-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateY(-1px);
}

.file-grid.list-view .delete-btn {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.file-grid.list-view .delete-btn:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* 列表视图的文件项结构调整 */
@media (max-width: 768px) {
    .file-grid.list-view .file-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .file-grid.list-view .file-actions {
        opacity: 1;
    }
}