body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f8f9fa;
    background-image: url('/static/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    position: relative;
}

/* 添加半透明遮罩层，使内容更清晰 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(248, 249, 250, 0.15);
    z-index: -1;
    pointer-events: none;
}

/* 确保头部区域在合适的层级 */
.container > .row:first-child {
    position: relative;
    z-index: 100;
}

/* 确保下拉菜单在最上层 */
.dropdown-menu {
    z-index: 10000 !important;
    position: absolute !important;
}

/* 确保用户信息区域在合适的层级 */
.dropdown {
    position: relative;
    z-index: 10000;
}

.container {
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* 主内容区域充满视口 */
.main-content-wrapper {
    min-height: calc(100vh - 120px);
}

/* 左侧栏容器 */
.left-sidebar-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: calc(100vh - 140px);
}

/* 卡片高度调整 */
.left-sidebar-container .card:first-child {
    flex: 0 0 auto;
    max-height: 50%;
    overflow-y: auto;
}

.left-sidebar-container .card:last-child {
    flex: 1;
    overflow-y: auto;
}

/* 中间和右侧栏高度 */
.col-lg-7 .card,
.col-lg-3 .card {
    height: calc(100vh - 140px);
    display: flex;
    flex-direction: column;
}

.col-lg-7 .card .card-body,
.col-lg-3 .card .card-body {
    flex: 1;
    overflow-y: auto;
}
.remove-param {
    min-width: 50px;
    height: 32px;
    padding: 0 10px;
    line-height: 32px;
    text-align: center;
    border-radius: 4px;
    font-size: 0.875rem;
}
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}

.card:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.card-header {
    border-bottom: 1px solid rgba(0,0,0,0.05);
    border-radius: 10px 10px 0 0 !important;
}

.form-control,
.form-select {
    border: 1px solid #e0e0e0;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.15);
}

.table {
    margin-bottom: 0;
    border-radius: 8px;
    overflow: hidden;
}

.table th {
    font-weight: 600;
    background-color: #f8f9fa;
    border-top: none;
}

.table td {
    vertical-align: middle;
    border-color: #f0f0f0;
}

.param-key,
.param-value {
    min-width: 200px;
}

#addParamBtn {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.remove-param {
    width: 32px;
    height: 32px;
    padding: 0;
    line-height: 32px;
    text-align: center;
    border-radius: 50%;
    font-size: 1rem;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

#result {
    white-space: pre-wrap;
    border: none;
    padding: 1.25rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.progress-updates {
    margin: 15px 0;
}

.progress-item {
    margin: 8px 0;
    padding: 10px 15px;
    border-left: 4px solid #0d6efd;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-size: 0.95rem;
}

.error-message {
    color: #dc3545;
    font-weight: 500;
}

.complete-message {
    color: #198754;
    font-weight: 500;
    margin-bottom: 15px;
}

.output-message {
    margin-top: 15px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.9rem;
}

.output-message pre {
    background-color: #fff;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    max-height: 300px;
    overflow-y: auto;
}

.output-message .text-break {
    word-break: break-all;
    white-space: pre-wrap;
}

.output-message .btn {
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.output-message .btn i {
    font-size: 0.875rem;
}

/* 右侧结果区域优化 */
#result {
    font-size: 0.85rem;
}

#result .complete-message {
    font-weight: 600;
    color: #198754;
}

#result .error-message {
    font-weight: 600;
    color: #dc3545;
}

#result .progress-item {
    margin: 8px 0;
    padding: 8px 12px;
    border-left: 3px solid #0d6efd;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* 动画效果 */
.alert {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.table {
    margin-bottom: 1rem;
}

.table th {
    background-color: #f8f9fa;
}

.table td {
    vertical-align: middle;
}

.param-key,
.param-value {
    min-width: 150px;
}

#addParamBtn {
    margin-bottom: 1rem;
}

.remove-param {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 1rem;
    height: 1rem;
    top: calc(50% - 0.5rem);
    left: calc(50% - 0.5rem);
    border: 2px solid #fff;
    border-radius: 50%;
    border-right-color: transparent;
    animation: button-loading-spinner 0.75s linear infinite;
}

