/* ========== AI生成工作流面板样式 ========== */
.ai-generate-panel {
    width: 600px;
    background: linear-gradient(135deg, rgba(15, 52, 96, 0.98), rgba(10, 34, 64, 0.98));
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 16px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(168, 85, 247, 0.15);
    overflow: hidden;
}

.ai-generate-panel .panel-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(37, 37, 71, 0.5);
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
}

.ai-generate-panel .header-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(124, 58, 237, 0.3));
    border-radius: 12px;
    font-size: 24px;
}

.ai-generate-panel .header-content {
    flex: 1;
}

.ai-generate-panel .header-content h2 {
    margin: 0;
    color: #e2e8f0;
    font-size: 18px;
    font-weight: 600;
}

.ai-generate-panel .header-content p {
    margin: 5px 0 0 0;
    color: #64748b;
    font-size: 13px;
}

.ai-generate-panel .panel-close {
    background: rgba(239, 68, 68, 0.15);
    border: none;
    color: #ef4444;
    font-size: 20px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s;
    line-height: 1;
}

.ai-generate-panel .panel-close:hover {
    background: rgba(239, 68, 68, 0.3);
}

.ai-generate-panel .panel-body {
    padding: 20px;
}

.ai-generate-panel .form-group {
    margin-bottom: 16px;
}

.ai-generate-panel .form-group label {
    display: block;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
}

.ai-generate-panel .form-group textarea {
    width: 100%;
    padding: 14px;
    background: rgba(37, 37, 71, 0.6);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 10px;
    color: #e2e8f0;
    font-size: 14px;
    font-family: 'Segoe UI', sans-serif;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
    line-height: 1.6;
}

.ai-generate-panel .form-group textarea:focus {
    border-color: #a855f7;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}

.ai-generate-panel .form-group textarea::placeholder {
    color: #475569;
}

.ai-generate-panel .form-group select {
    width: 100%;
    padding: 12px 14px;
    background: rgba(37, 37, 71, 0.6);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 10px;
    color: #e2e8f0;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    cursor: pointer;
}

.ai-generate-panel .form-group select:focus {
    border-color: #a855f7;
}

.ai-generate-panel .form-row {
    display: flex;
    gap: 16px;
}

.ai-generate-panel .form-row .flex-1 {
    flex: 1;
}

.ai-generate-panel .panel-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(10, 10, 26, 0.3);
    border-top: 1px solid rgba(168, 85, 247, 0.2);
}

.ai-generate-panel .btn-secondary {
    padding: 12px 24px;
    background: rgba(100, 116, 139, 0.3);
    border: 1px solid rgba(100, 116, 139, 0.3);
    border-radius: 10px;
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.ai-generate-panel .btn-secondary:hover {
    background: rgba(100, 116, 139, 0.5);
}

.ai-generate-panel .btn-primary {
    padding: 12px 28px;
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(168, 85, 247, 0.4);
}

.ai-generate-panel .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.5);
}

.ai-generate-panel .btn-primary:active {
    transform: translateY(0);
}

.ai-generate-panel .progress-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 52, 96, 0.95);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    border-radius: 16px;
}

.ai-generate-panel .progress-content {
    text-align: center;
}

.ai-generate-panel .progress-icon {
    font-size: 48px;
    margin-bottom: 16px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.ai-generate-panel .progress-text {
    color: #a855f7;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 20px;
}

.ai-generate-panel .progress-bar-container {
    width: 200px;
    height: 6px;
    background: rgba(37, 37, 71, 0.8);
    border-radius: 3px;
    overflow: hidden;
    margin: 0 auto;
}

.ai-generate-panel .progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #a855f7, #7c3aed);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* ========== 批量操作面板样式 ========== */
.batch-ops-panel {
    width: 400px;
    background: linear-gradient(135deg, rgba(15, 52, 96, 0.98), rgba(10, 34, 64, 0.98));
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 16px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(168, 85, 247, 0.15);
    overflow: hidden;
}

.batch-ops-panel .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
    background: rgba(37, 37, 71, 0.5);
}

.batch-ops-panel .panel-header h2 {
    margin: 0;
    color: #e2e8f0;
    font-size: 16px;
    font-weight: 600;
}

.batch-ops-panel .panel-close {
    background: rgba(239, 68, 68, 0.15);
    border: none;
    color: #ef4444;
    font-size: 18px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s;
    line-height: 1;
}

.batch-ops-panel .panel-close:hover {
    background: rgba(239, 68, 68, 0.3);
}

.batch-ops-panel .panel-body {
    padding: 20px;
}

