/* 基础样式重置 */
* {
    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;
}

.user-auth-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-auth-actions [hidden] {
    display: none !important;
}

.user-menu {
    position: relative;
}

.user-menu[hidden],
.user-menu-panel[hidden] {
    display: none !important;
}

.user-menu-trigger {
    min-width: 170px;
    justify-content: space-between;
    padding-right: 16px;
}

.user-menu-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 240px;
    padding: 8px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(102, 126, 234, 0.12);
    box-shadow: 0 16px 40px rgba(30, 41, 59, 0.16);
    backdrop-filter: blur(12px);
    z-index: 1100;
}

.user-menu-phone,
.user-menu-balance {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
}

.user-menu-phone {
    margin-bottom: 8px;
    background: rgba(15, 23, 42, 0.04);
    color: #1f2937;
    flex-wrap: nowrap;
}

.user-menu-balance {
    margin-bottom: 8px;
    background: rgba(102, 126, 234, 0.08);
    color: #4c5bd4;
}

.user-menu-phone-caption,
.user-menu-balance-caption {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
}

.user-menu-phone-caption {
    white-space: nowrap;
    flex-shrink: 0;
}

.user-menu-phone-value,
.user-menu-balance-value {
    font-size: 15px;
    font-weight: 700;
}

.user-menu-phone-value {
    white-space: nowrap;
}

.user-menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: #4c5bd4;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.user-menu-item:hover {
    background: rgba(102, 126, 234, 0.1);
}

/* 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;
    transition: all 0.3s ease;
}

.api-status .status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    transition: all 0.3s ease;
}

.api-status .status-indicator.test {
    background: #ffa726;
    animation: pulse 2s infinite;
}

.api-status .status-indicator.production {
    background: #4caf50;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.4);
}

.api-status .status-indicator.error {
    background: #ff6b6b;
    animation: errorPulse 1.5s infinite;
}

.api-status .status-indicator.checking {
    background: #42a5f5;
    animation: checkingPulse 1.8s infinite;
}

.api-status .status-indicator.warning {
    background: #ff9800;
    animation: warningBlink 2.5s infinite;
}

/* 状态文本颜色 */
.api-status .status-text {
    color: #666;
    transition: color 0.3s ease;
}

.api-status:has(.status-indicator.production) .status-text {
    color: #4caf50;
}

.api-status:has(.status-indicator.error) .status-text {
    color: #ff6b6b;
}

.api-status:has(.status-indicator.test) .status-text {
    color: #ffa726;
}

.api-status:has(.status-indicator.checking) .status-text {
    color: #42a5f5;
}

.api-status:has(.status-indicator.warning) .status-text {
    color: #ff9800;
}

/* 动画效果 */
@keyframes errorPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

@keyframes checkingPulse {

    0%,
    100% {
        opacity: 0.7;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

@keyframes warningBlink {

    0%,
    80%,
    100% {
        opacity: 1;
    }

    40% {
        opacity: 0.4;
    }
}

/* 按钮样式 */
.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-secondary-hide {
    display: 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;
}

.category-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 4px;
}

.filter-tab.active .category-count {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

.filter-tab:not(.active) .category-count {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

/* 工作流卡片网格 */
.workflows-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
    transition: opacity 0.3s ease;
}

.workflows-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* 分页容器 */
.pagination-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    display: none;
    /* 初始隐藏，有数据时显示 */
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.pagination-info {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.page-size-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-size-selector label {
    font-size: 14px;
    font-weight: 500;
    color: #666;
}

.page-size-select {
    padding: 8px 12px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.pagination-stats {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.keyboard-hint {
    font-size: 12px;
    color: #999;
    font-weight: 400;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #667eea;
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(102, 126, 234, 0.1);
    border-color: #667eea;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
    color: #ccc;
    border-color: #e0e0e0;
}

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 4px;
}

.page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    color: #667eea;
}

.page-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: #667eea;
}

.page-btn.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.page-btn.ellipsis {
    border: none;
    background: transparent;
    cursor: default;
    color: #999;
}

.page-btn.ellipsis:hover {
    background: transparent;
    border: none;
}

/* 悬浮定制按钮 */
.floating-custom-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 12px 16px;
    border-radius: 50px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    max-width: 200px;
    animation: float 3s ease-in-out infinite;
}

.floating-custom-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.5);
}

.floating-custom-btn i {
    font-size: 18px;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* 定制弹窗样式 */
.custom-modal-content {
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform;
    backface-visibility: hidden;
    overflow: hidden;
}

.custom-modal-content.show {
    transform: translateY(0);
}

/* 弹窗背景动画 */
#custom-workflow-modal {
    opacity: 0;
    transition: opacity 0.3s ease;
}

#custom-workflow-modal.show {
    opacity: 1;
}

.custom-modal-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 24px;
    border-radius: 20px 20px 0 0;
    position: relative;
    flex-shrink: 0;
}

.custom-modal-header h3 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 700;
}

.custom-modal-subtitle {
    margin: 0;
    opacity: 0.9;
    font-size: 16px;
}

