/* 文件转传工具 - 高级样式设计 */

/* 主头部样式 */
.main-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.header-content h1 {
    font-size: 2.5rem;
    margin: 0 0 0.5rem 0;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.header-content p {
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.9;
}

/* 主内容区域 */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* 操作区域 */
.operation-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    border: 1px solid rgba(255,255,255,0.2);
}

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

.operation-header h2 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin: 0 0 0.5rem 0;
    font-weight: 600;
}

.operation-header p {
    color: #7f8c8d;
    margin: 0;
    font-size: 1rem;
}

/* 输入组样式 */
.input-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.input-field {
    position: relative;
}

.input-field label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-field input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.input-field input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 操作按钮 */
.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.btn {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-upload {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-upload:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-query {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.4);
}

.btn-query:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(240, 147, 251, 0.6);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

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

/* 拖拽上传区域 */
.upload-area {
    border: 2px dashed #cbd5e0;
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    background: #f8f9fa;
    margin-bottom: 2rem;
}

.upload-area:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.upload-area.dragover {
    border-color: #667eea;
    background: #e6f3ff;
    transform: scale(1.02);
}

.upload-content .upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.upload-content h3 {
    font-size: 1.25rem;
    color: #2c3e50;
    margin: 0 0 0.5rem 0;
    font-weight: 600;
}

.upload-content p {
    color: #7f8c8d;
    margin: 0;
}

/* 文件预览区域 */
.file-preview {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 1.5rem;
    margin-top: 2rem;
    border: 1px solid #e1e8ed;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e1e8ed;
}

.preview-header h3 {
    font-size: 1.25rem;
    color: #2c3e50;
    margin: 0;
    font-weight: 600;
}

.preview-actions {
    display: flex;
    gap: 0.5rem;
}

/* 文件列表网格 */
.file-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

/* 文件项样式 */
.file-item {
    background: white;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.file-item::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;
}

.file-item:hover::before {
    left: 100%;
}

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

.file-item.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #e6f3ff 0%, #f0f4ff 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

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

.file-name {
    font-size: 0.875rem;
    color: #2c3e50;
    font-weight: 500;
    word-break: break-all;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.file-size {
    font-size: 0.75rem;
    color: #7f8c8d;
    font-weight: 500;
}

/* 进度条样式 */
.upload-progress {
    margin-top: 1rem;
}

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

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

.progress-text {
    text-align: center;
    margin-top: 0.5rem;
    color: #7f8c8d;
    font-size: 0.875rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .input-group {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .file-list {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .preview-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .preview-actions {
        justify-content: center;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.file-preview {
    animation: fadeInUp 0.5s ease;
}

.file-item {
    animation: fadeInUp 0.3s ease;
}

/* 缩略图样式 */
.file-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-item:hover {
    background: #f8f9fa;
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.15);
}

.file-item.selected {
    background: #e3f2fd;
    border-color: #2196f3;
    box-shadow: 0 0 0 2px rgba(33,150,243,0.2);
}

.file-thumbnail {
    width: 60px;
    height: 60px;
    margin-right: 1rem;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.thumbnail-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.9);
}

.thumbnail-loading .spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.thumbnail-image,
.thumbnail-video,
.thumbnail-pdf {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.thumbnail-pdf {
    border: none;
    background: white;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 0.25rem;
    word-break: break-all;
    line-height: 1.4;
}

.file-size {
    font-size: 0.875rem;
    color: #6c757d;
}

.file-icon {
    font-size: 1.5rem;
    color: #6c757d;
}