.batch-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.batch-action-btn {
    width: 100%;
    padding: 12px 16px;
    background: rgba(37, 37, 71, 0.5);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.batch-action-btn:hover {
    background: rgba(168, 85, 247, 0.2);
    border-color: rgba(168, 85, 247, 0.4);
}

.batch-action-btn.danger {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.batch-action-btn.danger:hover {
    background: rgba(239, 68, 68, 0.25);
}

.batch-colors h4 {
    margin: 0 0 12px 0;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
}

.color-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.color-btn {
    width: 36px;
    height: 36px;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.color-btn:hover {
    transform: scale(1.1);
    border-color: white;
}

/* ========== 节点扩展面板样式 ========== */
.node-ext-panel {
    width: 450px;
    max-height: 80vh;
    background: linear-gradient(135deg, rgba(15, 52, 96, 0.98), rgba(10, 34, 64, 0.98));
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 16px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(168, 85, 247, 0.15);
    overflow: hidden;
}

.node-ext-panel .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
    background: rgba(37, 37, 71, 0.5);
}

.node-ext-panel .panel-header h2 {
    margin: 0;
    color: #e2e8f0;
    font-size: 16px;
    font-weight: 600;
}

.node-ext-panel .panel-close {
    background: rgba(239, 68, 68, 0.15);
    border: none;
    color: #ef4444;
    font-size: 18px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s;
    line-height: 1;
}

.node-ext-panel .panel-close:hover {
    background: rgba(239, 68, 68, 0.3);
}

.node-ext-panel .panel-body {
    padding: 20px;
    max-height: 500px;
    overflow-y: auto;
}

.ext-category {
    margin-bottom: 20px;
}

.ext-category h4 {
    margin: 0 0 12px 0;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.ext-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(37, 37, 71, 0.3);
    border: 1px solid rgba(168, 85, 247, 0.1);
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.2s;
    cursor: pointer;
}

.ext-item:hover {
    background: rgba(37, 37, 71, 0.5);
    border-color: rgba(168, 85, 247, 0.3);
}

.ext-icon {
    font-size: 24px;
}

.ext-info {
    flex: 1;
}

.ext-name {
    display: block;
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 500;
}

.ext-desc {
    display: block;
    color: #64748b;
    font-size: 11px;
    margin-top: 2px;
}

.ext-status {
    padding: 4px 8px;
    background: rgba(34, 197, 94, 0.2);
    border-radius: 4px;
    color: #22c55e;
    font-size: 11px;
}

/* 扩展标签和面板 */
.extension-tabs {
    display: flex;
    gap: 8px;
    padding: 0 20px;
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
}

.extension-tab {
    padding: 12px 16px;
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.extension-tab:hover {
    color: #e2e8f0;
}

.extension-tab.active {
    color: #a855f7;
    border-bottom-color: #a855f7;
}

.extension-content {
    padding: 20px;
}

.extension-panel {
    display: none;
}

.extension-panel.active {
    display: block;
}

.extension-category {
    margin-bottom: 16px;
}

.extension-category-title {
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
    padding-left: 4px;
}

.extension-nodes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.extension-node-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(37, 37, 71, 0.3);
    border-radius: 8px;
    transition: all 0.2s;
}

.extension-node-item:hover {
    background: rgba(37, 37, 71, 0.5);
}

.extension-node-icon {
    font-size: 18px;
}

.extension-node-label {
    color: #e2e8f0;
    font-size: 12px;
}

.custom-badge {
    padding: 2px 6px;
    background: rgba(168, 85, 247, 0.2);
    border-radius: 4px;
    color: #a855f7;
    font-size: 10px;
    margin-left: auto;
}

.create-node-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 500;
}

.form-group input,
.form-group select {
    padding: 10px 12px;
    background: rgba(37, 37, 71, 0.5);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 13px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #a855f7;
}

.tool-btn.primary {
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.tool-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.4);
}

/* ========== 执行队列面板样式 ========== */
.execution-queue-panel {
    width: 500px;
    max-height: 80vh;
    background: linear-gradient(135deg, rgba(15, 52, 96, 0.98), rgba(10, 34, 64, 0.98));
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 16px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(168, 85, 247, 0.15);
    overflow: hidden;
}

.execution-queue-panel .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
    background: rgba(37, 37, 71, 0.5);
}

.execution-queue-panel .panel-header h2 {
    margin: 0;
    color: #e2e8f0;
    font-size: 16px;
    font-weight: 600;
}

.execution-queue-panel .panel-body {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.queue-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 16px;
    padding: 12px;
    background: rgba(37, 37, 71, 0.3);
    border-radius: 10px;
}