.custom-modal-header .modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.custom-modal-header .modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.custom-modal-body {
    padding: 32px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.custom-modal-footer {
    padding: 20px 32px 32px;
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    flex-shrink: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    background: white;
}

/* 表单样式 */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-label.required::after {
    content: ' *';
    color: #ff6b6b;
}

.form-input {
    width: 100%;
    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;
    box-sizing: border-box;
}

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

.form-textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

/* 联系方式输入组 */
.contact-input-group {
    display: flex;
    gap: 12px;
}

.contact-type-select {
    flex-shrink: 0;
    width: 120px;
    padding: 12px 16px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.contact-input {
    flex: 1;
}

/* 文件上传区域 */
.custom-upload-area {
    border: 2px dashed rgba(102, 126, 234, 0.3);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(102, 126, 234, 0.05);
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-upload-area:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.custom-upload-area.drag-over {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.15);
    transform: scale(1.02);
}

.upload-content {
    pointer-events: none;
}

.upload-icon {
    font-size: 32px;
    color: #667eea;
    margin-bottom: 12px;
    display: block;
}

.upload-text {
    color: #666;
    font-size: 16px;
    margin: 0 0 8px 0;
    font-weight: 500;
}

.upload-hint {
    color: #999;
    font-size: 12px;
    margin: 0;
}

/* 已上传文件显示 */
.uploaded-files {
    margin-top: 16px;
}

.uploaded-file {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 8px;
    margin-bottom: 8px;
}

.uploaded-file i {
    color: #4caf50;
    font-size: 16px;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

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

.remove-file {
    background: none;
    border: none;
    color: #ff6b6b;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.remove-file:hover {
    background: rgba(255, 107, 107, 0.1);
}

/* 价格选项 */
.price-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.price-option {
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    padding: 20px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.price-option:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.price-option.selected {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

.price-label {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #667eea;
}

.price-option.selected .price-label {
    color: white;
}

.price-range {
    font-size: 14px;
    font-weight: 500;
    color: #666;
}

.price-option.selected .price-range {
    color: rgba(255, 255, 255, 0.9);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .pagination-container {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .pagination-info {
        justify-content: space-between;
        width: 100%;
    }

    .pagination-controls {
        justify-content: center;
        width: 100%;
    }

    .pagination-pages {
        flex-wrap: wrap;
        justify-content: center;
    }

    .keyboard-hint {
        display: none;
        /* 在移动设备上隐藏键盘提示 */
    }

    /* 悬浮按钮移动端适配 */
    .floating-custom-btn {
        bottom: 20px;
        right: 20px;
        padding: 10px 14px;
        font-size: 12px;
        max-width: 150px;
        gap: 6px;
    }

    .floating-custom-btn span {
        display: none;
    }

    .floating-custom-btn::after {
        content: '定制';
        margin-left: 4px;
    }

    /* 定制弹窗移动端适配 */
    .custom-modal-content {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
        transform: translateY(100vh);
        /* 移动端从屏幕底部滑入 */
    }

    .custom-modal-content.show {
        transform: translateY(0);
    }

    .custom-modal-header {
        border-radius: 0;
    }

    .custom-modal-body {
        padding: 24px 20px;
    }

    .custom-modal-footer {
        padding: 16px 20px 24px;
        flex-direction: column;
    }

    .contact-input-group {
        flex-direction: column;
    }

    .contact-type-select {
        width: 100%;
    }

    .price-options {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .custom-upload-area {
        padding: 24px 16px;
        min-height: 100px;
    }
}

.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;
    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;
    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 (min-width: 1400px) {
    .workflow-info-panel {
        width: 35%;
        /* 大屏幕左侧面板更窄 */
        min-width: 450px;
    }

    .execution-results-panel {
        width: 65%;
        /* 大屏幕右侧面板更宽 */
    }
}

/* 中等屏幕响应式设计 */
@media (max-width: 1399px) and (min-width: 1025px) {
    .workflow-info-panel {
        width: 40%;
        /* 标准桌面屏幕 */
        min-width: 400px;
    }

    .execution-results-panel {
        width: 60%;
    }
}

/* 平板设备响应式设计 */
@media (max-width: 1024px) and (min-width: 769px) {
    .workflow-info-panel {
        width: 45%;
        /* 平板设备调整比例 */
        min-width: 350px;
    }

    .execution-results-panel {
        width: 55%;
    }
}

/* 响应式设计 */
@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;
    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: flex;
    flex-direction: row;
    /* PC端默认左右布局 */
    gap: 24px;
    min-height: calc(100vh - 140px);
    align-items: stretch;
    /* 确保两个面板高度一致 */
    max-width: 100%;
    overflow: hidden;
    /* 防止内容溢出 */
}

.workflow-info-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;
    width: 40%;
    /* PC端左侧面板占40%宽度 */
    min-width: 400px;
    /* 最小宽度确保内容可读性 */
    overflow: hidden;
}

.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;
    width: 60%;
    /* PC端右侧面板占60%宽度 */
    min-height: 400px;
    max-height: calc(100vh - 180px);
    /* 限制最大高度，确保不会超出视窗 */
    flex: 1;
    overflow: hidden;
}

.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 {
    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;
}

/* 下拉菜单样式 */
.parameter-select {
    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;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

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

.parameter-select:hover {
    border-color: rgba(102, 126, 234, 0.4);
}

/* 下拉菜单选项样式 */
.parameter-select option {
    padding: 8px 12px;
    background: white;
    color: #333;
}

.parameter-select option:hover {
    background: rgba(102, 126, 234, 0.1);
}

.parameter-select option:disabled {
    color: #999;
    background: #f5f5f5;
}

.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);
}

/* 拖拽状态样式 */
.file-upload-area.drag-over {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.15);
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.file-upload-area.drag-over .upload-icon {
    color: #667eea;
    transform: scale(1.1);
}

.file-upload-area.drag-over .upload-text {
    color: #667eea;
    font-weight: 600;
}

.file-upload-area.uploading {
    border-color: #ffa726;
    background: rgba(255, 167, 38, 0.1);
    pointer-events: none;
}

.file-upload-area.uploading .upload-icon {
    color: #ffa726;
    animation: pulse 1.5s infinite;
}

/* 上传提示文本 */
.upload-hint {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
    transition: all 0.3s ease;
}

.file-upload-area.drag-over .upload-hint {
    color: #667eea;
    font-weight: 500;
}

/* 文件信息显示 */
.file-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.file-info i {
    color: #4caf50;
    font-size: 16px;
}

.file-name {
    font-weight: 600;
    color: #333;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

/* 动画效果 */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.7;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 拖拽动画 */
.file-upload-area {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.file-upload-area:hover:not(.uploading):not(.has-file) {
    border-color: rgba(102, 126, 234, 0.6);
    background: rgba(102, 126, 234, 0.08);
    transform: translateY(-2px);
}

.file-upload-area:hover:not(.uploading):not(.has-file) .upload-icon {
    color: #667eea;
    transform: scale(1.05);
}

/* 成功状态动画 */
.file-upload-area.has-file .file-info i {
    animation: checkmark 0.6s ease-in-out;
}

@keyframes checkmark {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 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;
    max-height: 100%;
    /* 最大高度限制 */
    max-width: 100%;
    /* 最大宽度限制 */
    height: auto;
    /* 自适应高度 */
    min-height: 200px;
    /* 最小高度 */
    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;
    /* 确保滚动条始终可见 */
    overflow-x: auto;
    overflow-y: auto;
}

/* 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;
}

/* 智能体运行页面样式 */
.agent-container {
    display: flex;
    flex-direction: row;
    gap: 24px;
    min-height: calc(100vh - 140px);
    align-items: stretch;
    max-width: 100%;
    overflow: hidden;
}

.agent-config-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;
    width: 35%;
    min-width: 350px;
    overflow: hidden;
}

.chat-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;
    width: 65%;
    min-height: 400px;
    max-height: calc(100vh - 180px);
    flex: 1;
    overflow: hidden;
}

.agent-header {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.agent-header .agent-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;
}

.agent-details h2 {
    font-size: 24px;
    margin-bottom: 8px;
    color: #333;
}

.agent-details p {
    color: #666;
    line-height: 1.5;
}

.agent-selection {
    margin-bottom: 24px;
}

.agent-selection h3 {
    margin-bottom: 16px;
    color: #333;
    font-size: 18px;
}

.agent-selector {
    display: flex;
    gap: 12px;
    align-items: center;
}

.agent-select {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    font-size: 14px;
    background: white;
    color: #333;
    transition: all 0.3s ease;
}

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

.agent-info {
    background: rgba(102, 126, 234, 0.05);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.info-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.info-item label {
    font-weight: 600;
    color: #667eea;
    font-size: 14px;
}

.info-item span {
    color: #333;
    font-size: 14px;
    word-break: break-all;
}

.chat-config {
    margin-bottom: 24px;
}

.chat-config h3 {
    margin-bottom: 16px;
    color: #333;
    font-size: 18px;
}

.config-group {
    margin-bottom: 16px;
}

.config-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.config-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    font-size: 14px;
    background: white;
    transition: all 0.3s ease;
}

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

.config-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.chat-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);
}

.chat-header h3 {
    color: #333;
    font-size: 20px;
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-messages {
    flex: 1;
    max-height: 100%;
    overflow-y: auto;
    padding: 16px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
    scrollbar-width: thin;
    scrollbar-color: #667eea rgba(0, 0, 0, 0.1);
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8;
}

.chat-message {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    animation: messageSlideIn 0.3s ease-out;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-user {
    align-items: flex-end;
}

.message-assistant {
    align-items: flex-start;
}

.message-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
    position: relative;
}

.message-user .message-bubble {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-bottom-right-radius: 6px;
}

.message-assistant .message-bubble {
    background: white;
    color: #333;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-bottom-left-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.message-content {
    line-height: 1.5;
    font-size: 14px;
}

.message-content img {
    max-width: 100%;
    border-radius: 8px;
    margin: 8px 0;
}

.message-content video {
    max-width: 100%;
    border-radius: 8px;
    margin: 8px 0;
}

.message-timestamp {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 4px;
    text-align: right;
}

.message-assistant .message-timestamp {
    text-align: left;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: white;
    border-radius: 18px;
    border-bottom-left-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 80%;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #667eea;
    border-radius: 50%;
    animation: typingPulse 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typingPulse {

    0%,
    80%,
    100% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.chat-input-area {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 16px;
}

.input-container {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.message-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    font-size: 14px;
    background: white;
    resize: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

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

.input-actions {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.btn-icon {
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateY(-1px);
}

.attached-files {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.attached-file {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 20px;
    font-size: 12px;
    color: #667eea;
}

.attached-file .remove-file {
    cursor: pointer;
    color: #ff6b6b;
    font-weight: bold;
}

.attached-file .remove-file:hover {
    color: #ff5252;
}

/* 响应式设计 - 智能体页面 */
@media (max-width: 1024px) {
    .agent-container {
        flex-direction: column;
        gap: 16px;
    }

    .agent-config-panel,
    .chat-panel {
        width: 100%;
        min-width: auto;
    }

    .agent-config-panel {
        max-height: 400px;
        overflow-y: auto;
    }
}

@media (max-width: 768px) {
    .agent-selector {
        flex-direction: column;
        align-items: stretch;
    }

    .config-actions {
        flex-direction: column;
    }

    .input-container {
        flex-direction: column;
        gap: 8px;
    }

    .input-actions {
        justify-content: flex-end;
    }

    .message-bubble {
        max-width: 95%;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {

    /* 移动端导航优化 */
    .header-container {
        padding: 0 16px;
        height: 60px;
    }

    .logo {
        font-size: 18px;
    }

    .nav {
        gap: 4px;
    }

    .nav-item {
        padding: 8px 12px;
        font-size: 14px;
    }

    .nav-item span {
        display: none;
    }

    /* 主要内容区域 */
    .main {
        padding: 16px;
    }

    /* 工作流运行页面移动端优化 */
    .runner-container {
        flex-direction: column;
        /* 移动端切换为上下布局 */
        gap: 16px;
        min-height: calc(100vh - 120px);
    }

    .workflow-info-panel,
    .execution-results-panel {
        width: 100%;
        /* 移动端面板占满宽度 */
        min-width: unset;
        /* 移除最小宽度限制 */
        max-height: unset;
        /* 移动端移除高度限制 */
        padding: 16px;
        border-radius: 16px;
    }

    /* 工作流头部 */
    .workflow-header {
        flex-direction: column;
        text-align: center;
        gap: 12px;
        margin-bottom: 20px;
        padding-bottom: 16px;
    }

    .workflow-header .workflow-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
        align-self: center;
    }

    .workflow-details h2 {
        font-size: 20px;
        margin-bottom: 6px;
    }

    .workflow-details p {
        font-size: 14px;
    }

    /* 参数表单 */
    .parameters-form {
        gap: 12px;
    }

    .parameter-input {
        padding: 10px 12px;
        font-size: 16px;
        /* 防止iOS缩放 */
    }

    .parameter-input.textarea {
        min-height: 60px;
    }

    .file-upload-area {
        padding: 16px;
    }

    /* 执行控制按钮 */
    .execution-controls {
        flex-direction: column;
        gap: 8px;
    }

    .execution-controls .btn-primary,
    .execution-controls .btn-secondary,
    .execution-controls .btn-danger {
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
    }

    /* 执行结果面板 */
    .execution-results-panel {
        min-height: 300px;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 16px;
        padding-bottom: 12px;
    }

    .results-header h3 {
        font-size: 18px;
    }

    .results-content {
        padding: 12px;
        min-height: 150px;
    }

    /* 结果消息 */
    .result-message {
        padding: 12px;
        margin-bottom: 8px;
    }

    .result-header {
        margin-bottom: 6px;
    }

    .result-content {
        font-size: 13px;
    }

    /* 搜索区域 */
    .search-section {
        padding: 16px;
        margin-bottom: 16px;
        border-radius: 16px;
    }

    .search-container {
        gap: 16px;
    }

    .search-box input {
        padding: 12px 12px 12px 40px;
        font-size: 16px;
        /* 防止iOS缩放 */
    }

    .filter-tabs {
        gap: 8px;
    }

    .filter-tab {
        padding: 8px 12px;
        font-size: 14px;
    }

    /* 工作流卡片网格 */
    .workflows-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .workflow-card {
        border-radius: 16px;
    }

    .workflow-card-header {
        height: 160px;
    }

    .workflow-card-title {
        padding: 12px 16px 6px 16px;
    }

    .workflow-title {
        font-size: 15px;
    }

    .workflow-card-footer {
        padding: 0 16px 16px 16px;
    }

    .workflow-description {
        font-size: 12px;
        margin-bottom: 10px;
    }

    /* 历史页面 */
    .history-container {
        padding: 16px;
        border-radius: 16px;
    }

    .history-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-bottom: 16px;
        padding-bottom: 16px;
    }

    .history-controls {
        flex-direction: column;
        gap: 12px;
    }

    .history-filters {
        display: flex;
        gap: 8px;
    }

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

    .history-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 16px;
    }

    /* 模态框 */
    .modal-content {
        width: 95%;
        margin: 20px auto;
        max-height: 90vh;
        border-radius: 16px;
    }

    .modal-header {
        padding: 16px 20px;
    }

    .modal-body {
        padding: 16px 20px;
        max-height: 60vh;
        overflow-y: auto;
    }

    .modal-footer {
        padding: 16px 20px;
        flex-direction: column;
        gap: 8px;
    }

    .modal-footer .btn-primary,
    .modal-footer .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    /* 输出字段 */
    .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;
    }

    /* Toast通知 */
    .toast-container {
        left: 16px;
        right: 16px;
        top: 80px;
    }

    .toast {
        margin-bottom: 8px;
        padding: 10px 12px;
        border-radius: 8px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .header-container {
        padding: 0 12px;
    }

    .main {
        padding: 12px;
    }

    .runner-container {
        gap: 12px;
    }

    .workflow-info-panel,
    .execution-results-panel {
        padding: 12px;
    }

    .search-section {
        padding: 12px;
    }

    .workflows-grid {
        gap: 12px;
    }

    .history-stats {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 12px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .runner-container {
        gap: 12px;
        min-height: calc(100vh - 100px);
    }

    .workflow-info-panel,
    .execution-results-panel {
        padding: 12px;
        border-radius: 12px;
    }

    .workflow-header {
        margin-bottom: 16px;
        padding-bottom: 12px;
    }

    .workflow-header .workflow-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .workflow-details h2 {
        font-size: 18px;
    }

    .parameters-section h3 {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .results-header h3 {
        font-size: 16px;
    }
}

/* 移动端触摸优化 */
@media (max-width: 768px) {

    /* 增加触摸目标大小 */
    .btn-primary,
    .btn-secondary,
    .btn-danger {
        min-height: 44px;
        /* iOS推荐的最小触摸目标 */
        padding: 12px 20px;
    }

    .nav-item {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .filter-tab {
        min-height: 40px;
    }

    /* 改善滚动体验 */
    .results-content {
        -webkit-overflow-scrolling: touch;
        /* iOS平滑滚动 */
    }

    /* 防止双击缩放 */
    .workflow-card,
    .btn-primary,
    .btn-secondary,
    .btn-danger {
        touch-action: manipulation;
    }

    /* 改善表单输入体验 */
    .parameter-input {
        -webkit-appearance: none;
        /* 移除iOS默认样式 */
        border-radius: 8px;
    }

    .parameter-input:focus {
        transform: none;
        /* 防止iOS缩放 */
    }
}

/* 执行历史页面 */
.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;
}

.homepage-login-modal {
    align-items: center;
    justify-content: center;
}

.homepage-login-modal .homepage-login-card {
    max-width: 460px;
    height: auto;
    max-height: none;
    overflow: visible;
}

.homepage-login-modal .modal-body {
    max-height: none;
    overflow: visible;
}

.homepage-login-form {
    display: grid;
    gap: 18px;
}

.homepage-login-field {
    display: grid;
    gap: 8px;
}

.homepage-login-field label {
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
}

.homepage-login-code-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 128px;
    gap: 10px;
}

.homepage-login-subtitle {
    margin-bottom: 16px;
    color: #718096;
    line-height: 1.6;
}

.homepage-login-status {
    min-height: 20px;
    font-size: 13px;
    color: #718096;
}

.homepage-login-footer {
    padding: 0;
    margin-top: 4px;
}

.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;
    }

    .header-actions {
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
    }

    .user-auth-actions {
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
    }

    .user-menu {
        width: 100%;
    }

    .user-menu-trigger {
        width: 100%;
    }

    .user-menu-panel {
        left: auto;
        right: 0;
        width: auto;
        min-width: 240px;
        max-width: calc(100vw - 32px);
    }

    .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;
    }
}

/* Coze URL链接样式 */
.coze-url-link {
    color: #667eea;
    text-decoration: none;
    border-bottom: 1px dashed #667eea;
    transition: all 0.3s ease;
    cursor: pointer;
}

.coze-url-link:hover {
    color: #5a67d8;
    border-bottom-color: #5a67d8;
    background-color: rgba(102, 126, 234, 0.1);
    padding: 2px 4px;
    border-radius: 4px;
}

/* HTTPS链接样式 */
.https-link {
    color: #007bff;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
    word-break: break-all;
}

.https-link:hover {
    color: #0056b3;
    border-bottom-color: #0056b3;
    text-decoration: none;
}

/* 内联链接容器样式 */
.inline-link-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0;
    padding: 8px;
    background: rgba(0, 123, 255, 0.05);
    border-radius: 6px;
    border-left: 3px solid #007bff;
}

/* 预览按钮样式 */
.preview-btn {
    padding: 4px 8px !important;
    font-size: 12px !important;
    border: none !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}

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

.preview-btn i {
    font-size: 10px;
}

/* 解析内容样式 */
.parsed-image-content,
.parsed-video-content,
.parsed-text-content,
.parsed-generic-content,
.parsed-raw-content {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    background: #f8f9fa;
    margin: 12px 0;
}

.content-type-label {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.content-type-label i {
    font-size: 14px;
}

.text-content {
    line-height: 1.6;
    color: #333;
}

.generic-content {
    color: #333;
}

.message-timestamp {
    font-size: 12px;
    color: #6c757d;
    margin-top: 8px;
    font-style: italic;
}

/* 改进JSON显示样式 */
.parsed-raw-content pre {
    background: #f8f9fa !important;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 12px;
    font-size: 13px;
    line-height: 1.4;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* 内联图片容器样式 */
.inline-image-container {
    margin: 12px 0;
    padding: 8px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.inline-image-container .result-image-clickable {
    display: block;
    margin: 0 auto 8px auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.inline-image-container .result-image-clickable:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.image-url-link {
    font-size: 12px;
    color: #666;
    text-align: center;
    word-break: break-all;
}

.image-url-link a {
    color: #667eea;
    text-decoration: none;
}

.image-url-link a:hover {
    text-decoration: underline;
}

/* 图片加载失败样式 */
.image-load-error {
    padding: 16px;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 8px;
    text-align: center;
    color: #666;
}

.image-load-error i {
    font-size: 24px;
    color: #ff6b6b;
    margin-bottom: 8px;
}

.image-load-error p {
    margin: 8px 0;
    font-size: 14px;
}

.image-load-error a {
    color: #667eea;
    text-decoration: none;
    word-break: break-all;
    font-size: 12px;
}

.image-load-error a:hover {
    text-decoration: underline;
}

/* JSON结果中的图片显示样式 */
.json-result {
    background: rgba(102, 126, 234, 0.02);
    border-radius: 8px;
    padding: 12px;
}

.json-image-field {
    margin-bottom: 16px;
    padding: 12px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.json-image-field .field-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}


/* JSON结果中的视频显示样式 */
.json-video-field {
    margin-bottom: 16px;
    padding: 12px;
    background: rgba(233, 30, 99, 0.05);
    border-radius: 8px;
    border-left: 3px solid #e91e63;
}

.json-video-field .field-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.inline-video-container {
    margin: 8px 0;
}

.video-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    padding: 8px;
    background: rgba(233, 30, 99, 0.05);
    border-radius: 6px;
}

.download-btn {
    background: #e91e63;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.download-btn:hover {
    background: #c2185b;
    transform: translateY(-1px);
}

.video-url-link {
    color: #e91e63;
    text-decoration: none;
    font-size: 12px;
    word-break: break-all;
}

.video-url-link:hover {
    text-decoration: underline;
}


.json-other-fields {
    margin-top: 12px;
}

.json-other-fields .json-content {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    padding: 12px;
    margin: 0;
}

/* 图片预览模态框样式 */
.image-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.image-preview-container {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.image-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}

.image-preview-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.image-preview-header h4 {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 4px;
}

.image-preview-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.image-preview-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

.zoom-hint {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    cursor: default;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.zoom-hint:hover {
    background: rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

.image-preview-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    min-height: 300px;
    position: relative;
}

.image-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: #666;
}

.image-loading i {
    font-size: 32px;
    color: #667eea;
}

.image-loading p {
    margin: 0;
    font-size: 16px;
}

.error-detail {
    font-size: 14px !important;
    color: #999 !important;
}

.preview-image {
    max-width: 100%;
    max-height: 60vh;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: zoom-in;
}

.preview-image:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* 缩小动画 */
.image-preview-modal:not(.zoomed) .preview-image {
    animation: imageZoomOut 0.3s ease;
}

@keyframes imageZoomOut {
    from {
        transform: scale(1.1);
    }

    to {
        transform: scale(1);
    }
}

/* 缩放动画类 */
.preview-image.zooming-in {
    animation: zoomInAnimation 0.3s ease;
}

.preview-image.zooming-out {
    animation: zoomOutAnimation 0.3s ease;
}

@keyframes zoomInAnimation {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes zoomOutAnimation {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(0.95);
        opacity: 0.9;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.image-preview-footer {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
    justify-content: flex-end;
}

.image-preview-footer .btn-secondary,
.image-preview-footer .btn-primary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

/* 图片放大状态样式 */
.image-preview-modal.zoomed {
    background: rgba(0, 0, 0, 0.95);
    animation: zoomModalFadeIn 0.3s ease;
}

.image-preview-modal.zoomed .image-preview-overlay {
    background: rgba(0, 0, 0, 0.95);
}

@keyframes zoomModalFadeIn {
    from {
        background: rgba(0, 0, 0, 0.8);
    }

    to {
        background: rgba(0, 0, 0, 0.95);
    }
}

.image-preview-modal.zoomed .image-preview-container {
    max-width: 95vw;
    max-height: 95vh;
    background: transparent;
    box-shadow: none;
}

.image-preview-modal.zoomed .image-preview-header {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.image-preview-modal.zoomed .image-preview-header h3 {
    color: white;
}

.image-preview-modal.zoomed .zoom-hint {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
}

.image-preview-modal.zoomed .zoom-hint:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.image-preview-modal.zoomed .image-preview-close {
    color: white;
}

.image-preview-modal.zoomed .image-preview-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.image-preview-modal.zoomed .image-preview-body {
    padding: 0;
    background: transparent;
}

.image-preview-modal.zoomed .preview-image {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    cursor: zoom-out;
    transform: scale(1);
    animation: imageZoomIn 0.3s ease;
}

@keyframes imageZoomIn {
    from {
        transform: scale(0.8);
        opacity: 0.8;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.image-preview-modal.zoomed .image-preview-footer {
    background: rgba(0, 0, 0, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.image-preview-modal.zoomed .image-preview-footer .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.image-preview-modal.zoomed .image-preview-footer .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.image-preview-modal.zoomed .image-preview-footer .btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.image-preview-footer .btn-secondary {
    background: #f1f3f4;
    color: #5f6368;
}

.image-preview-footer .btn-secondary:hover {
    background: #e8eaed;
}

.image-preview-footer .btn-primary {
    background: #667eea;
    color: white;
}

.image-preview-footer .btn-primary:hover {
    background: #5a67d8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .image-preview-container {
        max-width: 95vw;
        max-height: 95vh;
    }

    .image-preview-header,
    .image-preview-footer {
        padding: 16px 20px;
    }

    .image-preview-body {
        padding: 20px;
    }

    .preview-image {
        max-height: 50vh;
    }

    .image-preview-footer {
        flex-direction: column;
    }

    .image-preview-footer .btn-secondary,
    .image-preview-footer .btn-primary {
        justify-content: center;
    }
}

/* 视频
URL链接样式 */
.video-url-link {
    color: #e91e63;
    text-decoration: none;
    border-bottom: 1px dashed #e91e63;
    transition: all 0.3s ease;
    cursor: pointer;
    font-weight: 500;
}

.video-url-link:hover {
    color: #c2185b;
    border-bottom-color: #c2185b;
    background-color: rgba(233, 30, 99, 0.1);
    padding: 2px 4px;
    border-radius: 4px;
}

/* 视频预览模态框样式 */
.video-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.video-preview-container {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.video-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}

.video-preview-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.video-preview-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.video-preview-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

.video-preview-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    min-height: 400px;
    position: relative;
    background: #000;
}

.video-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: #fff;
}

.video-loading i {
    font-size: 32px;
    color: #e91e63;
}

.video-loading p {
    margin: 0;
    font-size: 16px;
}

.preview-video {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 8px;
}

.video-preview-footer {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
    justify-content: flex-end;
}

.video-preview-footer .btn-secondary,
.video-preview-footer .btn-primary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.video-preview-footer .btn-secondary {
    background: #f1f3f4;
    color: #5f6368;
}

.video-preview-footer .btn-secondary:hover {
    background: #e8eaed;
}

.video-preview-footer .btn-primary {
    background: #e91e63;
    color: white;
}

.video-preview-footer .btn-primary:hover {
    background: #c2185b;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .video-preview-container {
        max-width: 95vw;
        max-height: 95vh;
    }

    .video-preview-header,
    .video-preview-footer {
        padding: 16px 20px;
    }

    .video-preview-body {
        padding: 20px;
        min-height: 300px;
    }

    .preview-video {
        max-height: 50vh;
    }

    .video-preview-footer {
        flex-direction: column;
    }

    .video-preview-footer .btn-secondary,
    .video-preview-footer .btn-primary {
        justify-content: center;
    }
}

/* 
==================== 页脚样式 ==================== */
.footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #ecf0f1;
    margin-top: 60px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 24px 20px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    text-align: center;
}

.company-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.company-name {
    font-size: 18px;
    font-weight: 600;
    color: #ecf0f1;
    margin: 0;
}

.beian-info {
    display: flex;
    align-items: center;
    justify-content: center;
}

.beian-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #bdc3c7;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: 1px solid rgba(189, 195, 199, 0.2);
}

.beian-link:hover {
    color: #3498db;
    background: rgba(52, 152, 219, 0.1);
    border-color: rgba(52, 152, 219, 0.3);
    transform: translateY(-1px);
}

.beian-link i {
    font-size: 12px;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-link {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #3498db;
}

.separator {
    color: #7f8c8d;
    font-size: 12px;
}

.copyright {
    margin: 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
}

.copyright p {
    margin: 0;
    font-size: 13px;
    color: #95a5a6;
}

/* 页脚响应式设计 */
@media (max-width: 768px) {
    .footer-container {
        padding: 30px 20px 15px;
    }

    .footer-content {
        gap: 20px;
    }

    .company-name {
        font-size: 16px;
    }

    .beian-link {
        font-size: 13px;
        padding: 6px 12px;
    }

    .footer-links {
        gap: 12px;
    }

    .footer-link {
        font-size: 13px;
    }

    .copyright p {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .footer-links {
        flex-direction: column;
        gap: 8px;
    }

    .separator {
        display: none;
    }

    .beian-link {
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }
}

/* JSON链
接字段样式 */
.json-link-field {
    margin: 12px 0;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

.json-link-field .field-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 异步结果链接样式 */
.async-result-link {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    margin: 12px 0;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.async-result-link:hover {
    background: #f1f3f4;
    border-color: #dee2e6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.async-result-link.image-link {
    border-left: 4px solid #28a745;
}

.async-result-link.video-link {
    border-left: 4px solid #dc3545;
}

.async-result-link.audio-link {
    border-left: 4px solid #ffc107;
}

.async-result-link.generic-link {
    border-left: 4px solid #007bff;
}

.link-preview {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 120px;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
}

.async-result-image {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.async-result-video {
    max-width: 100%;
    max-height: 300px;
    border-radius: 6px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.async-result-audio {
    width: 100%;
    max-width: 400px;
}

.link-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.link-display {
    font-weight: 500;
    color: #495057;
    text-decoration: none;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.link-display:hover {
    color: #007bff;
    text-decoration: underline;
}

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

.link-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid #dee2e6;
    background: #fff;
    color: #6c757d;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-size: 14px;
}

.link-action:hover {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
    text-decoration: none;
}

.link-url {
    font-size: 12px;
    color: #6c757d;
    word-break: break-all;
    background: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    font-family: 'Courier New', monospace;
}

.image-load-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #6c757d;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 6px;
}

.image-load-error a {
    color: #007bff;
    text-decoration: none;
    margin-top: 8px;
    word-break: break-all;
}

.image-load-error a:hover {
    text-decoration: underline;
}

/* JSON数组和对象显示样式 */
.json-array {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px;
    margin: 8px 0;
}

.json-array-item {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e9ecef;
}

.json-array-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.array-index {
    font-weight: 600;
    color: #495057;
    min-width: 40px;
    font-family: 'Courier New', monospace;
}

.array-value {
    flex: 1;
}

.json-object {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px;
    margin: 8px 0;
}

.json-field {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
    align-items: flex-start;
}

.json-field:last-child {
    margin-bottom: 0;
}

.field-key {
    font-weight: 600;
    color: #495057;
    min-width: 100px;
    font-family: 'Courier New', monospace;
}

.field-value {
    flex: 1;
    word-break: break-word;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .async-result-link {
        padding: 12px;
        gap: 8px;
    }

    .link-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .link-actions {
        align-self: flex-end;
    }

    .json-link-field {
        padding: 8px;
    }
}

.balance-warning {
    margin-top: 16px;
    padding: 16px;
    border-radius: 12px;
    background: rgba(255, 124, 124, 0.08);
    border: 1px solid rgba(255, 107, 107, 0.3);
    display: flex;
    align-items: center;
    gap: 16px;
    color: #d84343;
}

.balance-warning.hidden {
    display: none;
}

.balance-warning-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 107, 107, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff6b6b;
    font-size: 18px;
}

.balance-warning-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 14px;
    color: #8c2f2b;
}

.balance-warning-text strong {
    font-size: 15px;
    color: #d32f2f;
}

.balance-warning.shake {
    animation: balanceShake 0.6s ease;
}

@keyframes balanceShake {
    0% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-4px);
    }

    40% {
        transform: translateX(4px);
    }

    60% {
        transform: translateX(-3px);
    }

    80% {
        transform: translateX(3px);
    }

    100% {
        transform: translateX(0);
    }
}

/* 媒体画廊页面 */
.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.gallery-header {
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.gallery-header h2 {
    margin: 0;
    color: #333;
}

.gallery-controls {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.gallery-filters {
    display: flex;
    gap: 12px;
}

.gallery-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* 画廊统计卡片 */
.gallery-stats {
    margin-bottom: 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.gallery-stats .stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-stats .stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.gallery-stats .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.gallery-stats .stat-icon.image {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gallery-stats .stat-icon.video {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.gallery-stats .stat-icon.workflow {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.gallery-stats .stat-icon.total {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

/* 画廊内容区域 */
.gallery-content {
    min-height: 400px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.gallery-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px 0;
}

/* 媒体项目卡片 */
.media-item {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.media-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.media-item-preview {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
}

.media-item-preview img,
.media-item-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.media-item:hover .media-item-preview img,
.media-item:hover .media-item-preview video {
    transform: scale(1.05);
}

.media-type-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    backdrop-filter: blur(10px);
}

.media-type-badge.image {
    background: rgba(102, 126, 234, 0.8);
}

.media-type-badge.video {
    background: rgba(245, 87, 108, 0.8);
}

.media-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.media-item:hover .media-play-overlay {
    opacity: 1;
}

.media-item-info {
    padding: 16px;
}

.media-item-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.media-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.media-item-workflow {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    color: #555;
}

.media-item-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.media-item-actions .btn-small {
    flex: 1;
    padding: 6px 12px;
    font-size: 12px;
}

/* 列表视图样式 */
.gallery-list .media-item {
    display: flex;
    height: 120px;
}

.gallery-list .media-item-preview {
    width: 200px;
    height: 120px;
    flex-shrink: 0;
}

.gallery-list .media-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.gallery-list .media-item-title {
    font-size: 16px;
    -webkit-line-clamp: 1;
}

.gallery-list .media-item-actions {
    margin-top: 0;
}

.gallery-list .media-item-actions .btn-small {
    flex: none;
    width: auto;
}

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

.gallery-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

/* 媒体预览模态框 */
.media-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.media-preview-modal.show {
    opacity: 1;
    visibility: visible;
}

.media-preview-content {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
}

.media-preview-content img,
.media-preview-content video {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
}

.media-preview-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.media-preview-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.media-preview-info {
    position: absolute;
    bottom: -60px;
    left: 0;
    right: 0;
    color: white;
    text-align: center;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .gallery-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .gallery-controls {
        flex-direction: column;
        gap: 12px;
    }

    .gallery-filters {
        display: flex;
        gap: 8px;
    }

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

    .gallery-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 16px;
    }

    .gallery-list .media-item {
        flex-direction: column;
        height: auto;
    }

    .gallery-list .media-item-preview {
        width: 100%;
        height: 200px;
    }
}

@media (max-width: 480px) {
    .gallery-stats {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* 媒体加载错误样式
 */
.media-item-preview.media-error {
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-item-preview.media-error img,
.media-item-preview.media-error video {
    display: none;
}

.media-error-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #999;
    font-size: 14px;
}

.media-error-overlay i {
    display: block;
    font-size: 24px;
    margin-bottom: 8px;
}

.media-item-preview.media-error .media-error-overlay {
    display: block !important;
}

/* 分页控件样式 */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 24px 0;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    background: white;
    color: #333;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    min-width: 40px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination-btn:hover:not(.disabled) {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

.pagination-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8f9fa;
}

.pagination-ellipsis {
    padding: 8px 4px;
    color: #999;
    font-size: 14px;
}

.pagination-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 16px 0;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 14px;
    color: #666;
}

.pagination-summary {
    font-weight: 500;
}

.pagination-settings {
    display: flex;
    align-items: center;
    gap: 8px;
}

.items-per-page-select {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 14px;
}

/* 响应式分页 */
@media (max-width: 768px) {
    .pagination-controls {
        gap: 4px;
        margin: 16px 0;
    }

    .pagination-btn {
        padding: 6px 8px;
        font-size: 12px;
        min-width: 32px;
    }

    .pagination-info {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .pagination-settings {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .pagination-controls {
        justify-content: space-between;
    }

    .pagination-btn:not(.pagination-prev):not(.pagination-next):not(.active) {
        display: none;
    }

    .pagination-ellipsis {
        display: none;
    }
}

/*
 图片预览响应式设计 */
@media (max-width: 768px) {
    .image-preview-container {
        max-width: 95vw;
        max-height: 95vh;
        margin: 10px;
    }

    .image-preview-header {
        padding: 12px 16px;
    }

    .image-preview-header h3 {
        font-size: 16px;
    }

    .zoom-hint {
        font-size: 11px;
        padding: 4px 8px;
    }

    .zoom-hint i {
        font-size: 10px;
    }

    .image-preview-body {
        padding: 16px;
        min-height: 200px;
    }

    .preview-image {
        max-height: 50vh;
    }

    .image-preview-modal.zoomed .preview-image {
        max-width: 95vw;
        max-height: 80vh;
    }

    .image-preview-footer {
        padding: 16px;
        flex-direction: column;
        gap: 8px;
    }

    .image-preview-footer .btn-secondary,
    .image-preview-footer .btn-primary {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .image-preview-controls {
        gap: 8px;
    }

    .zoom-hint span {
        display: none;
    }

    .zoom-hint {
        padding: 6px;
        min-width: auto;
    }
}

/* 
拖拽上传响应式设计 */
@media (max-width: 768px) {
    .file-upload-area {
        padding: 20px 16px;
        min-height: 120px;
    }

    .upload-icon {
        font-size: 28px;
        margin-bottom: 12px;
    }

    .upload-text {
        font-size: 14px;
    }

    .upload-hint {
        font-size: 11px;
        margin-top: 6px;
    }

    .file-info {
        flex-direction: column;
        gap: 4px;
    }

    .file-name {
        max-width: 150px;
        font-size: 14px;
    }

    .file-size {
        font-size: 11px;
    }

    /* 移动端拖拽效果调整 */
    .file-upload-area.drag-over {
        transform: scale(1.01);
    }

    .file-upload-area:hover:not(.uploading):not(.has-file) {
        transform: none;
    }
}

@media (max-width: 480px) {
    .file-upload-area {
        padding: 16px 12px;
        min-height: 100px;
    }

    .upload-icon {
        font-size: 24px;
        margin-bottom: 8px;
    }

    .upload-text {
        font-size: 13px;
        line-height: 1.4;
    }

    .upload-hint {
        font-size: 10px;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .file-upload-area:hover:not(.uploading):not(.has-file) {
        border-color: rgba(102, 126, 234, 0.3);
        background: rgba(102, 126, 234, 0.05);
        transform: none;
    }

    .file-upload-area:active:not(.uploading):not(.has-file) {
        border-color: #667eea;
        background: rgba(102, 126, 234, 0.1);
        transform: scale(0.98);
    }
}

/* 批量
查询按钮样式 */
#batch-query-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

#batch-query-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

#batch-query-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#batch-query-btn:disabled .fa-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* 历史页面按钮组优化 */
.history-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.history-actions .btn-primary {
    order: -1;
    /* 批量查询按钮排在最前面 */
}

/* 响应式设计 */
@media (max-width: 768px) {
    .history-actions {
        flex-direction: column;
        width: 100%;
    }

    .history-actions button {
        width: 100%;
        justify-content: center;
    }
}

/* Mobile layout polish: keep dense controls on one line without changing desktop styles. */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    .header-container {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "logo actions"
            "nav nav";
        align-items: center;
        gap: 8px 10px;
        width: 100%;
        height: auto;
        padding: 10px 12px 8px;
    }

    .logo {
        grid-area: logo;
        min-width: 0;
        gap: 8px;
        font-size: 16px;
        white-space: nowrap;
    }

    .logo i {
        flex: 0 0 auto;
        font-size: 22px;
    }

    .logo span {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .header-actions {
        grid-area: actions;
        width: auto;
        min-width: 0;
        flex-wrap: nowrap;
        justify-content: flex-end;
        gap: 6px;
    }

    .user-auth-actions {
        width: auto;
        min-width: 0;
        flex-wrap: nowrap;
        gap: 6px;
    }

    .api-status {
        width: 40px;
        min-width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
    }

    .api-status .status-text {
        display: none;
    }

    #open-login-button,
    #help-button {
        width: auto;
        min-width: 0;
        min-height: 40px;
        padding: 0 10px;
        justify-content: center;
        gap: 5px;
        font-size: 12px;
        white-space: nowrap;
    }

    #open-login-button i,
    #help-button i {
        font-size: 15px;
    }

    .user-menu {
        width: auto;
        min-width: 0;
    }

    .user-menu-trigger {
        width: auto;
        min-width: 0;
        max-width: 116px;
        min-height: 40px;
        padding: 8px 10px;
        gap: 6px;
        font-size: 12px;
    }

    .user-menu-label {
        min-width: 0;
    }

    .user-menu-panel {
        position: fixed;
        top: 108px;
        right: 12px;
        left: auto;
        width: min(280px, calc(100vw - 24px));
        min-width: 0;
        max-width: none;
    }

    .nav {
        grid-area: nav;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        width: 100%;
        gap: 6px;
    }

    .nav-item {
        min-width: 0;
        min-height: 40px;
        padding: 7px 4px;
        justify-content: center;
        gap: 5px;
        font-size: 11px;
        white-space: nowrap;
    }

    .nav-item i {
        flex: 0 0 auto;
        font-size: 14px;
    }

    .main {
        width: 100%;
        min-width: 0;
        padding: 12px;
    }

    .search-section,
    .history-container,
    .gallery-container,
    .workflow-info-panel,
    .execution-results-panel {
        min-width: 0;
    }

    .filter-tabs,
    .history-filters,
    .history-actions,
    .gallery-filters,
    .gallery-actions,
    .pagination-controls,
    .pagination-pages {
        width: 100%;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 8px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .filter-tabs::-webkit-scrollbar,
    .history-filters::-webkit-scrollbar,
    .history-actions::-webkit-scrollbar,
    .gallery-filters::-webkit-scrollbar,
    .gallery-actions::-webkit-scrollbar,
    .pagination-controls::-webkit-scrollbar,
    .pagination-pages::-webkit-scrollbar {
        display: none;
    }

    .filter-tab,
    .history-actions button,
    .gallery-actions button,
    .filter-select,
    .pagination-btn,
    .page-btn {
        flex: 0 0 auto;
        width: auto;
        white-space: nowrap;
    }

    .history-controls,
    .gallery-controls {
        width: 100%;
        min-width: 0;
        gap: 10px;
    }

    .history-header,
    .gallery-header {
        min-width: 0;
    }

    .history-header h2,
    .gallery-header h2,
    .results-header h3,
    .workflow-details h2 {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .workflow-meta {
        min-width: 0;
        flex-wrap: nowrap;
    }

    .category-tag {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .duration-tag,
    .balance-cost-badge,
    .free-badge {
        white-space: nowrap;
    }

    .pagination-container,
    .pagination-info {
        align-items: stretch;
    }
}

@media (max-width: 360px) {
    .header-container {
        padding-inline: 8px;
    }

    .logo span {
        display: none;
    }

    .user-menu-trigger {
        max-width: 96px;
    }

    .main {
        padding: 8px;
    }
}

.filter-expand-toggle {
    display: none;
}

@media (max-width: 768px) {
    .filter-tabs {
        align-items: center;
    }

    .filter-tabs:not(.expanded) {
        overflow-x: hidden;
    }

    .filter-tabs:not(.expanded) .filter-tab:not(:first-child) {
        display: none;
    }

    .filter-tabs .filter-tab:first-child {
        order: 0;
    }

    .filter-tabs .filter-tab:not(:first-child) {
        order: 2;
    }

    .filter-expand-toggle {
        order: 1;
        flex: 0 0 40px;
        width: 40px;
        height: 40px;
        border: 2px solid rgba(102, 126, 234, 0.2);
        border-radius: 12px;
        background: #fff;
        color: #667eea;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }

    .filter-expand-toggle i {
        transition: transform 0.2s ease;
    }

    .filter-expand-toggle[aria-expanded="true"] i {
        transform: rotate(180deg);
    }

    .filter-tabs.expanded {
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 6px;
        scrollbar-width: thin;
        scrollbar-color: rgba(102, 126, 234, 0.45) transparent;
    }

    .filter-tabs.expanded::-webkit-scrollbar {
        display: block;
        height: 6px;
    }

    .filter-tabs.expanded::-webkit-scrollbar-track {
        background: transparent;
    }

    .filter-tabs.expanded::-webkit-scrollbar-thumb {
        border-radius: 999px;
        background: rgba(102, 126, 234, 0.45);
    }
}

/* Mobile execution history layout. */
@media (max-width: 768px) {
    .history-container {
        padding: 14px;
        border: 1px solid rgba(102, 126, 234, 0.08);
        border-radius: 18px;
        box-shadow: 0 10px 30px rgba(30, 41, 59, 0.08);
    }

    .history-header {
        gap: 14px;
        margin-bottom: 16px;
        padding-bottom: 16px;
        border-bottom-color: rgba(102, 126, 234, 0.12);
    }

    .history-header h2 {
        position: relative;
        padding-left: 12px;
        font-size: 20px;
        line-height: 1.2;
    }

    .history-header h2::before {
        content: '';
        position: absolute;
        top: 1px;
        bottom: 1px;
        left: 0;
        width: 4px;
        border-radius: 999px;
        background: linear-gradient(180deg, #667eea, #764ba2);
    }

    .history-controls {
        width: 100%;
        gap: 10px;
    }

    .history-filters {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        gap: 8px;
        overflow: visible;
    }

    .history-filters .filter-select {
        width: 100%;
        min-width: 0;
        height: 42px;
        padding: 0 30px 0 10px;
        border-width: 1px;
        border-radius: 10px;
        font-size: 13px;
    }

    .history-actions {
        display: grid;
        grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
        grid-template-areas:
            "batch clear"
            "export refresh";
        width: 100%;
        gap: 8px;
        overflow: visible;
    }

    .history-actions button {
        width: 100%;
        min-width: 0;
        min-height: 42px;
        padding: 9px 10px;
        border-radius: 10px;
        justify-content: center;
        gap: 6px;
        font-size: 12px;
        white-space: nowrap;
    }

    #batch-query-btn {
        grid-area: batch;
    }

    #export-history-btn {
        grid-area: export;
    }

    #refresh-history-btn {
        grid-area: refresh;
    }

    #clear-history-btn {
        grid-area: clear;
    }

    .history-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-bottom: 16px;
    }

    .history-stats .stat-card {
        min-width: 0;
        padding: 12px;
        gap: 10px;
        border: 1px solid rgba(102, 126, 234, 0.08);
        border-radius: 13px;
        box-shadow: 0 5px 16px rgba(30, 41, 59, 0.07);
    }

    .history-stats .stat-icon {
        flex: 0 0 38px;
        width: 38px;
        height: 38px;
        border-radius: 10px;
        font-size: 15px;
    }

    .history-stats .stat-info {
        min-width: 0;
    }

    .history-stats .stat-number {
        margin-bottom: 2px;
        overflow: hidden;
        font-size: 19px;
        line-height: 1.15;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .history-stats .stat-label {
        overflow: hidden;
        font-size: 11px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .history-controls-bar {
        gap: 10px;
        margin-bottom: 12px;
        padding: 10px;
        border-radius: 11px;
        background: rgba(102, 126, 234, 0.045);
    }

    .view-controls {
        flex: 0 0 auto;
        gap: 4px;
    }

    .view-controls .btn-small {
        min-height: 34px;
        padding: 6px 9px;
        justify-content: center;
        white-space: nowrap;
    }

    .items-info {
        min-width: 0;
        overflow: hidden;
        font-size: 11px;
        text-align: right;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .history-list,
    .history-items {
        gap: 10px;
    }

    .history-item {
        position: relative;
        padding: 14px;
        border: 1px solid rgba(102, 126, 234, 0.08);
        border-radius: 14px;
        box-shadow: 0 6px 18px rgba(30, 41, 59, 0.07);
    }

    .history-item::before {
        content: '';
        position: absolute;
        top: 14px;
        bottom: 14px;
        left: 0;
        width: 3px;
        border-radius: 0 999px 999px 0;
        background: rgba(102, 126, 234, 0.65);
    }

    .history-item-header {
        flex-direction: row;
        align-items: center;
        gap: 10px;
        margin-bottom: 10px;
    }

    .history-workflow-name {
        min-width: 0;
        flex: 1;
        overflow: hidden;
        font-size: 14px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .history-status {
        flex: 0 0 auto;
        padding: 4px 9px;
        white-space: nowrap;
    }

    .history-item-meta {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px 10px;
        font-size: 11px;
    }

    .history-item-meta > span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .history-item-actions:not(.compact) {
        display: grid;
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.15fr) minmax(0, 0.8fr);
        gap: 7px;
        margin-top: 12px;
    }

    .history-item-actions:not(.compact) .btn-small {
        width: 100%;
        min-width: 0;
        min-height: 38px;
        padding: 7px 5px;
        justify-content: center;
        font-size: 11px;
        white-space: nowrap;
    }

    .history-items.compact .history-item {
        gap: 8px;
        padding: 11px 12px;
    }

    .history-item-actions.compact {
        flex: 0 0 auto;
        gap: 4px;
    }

    .history-item-actions.compact .btn-icon {
        width: 34px;
        height: 34px;
    }

    .pagination {
        gap: 5px;
        margin-top: 14px;
        padding: 10px 0 0;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .pagination::-webkit-scrollbar {
        display: none;
    }
}

@media (max-width: 360px) {
    .history-container {
        padding: 11px;
    }

    .history-actions button {
        padding-inline: 7px;
        font-size: 11px;
    }

    .history-stats .stat-card {
        padding: 10px;
        gap: 8px;
    }

    .history-stats .stat-icon {
        flex-basis: 34px;
        width: 34px;
        height: 34px;
    }
}

/* 媒体画廊：移动端与执行历史保持一致的紧凑卡片风格 */
@media (max-width: 768px) {
    .gallery-container {
        padding: 14px;
        border: 1px solid rgba(102, 126, 234, 0.08);
        border-radius: 15px;
        box-shadow: 0 8px 24px rgba(30, 41, 59, 0.06);
    }

    .gallery-header {
        align-items: stretch;
        gap: 14px;
        margin-bottom: 18px;
    }

    .gallery-header h2 {
        position: relative;
        padding-left: 11px;
        font-size: 18px;
        line-height: 1.3;
    }

    .gallery-header h2::before {
        content: '';
        position: absolute;
        top: 2px;
        bottom: 2px;
        left: 0;
        width: 3px;
        border-radius: 999px;
        background: #667eea;
    }

    .gallery-controls {
        width: 100%;
        gap: 10px;
    }

    .gallery-filters {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        gap: 8px;
        overflow: visible;
    }

    .gallery-filters .filter-select {
        width: 100%;
        min-width: 0;
        height: 42px;
        padding: 0 30px 0 10px;
        border-width: 1px;
        border-radius: 10px;
        font-size: 13px;
    }

    .gallery-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.25fr);
        width: 100%;
        gap: 8px;
        overflow: visible;
    }

    .gallery-actions button {
        width: 100%;
        min-width: 0;
        min-height: 42px;
        padding: 9px 7px;
        border-radius: 10px;
        justify-content: center;
        gap: 5px;
        font-size: 12px;
        white-space: nowrap;
    }

    .gallery-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-bottom: 16px;
    }

    .gallery-stats .stat-card {
        min-width: 0;
        padding: 12px;
        gap: 10px;
        border: 1px solid rgba(102, 126, 234, 0.08);
        border-radius: 13px;
        box-shadow: 0 5px 16px rgba(30, 41, 59, 0.07);
    }

    .gallery-stats .stat-icon {
        flex: 0 0 38px;
        width: 38px;
        height: 38px;
        border-radius: 10px;
        font-size: 15px;
    }

    .gallery-stats .stat-info {
        min-width: 0;
    }

    .gallery-stats .stat-number {
        margin-bottom: 2px;
        overflow: hidden;
        font-size: 19px;
        line-height: 1.15;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .gallery-stats .stat-label {
        overflow: hidden;
        font-size: 11px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .gallery-content {
        min-height: 280px;
    }

    .gallery-grid,
    .gallery-list {
        gap: 10px;
        padding: 2px 0;
    }

    .gallery-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .media-item,
    .gallery-list .media-item {
        display: block;
        height: auto;
        border: 1px solid rgba(102, 126, 234, 0.08);
        border-radius: 14px;
        box-shadow: 0 6px 18px rgba(30, 41, 59, 0.07);
    }

    .media-item-preview,
    .gallery-list .media-item-preview {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .gallery-list .media-item-preview {
        aspect-ratio: 2 / 1;
    }

    .media-type-badge {
        top: 10px;
        right: 10px;
        padding: 4px 8px;
        font-size: 11px;
    }

    .media-item-info,
    .gallery-list .media-item-info {
        display: block;
        padding: 13px;
    }

    .media-item-title,
    .gallery-list .media-item-title {
        margin-bottom: 9px;
        font-size: 14px;
        line-height: 1.4;
        -webkit-line-clamp: 1;
    }

    .media-item-meta {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, auto);
        gap: 8px;
        font-size: 11px;
    }

    .media-item-time,
    .media-item-workflow {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .media-item-workflow {
        max-width: 42vw;
        padding: 3px 7px;
        border-radius: 6px;
    }

    .media-item-actions,
    .gallery-list .media-item-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 0.85fr);
        gap: 7px;
        margin-top: 12px;
    }

    .media-item-actions .btn-small,
    .gallery-list .media-item-actions .btn-small {
        width: 100%;
        min-width: 0;
        min-height: 38px;
        padding: 7px 4px;
        justify-content: center;
        font-size: 11px;
        white-space: nowrap;
    }

    .gallery-empty {
        padding: 46px 16px;
        border: 1px dashed rgba(102, 126, 234, 0.2);
        border-radius: 14px;
        background: rgba(102, 126, 234, 0.025);
    }
}

@media (max-width: 360px) {
    .gallery-container {
        padding: 11px;
    }

    .gallery-actions button {
        padding-inline: 5px;
        font-size: 11px;
    }

    .gallery-stats .stat-card {
        padding: 10px;
        gap: 8px;
    }

    .gallery-stats .stat-icon {
        flex-basis: 34px;
        width: 34px;
        height: 34px;
    }

    .media-item-actions .btn-small,
    .gallery-list .media-item-actions .btn-small {
        font-size: 10px;
    }
}

/* 页脚：移动端公司与备案信息紧凑展示 */
@media (max-width: 768px) {
    .footer {
        margin-top: 36px;
    }

    .footer-container {
        padding: 26px 16px calc(16px + env(safe-area-inset-bottom));
    }

    .footer-content {
        gap: 16px;
    }

    .company-info {
        width: 100%;
        gap: 10px;
    }

    .company-name {
        font-size: 15px;
        line-height: 1.5;
        letter-spacing: 0.02em;
    }

    .beian-info {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
        max-width: 420px;
        gap: 8px;
    }

    .beian-link {
        flex-direction: row;
        justify-content: center;
        width: 100%;
        min-width: 0;
        min-height: 40px;
        padding: 8px 12px;
        border-radius: 9px;
        background: rgba(255, 255, 255, 0.045);
        font-size: 12px;
        line-height: 1.35;
        text-align: center;
    }

    .beian-link i {
        flex: 0 0 auto;
        color: #8fb9d6;
    }

    .footer-links {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
        max-width: 420px;
        gap: 8px;
    }

    .footer-link {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 0;
        min-height: 38px;
        padding: 7px 5px;
        border: 1px solid rgba(189, 195, 199, 0.14);
        border-radius: 9px;
        background: rgba(255, 255, 255, 0.035);
        font-size: 12px;
        line-height: 1.25;
        white-space: nowrap;
    }

    .separator {
        display: none;
    }

    .copyright {
        padding-top: 14px;
    }

    .copyright p {
        padding: 0 6px;
        font-size: 11px;
        line-height: 1.65;
    }
}

@media (max-width: 360px) {
    .footer-container {
        padding-inline: 12px;
    }

    .company-name {
        font-size: 14px;
    }

    .beian-link,
    .footer-link {
        font-size: 11px;
    }

    .footer-links {
        gap: 6px;
    }
}
