/* 基础样式重置 */
* {
    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, #eef1ff 0%, #ffffff 100%);
    min-height: 100vh;
    color: #333;
}

/* 顶部导航栏 */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: #667eea;
}

.logo i {
    font-size: 28px;
}

.nav {
    display: flex;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    text-decoration: none;
    color: #666;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-item:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.nav-item.active {
    background: #667eea;
    color: white;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* API状态指示器 */
.api-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.api-status .status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
}

.api-status .status-indicator.test {
    background: #ffa726;
    animation: pulse 2s infinite;
}

.api-status .status-indicator.production {
    background: #4caf50;
}

.api-status .status-indicator.error {
    background: #ff6b6b;
}

/* 按钮样式 */
.btn-primary,
.btn-secondary,
.btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(102, 126, 234, 0.1);
}

.btn-danger {
    background: #ff6b6b;
    color: white;
}

.btn-danger:hover {
    background: #ff5252;
}

/* 主要内容区域 */
.main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

/* 页面切换 */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* 搜索和筛选区域 */
.search-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.search-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.search-box {
    position: relative;
    max-width: 500px;
}

.search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.search-box input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    font-size: 16px;
    background: white;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-tabs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    background: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #666;
}

.filter-tab:hover {
    border-color: #667eea;
    color: #667eea;
}

.filter-tab.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

/* 工作流卡片网格 */
.workflows-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.workflow-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    display: flex;
    flex-direction: column;
}

.workflow-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* 视频封面区域悬停效果 */
.workflow-card-header:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4c93);
}