.queue-stats .stat-item {
    text-align: center;
}

.queue-stats .stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #a855f7;
}

.queue-stats .stat-value.pending { color: #f59e0b; }
.queue-stats .stat-value.processing { color: #3b82f6; }
.queue-stats .stat-value.completed { color: #22c55e; }
.queue-stats .stat-value.failed { color: #ef4444; }

.queue-stats .stat-label {
    display: block;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}

.queue-progress {
    height: 6px;
    background: rgba(37, 37, 71, 0.5);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 16px;
}

.queue-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #a855f7, #7c3aed);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.queue-tasks {
    max-height: 250px;
    overflow-y: auto;
}

.queue-task {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(37, 37, 71, 0.3);
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.2s;
}

.queue-task:hover {
    background: rgba(37, 37, 71, 0.5);
}

.queue-task-index {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(168, 85, 247, 0.2);
    border-radius: 50%;
    font-size: 12px;
    color: #a855f7;
    flex-shrink: 0;
}

.queue-task-info {
    flex: 1;
}

.queue-task-name {
    display: block;
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 500;
}

.queue-task-status {
    display: block;
    font-size: 11px;
    margin-top: 4px;
}

.queue-task-status.pending { color: #f59e0b; }
.queue-task-status.processing { color: #3b82f6; }
.queue-task-status.completed { color: #22c55e; }
.queue-task-status.failed { color: #ef4444; }

.queue-task-error {
    display: block;
    font-size: 11px;
    color: #ef4444;
    margin-top: 4px;
}

.queue-empty {
    text-align: center;
    padding: 40px;
    color: #64748b;
}

.execution-queue-panel .panel-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid rgba(168, 85, 247, 0.2);
    background: rgba(10, 10, 26, 0.3);
}

/* ========== 通知提示框样式 ========== */

/* 通知提示 */
.notification {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: rgba(15, 52, 96, 0.95);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    animation: slideInRight 0.3s ease;
    max-width: 400px;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.notification-hidden {
    animation: slideOutRight 0.3s ease forwards;
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(20px);
    }
}

.notification-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
    color: #e2e8f0;
    font-size: 13px;
    line-height: 1.5;
}

.notification-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #94a3b8;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
    line-height: 1;
}

.notification-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.notification-success {
    border-color: rgba(34, 197, 94, 0.5);
    background: linear-gradient(135deg, rgba(15, 52, 96, 0.95), rgba(15, 96, 52, 0.8));
}

.notification-error {
    border-color: rgba(239, 68, 68, 0.5);
    background: linear-gradient(135deg, rgba(96, 15, 15, 0.95), rgba(15, 52, 96, 0.9));
}

.notification-warning {
    border-color: rgba(245, 158, 11, 0.5);
    background: linear-gradient(135deg, rgba(96, 75, 15, 0.95), rgba(15, 52, 96, 0.9));
}

/* 模态框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-hidden {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.alert-modal, .confirm-modal, .prompt-modal {
    width: 420px;
    background: linear-gradient(135deg, rgba(15, 52, 96, 0.98), rgba(10, 34, 64, 0.98));
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 16px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(168, 85, 247, 0.15);
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
    background: rgba(37, 37, 71, 0.5);
}

.modal-header h3 {
    margin: 0;
    color: #e2e8f0;
    font-size: 16px;
    font-weight: 600;
}

.modal-close {
    background: rgba(239, 68, 68, 0.15);
    border: none;
    color: #ef4444;
    font-size: 18px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.modal-body {
    padding: 24px 20px;
    text-align: center;
}

.alert-icon, .confirm-icon, .prompt-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.modal-body p {
    margin: 0;
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.6;
}

.modal-body input {
    width: 100%;
    padding: 12px 16px;
    margin-top: 16px;
    background: rgba(37, 37, 71, 0.6);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 10px;
    color: #e2e8f0;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.modal-body input:focus {
    border-color: #a855f7;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}

.modal-body input::placeholder {
    color: #64748b;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid rgba(168, 85, 247, 0.2);
    background: rgba(10, 10, 26, 0.3);
}

.modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-btn-primary {
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    color: white;
}

.modal-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.4);
}

.modal-btn-secondary {
    background: rgba(100, 116, 139, 0.3);
    color: #cbd5e1;
}

.modal-btn-secondary:hover {
    background: rgba(100, 116, 139, 0.5);
}

.modal-btn-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.8), rgba(220, 38, 38, 0.8));
    color: white;
}

.modal-btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}