/* 确保文件以UTF-8编码保存，无BOM */
@charset "UTF-8";

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    --bg-color: #f9fafb;
    --card-bg: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    /* 优化字体栈，确保中文和跨平台兼容性 */
    font-family: 'Inter', 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
}

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

/* 头部 */
.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, #ec4899 100%);
    color: white;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
}

/* 主内容布局 */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    min-height: 600px;
}

.left-panel, .right-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 调整右侧面板第一个section（进度）的位置，与左侧面板的提示词部分对齐 */
.right-panel .section:first-child {
    margin-top: -5px;
}

/* 调整右侧面板第二个section（历史）的位置，紧跟进度部分 */
.right-panel .section:nth-child(2) {
    margin-top: -10px;
}

/* 部分 */
.section {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.section-header h2 {
    font-size: 1.3em;
    color: var(--text-primary);
    margin: 0;
}

.btn-toggle, .btn-refresh, .btn-clear {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.btn-toggle:hover, .btn-refresh:hover, .btn-clear:hover {
    color: var(--primary-color);
}

/* 创建角色按钮 */
.btn-character {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 0.95em;
    padding: 6px 14px;
    transition: transform 0.2s, box-shadow 0.2s;
    font-weight: 500;
}

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

.header-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* 表单元素 */
.form-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 0.95em;
}

.form-input, .form-textarea {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95em;
    transition: border-color 0.2s, box-shadow 0.2s;
}

/* 输入框包装器（用于显示/隐藏密码按钮） */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper .form-input {
    flex: 1;
    padding-right: 38px;
}

.toggle-password {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1em;
    color: var(--text-secondary);
    transition: color 0.2s;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password:hover {
    color: var(--primary-color);
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 200px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.form-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin-right: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
    margin-bottom: 0;
}

.checkbox-hint {
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-top: 6px;
    margin-bottom: 0;
}

/* 按钮 */
.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    display: inline-block;
    width: 100%;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #4f46e5;
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
    font-size: 1.1em;
    padding: 14px 24px;
}

.btn-success:hover {
    background-color: #059669;
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* 大型生成按钮 - 放在提示词框下方 */
.btn-generate-large {
    width: 100%;
    font-size: 1.2em;
    padding: 16px 24px;
    margin-top: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3);
    transition: all 0.3s ease;
}

.btn-generate-large:hover {
    font-size: 1.25em;
    box-shadow: 0 8px 12px rgba(16, 185, 129, 0.4);
}

.btn-generate-large:active {
    transform: scale(0.98);
}

.btn-info {
    background-color: var(--info-color);
    color: white;
    margin-left: 10px;
}

.btn-info:hover {
    background-color: #2563eb;
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* 文件上传 */
.image-upload {
    position: relative;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background-color: #fafafa;
    margin: 10px 0;
}

.image-upload:hover {
    border-color: var(--primary-color);
    background-color: rgba(99, 102, 241, 0.05);
}

.image-upload.dragover {
    border-color: var(--primary-color);
    background-color: rgba(99, 102, 241, 0.1);
}

.file-input {
    display: none;
}

.file-label {
    display: block;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    margin: 0;
    font-size: 0.95em;
}

.image-preview {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    max-height: 120px;
    overflow-y: auto;
}

.preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item .remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 0.8em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-item .remove-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* 进度项按钮容器 */
.progress-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.progress-actions .btn-sm {
    flex: 1;
    padding: 8px 12px;
    font-size: 0.9em;
    background-color: var(--success-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.progress-actions .btn-sm:hover {
    background-color: #059669;
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.progress-actions .btn-sm:active {
    transform: translateY(0);
}

/* ==================== 进度项美化样式 ==================== */

/* 进度项 */
.progress-item {
    padding: 14px;
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.progress-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* 进度头部 */
.progress-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.progress-number {
    font-weight: 700;
    font-size: 1.1em;
    color: var(--primary-color);
    min-width: 32px;
    text-align: center;
}

.progress-title {
    flex: 1;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.progress-status {
    font-size: 1.2em;
    font-weight: 700;
    color: #10b981;
    min-width: 40px;
    text-align: right;
}

/* 进度条容器 */
.progress-bar-container {
    width: 100%;
    height: 6px;
    background-color: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
    transition: width 0.3s ease;
    border-radius: 3px;
}

/* 配置信息 */
.config-item {
    display: inline-block;
    background-color: #f3f4f6;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85em;
    color: var(--text-secondary);
    white-space: nowrap;
}

.config-item.hd-badge {
    background: linear-gradient(135deg, #fef3c7 0%, #fcd34d 100%);
    color: #92400e;
    font-weight: 600;
}

/* 按钮美化 */
.progress-actions .btn-sm.btn-view {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
}

.progress-actions .btn-sm.btn-view:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
}

.progress-actions .btn-sm.btn-download {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

.progress-actions .btn-sm.btn-download:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
}

/* 禁用按钮样式 */
.progress-actions .btn-sm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%) !important;
}

.progress-actions .btn-sm:disabled:hover {
    transform: none !important;
    box-shadow: none !important;
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%) !important;
}

/* ==================== end of 进度项美化样式 ==================== */

/* 生成进度容器 - 无高度限制，显示全部 */
.progress-container {
    max-height: none;
    overflow-y: auto;
}

/* 历史记录容器 - 无高度限制，显示全部 */
.history-container {
    max-height: none;
    overflow-y: auto;
}

.task-item {
    padding: 10px;
    background-color: var(--bg-color);
    border-radius: 6px;
    margin-bottom: 8px;
    border-left: 4px solid var(--info-color);
    cursor: pointer;
    transition: all 0.2s;
}

.task-item:hover {
    box-shadow: var(--shadow);
    transform: translateX(5px);
}

.task-item.success {
    border-left-color: var(--success-color);
}

.task-item.failure {
    border-left-color: var(--danger-color);
}

.task-item.in-progress {
    border-left-color: var(--warning-color);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.task-title {
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.task-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background-color: #f3f4f6;
    color: var(--text-secondary);
}

.status-in-progress {
    background-color: rgba(245, 158, 11, 0.1);
    color: #b45309;
}

.status-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: #047857;
}

.status-failure {
    background-color: rgba(239, 68, 68, 0.1);
    color: #991b1b;
}

.task-details {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin: 8px 0;
}

/* 进度信息 */
.progress-info {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    font-size: 0.85em;
    color: var(--text-secondary);
}

.progress-time {
    flex: 1;
}

/* 进度配置信息 */
.progress-config {
    display: flex;
    gap: 12px;
    margin-top: 10px;
    font-size: 0.85em;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.progress-config span {
    background-color: #f3f4f6;
    padding: 4px 8px;
    border-radius: 4px;
}

.task-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85em;
    flex: 1;
    text-align: center;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-view {
    background-color: var(--info-color);
    color: white;
}

.btn-view:hover {
    background-color: #2563eb;
}

.btn-download {
    background-color: var(--success-color);
    color: white;
}

.btn-download:hover {
    background-color: #059669;
}

.btn-delete {
    background-color: var(--danger-color);
    color: white;
}

.btn-delete:hover {
    background-color: #dc2626;
}

/* 历史记录 */
.history-item {
    padding: 15px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.history-item:hover {
    box-shadow: var(--shadow);
}


.history-content p {
    margin: 4px 0;
    font-size: 0.9em;
}

.history-time {
    color: var(--text-secondary);
    font-size: 0.85em;
}

/* 消息提示 */
.message {
    padding: 12px;
    border-radius: 6px;
    margin-top: 10px;
    font-size: 0.95em;
    min-height: 20px;
}

.message.success {
    background-color: rgba(16, 185, 129, 0.1);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.message.error {
    background-color: rgba(239, 68, 68, 0.1);
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.message.info {
    background-color: rgba(59, 130, 246, 0.1);
    color: #1e40af;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: var(--card-bg);
    margin: 50px auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideIn 0.3s;
}

.modal-content.modal-large {
    max-width: 900px;
}

.modal-content.modal-video {
    max-width: 600px;
    max-height: 90vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;  /* 启用垂直滚动条 */
}

.modal-content.modal-video #videoModalBody {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: visible;  /* 改为 visible 允许内容超出时显示滚动条 */
    min-height: 0;
}

.modal-content.modal-video video {
    max-width: 100%;
    max-height: calc(90vh - 100px);
    object-fit: contain;
    border-radius: 8px;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: var(--text-secondary);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close:hover {
    color: var(--text-primary);
}

.modal-content h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--text-primary);
}

/* 视频播放器 */
.video-player {
    width: 100%;
    border-radius: 8px;
    background-color: #000;
}

.video-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.video-info p {
    margin: 8px 0;
    font-size: 0.95em;
}

.info-label {
    font-weight: 600;
    color: var(--text-primary);
}

.info-value {
    color: var(--text-secondary);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 1.05em;
}

/* 加载动画 */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(99, 102, 241, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 复制提示动画 */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* API配置折叠 */
.api-config-content {
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.api-config-content.collapsed {
    max-height: 0;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .header h1 {
        font-size: 2em;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .header {
        padding: 20px 0;
        margin-bottom: 20px;
    }

    .header h1 {
        font-size: 1.5em;
    }

    .subtitle {
        font-size: 1em;
    }

    .section {
        padding: 15px;
    }

    .modal-content {
        width: 95%;
        margin: 20px auto;
        padding: 20px;
    }
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* 小按钮样式 */
.btn-sm {
    padding: 8px 16px;
    font-size: 0.9em;
    width: auto;
    display: inline-block;
}

/* API配置按钮容器 */
.api-config-buttons {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.api-config-buttons .btn-sm {
    flex: 1;
}

/* 历史记录项按钮容器 */
.history-item-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.history-item-actions .btn-sm {
    flex: 1;
    padding: 8px 12px;
    font-size: 0.9em;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.history-item-actions .btn-sm:hover {
    background-color: #4f46e5;
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.history-item-actions .btn-sm:active {
    transform: translateY(0);
}

.history-no-video {
    padding: 8px 12px;
    font-size: 0.9em;
    color: var(--text-secondary);
    text-align: center;
    flex: 1;
}

/* 视频脚本部分 */
.video-script {
    flex-grow: 0;
}

.video-script .form-textarea {
    min-height: 120px;
    margin-bottom: 10px;
    resize: vertical;
    min-height: 100px;
}

/* 视频脚本部分中的表单组 */
.video-script .form-group {
    margin-bottom: 12px;
}

/* ==================== 历史提示词列表样式 ==================== */

.history-prompts-section {
    margin-top: 15px;
    border-top: 1px solid #e5e7eb;
    padding-top: 15px;
}

.history-prompts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    cursor: pointer;
}

.history-prompts-header h3 {
    margin: 0;
    font-size: 1em;
    color: #374151;
    flex: 1;
}

.btn-toggle-history {
    background: none;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
    color: #666;
    padding: 0 5px;
    transition: transform 0.3s ease;
}

.btn-toggle-history:hover {
    color: #0066cc;
}

.history-prompts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
    transition: max-height 0.3s ease;
}

.history-prompts-list.collapsed {
    max-height: 0;
    overflow: hidden;
}

.empty-prompts {
    text-align: center;
    color: #999;
    padding: 15px;
    font-size: 0.9em;
}

.history-prompt-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    transition: all 0.2s ease;
    gap: 10px;
}

.history-prompt-item:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.prompt-text {
    flex: 1;
    font-size: 0.9em;
    color: #374151;
    word-break: break-word;
    line-height: 1.4;
}

.prompt-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.btn-use-prompt,
.btn-copy-prompt {
    padding: 6px 10px;
    font-size: 0.8em;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background-color: #e0e7ff;
    color: #4f46e5;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-use-prompt:hover,
.btn-copy-prompt:hover {
    background-color: #c7d2fe;
    color: #4338ca;
}

.btn-use-prompt:active,
.btn-copy-prompt:active {
    transform: scale(0.95);
}

/* ==================== end of 历史提示词列表样式 ==================== */

/* 脚本格式模板样式 */
.script-template {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px dashed #0ea5e9;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.script-template:hover {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    border-color: #0284c7;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
}

.script-template h4 {
    color: #0369a1;
    margin-bottom: 10px;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.script-template p {
    margin: 6px 0;
    color: #0c4a6e;
    font-size: 14px;
    line-height: 1.5;
}

.script-template strong {
    color: #0369a1;
    font-weight: 600;
}

.script-template::before {
    content: "📝";
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    opacity: 0.3;
}

.script-template.hidden {
    display: none;
}


.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.history-title {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
    margin-right: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.95em;
}

.history-status {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 500;
    white-space: nowrap;
}

.history-status.success {
    background-color: rgba(16, 185, 129, 0.1);
    color: #047857;
}

.history-status.error {
    background-color: rgba(239, 68, 68, 0.1);
    color: #991b1b;
}

.history-error {
    color: var(--danger-color);
    font-size: 0.8em;
    margin-top: 4px;
}

.history-no-video {
    color: var(--text-secondary);
    font-size: 0.8em;
    font-style: italic;
}
