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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 40px);
}

/* 顶部导航 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.username-link {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.3s;
}

.username-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* 工具栏 */
.toolbar {
    padding: 15px 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 按钮 */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

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

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

.btn-danger {
    background: #dc3545;
    color: #fff;
}

/* 搜索框 */
.search-input {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    width: 200px;
    transition: all 0.3s;
}

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

/* 面包屑 */
.breadcrumb {
    padding: 10px 30px;
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
    color: #495057;
}

.breadcrumb-item {
    cursor: pointer;
    color: #667eea;
}

.breadcrumb-item:hover {
    text-decoration: underline;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: " / ";
    color: #adb5bd;
}

/* 文件列表容器 */
.file-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* 文件列表表格 */
.file-list {
    width: 100%;
    border-collapse: collapse;
}

.file-list thead {
    position: sticky;
    top: 0;
    background: #f8f9fa;
    z-index: 10;
}

.file-list th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #e9ecef;
    font-size: 13px;
    text-transform: uppercase;
}

.file-list td {
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
}

.file-list tbody tr {
    transition: background 0.2s;
}

.file-list tbody tr:hover {
    background: #f8f9fa;
}

.file-list tbody tr.selected {
    background: #e7f3ff;
}

/* 文件图标 */
.file-icon {
    font-size: 24px;
    width: 40px;
    text-align: center;
}

.file-name {
    cursor: pointer;
    color: #495057;
}

.file-name:hover {
    color: #667eea;
    text-decoration: underline;
}

/* 操作按钮 */
.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
    margin-right: 5px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.action-btn:hover {
    opacity: 1;
}

/* 状态栏 */
.status-bar {
    padding: 10px 30px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    font-size: 13px;
    color: #6c757d;
    display: flex;
    justify-content: space-between;
}

/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    color: #495057;
}

.close {
    font-size: 28px;
    cursor: pointer;
    color: #adb5bd;
    transition: color 0.3s;
}

.close:hover {
    color: #dc3545;
}

.modal-body {
    padding: 20px;
}

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

/* 拖放区域 */
.drop-zone {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s;
}

.drop-zone.dragover {
    border-color: #667eea;
    background: #e7f3ff;
}

.drop-zone p {
    color: #6c757d;
    margin-bottom: 15px;
}

.drop-zone input[type="file"] {
    display: none;
}

/* 上传进度 */
.upload-progress {
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin: 15px 0;
}

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

#progressText {
    color: #6c757d;
    font-size: 14px;
}

/* 输入框 */
.input-text {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
}

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

/* 加载动画 */
.loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.loading.show {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 消息提示 */
.toast {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    background: #28a745;
    color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 3000;
    animation: slideIn 0.3s;
}

.toast.show {
    display: block;
}

.toast.error {
    background: #dc3545;
}

.toast.warning {
    background: #ffc107;
    color: #212529;
}

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

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

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* 响应式 */
@media (max-width: 768px) {
    .toolbar {
        flex-direction: column;
        gap: 15px;
    }

    .toolbar-left,
    .toolbar-right {
        width: 100%;
        justify-content: space-between;
    }

    .search-input {
        flex: 1;
    }

    .file-list th:nth-child(3),
    .file-list td:nth-child(3) {
        padding-left: 10px;
    }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #adb5bd;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-state-text {
    font-size: 16px;
}
