/* 自定义样式，补充 TailwindCSS */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #374151;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 上传区域动画效果 */
#upload-area {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#upload-area:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

#upload-area.dragover {
    border-color: #3b82f6 !important;
    background-color: #dbeafe !important;
    transform: scale(1.02);
}

/* 文件列表行hover效果 */
.file-row {
    transition: all 0.2s ease-in-out;
}

.file-row:hover {
    background-color: #f9fafb;
    transform: translateX(4px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* 按钮动画效果 */
.btn-animate {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-animate:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-animate:active {
    transform: translateY(0);
}

/* 进度条动画 */
#progress-bar {
    transition: width 0.3s ease-in-out;
}

/* 进度条初始状态 */
.progress-bar-initial {
    width: 0%;
}

/* 通知消息动画 */
#notification {
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 模态框动画 */
.modal-overlay {
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    animation: slideInUp 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 30px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* 加载动画 */
.loading-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 文件图标样式 */
.file-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 面包屑导航样式 */
.breadcrumb-item {
    transition: color 0.2s ease-in-out;
}

.breadcrumb-item:hover {
    color: #1d4ed8;
}

/* 文件操作按钮样式 */
.file-action-btn {
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease-in-out;
    opacity: 0.7;
}

.file-action-btn:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.05);
    transform: scale(1.1);
}

/* 响应式设计优化 */
@media (max-width: 768px) {
    .container {
        padding: 16px;
    }
    
    .action-bar {
        flex-direction: column;
        gap: 16px;
    }
    
    .file-list-header {
        display: none;
    }
    
    .file-row {
        padding: 12px;
    }
    
    .file-actions {
        margin-top: 8px;
        display: flex;
        gap: 12px;
        justify-content: flex-end;
    }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 文件类型特定样式 */
.file-image {
    color: #10b981;
}

.file-document {
    color: #3b82f6;
}

.file-video {
    color: #8b5cf6;
}

.file-audio {
    color: #ec4899;
}

.file-archive {
    color: #f59e0b;
}

.file-code {
    color: #6b7280;
}

/* 拖拽上传反馈 */
.drag-over {
    border-color: #3b82f6 !important;
    background-color: #eff6ff !important;
    transform: scale(1.02);
}

/* 空状态插图 */
.empty-state-icon {
    opacity: 0.3;
    transition: opacity 0.3s ease-in-out;
}

.empty-state:hover .empty-state-icon {
    opacity: 0.6;
}

/* 搜索框样式（预留） */
.search-input {
    transition: all 0.3s ease-in-out;
}

.search-input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
}

/* 网格视图样式（预留） */
.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    padding: 16px;
}

.grid-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.grid-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.grid-item-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.grid-item-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 4px;
    word-break: break-word;
}

.grid-item-info {
    font-size: 0.75rem;
    color: #6b7280;
}

/* 成功/错误状态样式 */
.status-success {
    color: #10b981;
    background-color: #d1fae5;
    border-color: #a7f3d0;
}

.status-error {
    color: #ef4444;
    background-color: #fee2e2;
    border-color: #fecaca;
}

.status-warning {
    color: #f59e0b;
    background-color: #fef3c7;
    border-color: #fde68a;
}

.status-info {
    color: #3b82f6;
    background-color: #dbeafe;
    border-color: #93c5fd;
}

/* 工具提示样式 */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
    z-index: 1000;
}

.tooltip:hover::after {
    opacity: 1;
}

/* 卡片阴影效果 */
.card-shadow {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.card-shadow-hover:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* 渐变背景 */
.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 玻璃效果 */
.glass-effect {
    background: rgba(255, 255, 255, 0.25);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}