.workflow-card-header:hover::after {
    content: '🎬 点击播放示例视频';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    z-index: 4;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* 标题和底部区域悬停效果 */
.workflow-card-title:hover,
.workflow-card-footer:hover {
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.workflow-card-title:hover::after,
.workflow-card-footer:hover::after {
    content: '▶️ 点击直接运行';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(102, 126, 234, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    z-index: 3;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(10px);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

.workflow-card-title {
    position: relative;
}

.workflow-card-footer {
    position: relative;
}

/* 顶部：视频封面区域 */
.workflow-card-header {
    position: relative;
    height: 180px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
}

.workflow-card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

/* 视频封面样式 */
.workflow-cover-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.play-button {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #667eea;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.play-button:hover {
    background: white;
    transform: scale(1.1);
}

.workflow-card-header:hover .play-button {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

/* 积分消耗标签 */
.balance-cost-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}

.free-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.workflow-icon {
    font-size: 48px;
    z-index: 1;
    position: relative;
    color: white;
}

/* 中部：标题区域 */
.workflow-card-title {
    padding: 16px 20px 8px 20px;
    cursor: pointer;
}

.workflow-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 底部：描述和元信息区域 */
.workflow-card-footer {
    padding: 0 20px 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
}

.workflow-description {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin: 0 0 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.workflow-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}

.category-tag {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.duration-tag {
    background: rgba(255, 152, 0, 0.1);
    color: #ff9800;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.duration-tag i {
    font-size: 10px;
}

/* 视频播放模态框 */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: videoModalFadeIn 0.3s ease;
}

@keyframes videoModalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.video-modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: videoModalSlideIn 0.3s ease;
}

@keyframes videoModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.video-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.video-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.video-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.video-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.video-modal-body {
    padding: 0;
    position: relative;
}

.modal-video {
    width: 100%;
    height: auto;
    max-height: 60vh;
    display: block;
    background: #000;
}

.video-modal-footer {
    padding: 20px 24px;
    background: rgba(0, 0, 0, 0.02);
}

.video-description {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 16px 0;
}

.video-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.video-modal-close-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.video-modal-close-btn:hover {
    background: rgba(102, 126, 234, 0.1);
}

.video-modal-run-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.video-modal-run-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .video-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .video-modal-header {
        padding: 16px 20px;
    }
    
    .video-modal-header h3 {
        font-size: 16px;
    }
    
    .video-modal-footer {
        padding: 16px 20px;
    }
    
    .video-modal-actions {
        flex-direction: column;
    }
    
    .modal-video {
        max-height: 50vh;
    }
}

.workflow-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #333;
}

.workflow-description {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.workflow-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-tag {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.output-format {
    font-size: 12px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 工作流运行页面 */
.runner-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    height: calc(100vh - 140px);
}

.workflow-info-panel,
.execution-results-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.workflow-header {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.workflow-header .workflow-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.workflow-details h2 {
    font-size: 24px;
    margin-bottom: 8px;
    color: #333;
}

.workflow-details p {
    color: #666;
    line-height: 1.5;
}

.parameters-section {
    flex: 1;
    margin-bottom: 24px;
}

.parameters-section h3 {
    margin-bottom: 16px;
    color: #333;
}

.parameters-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.parameter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.parameter-label {
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 4px;
}

.parameter-label .required {
    color: #ff6b6b;
}

.parameter-input {
    padding: 12px 16px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.parameter-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.parameter-input.textarea {
    resize: vertical;
    min-height: 80px;
}

.file-upload-area {
    border: 2px dashed rgba(102, 126, 234, 0.3);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(102, 126, 234, 0.05);
}

.file-upload-area:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.file-upload-area.has-file {
    border-color: #4caf50;
    background: rgba(76, 175, 80, 0.1);
}

.upload-icon {
    font-size: 32px;
    color: #667eea;
    margin-bottom: 12px;
}

.upload-text {
    color: #666;
    font-size: 14px;
}

.no-workflow-selected {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.no-workflow-selected i {
    font-size: 32px;
    margin-bottom: 16px;
    color: #ccc;
}

.execution-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* 执行进度条 */
.execution-progress {
    margin-top: 16px;
    padding: 12px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(102, 126, 234, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    font-size: 12px;
    color: #667eea;
    font-weight: 600;
}

/* 执行结果面板 */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.results-header h3 {
    color: #333;
}

.execution-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-indicator.idle {
    background: #ccc;
    animation: none;
}

.status-indicator.running {
    background: #667eea;
}

.status-indicator.success {
    background: #4caf50;
    animation: none;
}

.status-indicator.error {
    background: #ff6b6b;
    animation: none;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

.status-text {
    font-size: 14px;
    font-weight: 600;
    color: #666;
}

.results-content {
    flex: 1;
    height: 400px;
    /* 固定高度 */
    overflow: auto;
    /* 上下左右滚动 */
    padding: 16px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    /* 自定义滚动条样式 */
    scrollbar-width: thin;
    scrollbar-color: #667eea rgba(0, 0, 0, 0.1);
    /* 确保内容不会溢出 */
    word-wrap: break-word;
    word-break: break-all;
}

/* Webkit 浏览器滚动条样式 */
.results-content::-webkit-scrollbar {
    width: 8px;
    height: 8px;
    /* 水平滚动条高度 */
}

.results-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.results-content::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
    min-height: 20px;
    /* 最小滚动条长度 */
    min-width: 20px;
    /* 最小滚动条宽度 */
}

.results-content::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8;
}

/* 滚动条交叉点样式 */
.results-content::-webkit-scrollbar-corner {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #ccc;
}

.result-message {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    border-left: 4px solid #667eea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.result-message.error {
    border-left-color: #ff6b6b;
    background: #fff5f5;
}

.result-message.success {
    border-left-color: #4caf50;
    background: #f8fff8;
}

.result-message.warning {
    border-left-color: #ffa726;
    background: #fff8e1;
}

.result-message.info {
    border-left-color: #42a5f5;
    background: #e3f2fd;
}

.result-message.image {
    border-left-color: #ab47bc;
    background: #fce4ec;
}

.result-message.video {
    border-left-color: #26a69a;
    background: #e0f2f1;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.result-header i {
    font-size: 14px;
    color: #667eea;
}

.result-message.error .result-header i {
    color: #ff6b6b;
}

.result-message.success .result-header i {
    color: #4caf50;
}

.result-message.warning .result-header i {
    color: #ffa726;
}

.result-message.info .result-header i {
    color: #42a5f5;
}

.result-message.image .result-header i {
    color: #ab47bc;
}

.result-message.video .result-header i {
    color: #26a69a;
}

.result-timestamp {
    font-size: 11px;
    color: #999;
    font-weight: 500;
}

.result-content {
    color: #333;
    line-height: 1.6;
    font-size: 14px;
}

.result-content img {
    max-width: 100%;
    border-radius: 8px;
    margin: 8px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.result-content video {
    max-width: 100%;
    border-radius: 8px;
    margin: 8px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.result-content pre {
    background: rgba(0, 0, 0, 0.05);
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.4;
}

.result-content code {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}

/* 格式化内容样式 */
.json-content {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 12px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.4;
    overflow-x: auto;
    white-space: pre;
    color: #333;
    margin: 8px 0;
}

.workflow-result {
    background: rgba(102, 126, 234, 0.05);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    padding: 16px;
    margin: 8px 0;
}

.result-section {
    margin-bottom: 16px;
}

.result-section:last-child {
    margin-bottom: 0;
}

.section-title {
    color: #667eea;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.section-content {
    background: rgba(255, 255, 255, 0.7);
    padding: 8px 12px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #333;
    border-left: 3px solid #667eea;
}

.output-item {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    border-left: 3px solid #4caf50;
}

.output-item:last-child {
    margin-bottom: 0;
}

.output-name {
    color: #4caf50;
    font-size: 13px;
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
}

.output-value {
    color: #333;
    font-size: 13px;
    line-height: 1.5;
}

.workflow-output {
    background: rgba(76, 175, 80, 0.05);
    border: 1px solid rgba(76, 175, 80, 0.2);
    border-radius: 12px;
    padding: 16px;
    margin: 8px 0;
}

.output-section {
    margin-bottom: 16px;
}

.output-section:last-child {
    margin-bottom: 0;
}

.output-title {
    color: #4caf50;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.output-content {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    padding: 12px;
    border-left: 3px solid #4caf50;
}

.output-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    word-break: break-all;
}

.output-link:hover {
    text-decoration: underline;
}

.long-text {
    position: relative;
}

.toggle-text-btn {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 6px;
    padding: 4px 12px;
    font-size: 12px;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.3s ease;
}

.toggle-text-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

/* Output对象格式化样式 */
.output-object {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.output-field {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 12px;
    border-left: 4px solid #4caf50;
    transition: all 0.3s ease;
}

.output-field:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.field-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4caf50;
}

.field-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.field-label {
    font-size: 14px;
    text-transform: capitalize;
}

.field-content {
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}

.field-value {
    background: rgba(76, 175, 80, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

/* 数组内容样式 */
.array-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.array-item {
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
    padding: 10px;
    border-left: 3px solid #667eea;
}

.array-index {
    font-weight: 600;
    color: #667eea;
    font-size: 12px;
    margin-bottom: 4px;
}

.array-value {
    color: #333;
}

/* 嵌套对象样式 */
.nested-object {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
    padding: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.nested-field {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 13px;
}

.nested-field:last-child {
    margin-bottom: 0;
}

.nested-key {
    font-weight: 600;
    color: #667eea;
    min-width: 80px;
    flex-shrink: 0;
}

.nested-value {
    color: #333;
    flex: 1;
    word-break: break-word;
}

/* 媒体内容样式增强 */
.output-image {
    cursor: pointer;
    transition: all 0.3s ease;
}

.output-image:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2) !important;
}

.output-video {
    transition: all 0.3s ease;
}

.output-video:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2) !important;
}

.output-audio {
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
    padding: 8px;
}

/* 链接样式增强 */
.output-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    word-break: break-all;
}

.output-link:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.output-link::after {
    content: "🔗";
    font-size: 12px;
    opacity: 0.7;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .output-field {
        padding: 10px;
    }
    
    .field-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .field-icon {
        width: auto;
    }
    
    .nested-field {
        flex-direction: column;
        gap: 4px;
    }
    
    .nested-key {
        min-width: auto;
    }
}

/* 执行历史页面 */
.history-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
    gap: 16px;
}

.history-header h2 {
    color: #333;
}

.history-controls {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.history-filters {
    display: flex;
    gap: 12px;
}

.filter-select {
    padding: 8px 12px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 8px;
    background: white;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
}

.history-actions {
    display: flex;
    gap: 12px;
}

/* 历史统计卡片 */
.history-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.stat-icon.success {
    background: linear-gradient(135deg, #4caf50, #45a049);
}

.stat-icon.error {
    background: linear-gradient(135deg, #ff6b6b, #ff5252);
}

.stat-icon.running {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.stat-icon.info {
    background: linear-gradient(135deg, #2196f3, #1976d2);
}

.stat-icon.unknown {
    background: linear-gradient(135deg, #ff8f00, #f57c00);
}

.stat-icon.pending {
    background: linear-gradient(135deg, #8e24aa, #7b1fa2);
}

.stat-info {
    flex: 1;
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: #666;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.history-item {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.history-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.history-workflow-name {
    font-weight: 700;
    color: #333;
}

.history-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.history-status.success {
    background: rgba(76, 175, 80, 0.1);
    color: #4caf50;
}

.history-status.error {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
}

.history-status.running {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.history-status.unknown {
    background: rgba(255, 193, 7, 0.1);
    color: #ff8f00;
}

.history-status.pending {
    background: rgba(156, 39, 176, 0.1);
    color: #8e24aa;
}

.history-item-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #666;
}

.history-item-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-small:hover {
    transform: translateY(-1px);
}

.error-indicator {
    color: #ff6b6b;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-header h3 {
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

.modal-body {
    padding: 24px;
    max-height: 400px;
    overflow-y: auto;
}

.workflow-detail-info {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
}

.detail-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    flex-shrink: 0;
}

.detail-content h4 {
    font-size: 20px;
    margin-bottom: 8px;
    color: #333;
}

.detail-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 12px;
}

.detail-meta {
    display: flex;
    gap: 12px;
}

.workflow-inputs-preview h5 {
    margin-bottom: 12px;
    color: #333;
}

.inputs-preview-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-preview-item {
    background: rgba(102, 126, 234, 0.05);
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.input-preview-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.input-preview-type {
    font-size: 12px;
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-block;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(0, 0, 0, 0.02);
}

/* 历史记录控制栏 */
.history-controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.view-controls {
    display: flex;
    gap: 8px;
}

.view-controls .btn-small.active {
    background: #667eea;
    color: white;
}

.items-info {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* 紧凑视图样式 */
.history-items.compact .history-item {
    padding: 12px 16px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: auto;
}

.history-item-compact-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.compact-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.compact-main .history-workflow-name {
    font-weight: 600;
    color: #333;
}

.compact-main .history-status {
    font-size: 11px;
    padding: 2px 8px;
}

.compact-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #666;
}

.compact-time,
.compact-type,
.compact-duration {
    display: flex;
    align-items: center;
    gap: 4px;
}

.compact-time::before {
    content: "🕒";
    font-size: 10px;
}

.compact-type::before {
    content: "⚡";
    font-size: 10px;
}

.compact-duration::before {
    content: "⏱️";
    font-size: 10px;
}

/* 图标按钮样式 */
.btn-icon {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.btn-icon:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateY(-1px);
}

.btn-icon.btn-danger {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
}

.btn-icon.btn-danger:hover {
    background: rgba(255, 107, 107, 0.2);
}

.history-item-actions.compact {
    display: flex;
    gap: 6px;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    padding: 16px;
}

.pagination-btn {
    min-width: 36px;
    height: 36px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    background: white;
    color: #667eea;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
}

.pagination-btn:hover:not(.disabled) {
    background: rgba(102, 126, 234, 0.1);
    border-color: #667eea;
}

.pagination-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
    color: #ccc;
}

.pagination-ellipsis {
    padding: 0 8px;
    color: #999;
    font-weight: 500;
}

/* 历史记录详情模态框样式 */
.detail-section {
    margin-bottom: 24px;
}

.detail-section h4 {
    color: #333;
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 2px solid #667eea;
    padding-bottom: 8px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-item label {
    font-size: 12px;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item span {
    font-size: 14px;
    color: #333;
    padding: 8px 12px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px !important;
    border-radius: 20px !important;
    font-size: 12px !important;
    font-weight: 600;
    border-left: none !important;
}

.status-badge.success {
    background: rgba(76, 175, 80, 0.1) !important;
    color: #4caf50 !important;
}

.status-badge.error {
    background: rgba(255, 107, 107, 0.1) !important;
    color: #ff6b6b !important;
}

.status-badge.running {
    background: rgba(102, 126, 234, 0.1) !important;
    color: #667eea !important;
}

.status-badge.unknown {
    background: rgba(255, 143, 0, 0.1) !important;
    color: #ff8f00 !important;
}

.status-badge.pending {
    background: rgba(142, 36, 170, 0.1) !important;
    color: #8e24aa !important;
}

.parameters-display,
.results-display,
.error-display {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
}

.parameter-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.parameter-item:last-child {
    border-bottom: none;
}

.parameter-key {
    font-weight: 600;
    color: #667eea;
    font-size: 14px;
}

.parameter-value {
    color: #333;
    font-size: 14px;
    max-width: 200px;
    word-break: break-word;
}

.result-item {
    margin-bottom: 12px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.result-timestamp {
    font-size: 11px;
    color: #999;
    margin-bottom: 6px;
}

.result-content {
    color: #333;
    line-height: 1.5;
    font-size: 14px;
}

.error-display {
    background: rgba(255, 107, 107, 0.05);
    border-color: rgba(255, 107, 107, 0.2);
    color: #d32f2f;
    font-family: monospace;
    font-size: 13px;
    line-height: 1.4;
}

/* 加载提示 */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.loading.hidden {
    display: none;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(102, 126, 234, 0.2);
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading p {
    color: #667eea;
    font-weight: 600;
}

/* Toast 通知 */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 4000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: toastSlideIn 0.3s ease;
}

.toast.success {
    border-left: 4px solid #4caf50;
}

.toast.error {
    border-left: 4px solid #ff6b6b;
}

.toast.info {
    border-left: 4px solid #667eea;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-container {
        padding: 0 16px;
        flex-direction: column;
        height: auto;
        gap: 16px;
        padding-top: 16px;
        padding-bottom: 16px;
    }

    .nav {
        width: 100%;
        justify-content: center;
    }

    .main {
        padding: 16px;
    }

    .search-container {
        flex-direction: column;
    }

    .filter-tabs {
        justify-content: center;
    }

    .workflows-grid {
        grid-template-columns: 1fr;
    }

    .runner-container {
        grid-template-columns: 1fr;
        height: auto;
    }

    .workflow-info-panel {
        order: 2;
    }

    .execution-results-panel {
        order: 1;
        min-height: 400px;
    }

    .execution-controls {
        flex-direction: column;
    }

    .history-controls {
        flex-direction: column;
        gap: 8px;
    }

    .history-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .history-item-meta {
        flex-direction: column;
        gap: 8px;
    }

    .modal-content {
        width: 95%;
        margin: 16px;
    }

    .workflow-detail-info {
        flex-direction: column;
        text-align: center;
    }

    .detail-icon {
        align-self: center;
    }
}
/* 查询结果模态框 */
.query-result-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.query-result-modal.show {
    opacity: 1;
}

.query-result-modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(-20px) scale(0.95);
    transition: all 0.3s ease;
}

.query-result-modal.show .query-result-modal-content {
    transform: translateY(0) scale(1);
}

.query-result-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: white;
}

.query-result-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.query-result-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.query-result-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.query-result-modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.result-info {
    background: rgba(76, 175, 80, 0.1);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    border-left: 4px solid #4caf50;
}

.result-info-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.result-info-item:last-child {
    margin-bottom: 0;
}

.result-info-item label {
    font-weight: 600;
    color: #333;
    width: 100px;
    flex-shrink: 0;
}

.result-info-item span {
    color: #666;
    flex: 1;
}

.status-success {
    color: #4caf50 !important;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.result-content h4 {
    color: #333;
    margin-bottom: 16px;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-content h4::before {
    content: "📋";
    font-size: 18px;
}

.result-messages {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.result-message {
    background: white;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.result-message:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.result-message-header {
    background: rgba(0, 0, 0, 0.02);
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.result-message-header i {
    color: #667eea;
    width: 16px;
}

.result-timestamp {
    margin-left: auto;
    font-size: 12px;
    color: #999;
}

.result-message-content {
    padding: 16px;
}

.result-image-preview {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 8px;
}

.result-image-preview:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.result-video-preview {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    margin-bottom: 8px;
}

.image-link, .video-link {
    font-size: 12px;
    color: #666;
    margin: 0;
    word-break: break-all;
}

.image-link a, .video-link a {
    color: #667eea;
    text-decoration: none;
}

.image-link a:hover, .video-link a:hover {
    text-decoration: underline;
}

.result-text .result-message-content {
    line-height: 1.6;
    color: #333;
}

.no-result {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 40px 20px;
}

.query-result-modal-footer {
    padding: 20px 24px;
    background: rgba(0, 0, 0, 0.02);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.query-result-close-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.query-result-close-btn:hover {
    background: rgba(102, 126, 234, 0.1);
}

.query-result-detail-btn, .query-result-copy-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.query-result-detail-btn:hover, .query-result-copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* 查询结果模态框响应式设计 */
@media (max-width: 768px) {
    .query-result-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .query-result-modal-header {
        padding: 16px 20px;
    }
    
    .query-result-modal-header h3 {
        font-size: 16px;
    }
    
    .query-result-modal-body {
        padding: 16px 20px;
    }
    
    .query-result-modal-footer {
        padding: 16px 20px;
        flex-direction: column;
    }
    
    .result-info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .result-info-item label {
        width: auto;
    }
    
    .result-image-preview, .result-video-preview {
        max-height: 200px;
    }
}