@keyframes button-loading-spinner {
    from {
        transform: rotate(0turn);
    }
    to {
        transform: rotate(1turn);
    }
}

.btn-check:checked + .btn-outline-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

.form-floating textarea.form-control {
    height: 200px;
}

.form-floating textarea.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.15);
}


/* 文件上传样式 */
.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 50px 40px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background-color: #fafbfc;
}

/* 小尺寸上传区域（左侧栏） */
.upload-area-small {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 20px 10px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background-color: #fafbfc;
}

.upload-area:hover,
.upload-area-small:hover {
    border-color: #0d6efd;
    background-color: #f0f7ff;
}

.upload-area.drag-over,
.upload-area-small.drag-over {
    border-color: #0d6efd;
    background-color: #e3f2fd;
    transform: scale(1.02);
}

.upload-content {
    pointer-events: none;
}

.upload-content .btn {
    pointer-events: auto;
    cursor: pointer;
}

.upload-content i,
.upload-content p {
    pointer-events: none;
}

#uploadProgress {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

#uploadResult .table {
    margin-top: 10px;
    border-radius: 8px;
    overflow: hidden;
    font-size: 0.75rem;
}

#uploadResult .table th {
    background-color: #f8f9fa;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    padding: 0.5rem;
}

#uploadResult .table td {
    vertical-align: middle;
    padding: 0.5rem;
}

#uploadResult .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

#uploadResult .btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
}

/* 左侧栏上传结果紧凑显示 */
#uploadCard #uploadResult .alert {
    padding: 0.5rem;
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

#uploadCard #uploadResult .table {
    font-size: 0.7rem;
}

#uploadCard #uploadResult .btn-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

#uploadCard #uploadResult .btn-group .btn {
    width: 100%;
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
}

/* Toast 动画 */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* 高亮边框动画 */
.border-success {
    border-color: #198754 !important;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25) !important;
    transition: all 0.3s ease;
}

/* 左侧分类列表样式 */
#categoryList .list-group-item {
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
}

#categoryList .list-group-item:hover {
    background-color: #f8f9fa;
    border-left-color: #0d6efd;
}

#categoryList .list-group-item.active {
    background-color: #e3f2fd;
    border-left-color: #0d6efd;
    color: #0d6efd;
    font-weight: 500;
}

#categoryList .list-group-item.active .badge {
    background-color: #0d6efd !important;
}

/* 工作流树样式 */
.workflow-tree {
    max-height: calc(50vh - 100px);
    overflow-y: auto;
}

.category-group {
    border-bottom: 1px solid #e9ecef;
}

.category-group:last-child {
    border-bottom: none;
}

.category-header {
    padding: 0.75rem 1rem;
    background-color: #f8f9fa;
    font-weight: 600;
    font-size: 0.85rem;
    color: #495057;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #dee2e6;
}

.workflow-list {
    background-color: #fff;
}

.workflow-item {
    display: flex;
    align-items: center;
    padding: 0.6rem 1rem 0.6rem 2rem;
    color: #495057;
    text-decoration: none;
    font-size: 0.85rem;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
}

.workflow-item:hover {
    background-color: #f8f9fa;
    border-left-color: #0d6efd;
    color: #0d6efd;
}

.workflow-item.active {
    background-color: #e3f2fd;
    border-left-color: #0d6efd;
    color: #0d6efd;
    font-weight: 500;
}

.workflow-item i {
    font-size: 0.9rem;
}

/* 右侧提示区域 */
#selectCategoryHint {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .col-md-3, .col-md-9 {
        margin-bottom: 1rem;
    }
}

/* 头部样式优化 */
.container > .row.mb-3 {
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 100;
}

.h3 {
    color: #212529;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

/* 优化表单元素在背景上的显示 */
.form-control,
.form-select {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
}

.form-control:focus,
.form-select:focus {
    background-color: rgba(255, 255, 255, 0.95);
}

/* 优化按钮在背景上的显示 */
.btn {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.btn:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn i {
    display: inline-flex;
    align-items: center;
}

/* 优化 alert 在背景上的显示 */
.alert {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
}
