* {
    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;
    color: #333;
}

/* 登录面板样式 */
.login-panel {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.login-container h1 {
    margin-bottom: 20px;
    color: #667eea;
    text-align: center;
    font-size: 28px;
}

.server-info {
    background: #f0f4ff;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 24px;
    text-align: center;
}

.server-info p {
    color: #555;
    font-size: 14px;
}

.server-info strong {
    color: #667eea;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

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

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
    color: white;
    padding: 8px 16px;
    font-size: 12px;
}

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

.error-message {
    color: #dc3545;
    font-size: 14px;
    margin-top: 16px;
    text-align: center;
    min-height: 20px;
}

/* 主界面样式 */
.main-panel {
    min-height: 100vh;
    padding: 20px;
}

.header {
    background: white;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    color: #667eea;
    font-size: 24px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.username-display {
    color: #555;
    font-weight: 500;
}

/* 面包屑导航 */
.breadcrumb-container {
    background: white;
    padding: 16px 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.breadcrumb-item {
    color: #667eea;
    cursor: pointer;
    transition: color 0.3s;
    font-weight: 500;
}

.breadcrumb-item:hover {
    color: #5568d3;
    text-decoration: underline;
}

.breadcrumb-separator {
    color: #999;
}

/* 工具栏 */
.toolbar {
    background: white;
    padding: 16px 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.toolbar .btn {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon {
    font-size: 16px;
}

/* 内容区域 */
.content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    min-height: 400px;
    position: relative;
}

/* 拖拽区域 */
.drop-zone {
    border: 3px dashed #ccc;
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    margin: 20px;
    transition: all 0.3s;
    background: #fafafa;
}

.drop-zone.drag-over {
    border-color: #667eea;
    background: #f0f4ff;
}

.drop-zone-text {
    color: #999;
    font-size: 18px;
}

/* 加载指示器 */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

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

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

/* 文件列表 */
.file-list {
    padding: 20px;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.3s;
    cursor: pointer;
}

.file-item:hover {
    background: #f8f9fa;
}

.file-icon {
    font-size: 32px;
    margin-right: 16px;
    min-width: 40px;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.file-meta {
    font-size: 12px;
    color: #999;
}

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

.file-actions .btn {
    padding: 6px 12px;
    font-size: 12px;
}

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

/* Toast 提示 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #333;
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s;
    pointer-events: none;
    z-index: 1000;
    max-width: 400px;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.toast.success {
    background: #28a745;
}

.toast.error {
    background: #dc3545;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .toolbar {
        flex-direction: column;
    }

    .toolbar .btn {
        width: 100%;
        justify-content: center;
    }

    .file-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .file-actions {
        width: 100%;
        margin-top: 12px;
    }

    .file-actions .btn {
        flex: 1;
    }
}
