/* ===== 苹果风格视频生成UI ===== */

/* 视频生成头部 */
.video-header-modern {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.upload-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.upload-hint {
    font-size: 11px;
    color: #666;
    text-align: center;
    line-height: 1.2;
}

.btn-upload-header {
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: 1px solid rgba(0, 0, 0, 0.8);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-upload-header:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(0, 0, 0, 1);
}

.title-group h1 {
    font-size: 28px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.title-group p {
    font-size: 17px;
    color: #6e6e73;
    margin: 0;
    font-weight: 400;
    line-height: 1.4;
}

.btn-generate-start {
    background: #e53935;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(29, 29, 31, 0.25);
}

.btn-generate-start:hover {
    background: #c62828;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(29, 29, 31, 0.35);
}

.btn-generate-start:active {
    transform: translateY(0);
}

/* 配置面板 */
.video-config-modern {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.config-header {
    margin-bottom: 28px;
}

.config-header h2 {
    font-size: 22px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0 0 4px 0;
    letter-spacing: -0.3px;
}

.config-subtitle {
    font-size: 15px;
    color: #6e6e73;
    font-weight: 400;
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.config-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.config-item label {
    font-size: 15px;
    font-weight: 500;
    color: #1d1d1f;
    margin: 0;
}

.modern-select {
    background: #f6f6f6;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 15px;
    color: #1d1d1f;
    cursor: pointer;
    transition: all 0.2s ease;
    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='currentColor' 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;
}

.modern-select:hover {
    background: #f0f0f0;
    border-color: rgba(0, 0, 0, 0.1);
}

.modern-select:focus {
    outline: none;
    background: #ffffff;
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* 视频段落区域 */
.video-segments-modern,
.voice-segments-modern {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 24px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    width: calc(100vw - 4rem);
    margin-left: calc(-50vw + 50% + 2rem);
    max-width: none;
}

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

.segments-header h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0;
    letter-spacing: -0.3px;
}

.segment-counter {
    background: #6366f1;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 600;
}

/* 空状态重新设计 */
.video-segments-empty,
.voice-segments-empty {
    grid-column: 1 / -1;
}

.empty-state-modern {
    text-align: center;
    padding: 60px 40px;
}

.empty-icon {
    margin-bottom: 24px;
}

.empty-icon svg {
    color: #c7c7cc;
    opacity: 0.6;
}

.empty-state-modern h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0 0 8px 0;
    letter-spacing: -0.2px;
}

.empty-state-modern p {
    font-size: 15px;
    color: #6e6e73;
    margin: 0;
    line-height: 1.4;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* 底部导航 */
.video-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 1.5rem 2rem;
    background: transparent;
    border: none;
    margin-top: 2rem;
}

.video-navigation button {
    width: auto !important;
    flex: none !important;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-btn-back,
.nav-btn-next {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.nav-btn-back {
    background: #f6f6f6;
    color: #1d1d1f;
}

.nav-btn-back:hover {
    background: #e8e8ed;
    transform: translateX(-2px);
}

/* 语音段落卡片样式 */
.voice-segment-card {
    background: #ffffff;
    border: 1px solid #e1e1e6;
    border-radius: 12px;
    margin-bottom: 16px;
    transition: all 0.2s ease;
    overflow: hidden;
}

.segment-top-row {
    display: flex;
    flex-direction: row;
    gap: 1rem;
}

.voice-segment-card:hover {
    border-color: #c7c7cc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.voice-segment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px;
    flex: 0 0 auto;
    min-width: 240px;
}

.segment-title h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1d1d1f;
}

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

.btn-icon-small {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: #ffffff;
    color: #6e6e73;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-icon-small:hover {
    background: #e8e8ed;
    color: #1d1d1f;
}

.btn-icon-small.btn-delete:hover {
    background: #ff3b30;
    color: white;
}

.voice-segment-content {
    padding: 20px;
    flex: 1;
}

.voice-segment-card .voice-result {
    width: 100%;
    padding: 20px;
    border-top: 1px solid #e1e1e6;
    background: #fafafa;
}

.segment-text-preview {
    margin-bottom: 20px;
}

.segment-text-preview textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 1px solid #e1e1e6;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    background: #fafafa;
}

.segment-text-preview textarea:focus {
    outline: none;
    border-color: #007aff;
    background: #ffffff;
}

.voice-config-section {
    border-top: 1px solid #f0f0f0;
    padding-top: 20px;
}

.voice-config-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 16px;
}

.voice-config-row:last-child {
    margin-bottom: 0;
}

.config-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.config-item label {
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
}

.config-item select,
.config-item input[type="range"] {
    padding: 8px 12px;
    border: 1px solid #e1e1e6;
    border-radius: 6px;
    font-size: 14px;
    background: #ffffff;
}

.config-item select:focus {
    outline: none;
    border-color: #007aff;
}

.config-item input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #e1e1e6;
    border-radius: 3px;
    border: none;
    padding: 0;
}

.config-item input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #007aff;
    border-radius: 50%;
    cursor: pointer;
}

.config-item input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #007aff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.scale-value,
.speed-value {
    font-size: 12px;
    color: #6e6e73;
    text-align: center;
    margin-top: 4px;
}

.nav-btn-next {
    background: #1d1d1f;
    color: #ffffff;
}

.nav-btn-next:hover {
    background: #424245;
    transform: translateX(2px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
flex-direction: column;
gap: 20px;
text-align: center;
    }

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

    .video-navigation {
flex-direction: column;
gap: 12px;
    }

    .nav-btn-back,
    .nav-btn-next {
width: 100%;
justify-content: center;
    }
}

/* 视频段落卡片现代化设计 */
.video-segment-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.video-segment-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.1);
}

.video-segment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f2f2f7;
}

.video-segment-number {
    font-size: 17px;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -0.2px;
}

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

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #c7c7cc;
}

.status-indicator.pending {
    background: #ff9500;
}

.status-indicator.generating {
    background: #007aff;
    animation: pulse 1.5s infinite;
}

.status-indicator.completed {
    background: #34c759;
}

.status-indicator.failed {
    background: #ff3b30;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.status-text {
    font-size: 13px;
    font-weight: 500;
    color: #6e6e73;
}

/* 优化其他视频相关样式 */
.video-source-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

.source-image {
    width: 100%;
}

.source-image label,
.video-result-section label {
    display: block;
    font-size: 15px;
    font-weight: 500;
    color: #1d1d1f;
    margin-bottom: 8px;
}

.image-preview-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #f6f6f6;
    border-radius: 8px;
}

.image-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    height: 100%;
    margin: 0 auto;
}

.image-preview:hover .upload-overlay {
    opacity: 1;
}

.upload-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50%;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.no-image {
    color: #6e6e73;
    font-size: 14px;
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    justify-content: center;
}

.no-image svg {
    opacity: 0.6;
}

.no-image p {
    margin: 0;
    font-weight: 500;
}

.upload-hint {
    text-align: center;
    color: #6e6e73;
    font-size: 13px;
    margin-top: 8px;
    margin-bottom: 0;
}

.video-prompt-section {
    margin-bottom: 24px;
}

.video-result-section {
    width: 100%;
    display: flex;
    justify-content: center;
}

.video-prompt-section label {
    display: block;
    font-size: 15px;
    font-weight: 500;
    color: #1d1d1f;
    margin-bottom: 8px;
}

.video-prompt {
    width: 100%;
    background: #f6f6f6;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 16px;
    font-size: 14px;
    line-height: 1.6;
    color: #1d1d1f;
    resize: none;
    min-height: 150px;
    height: auto;
    overflow: visible;
    transition: all 0.2s ease;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.video-prompt:focus {
    outline: none;
    background: #ffffff;
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}


.btn-regenerate-video {
    background: #1d1d1f;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 16px auto 24px auto;
    display: block;
    width: fit-content;
    min-width: 120px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.loading-spinner {
    display: inline-flex;
    align-items: center;
}

.spin-animation {
    animation: spin 1s linear infinite;
}

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

.btn-regenerate-video:hover {
    background: #424245;
    transform: translateY(-1px);
}

.btn-regenerate-video:disabled {
    background: #c7c7cc;
    cursor: not-allowed;
    transform: none;
}

.video-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
    overflow: visible;
    width: 100%;
    max-width: 100%;
    margin: 0 auto 16px auto;
}

.video-placeholder {
    text-align: center;
    color: #6e6e73;
    width: 100%;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f6f6f6;
    border-radius: 10px;
    padding: 60px 20px;
}

.video-placeholder svg {
    margin-bottom: 12px;
    opacity: 0.6;
}

.video-placeholder p {
    font-size: 14px;
    margin: 0;
}

.generated-video {
    width: 100%;
    height: auto;
    max-height: none;
    border-radius: 10px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.empty-state h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.9rem;
    color: #9ca3af;
}

/* 视频生成底部操作 */
.video-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: 1rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .video-config .config-options {
grid-template-columns: 1fr;
    }

    .video-source-info {
grid-template-columns: 1fr;
gap: 1rem;
    }

    .video-result-section {
grid-template-columns: 1fr;
gap: 1rem;
    }

    .video-actions {
flex-direction: row;
justify-content: space-between;
    }

    .btn-generate-video,
    .btn-regenerate-video {
min-width: auto;
flex: 1;
    }
}

/* 状态动画 */
@keyframes pulse {
    0%, 100% {
opacity: 1;
    }
    50% {
opacity: 0.5;
    }
}


/* ============================================
   视频合成模块样式 - 全屏布局
   ============================================ */

.synthesis-full-container {
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    background: #f5f5f7;
}

/* 禁用视频合成页面的动画效果，避免容器炸开 */
#synthesis-section {
    animation: none !important;
}

#synthesis-section.active {
    animation: none !important;
}

/* 主要内容网格布局 */
.synthesis-main-grid {
    display: grid;
    grid-template-columns: 450px 1fr;
    min-height: 100vh; /* 确保至少占满屏幕高度 */
    height: auto; /* 允许内容超出时自动扩展 */
    background: white;
}

/* 左侧媒体上传面板 */
.synthesis-media-panel {
    background: white;
    border-right: 1px solid #e5e7eb;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.synthesis-media-panel .panel-header {
    margin-bottom: 24px;
}

.synthesis-media-panel .panel-header h3 {
    font-size: 18px;
    color: #1a1a1a;
    font-weight: 600;
}

/* 媒体文件选项卡 */
.media-tabs {
    display: flex;
    margin-bottom: 24px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 4px;
    gap: 2px;
}

.media-tab {
    flex: 1;
    padding: 12px 8px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.media-tab.active {
    background: white;
    color: #1a1a1a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.media-tab:hover:not(.active) {
    color: #1a1a1a;
    background: rgba(255, 255, 255, 0.5);
}

.tab-icon {
    font-size: 16px;
}

/* 媒体上传容器 */
.media-upload-container {
    flex: 1;
    position: relative;
}

.upload-section {
    display: none;
    margin-bottom: 24px;
    position: relative;
}

.upload-section.active {
    display: block;
}

.upload-section .section-close-btn {
    position: absolute !important;
    top: 8px !important;
    left: 8px !important;
    right: auto !important;
    width: 24px;
    height: 24px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    color: #dc2626;
    z-index: 10;
    transition: all 0.2s ease;
}

.upload-section .section-close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    transform: scale(1.1);
}

.upload-label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.file-info {
    margin-top: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 13px;
    color: #666;
    border: 1px solid #e5e7eb;
}

.upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
    position: relative;
    aspect-ratio: 16 / 9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.upload-area:hover {
    border-color: #1a1a1a;
    background: #f0f0f0;
}

.upload-area.active {
    border-color: #1a1a1a;
    background: #f8f8f8;
}

/* 文件上传成功状态 */
.upload-area.file-uploaded {
    border-color: #10b981;
    background: #f0fdf4;
    border-style: solid;
}

.upload-area.file-uploaded .upload-icon {
    color: #10b981;
}

.upload-area.file-uploaded .upload-text {
    color: #059669;
    font-weight: 600;
}

.upload-area.file-uploaded .upload-hint {
    color: #10b981;
}

/* 媒体文件网格布局 */
.media-files-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
}

/* 视频预览容器 */
.video-preview-item {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f9fa;
    cursor: grab;
    transition: all 0.2s ease;
    border: 1px solid #e0e6ed;
    padding: 8px;
    user-select: none;
}

.video-preview-item:active {
    cursor: grabbing;
}

.video-preview-item.dragging {
    opacity: 0.7;
    transform: rotate(2deg) scale(1.02);
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.video-preview-item:hover {
    transform: scale(1.02);
}

.video-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    background: #000;
}

.video-preview-item .preview-thumbnail-fallback {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.18) 0%, rgba(129, 140, 248, 0.32) 100%);
    color: rgba(17, 24, 39, 0.85);
}

.video-filename-tooltip {
    position: absolute;
    bottom: 8px;
    left: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 6px 10px;
    font-size: 11px;
    border-radius: 6px;
    opacity: 0;
    transition: opacity 0.2s ease;
    word-break: break-all;
    pointer-events: none;
}

.video-preview-item:hover .video-filename-tooltip {
    opacity: 1;
}

/* 删除按钮 */
.delete-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    color: #dc2626;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 10;
}

.video-preview-item:hover .delete-btn {
    opacity: 1;
}

.delete-btn:hover {
    background: rgba(255, 255, 255, 1);
    color: #dc2626;
    border-color: #dc2626;
    transform: scale(1.05);
}

.delete-btn:active {
    transform: scale(0.95);
}

/* 音频预览项 */
.audio-preview-item {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e6ed;
    padding: 0;
}

/* 音频缩略图容器也要充满 */
.audio-preview-item .video-thumbnail.audio-thumbnail {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    border-radius: 12px;
    overflow: hidden;
}

.audio-preview-item:hover {
    transform: scale(1.02);
}

.audio-icon {
    font-size: 32px;
    color: #0ea5e9;
}

/* 媒体库音频预览样式 */
.media-audio-waveform {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    background: rgba(30, 58, 138, 0.7);
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
    height: 100%;
}

.media-waveform-svg {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.media-waveform-path {
    fill: none;
    stroke: #ffffff;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.9;
}

/* 为不同的波浪路径设置不同的透明度 */
.media-waveform-path:nth-child(2) {
    opacity: 0.7;
}

.media-waveform-path:nth-child(3) {
    opacity: 0.5;
}

.media-waveform-path:nth-child(4) {
    opacity: 0.3;
}

/* 字幕预览项 */
.subtitle-preview-item {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e6ed;
    padding: 8px;
}

.subtitle-preview-item:hover {
    transform: scale(1.02);
}

.subtitle-icon {
    font-size: 32px;
    color: #f59e0b;
}

/* 通用文件名提示 */
.audio-preview-item:hover .video-filename-tooltip,
.subtitle-preview-item:hover .video-filename-tooltip {
    opacity: 1;
}

/* 网格中的上传区域 */
.upload-grid-item {
    width: 100%;
}

.upload-area-grid {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.upload-area-grid:hover {
    border-color: #1a1a1a;
    background: #f0f0f0;
}

.upload-area-grid .upload-input {
    display: none;
}

.upload-area.has-file {
    border-style: solid;
    border-color: #10b981;
    background: #f0fdf4;
}

.upload-icon {
    font-size: 28px;
    margin-bottom: 8px;
    opacity: 0.7;
}

.upload-text {
    font-size: 12px;
    color: #4b5563;
    margin-bottom: 4px;
    font-weight: 500;
}

/* 移除了关闭按钮相关样式 */

.upload-hint {
    font-size: 10px;
    color: #9ca3af;
    line-height: 1.2;
}

.upload-input {
    display: none;
}

.uploaded-file {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    margin-top: 8px;
    border: 1px solid #e5e7eb;
}

.file-icon {
    font-size: 24px;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-size: 13px;
    color: #1a1a1a;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    font-size: 11px;
    color: #999;
}

.file-remove {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: #f3f4f6;
    color: #666;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: all 0.2s;
}

.file-remove:hover {
    background: #ef4444;
    color: white;
}

/* 中间预览和时间轴面板 */
.synthesis-preview-panel {
    display: flex;
    flex-direction: column;
    padding: 40px 24px 24px;
    background: #fafafa;
    overflow-y: auto; /* 恢复滚动条，但设置足够的高度 */
    min-height: 100vh; /* 设置为全屏高度 */
    height: auto; /* 允许自动扩展高度 */
    justify-content: flex-start;
    position: relative;
}

/* 独立的按钮容器 */
.synthesis-buttons-container {
    padding: 20px 24px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 0;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(10px);
}

/* 操作按钮组 */
.synthesis-action-buttons {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    align-items: center;
}

/* 保存草稿按钮 */
.btn-save-draft {
    background: #1a1a1a;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-save-draft:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    background: #333;
}

.btn-save-draft:active {
    transform: translateY(0);
}

.btn-save-draft svg {
    transition: transform 0.2s ease;
}

.btn-save-draft:hover svg {
    transform: scale(1.1);
}

.btn-export-video {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-export-video:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
    filter: brightness(1.1);
}

.btn-export-video:active {
    transform: translateY(0);
}

.btn-export-video svg {
    transition: transform 0.2s ease;
}

.btn-export-video:hover svg {
    transform: scale(1.1);
}

/* 清空轨道按钮容器 - 左下角定位 */
.timeline-clear-button {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 20;
}

/* 清空轨道按钮 */
.btn-clear-tracks {
    background: white;
    color: #1a1a1a;
    border: 2px dashed #1a1a1a;
    border-radius: 10px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.btn-clear-tracks:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    background: #f9f9f9;
    border-color: #ef4444;
    color: #ef4444;
}

.btn-clear-tracks:active {
    transform: translateY(0);
}

.btn-clear-tracks svg {
    transition: transform 0.2s ease;
}

.btn-clear-tracks:hover svg {
    transform: scale(1.1) rotate(90deg);
}

/* 时间轴外部按钮组 */
.timeline-external-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 20px;
    padding-right: 20px;
}

/* 时间轴内部按钮组 - 位于时间轴编辑器右下角 */
.timeline-internal-buttons {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 15px;
    z-index: 10;
}

/* 修改导出视频按钮为黑色背景 */
.timeline-external-buttons .btn-export-video,
.timeline-internal-buttons .btn-export-video {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.timeline-external-buttons .btn-export-video:hover,
.timeline-internal-buttons .btn-export-video:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    filter: brightness(1.2);
}

/* 预览和设置容器 - 左右布局 */
.preview-settings-container {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
    height: auto !important;
    margin-top: -50px !important;
}

/* 左侧视频预览区 */
.video-preview-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    min-width: 0;
    max-height: min(85vh, 1200px);
    min-height: 400px;
}

.preview-screen {
    width: 100%;
    max-width: min(90vw, 1200px);
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    object-fit: contain;
    margin: 0 auto;
    box-sizing: border-box;
}

.preview-screen .preview-video-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    opacity: 0;
    /* 使用will-change优化渲染性能，避免闪烁 */
    will-change: opacity;
    /* 移除transition，通过JS控制过渡 */
    background: #000;
    z-index: 1;
    pointer-events: none;
    /* 添加硬件加速 */
    transform: translateZ(0);
    backface-visibility: hidden;
}

.preview-screen .preview-video-layer.primary {
    z-index: 1;
    /* 使用transform3d强制GPU渲染 */
    transform: translate3d(0, 0, 0);
    /* 预设过渡效果，但通过JS动态控制 */
    transition: none;
}

.preview-screen .preview-video-layer.secondary {
    z-index: 2;
    /* 使用transform3d强制GPU渲染 */
    transform: translate3d(0, 0, 0);
    /* 预设过渡效果，但通过JS动态控制 */
    transition: none;
}

.preview-screen .preview-video-layer.active {
    /* 不再通过CSS控制opacity，改用JS精确控制 */
}

/* 平滑切换效果类 */
.preview-screen .preview-video-layer.smooth-transition {
    transition: opacity 0.15s ease-in-out;
}

/* 确保视频元素在切换时不闪烁 */
.preview-screen .preview-video-layer {
    background-color: transparent;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: opacity;
}

.preview-placeholder {
    color: white;
    font-size: 18px;
    opacity: 0.6;
}

/* 右侧属性设置面板 */
.synthesis-settings-panel {
    width: 320px;
    background: #ffffff;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    flex-shrink: 0;
    height: 75vh;
    max-height: 75vh;
    display: flex;
    flex-direction: column;
}

/* 音量控制头部区域样式 */
.volume-control-header {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent;
    border-radius: 0;
}

.volume-header-bg {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 20px;
    border-radius: 12px 12px 20px 20px;
    color: white;
    margin: 0;
    position: relative;
}

.volume-header-bg::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 20px;
    right: 20px;
    height: 10px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 0 0 15px 15px;
}

.volume-label {
    color: white !important;
    font-weight: 600;
    margin-bottom: 15px;
}

.settings-header {
    padding: 20px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
    border-radius: 12px 12px 0 0;
}

/* 音量控制区域内的滑块样式 */
.volume-header-bg .slider-wrapper {
    margin-top: 12px;
}

.volume-header-bg .slider-compact {
    background: rgba(255, 255, 255, 0.2);
    border: none;
}

.volume-header-bg .slider-compact::-webkit-slider-thumb {
    background: #ffffff;
    border: 2px solid #1a1a1a;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.volume-header-bg .slider-labels span {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
}

.volume-header-bg #videoVolumeValue {
    color: #ffffff;
    font-weight: 600;
}

/* 确保字幕通知和编辑器有合适的间距 */
.subtitle-notice {
    margin-top: 15px;
    padding: 15px 20px;
}

#subtitle-editor {
    padding: 0;
}

.settings-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
}
.container-name {
    margin-top: 8px;
    color: #b8b8b8;
    font-size: 14px;
    font-weight: 400;
}
.info-display {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    color: #666;
    border: 1px solid #e9ecef;
}
.info-display .info-item {
    margin-bottom: 8px;
}
.info-display .info-item:last-child {
    margin-bottom: 0;
}
.info-display .info-label {
    font-weight: 500;
    color: #333;
}

.settings-content {
    padding: 0;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.setting-group {
    margin-bottom: 20px;
}

.setting-label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
}

.setting-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
    color: #1f2937;
    font-size: 14px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.setting-select:hover {
    border-color: #9ca3af;
}

.setting-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.settings-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.settings-section-title {
    margin: 0 0 16px 0;
    color: #1f2937;
    font-size: 16px;
    font-weight: 600;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.setting-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
    -webkit-appearance: none;
}

.setting-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.setting-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.slider-value {
    min-width: 45px;
    color: #6b7280;
    font-size: 14px;
    text-align: right;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-container input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label {
    color: #4b5563;
    font-size: 14px;
    user-select: none;
}

/* 设置面板选项卡 */
.settings-tabs {
    display: flex;
    background: #f3f4f6;
    border-bottom: 1px solid #e5e7eb;
}

.settings-tab {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: none;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.settings-tab:hover {
    background: rgba(0, 0, 0, 0.03);
}

.settings-tab.active {
    color: #1f2937;
    background: #ffffff;
    border-bottom: 2px solid #3b82f6;
    margin-bottom: -1px;
}

/* 字幕相关样式 */
.subtitle-notice {
    padding: 40px 20px;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
}

.subtitle-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
}

.subtitle-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}


.color-picker-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-picker {
    width: 60px;
    height: 36px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    padding: 2px;
}

.color-value {
    color: #6b7280;
    font-size: 13px;
    font-family: 'Courier New', monospace;
}

.position-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-width: 150px;
}

.position-btn {
    width: 100%;
    aspect-ratio: 1;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    color: #6b7280;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.position-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.position-btn.active {
    background: #3b82f6;
    color: #ffffff;
    border-color: #3b82f6;
}

.alignment-buttons {
    display: flex;
    gap: 8px;
}

.align-btn {
    padding: 8px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.align-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.align-btn.active {
    background: #3b82f6;
    color: #ffffff;
    border-color: #3b82f6;
}

/* 字幕预览层 */
.subtitle-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    display: none;
    padding: 20px;
    padding-bottom: 30px;
    z-index: 10;
    /* 当显示时默认底部居中 */
    justify-content: center;
    align-items: flex-end;
}

.subtitle-overlay[style*="block"],
.subtitle-overlay[style*="flex"] {
    display: flex !important;
}

.subtitle-text {
    display: inline-block;
    background: transparent;
    border-radius: 4px;
    color: #ffffff;
    line-height: 1.4;
    max-width: 90%;
    word-wrap: break-word;
    text-align: center;
    /* 字体大小和内边距将由JavaScript动态设置 */
    padding: 8px 16px;
}

/* 字幕位置类 */
.subtitle-position-top-left {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
}

.subtitle-position-top-center {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.subtitle-position-top-right {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
}

.subtitle-position-middle-left {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.subtitle-position-middle-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.subtitle-position-middle-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.subtitle-position-bottom-left {
    display: flex;
    justify-content: flex-start;
    align-items: flex-end;
}

.subtitle-position-bottom-center {
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.subtitle-position-bottom-right {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
}

/* 字幕动画 */
@keyframes subtitle-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes subtitle-slide-up {
    from {
opacity: 0;
transform: translateY(20px);
    }
    to {
opacity: 1;
transform: translateY(0);
    }
}

@keyframes subtitle-slide-down {
    from {
opacity: 0;
transform: translateY(-20px);
    }
    to {
opacity: 1;
transform: translateY(0);
    }
}

@keyframes subtitle-zoom {
    from {
opacity: 0;
transform: scale(0.8);
    }
    to {
opacity: 1;
transform: scale(1);
    }
}

@keyframes subtitle-typewriter {
    from {
width: 0;
    }
    to {
width: 100%;
    }
}

.subtitle-animation-fade {
    animation: subtitle-fade 0.5s ease;
}

.subtitle-animation-slide-up {
    animation: subtitle-slide-up 0.5s ease;
}

.subtitle-animation-slide-down {
    animation: subtitle-slide-down 0.5s ease;
}

.subtitle-animation-zoom {
    animation: subtitle-zoom 0.5s ease;
}

.subtitle-animation-typewriter {
    overflow: hidden;
    white-space: nowrap;
    animation: subtitle-typewriter 1s steps(40, end);
}

/* 视频片段选中状态 */
.timeline-clip.selected {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.timeline-clip.selected::after {
    content: '';
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    background: #3b82f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: white;
    border-radius: 8px;
    margin-top: 16px;
}

.play-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1a1a1a;
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: transform 0.2s;
}

.play-button:hover {
    transform: scale(1.1);
}

.time-display {
    font-size: 13px;
    color: #666;
    font-family: monospace;
    min-width: 100px;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    position: relative;
    cursor: pointer;
}

.progress-fill {
    height: 100%;
    background: #1a1a1a;
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-control input {
    width: 80px;
}

/* 时间轴编辑器 */
.timeline-editor {
    background: white;
    border-radius: 12px;
    padding: 20px;
    min-height: 400px; /* 调整为适中的最小高度 */
    max-height: 600px; /* 设置最大高度避免过高 */
    height: auto; /* 自动高度 */
    display: flex;
    flex-direction: column;
    flex-shrink: 0; /* 确保不被压缩 */
    position: relative; /* 为内部按钮提供定位参考 */
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
}

.timeline-header-left h4 {
    font-size: 16px;
    color: #1a1a1a;
    font-weight: 600;
}

.timeline-playback-controls {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.timeline-tools {
    display: flex;
    gap: 8px;
}

.tool-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: white;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}

.tool-btn:hover {
    background: #1a1a1a;
    border-color: #1a1a1a;
}


.playback-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1a1a1a;
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.playback-btn:hover {
    background: #333;
    transform: scale(1.05);
}

.time-display {
    font-size: 12px;
    color: #666;
    font-family: monospace;
    min-width: 80px;
}

.playback-progress {
    width: 120px;
}

.progress-bar-mini {
    width: 100%;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}

.progress-fill-mini {
    height: 100%;
    background: #1a1a1a;
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s ease;
}

.volume-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    transition: transform 0.2s;
}

.volume-btn:hover {
    transform: scale(1.1);
}

.timeline-tracks {
    flex: 1;
    overflow-x: hidden; /* 确保没有水平滚动条 */
    overflow-y: auto; /* 恢复垂直滚动条，当内容超出时显示 */
    background: #ffffff;
    padding: 16px;
    min-height: 300px; /* 适中的最小高度 */
    max-height: 450px; /* 设置最大高度，超出时滚动 */
}

.timeline-track {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2px; /* 减少轨道间距，让轨道靠拢 */
    min-height: 35px; /* 统一轨道高度为35px */
}

.track-header {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px; /* 只为按钮预留空间 */
    height: 110px; /* 与轨道内容高度对齐 */
    flex-shrink: 0;
    margin-right: 8px;
    background: transparent !important; /* 确保没有背景色 */
    border: none; /* 去掉边框 */
    padding: 0; /* 去掉内边距 */
}

.track-mute-btn {
    width: 20px;
    height: 20px;
    background: rgba(59, 130, 246, 0.9); /* 蓝色底色 */
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.track-mute-btn:hover {
    background: rgba(37, 99, 235, 1);
    transform: scale(1.05);
}

.track-mute-btn.muted {
    background: rgba(107, 114, 128, 0.9); /* 静音时灰色 */
}

.track-mute-btn.muted:hover {
    background: rgba(75, 85, 99, 1);
}

.track-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    user-select: none;
}

/* 视频轨道容器样式 */
.track-content-wrapper {
    flex: 1;
    height: 110px; /* 恢复视频轨道高度 */
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding: 0 8px 0 0;  /* 只保留右内边距，去掉上下内边距 */
    /* 隐藏默认滚动条 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.track-content-wrapper::-webkit-scrollbar {
    display: none; /* Chrome/Safari/WebKit */
}

.track-content-wrapper .track-content {
    height: 100%;
    min-width: 100%;
    overflow: visible;
    border: none;
    padding: 0;
    background: transparent;
}

/* 音频轨道和其他轨道样式 */
.track-content {
    flex: 1;
    height: 110px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding: 8px;
    /* 隐藏默认滚动条 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.track-content::-webkit-scrollbar {
    display: none; /* Chrome/Safari/WebKit */
    transition: all 0.2s ease;
}

.track-content.drag-over {
    background: #e0f2fe;
    border: 2px dashed #0ea5e9;
    box-shadow: inset 0 0 10px rgba(14, 165, 233, 0.1);
}

.track-content.drag-over::after {
    content: "拖拽视频到此处";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #0ea5e9;
    font-size: 12px;
    font-weight: 500;
    pointer-events: none;
}

/* 时间轴上的视频片段 - 填满轨道高度 */
.timeline-clip {
    display: inline-block;
    min-width: 20px; /* 降低最小宽度，允许短片段正确显示 */
    height: 108px; /* 几乎填满110px轨道，留出2px边距 */
    background: #111827;
    border: 1px solid rgba(59, 130, 246, 0.35);
    border-radius: 12px;
    margin: 0 !important;
    cursor: move;
    position: relative;
    vertical-align: top;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    user-select: none;
    overflow: hidden;
    --snap-indicator-color: #3b82f6;
}

/* 吸附时的视觉反馈 */
.timeline-clip.snap-candidate {
    border-color: var(--snap-indicator-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.timeline-clip.snapping {
    animation: snap-effect 0.2s ease;
}

@keyframes snap-effect {
    0% { transform: translateX(0); }
    50% { transform: translateX(-2px); }
    100% { transform: translateX(0); }
}

/* 拖拽和插入视觉效果 */
.timeline-clip.dragging {
    cursor: grabbing !important;
    opacity: 0.8 !important;
    transform: scale(1.05) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
    transition: none !important;
}

/* 插入位置提示 */
.timeline-clip.insert-before {
    position: relative;
    margin-left: 15px;
    transition: margin-left 0.2s ease;
}

.timeline-clip.insert-before::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, #3b82f6, #2563eb);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.6);
    animation: pulse-glow 1s ease-in-out infinite;
}

.timeline-clip.insert-after {
    position: relative;
    margin-right: 15px;
    transition: margin-right 0.2s ease;
}

.timeline-clip.insert-after::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, #3b82f6, #2563eb);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.6);
    animation: pulse-glow 1s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
opacity: 0.8;
box-shadow: 0 0 10px rgba(59, 130, 246, 0.6);
    }
    50% {
opacity: 1;
box-shadow: 0 0 20px rgba(59, 130, 246, 0.9);
    }
}

/* 占位符样式 */
.timeline-clip-placeholder {
    display: inline-block;
    vertical-align: top;
    background: rgba(59, 130, 246, 0.1) !important;
    border: 2px dashed #3b82f6 !important;
    border-radius: 6px;
    margin: 0;
    box-sizing: border-box;
    animation: placeholder-pulse 1.5s ease-in-out infinite;
}

@keyframes placeholder-pulse {
    0%, 100% {
background: rgba(59, 130, 246, 0.1);
border-color: #3b82f6;
    }
    50% {
background: rgba(59, 130, 246, 0.2);
border-color: #2563eb;
    }
}

/* 插入指示器 */
.insert-indicator {
    position: absolute;
    width: 3px;
    height: 60px;
    background: linear-gradient(180deg, #3b82f6, #2563eb);
    border-radius: 2px;
    z-index: 999;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
    transition: left 0.2s ease;
    animation: indicator-pulse 1s ease-in-out infinite;
}

@keyframes indicator-pulse {
    0%, 100% {
transform: scaleY(1);
opacity: 0.8;
    }
    50% {
transform: scaleY(1.1);
opacity: 1;
    }
}

/* 拖拽插入指示器动画 */
@keyframes drag-indicator-pulse {
    0%, 100% {
opacity: 0.8;
transform: scaleY(1);
box-shadow: 0 0 15px rgba(16, 185, 129, 0.8);
    }
    50% {
opacity: 1;
transform: scaleY(1.05);
box-shadow: 0 0 25px rgba(16, 185, 129, 1);
    }
}

/* 拖拽时的轨道样式 */
.track-content.drag-over {
    background-color: rgba(16, 185, 129, 0.1);
    border: 2px dashed rgba(16, 185, 129, 0.5);
}

.timeline-clip:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.45);
    border-color: rgba(59, 130, 246, 0.75);
}

.timeline-clip.dragging {
    opacity: 0.75;
    transform: rotate(1.5deg) scale(1.04);
    z-index: 1000;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.5);
}

.clip-body {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.clip-thumbnail-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 32px;
    font-weight: 600;
    color: rgba(15, 23, 42, 0.85);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.18) 0%, rgba(129, 140, 248, 0.32) 100%);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.45);
}

.timeline-clip .clip-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.92) saturate(1.05);
    transform: scale(1.02);
    transition: transform 0.2s ease, filter 0.2s ease;
}

.timeline-clip:hover .clip-thumbnail {
    filter: brightness(0.98) saturate(1.1);
    transform: scale(1.05);
}

.clip-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: space-between;
    padding: 6px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.timeline-clip:hover .clip-overlay {
    opacity: 1;
}

.clip-overlay button {
    pointer-events: auto;
}

.timeline-clip .clip-delete,
.timeline-clip .clip-volume {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e2e8f0;
    transition: transform 0.2s ease, background 0.2s ease;
    box-shadow: 0 4px 8px rgba(15, 23, 42, 0.35);
}

.timeline-clip .clip-delete {
    background: rgba(239, 68, 68, 0.92);
}

.timeline-clip .clip-delete:hover {
    transform: scale(1.15);
    background: rgba(239, 68, 68, 1);
}

.timeline-clip .clip-volume {
    background: rgba(59, 130, 246, 0.92);
    font-size: 11px;
}

.timeline-clip .clip-volume:hover {
    transform: scale(1.15);
    background: rgba(37, 99, 235, 1);
}

.timeline-clip .clip-duration-text {
    position: absolute;
    bottom: 6px;
    right: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    color: #f1f5f9;
    background: rgba(15, 23, 42, 0.9);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.45);
    pointer-events: none;
    letter-spacing: 0.02em;
}

/* 字幕轨道样式 */
.timeline-track.subtitle-track {
    margin-bottom: 2px;
}

.track-header.subtitle-header {
    height: 35px;
}

.track-content-wrapper.subtitle-content-wrapper {
    flex: 1;
    height: 40px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
}

.track-content.subtitle-content {
    height: 40px;
    background: linear-gradient(180deg, #f9fafb 0%, #e5e7eb 100%);
    border: 1px solid #d1d5db;
    border-radius: 8px;
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    min-width: 600px;
    padding: 0;
}

/* 字幕容器样式 */
.subtitle-clip {
    position: absolute;
    height: 35px;
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    border: 2px solid #9ca3af;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0 8px;
    box-sizing: border-box;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 2px 4px rgba(107, 114, 128, 0.2);
    overflow: hidden;
}

.subtitle-clip:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(107, 114, 128, 0.3);
    border-color: #6b7280;
}

.subtitle-clip.selected {
    border-color: #4b5563;
    box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.3);
}

.subtitle-clip-body {
    flex: 1;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.subtitle-text-preview {
    font-size: 11px;
    color: #374151;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.subtitle-clip-delete {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    border: none;
    background: rgba(239, 68, 68, 0.8);
    color: white;
    border-radius: 50%;
    font-size: 10px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    transition: all 0.2s ease;
}

.subtitle-clip:hover .subtitle-clip-delete {
    display: flex;
}

.subtitle-clip-delete:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* 字幕轨道空提示样式 */
.subtitle-content .empty-track-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #6b7280;
    font-size: 12px;
    opacity: 0.6;
    white-space: nowrap;
}

/* 音频轴道样式 */
.timeline-track.audio-track {
    margin-bottom: 2px;
}

/* 背景音乐轴道样式 */
.timeline-track.bgmusic-track {
    margin-bottom: 2px;
}

.track-header.audio-header {
    height: 35px; /* 统一高度为35px */
}

.track-header.bgmusic-header {
    height: 35px; /* 统一高度为35px */
}

.track-content.audio-content {
    height: 35px; /* 统一高度为35px */
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    min-width: 600px;
    padding: 0;  /* 移除内边距，因为音频容器现在填满整个轨道高度 */
}

.track-content.audio-content .audio-clip {
    position: absolute;
    top: 5px;
    height: 25px !important;  /* 上下各预留5px间距 */
    min-width: 0;  /* 允许脚本控制实际宽度以避免重叠 */
    border-radius: 6px;
    overflow: visible;
    padding: 3px 8px !important;  /* 调整内边距适应新高度 */
    box-sizing: border-box;
    cursor: grab;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 4px 8px rgba(255, 105, 180, 0.15);
}

.track-content.audio-content .audio-clip.dragging {
    opacity: 0.75;
    cursor: grabbing;
    z-index: 1000;
    transform: rotate(1.5deg) scale(1.04);
    box-shadow: 0 16px 32px rgba(255, 105, 180, 0.4);
}

.audio-clip-bg {
    position: absolute;
    inset: 0;
    border-radius: 6px;
    background: transparent;
    border: none;
    overflow: hidden;
}

.audio-clip:nth-of-type(odd) .audio-clip-bg {
    background: transparent;
    border: none;
}

/* 时间轨道音频预览样式 */
.timeline-audio-waveform {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    background: rgba(30, 58, 138, 0.7);
    border-radius: 6px;
    overflow: hidden;
    width: 100%;
    height: 100%;
}

.audio-clip-content {
    position: absolute;
    bottom: 2px;
    left: 4px;
    right: 4px;
    z-index: 10;
    text-align: center;
    background: transparent;
    padding: 2px 4px;
    border-radius: 3px;
    pointer-events: none;
    transition: transform 0.2s ease;
}

.audio-clip:hover .audio-clip-content {
    transform: scale(1.02);
}

.audio-clip-name {
    display: none;
}

.audio-clip-duration {
    font-size: 10px;
    color: #ffffff;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* 音频容器悬停效果 */
.audio-clip:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(255, 105, 180, 0.3);
}

.audio-clip:hover .audio-clip-bg {
    border-color: rgba(255, 105, 180, 0.8);
    box-shadow: 0 4px 16px rgba(255, 182, 193, 0.4);
}

.audio-clip:nth-of-type(odd):hover .audio-clip-bg {
    border-color: rgba(255, 20, 147, 0.8);
    box-shadow: 0 4px 16px rgba(255, 105, 180, 0.4);
}

/* 音频容器吸附效果 */
.audio-clip.snap-candidate {
    border-color: var(--snap-indicator-color);
    box-shadow: 0 0 0 2px rgba(255, 105, 180, 0.5);
}

.audio-clip.snapping {
    animation: audio-snap-effect 0.2s ease;
}

@keyframes audio-snap-effect {
    0% { transform: translateX(0); }
    50% { transform: translateX(-2px); }
    100% { transform: translateX(0); }
}

.track-content.audio-content .clip-delete {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: white;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    cursor: pointer;
    opacity: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.track-content.audio-content .audio-clip:hover .clip-delete {
    opacity: 1;
}

.track-content.audio-content .clip-delete:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

.track-content.audio-content .timeline-scroll-spacer {
    position: relative;
    display: block;
    height: 100%;
}

.track-content.bgmusic-content {
    height: 35px; /* 统一轨道高度为35px */
    background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%); /* 与音频轨道相同的浅灰色背景 */
    border: 1px solid #dee2e6;
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0; /* 移除内边距，因为容器现在填满整个轨道高度 */
    min-width: 600px;
    white-space: nowrap;
}

.track-content.audio-content::-webkit-scrollbar {
    height: 4px;
}

.track-content.audio-content::-webkit-scrollbar-thumb {
    background: #adb5bd;
    border-radius: 2px;
}

.track-content.audio-content.drag-over {
    background: linear-gradient(180deg, #e3f2fd 0%, #bbdefb 100%);
    border: 2px dashed #2196f3;
}

.track-content.bgmusic-content::-webkit-scrollbar {
    height: 4px;
}

.track-content.bgmusic-content::-webkit-scrollbar-thumb {
    background: #adb5bd;
    border-radius: 2px;
}

.track-content.bgmusic-content.drag-over {
    background: linear-gradient(180deg, #e3f2fd 0%, #bbdefb 100%);
    border: 2px dashed #2196f3;
}

.audio-mute-btn {
    font-size: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 6px;
}

.bgmusic-mute-btn {
    font-size: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); /* 与音频轨道相同的紫色系 */
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

/* 系统背景音乐样式 */
.system-bgmusic-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.system-bgmusic-section .section-title {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
}

.system-bgmusic-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.system-bgmusic-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: grab;
    transition: all 0.2s;
}

.system-bgmusic-item.user-bgmusic-item {
    margin-top: 8px;
}

.system-bgmusic-item:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    transform: translateY(-1px);
}

.system-bgmusic-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.bgmusic-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    margin-right: 12px;
    flex-shrink: 0;
}

.bgmusic-info {
    flex: 1;
    min-width: 0;
}

.bgmusic-meta {
    display: flex;
    gap: 8px;
    font-size: 11px;
    color: #6b7280;
}

.bgmusic-name {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 2px;
}

.bgmusic-duration {
    font-size: 11px;
    color: #6b7280;
}

/*============ 背景音乐预览项样式 ============*/
.bgmusic-preview {
    position: relative;
    width: 100%;
    border-radius: 8px;
    background: rgba(168, 85, 247, 0.1);
    cursor: grab;
    transition: all 0.2s ease;
    border: 1px solid rgba(168, 85, 247, 0.2);
    user-select: none;
}

.bgmusic-preview:active {
    cursor: grabbing;
}

.bgmusic-preview.dragging {
    opacity: 0.7;
    transform: rotate(2deg) scale(1.02);
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.bgmusic-preview:hover {
    transform: scale(1.02);
    background: rgba(168, 85, 247, 0.15);
    border-color: rgba(168, 85, 247, 0.3);
}

.bgmusic-simple-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    position: relative;
}

.bgmusic-simple-preview .bgmusic-icon {
    font-size: 20px;
    color: rgba(168, 85, 247, 0.8);
    flex-shrink: 0;
}

.bgmusic-simple-preview .bgmusic-filename {
    flex: 1;
    font-size: 14px;
    color: #374151;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bgmusic-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.bgmusic-play-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: rgba(168, 85, 247, 0.9);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.bgmusic-play-btn:hover {
    background: rgba(168, 85, 247, 1);
    transform: scale(1.1);
}

.bgmusic-play-btn.playing {
    background: rgba(239, 68, 68, 0.9);
}

.bgmusic-play-btn.playing:hover {
    background: rgba(239, 68, 68, 1);
}

.bgmusic-simple-preview .delete-btn {
    width: 20px;
    height: 20px;
    border: none;
    background: rgba(156, 163, 175, 0.7);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.bgmusic-simple-preview .delete-btn:hover {
    background: rgba(239, 68, 68, 0.9);
    transform: scale(1.1);
}

.bgmusic-preview-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(168, 85, 247, 0.9);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(168, 85, 247, 0.3);
}

.bgmusic-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.bgmusic-delete-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s ease;
}

.bgmusic-delete-btn:hover {
    background: rgba(220, 38, 38, 0.95);
    transform: scale(1.05);
}

.bgmusic-preview-btn:hover {
    background: rgba(168, 85, 247, 1);
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.4);
}

.bgmusic-preview-btn.playing {
    background: rgba(239, 68, 68, 0.9);
    animation: pulse 1.5s infinite;
}

.preview-play-btn.playing {
    background: #e74c3c;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}
}

.audio-mute-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.audio-mute-btn.muted {
    background: #6c757d;
    opacity: 0.6;
}

/* 空轨道提示 */
.empty-track-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #adb5bd;
    font-size: 12px;
    pointer-events: none;
    white-space: nowrap;
    z-index: 0;
}

/* 媒体文件列表 */
.media-files {
    margin-top: 12px;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px;
    background: #f9fafb;
}

.media-files::-webkit-scrollbar {
    width: 6px;
}

.media-files::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.media-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: white;
    border-radius: 6px;
    margin-bottom: 6px;
    cursor: grab;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.media-item:hover {
    border-color: #6366f1;
    transform: translateX(2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.media-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.media-item-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.media-item-info {
    flex: 1;
    min-width: 0;
}

.media-item-name {
    font-size: 12px;
    color: #1f2937;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.media-item-duration {
    font-size: 10px;
    color: #9ca3af;
}

.empty-media {
    text-align: center;
    padding: 20px;
    color: #9ca3af;
    font-size: 12px;
}

.timeline-clip .clip-volume:hover {
    background: rgba(37, 99, 235, 1);
    transform: scale(1.1);
}

.timeline-clip .clip-volume.muted {
    background: rgba(107, 114, 128, 0.9); /* 静音时灰色 */
}

/* 音频预览项样式 */
.audio-preview-item .video-thumbnail.audio-thumbnail {
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    color: white;
    border-radius: 12px;
}

.audio-icon-large {
    font-size: 32px;
    margin-bottom: 8px;
}

.audio-info {
    position: absolute;
    bottom: 8px;
    left: 8px;
    right: 8px;
    z-index: 10;
    text-align: center;
    background: rgba(0, 0, 0, 0.15);
    padding: 4px 8px;
    border-radius: 6px;
    backdrop-filter: blur(4px);
}

.audio-name {
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.audio-duration {
    font-size: 10px;
    color: #e5e7eb;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.timeline-clip .clip-volume.muted:hover {
    background: rgba(75, 85, 99, 1);
}

.timeline-scroll-spacer {
    display: inline-block;
    height: 100%;
    pointer-events: none;
    background: transparent;
}

/* 时间标尺 - 与视频轨道对齐 */
.timeline-ruler {
    height: 40px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 12px;
    margin-left: 48px; /* 32px按钮宽度 + 8px间距 + 8px额外间距 */
    margin-right: 16px;
    padding: 0 8px; /* 与轨道内容的padding对齐 */
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    /* 隐藏默认滚动条 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.timeline-ruler::-webkit-scrollbar {
    display: none; /* Chrome/Safari/WebKit */
}

.timeline-ruler-content {
    position: relative;
    height: 100%;
    display: inline-block;
    min-width: 100%;
}

.timeline-ruler-mark {
    position: absolute;
    top: 25px;
    width: 1px;
    height: 15px;
    background: #d1d5db;
}

.timeline-ruler-mark.major {
    background: #6b7280;
    width: 1px;
    height: 20px;
    top: 20px;
}

.timeline-ruler-mark.minor {
    background: #9ca3af;
    width: 1px;
    height: 15px;
    top: 25px;
}

.timeline-ruler-text {
    position: absolute;
    top: 5px;
    font-size: 11px;
    color: #374151;
    font-weight: 500;
    transform: translateX(-50%);
    user-select: none;
    background: white;
    padding: 0 4px;
}

.timeline-ruler-text.major {
    color: #1a1a1a;
    font-weight: 600;
}

.timeline-ruler-text.minor {
    color: #6b7280;
    font-weight: 400;
    font-size: 10px;
}

/* 播放进度指示器 */
.timeline-playback-indicator {
    position: absolute;
    top: 0;
    left: 8px; /* 与时间标尺的padding对齐 */
    width: 2px;
    height: 100%;
    background: #ef4444;
    z-index: 10;
    pointer-events: auto; /* 允许交互，用于拖拽 */
    display: block; /* 默认显示在0秒位置 */
    cursor: ew-resize; /* 水平调整光标 */
    /* 避免闪烁的优化 */
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* 扩大进度指示器的交互区域 */
.timeline-playback-indicator::before {
    content: '';
    position: absolute;
    top: 0;
    left: -8px; /* 向左扩展8px */
    width: 18px; /* 总宽度18px（左8px + 中间2px + 右8px） */
    height: 100%;
    background: transparent;
    cursor: ew-resize;
    z-index: 1;
}

/* 音量控制按钮 */
.volume-btn, .test-audio-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
}

.test-audio-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 6px;
    margin-left: 8px;
}

.test-audio-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.volume-icon {
    font-size: 16px;
}

.volume-mute-indicator {
    position: absolute;
    top: -2px;
    right: -2px;
    font-size: 10px;
    color: #ef4444;
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.8);
    z-index: 1;
}

.volume-btn.muted .volume-icon {
    opacity: 0.5;
}

.volume-btn.muted .volume-mute-indicator {
    display: inline-block !important;
}

/* 时间轴滚动控制器 */
.timeline-scroll-control {
    margin: 8px 16px 8px 48px; /* 左边距增加到48px与标尺对齐 */
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 8px 12px;
}

.timeline-scrollbar {
    width: 100%;
    height: 20px;
    background: linear-gradient(to bottom, transparent 35%, #e5e7eb 35%, #e5e7eb 65%, transparent 65%);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    pointer-events: auto !important;
    position: relative;
    z-index: 10;
}

.timeline-scrollbar::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    margin-top: 7px;
}

.timeline-scrollbar::-moz-range-track {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
}

.timeline-scrollbar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 40px;
    height: 20px;
    background: #3b82f6;
    border-radius: 10px;
    cursor: grab;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.timeline-scrollbar::-webkit-slider-thumb:hover {
    background: #2563eb;
    transform: scale(1.1);
}

.timeline-scrollbar::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(0.95);
}

.timeline-scrollbar::-moz-range-thumb {
    width: 40px;
    height: 20px;
    background: #3b82f6;
    border-radius: 10px;
    border: none;
    cursor: grab;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.timeline-scrollbar::-moz-range-thumb:hover {
    background: #2563eb;
    transform: scale(1.1);
}

/* 右侧设置面板 */
.synthesis-settings-panel {
    background: white;
    border-left: 1px solid #e5e7eb;
    padding: 24px;
    overflow-y: auto;
    height: 75vh;
    max-height: 75vh;
}

.synthesis-settings-panel .panel-header {
    margin-bottom: 24px;
}

.synthesis-settings-panel .panel-header h3 {
    font-size: 18px;
    color: #1a1a1a;
    font-weight: 600;
}

.settings-section {
    margin-bottom: 32px;
}

.settings-section h4 {
    font-size: 14px;
    color: #1a1a1a;
    font-weight: 600;
    margin-bottom: 16px;
}

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

.setting-group label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
}

.setting-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    background: white;
    cursor: pointer;
}

.setting-select:focus {
    outline: none;
    border-color: #1a1a1a;
}

.quality-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.quality-btn {
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: white;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.quality-btn:hover {
    border-color: #1a1a1a;
}

.quality-btn.active {
    background: #1a1a1a;
    color: white;
    border-color: #1a1a1a;
}

.export-info {
    background: #f9fafb;
    border-radius: 8px;
    padding: 16px;
    margin: 24px 0;
}

.export-info .info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

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

.info-label {
    font-size: 12px;
    color: #999;
}

.info-value {
    font-size: 13px;
    color: #1a1a1a;
    font-weight: 500;
}

.btn-export {
    width: 100%;
    padding: 12px;
    background: #1a1a1a;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 12px;
}

.btn-export:hover {
    background: #000;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-secondary {
    width: 100%;
    padding: 10px;
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: #1a1a1a;
    color: #1a1a1a;
}

/* 底部状态栏 */
.synthesis-status-bar {
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.status-indicator {
    padding: 4px 12px;
    background: #10b981;
    color: white;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-message {
    font-size: 13px;
    color: #666;
}

.status-right {
    display: flex;
    gap: 8px;
}

.btn-small {
    padding: 6px 16px;
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 6px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-small:hover {
    border-color: #1a1a1a;
    color: #1a1a1a;
}

/* 响应式布局 */
@media (max-width: 1200px) {
    .synthesis-main-grid {
grid-template-columns: 340px 1fr 320px;
    }
}

@media (max-width: 992px) {
    .synthesis-main-grid {
grid-template-columns: 1fr;
grid-template-rows: auto 1fr auto;
    }

    .synthesis-media-panel,
    .synthesis-settings-panel {
border: none;
border-bottom: 1px solid #e5e7eb;
    }
}

/* 4K 和超大屏幕优化 */
@media (min-width: 2560px) {
    .video-preview-container {
max-height: min(80vh, 1600px);
padding: 30px;
    }

    .preview-screen {
max-width: min(80vw, 1600px);
    }
}

/* 5K 及以上超大屏幕优化 */
@media (min-width: 3840px) {
    .video-preview-container {
max-height: min(75vh, 2000px);
padding: 40px;
    }

    .preview-screen {
max-width: min(70vw, 2000px);
    }
}





/* 强制移除所有容器间隙 */
.audio-clip,
.bgmusic-clip,
.timeline-clip {
    margin: 0 !important;
    padding: 0 !important;
}

/* 背景音乐容器样式 */
.bgmusic-clip {
    display: inline-block;
    height: 35px; /* 与轨道高度完全一致 */
    background: rgba(30, 58, 138, 0.7);
    border: none;
    border-radius: 4px;
    margin: 0 !important;
    cursor: move;
    position: relative;
    vertical-align: top;
    user-select: none;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 2px 6px rgba(30, 58, 138, 0.2);
}

/* 背景音乐容器悬停效果 */
.bgmusic-clip:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(30, 58, 138, 0.3);
}

/* 背景音乐容器拖拽效果 */
.bgmusic-clip.dragging {
    opacity: 0.75;
    transform: rotate(1.5deg) scale(1.04);
    z-index: 1000;
    box-shadow: 0 12px 24px rgba(30, 58, 138, 0.4);
}

/* 背景音乐容器吸附效果 */
.bgmusic-clip.snap-candidate {
    box-shadow: 0 0 0 2px rgba(30, 58, 138, 0.5);
}

.bgmusic-clip.snapping {
    animation: bgmusic-snap-effect 0.2s ease;
}

@keyframes bgmusic-snap-effect {
    0% { transform: translateX(0); }
    50% { transform: translateX(-2px); }
    100% { transform: translateX(0); }
}

/* 选中状态样式 */
.timeline-clip.selected,
.audio-clip.selected,
.bgmusic-clip.selected {
    box-shadow: 0 0 0 1px #007bff;
    border: 1px solid #007bff !important;
}

/* 切割模式光标样式 */
.cut-mode-cursor {
    cursor: text !important;
}

.cut-mode-cursor * {
    cursor: text !important;
}

/* 切割模式指示器 */
.cut-indicator {
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    font-size: 20px;
    color: #007bff;
    transform: translate(-10px, -10px);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.drop-hint {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 视频导出进度弹窗样式 */
.export-progress-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(20px) saturate(180%);
    animation: fadeIn 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.export-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    font-size: 16px;
    color: #86868b;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-weight: 500;
}

.export-close-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #1d1d1f;
    transform: scale(1.05);
}

.export-close-btn:active {
    transform: scale(0.95);
    background: rgba(0, 0, 0, 0.15);
}

.export-progress-modal.show {
    display: flex;
}

.export-progress-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 32px;
    width: 420px;
    max-width: 90vw;
    color: #1d1d1f;
    box-shadow:
0 0 0 1px rgba(0, 0, 0, 0.04),
0 2px 16px rgba(0, 0, 0, 0.12),
0 24px 48px rgba(0, 0, 0, 0.08);
    position: relative;
    animation: slideUp 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(40px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.export-header {
    text-align: center;
    margin-bottom: 25px;
}

.export-header h3 {
    margin: 0 0 8px 0;
    font-size: 22px;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -0.022em;
}

.export-status {
    color: #86868b;
    font-size: 15px;
    font-weight: 400;
}

.export-info {
    margin-bottom: 25px;
}

.export-details {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 14px;
    font-size: 15px;
}

.detail-item:last-child {
    margin-bottom: 0;
}

.detail-label {
    color: #86868b;
    font-weight: 400;
}

.detail-value {
    font-weight: 500;
    color: #1d1d1f;
}

.export-progress {
    margin-bottom: 30px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007AFF, #34C759);
    border-radius: 3px;
    width: 0%;
    transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 1px 3px rgba(0, 122, 255, 0.2);
}

.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #86868b;
    font-weight: 400;
}

.export-animation {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
}

.export-spinner {
    position: relative;
    width: 60px;
    height: 60px;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-top: 2px solid #007AFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-ring:nth-child(1) {
    animation-delay: 0s;
}

.spinner-ring:nth-child(2) {
    animation-delay: -0.33s;
    border-top-color: #34C759;
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
}

.spinner-ring:nth-child(3) {
    animation-delay: -0.66s;
    border-top-color: #FF9500;
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
}

.export-icon {
    position: absolute;
    font-size: 24px;
    color: #86868b;
    animation: pulse 2s ease-in-out infinite;
}

/* 成功状态样式 */
.export-success {
    text-align: center;
    animation: scaleIn 0.5s ease;
}

.export-success.show {
    display: block !important;
}

.success-icon {
    font-size: 48px;
    color: #34C759;
    margin-bottom: 15px;
    animation: bounce 0.6s ease;
}

.export-success h3 {
    color: #1d1d1f;
    margin: 0 0 20px 0;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.022em;
}

.success-info {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.success-detail {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 15px;
}

.success-detail:last-child {
    margin-bottom: 0;
}

.success-detail .detail-label {
    color: #86868b;
    font-weight: 400;
}

.success-detail .detail-value {
    color: #1d1d1f;
    font-weight: 500;
}


.btn-close-modal {
    background: rgba(0, 0, 0, 0.05);
    color: #1d1d1f;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    letter-spacing: -0.01em;
}

.btn-close-modal:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.15);
}

.btn-close-modal:active {
    background: rgba(0, 0, 0, 0.12);
}

/* 错误状态样式 */
.export-error {
    text-align: center;
    animation: scaleIn 0.5s ease;
}

.export-error.show {
    display: block !important;
}

.error-icon {
    font-size: 48px;
    color: #FF3B30;
    margin-bottom: 15px;
}

.export-error h3 {
    color: #1d1d1f;
    margin: 0 0 15px 0;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.022em;
}

.error-message {
    background: rgba(255, 59, 48, 0.08);
    border: 1px solid rgba(255, 59, 48, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    color: #1d1d1f;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 400;
}

/* 动画定义 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
opacity: 0;
transform: translateY(30px) scale(0.95);
    }
    to {
opacity: 1;
transform: translateY(0) scale(1);
    }
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}


/* 导出成功页面的下载按钮样式 */
.export-success .export-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    justify-content: center;
}

.export-success .btn-download {
    background: #000;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.export-success .btn-download:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-1px);
}

.export-success .btn-download:active {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(0);
}

.export-success .download-icon {
    font-size: 18px;
    font-weight: bold;
}

/* 高级设置折叠区域样式 */
.advanced-settings-section {
    margin-top: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.advanced-settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f9fafb;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}

.advanced-settings-header:hover {
    background: #f3f4f6;
}

.settings-toggle-text {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.settings-toggle-icon {
    font-size: 14px;
    color: #6b7280;
    transition: transform 0.3s ease;
    display: inline-block;
}

.advanced-settings-content {
    padding: 16px;
    background: white;
    border-top: 1px solid #e5e7eb;
}

/* 折叠动画 */
.advanced-settings-content {
    transition: all 0.3s ease;
}

.advanced-settings-content[style*="display: none"] {
    padding: 0;
    border-top: none;
}

/* 单独折叠设置项样式 */
.collapsible-setting {
    margin-bottom: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    background: white;
}

.collapsible-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #f9fafb;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}

.collapsible-header:hover {
    background: #f3f4f6;
}

.setting-title {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

.toggle-icon {
    font-size: 11px;
    color: #6b7280;
    transition: transform 0.3s ease;
    display: inline-block;
}

.collapsible-content {
    border-top: 1px solid #e5e7eb;
    background: white;
}

.setting-inner {
    padding: 10px 12px;
}

.sub-setting {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f3f4f6;
}

/* 折叠内容的过渡动画 */
.collapsible-content {
    transition: all 0.3s ease;
}

.collapsible-content[style*="display: none"] {
    padding: 0;
    border-top: none;
}

/* 确保折叠设置内的控件使用全宽 */
.collapsible-setting .color-picker-container,
.collapsible-setting .slider-container {
    width: 100%;
}

.collapsible-setting .color-picker-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.collapsible-setting .color-picker {
    flex: 1;
    max-width: 100px;
}

.collapsible-setting .slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.collapsible-setting .setting-slider {
    flex: 1;
}

.collapsible-setting .slider-value {
    min-width: 45px;
    text-align: right;
}

/* 为需要内边距的元素单独添加 */
.subtitle-notice {
    padding: 16px;
}

#subtitle-editor {
    padding: 0;
}

/* 调整第一个setting-group的上边距 */
#subtitle-editor > .setting-group:first-child {
    margin-top: 16px;
}

/* 调整音频属性音量调节的上边距 */
#audio-settings > .setting-group:first-child {
    margin-top: 16px;
}

/* 调整背景音乐属性音量调节的上边距 */
#bgmusic-settings > .setting-group:first-child {
    margin-top: 16px;
}

/* 加载所有媒体容器样式 */
.load-all-media-container {
    padding: 16px;
    margin-bottom: 16px;
}

.btn-load-all-media {
    background: #e53935;
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-load-all-media:hover {
    background: #c62828;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-load-all-media:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-load-all-media svg {
    flex-shrink: 0;
}

/* 视频和音频占位符样式 */
.video-placeholder, .audio-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    border-radius: 6px;
}

.video-icon, .audio-icon {
    font-size: 32px;
    margin-bottom: 8px;
    opacity: 0.7;
}

.video-name, .audio-name {
    font-size: 11px;
    font-weight: 500;
    color: #666;
    text-align: center;
    word-break: break-all;
    line-height: 1.2;
}

/* 视频缩略图样式 */
.video-thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    background: #f5f5f5;
}

/* ===============================
   登录功能样式
   =============================== */

/* 登录区域样式 */
.login-area {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
}

.login-btn {
    background: #000000;
    color: white;
    border: 2px solid #000000;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.login-btn:hover {
    background: #333333;
    border-color: #333333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #4a5568;
    font-size: 14px;
}

.user-name {
    font-weight: 500;
    color: #2d3748;
}

.logout-btn {
    background: #f7fafc;
    color: #718096;
    border: 1px solid #e2e8f0;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: #edf2f7;
    color: #4a5568;
    border-color: #cbd5e0;
}

.save-progress-btn {
    background: #1a1a1a;
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 12px;
}

.save-progress-btn:hover {
    background: #333;
}

.save-progress-btn.saving {
    opacity: 0.7;
    pointer-events: none;
}

.reset-btn {
    background: #fff5f5;
    color: #e53e3e;
    border: 1px solid #feb2b2;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 40px;
}

.reset-btn:hover {
    background: #fed7d7;
    color: #c53030;
    border-color: #fc8181;
}

/* 登录模态框样式 */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.login-modal-content {
    background: white;
    border-radius: 16px;
    width: 400px;
    max-width: 90vw;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    animation: loginModalSlideIn 0.3s ease-out;
}

@keyframes loginModalSlideIn {
    from {
opacity: 0;
transform: scale(0.9) translateY(-20px);
    }
    to {
opacity: 1;
transform: scale(1) translateY(0);
    }
}

.login-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 0;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 24px;
}

.login-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
}

.login-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #a0aec0;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.login-close:hover {
    background: #f7fafc;
    color: #4a5568;
}

.login-body {
    padding: 0 24px 24px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-field label {
    font-size: 14px;
    font-weight: 500;
    color: #4a5568;
}

.login-field input {
    padding: 12px 16px;
    border: 2px solid #000000;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #f7fafc;
}

.login-field input:focus {
    outline: none;
    border-color: #333333;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.login-error {
    background: #fed7d7;
    color: #c53030;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
    border: 1px solid #feb2b2;
}

.login-submit {
    background: #000000;
    color: white;
    border: 2px solid #000000;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.login-submit:hover {
    background: #333333;
    border-color: #333333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.login-submit:active {
    transform: translateY(0);
}

/* 状态提示样式 */
.status-success {
    color: #38a169 !important;
}

.status-warning {
    color: #d69e2e !important;
}

.status-info {
    color: #3182ce !important;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .header-inner {
flex-wrap: wrap;
gap: 10px;
    }
    
    .nav {
order: 3;
width: 100%;
flex-wrap: wrap;
gap: 8px;
    }
    
    .login-area {
order: 2;
margin-left: 0;
    }
    
    .login-modal-content {
width: 350px;
margin: 0 16px;
    }
    
    .nav-btn {
flex: 1;
min-width: calc(50% - 4px);
font-size: 13px;
padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .nav-btn {
min-width: 100%;
margin: 2px 0;
    }
    
    .login-modal-content {
width: 300px;
    }
    
    .login-field input {
padding: 10px 14px;
    }
}

/* ===============================
   个人中心样式
   =============================== */

/* 个人中心容器 */
.profile-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    background: #ffffff;
    min-height: 100vh;
    color: #333333;
}

/* 个人中心头部 */
.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding: 24px;
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
    border-radius: 16px;
    color: white;
    border: 1px solid #404040;
}

.profile-title h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.profile-title p {
    font-size: 16px;
    opacity: 0.9;
    margin: 0;
}

.profile-stats {
    display: flex;
    gap: 32px;
}

.stat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 16px 24px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

/* 个人中心选项卡 */
.profile-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: transparent;
    padding: 8px;
    border-radius: 12px;
    border: none;
}

.profile-tab {
    flex: 1;
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #666666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.profile-tab:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333333;
}

.profile-tab.active {
    background: #000000;
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    border: 1px solid #555555;
}

/* 选项卡内容 */
.profile-tab-content {
    display: none;
}

.profile-tab-content.active {
    display: block;
}

/* 视频网格 */
.videos-grid, .drafts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

/* 视频卡片 */
.video-card {
    background: transparent;
    border: 2px dashed #d1d5db;
    border-radius: 16px;
    padding: 16px;
    box-shadow: none;
    overflow: visible;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.video-card:hover {
    transform: translateY(-2px);
    border-color: #9ca3af;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    /* 强制设置16:9比例 */
    aspect-ratio: 16 / 9;
    /* 后备方案：对于不支持 aspect-ratio 的浏览器 */
    padding-bottom: 56.25%; /* 16:9 比例 (9/16 = 56.25%) */
}

/* 确保现代浏览器使用aspect-ratio */
@supports (aspect-ratio: 16 / 9) {
    .video-thumbnail {
padding-bottom: 0 !important;
aspect-ratio: 16 / 9 !important;
    }
}

.video-thumbnail video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    background: #f9fafb;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.7) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    /* 确保overlay与父容器保持相同比例 */
    aspect-ratio: inherit;
}

.video-card:hover .video-overlay {
    opacity: 1;
}

.play-btn {
    width: 64px;
    height: 64px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.play-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: white;
    transform: scale(1.1);
}

.play-btn svg {
    margin-left: 2px; /* 视觉上居中播放图标 */
}

/* 视频预览UI改进样式 */
.video-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    z-index: 2;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
    margin-bottom: 8px;
}

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

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.video-error {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fee2e2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #dc2626;
    font-size: 14px;
    z-index: 3;
}

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


/* 改进的按钮图标样式 */
.btn-download, .btn-delete {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-download svg, .btn-delete svg {
    flex-shrink: 0;
}


.video-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.video-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 12px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 12px;
    border-radius: 6px;
    backdrop-filter: blur(10px);
}

.video-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    font-size: 12px;
    color: #cccccc;
    background: rgba(0, 0, 0, 0.5);
    padding: 6px 12px;
    border-radius: 6px;
    backdrop-filter: blur(10px);
}

.video-actions {
    display: flex;
    gap: 8px;
    justify-content: space-between;
    margin-top: 12px;
    padding: 0 4px;
}

.btn-download, .btn-delete, .btn-load {
    flex: 1;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-download, .btn-load {
    background: #f8f9fa;
    color: #1a1a1a;
    border: 1px solid #e9ecef;
}

.btn-download:hover, .btn-load:hover {
    background: #ffffff;
    border-color: #dee2e6;
    transform: translateY(-1px);
}

.btn-delete {
    background: #dc3545;
    color: white;
    border: 1px solid #dc3545;
}

.btn-delete:hover {
    background: #c82333;
    border-color: #bd2130;
    transform: translateY(-1px);
}

/* 草稿卡片 */
.draft-card {
    background: transparent;
    border-radius: 16px;
    box-shadow: none;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px dashed rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.draft-card:hover {
    transform: translateY(-4px);
    box-shadow: none;
    border-color: rgba(0, 0, 0, 0.5);
}

.draft-thumbnail {
    display: none;
}

.draft-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.draft-progress {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.draft-progress .progress-bar {
    width: 100%;
    height: 8px;
    background: #555555;
    border-radius: 4px;
    overflow: hidden;
}

.draft-progress .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #000000, #333333);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 12px;
    color: #cccccc;
    text-align: center;
}

.draft-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.draft-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 8px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 12px;
    border-radius: 6px;
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.2s ease;
}

.draft-info h4:hover {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.draft-description {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 12px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.draft-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 12px;
    font-size: 11px;
    color: #e5e7eb;
    white-space: nowrap;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.draft-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 12px;
    color: #9ca3af;
    background: rgba(0, 0, 0, 0.5);
    padding: 6px 12px;
    border-radius: 6px;
    backdrop-filter: blur(10px);
}

.draft-date,
.draft-stage {
    display: flex;
    align-items: center;
    gap: 4px;
}

.draft-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.draft-actions .btn-load,
.draft-actions .btn-delete {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.draft-actions .btn-load {
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
    color: white;
}

.draft-actions .btn-load:hover {
    background: linear-gradient(135deg, #1a1a1a 0%, #404040 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.draft-actions .btn-delete {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.draft-actions .btn-delete:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.3);
    transform: translateY(-1px);
}

.draft-actions svg {
    width: 16px;
    height: 16px;
}

/* 草稿头部 */
.drafts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.drafts-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.btn-save-current {
    background: #000000;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-save-current:hover {
    background: #333333;
    transform: translateY(-1px);
}

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

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 500;
    color: #374151;
    margin: 0 0 8px 0;
}

.empty-state p {
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

/* 视频播放器模态框 */
.video-player-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.video-player-content {
    background: white;
    border-radius: 16px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
}

.video-player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.video-player-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.video-player-body {
    padding: 20px;
}

.video-player-body video {
    width: 100%;
    max-width: 800px;
    border-radius: 8px;
}

/* 视频播放器模态框 */
.video-player-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.video-player-content {
    background: #1a1a1a;
    border-radius: 16px;
    max-width: 90%;
    max-height: 90%;
    overflow: hidden;
    border: 1px solid #404040;
}

.video-player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #404040;
}

.video-player-header h3 {
    color: #ffffff;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.close-btn {
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #b91c1c;
}

.video-player-body {
    padding: 20px;
}

.video-player-body video {
    width: 100%;
    max-width: 800px;
    border-radius: 8px;
}

.video-player-body .video-info {
    margin-top: 16px;
    color: #cccccc;
    font-size: 14px;
}

.video-player-body .video-info p {
    margin: 8px 0;
}

.video-player-body .video-info a {
    color: #4f9eff;
    text-decoration: none;
}

.video-player-body .video-info a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .profile-header {
flex-direction: column;
gap: 20px;
text-align: center;
    }

    .profile-stats {
gap: 16px;
    }

    .stat-item {
padding: 12px 16px;
    }

    .videos-grid, .drafts-grid {
grid-template-columns: 1fr;
gap: 16px;
    }

    .profile-tabs {
flex-direction: column;
gap: 4px;
    }

    .profile-tab {
text-align: center;
    }

    .drafts-header {
flex-direction: column;
gap: 12px;
align-items: stretch;
    }

    .video-player-content {
margin: 20px;
    }
}

@media (max-width: 480px) {
    .profile-container {
padding: 16px;
    }

    .video-actions, .draft-actions {
flex-direction: column;
    }

    .btn-download, .btn-delete, .btn-load {
width: 100%;
    }
}

/* 一键成片按钮样式 */
.one-click-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
    letter-spacing: 0.5px;
}

.one-click-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.5);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.one-click-btn svg {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
transform: scale(1);
    }
    50% {
transform: scale(1.1);
    }
}

/* 一键成片配置弹窗 */
.one-click-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.one-click-modal-content {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.3s ease-out;
}

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

.one-click-header {
    padding: 24px 28px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px 20px 0 0;
    color: white;
}

.one-click-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

.one-click-close {
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.one-click-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.one-click-body {
    padding: 28px;
}

.config-section {
    margin-bottom: 28px;
}

.config-section h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 8px;
}

.config-section h4::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

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

.config-row label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #4b5563;
}

.one-click-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    background: white;
    transition: all 0.2s ease;
    cursor: pointer;
}

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

.slider-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.slider-group input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
    -webkit-appearance: none;
}

.slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.slider-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.slider-group span {
    min-width: 50px;
    text-align: right;
    font-size: 14px;
    font-weight: 600;
    color: #667eea;
}

.one-click-actions {
    margin-top: 32px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* 一键成片进度条 - 苹果风格 */
.one-click-progress-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
}

/* 半透明灰色背景遮罩 */
.one-click-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 10001;
    animation: fadeIn 0.3s ease-out;
    pointer-events: auto;
    cursor: not-allowed;
}

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

@keyframes slideDown {
    from {
transform: translateY(-100%);
opacity: 0;
    }
    to {
transform: translateY(0);
opacity: 1;
    }
}

.one-click-progress-content {
    position: relative;
    z-index: 10002;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    animation: slideDown 0.3s ease-out;
}

.one-click-progress-modal .progress-header {
    padding: 10px 24px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.one-click-progress-modal .progress-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    color: #86868b;
    letter-spacing: 0.5px;
}

.one-click-progress-modal .progress-close {
    display: none;
}

.one-click-progress-modal .progress-body {
    padding: 12px 24px 14px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.one-click-progress-modal .current-step {
    flex: 0 0 auto;
    min-width: 140px;
}

.one-click-progress-modal .step-label {
    display: none;
}

.one-click-progress-modal .step-text {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
}

.one-click-progress-modal .progress-bar-container {
    flex: 1;
    background: #e8e8ed;
    border-radius: 10px;
    height: 4px;
    overflow: hidden;
}

.one-click-progress-modal .progress-bar {
    height: 100%;
    background: #000000;
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 0%;
}

.one-click-progress-modal .progress-percentage {
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 500;
    color: #1d1d1f;
    min-width: 40px;
    text-align: right;
}

.one-click-progress-modal .progress-time {
    flex: 0 0 auto;
    font-size: 13px;
    color: #86868b;
    min-width: 80px;
}

.one-click-progress-modal .btn-stop {
    flex: 0 0 auto;
    padding: 6px 16px;
    background: #000000;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 10003;
    pointer-events: auto;
}

.one-click-progress-modal .btn-stop:hover {
    background: #333333;
    transform: scale(0.98);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .one-click-btn {
bottom: 20px;
right: 20px;
padding: 14px 20px;
font-size: 14px;
    }

    .one-click-modal-content,
    .one-click-progress-content {
width: 95%;
    }
}

/* 一键成片内联按钮样式 */
.action-buttons-left {
    display: flex;
    gap: 12px;
}

.btn-one-click {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #000000;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-one-click:hover {
    background: #333333;
    transform: translateY(-1px);
}

.btn-one-click svg {
    flex-shrink: 0;
}

/* 修改input-actions布局以支持左右两侧按钮 */
.input-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    gap: 16px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .input-actions {
flex-direction: column;
align-items: stretch;
    }
    
    .action-buttons-left,
    .action-buttons {
width: 100%;
justify-content: stretch;
    }
    
    .btn-one-click {
width: 100%;
justify-content: center;
    }
}

/* 覆盖悬浮按钮样式 - 不再使用 */
.one-click-btn {
    display: none !important;
}

/* 修改一键成片弹窗样式为黑白配色 */
.one-click-header {
    padding: 24px 28px !important;
    border-bottom: 1px solid #e5e7eb !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    background: #000000 !important;
    border-radius: 20px 20px 0 0 !important;
    color: white !important;
}

.one-click-actions {
    margin-top: 32px !important;
    display: flex !important;
    gap: 12px !important;
    justify-content: flex-end !important;
}

.one-click-actions .btn-secondary,
.one-click-actions .btn-primary {
    flex: 1 !important;
    max-width: none !important;
}

.config-section h4::before {
    background: #000000 !important;
}

.one-click-select:focus {
    border-color: #000000 !important;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1) !important;
}

.slider-group input[type="range"]::-webkit-slider-thumb {
    background: #000000 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
}

.slider-group input[type="range"]::-moz-range-thumb {
    background: #000000 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
}

.slider-group span {
    color: #000000 !important;
}


/* 一键成片结果弹窗 - 苹果风格 */
.one-click-result-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
}

.result-modal-content {
    position: relative;
    background: white;
    border-radius: 14px;
    max-width: 420px;
    width: 88%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
opacity: 0;
transform: scale(0.95) translateY(-10px);
    }
    to {
opacity: 1;
transform: scale(1) translateY(0);
    }
}

.result-modal-header {
    padding: 28px 24px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.result-modal-header.success {
    background: white;
    border-radius: 14px 14px 0 0;
}

.result-modal-header.error {
    background: white;
    border-radius: 14px 14px 0 0;
}

.result-icon {
    display: none;
}

.result-modal-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -0.4px;
}

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

.result-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

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

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

.info-label {
    font-size: 14px;
    color: #86868b;
    font-weight: 400;
}

.info-value {
    font-size: 14px;
    color: #1d1d1f;
    font-weight: 500;
}

.result-error {
    background: #f5f5f7;
    border-radius: 10px;
    padding: 14px;
}

.error-label {
    font-size: 13px;
    color: #1d1d1f;
    font-weight: 600;
    margin-bottom: 6px;
}

.error-message {
    font-size: 13px;
    color: #86868b;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.success-message {
    text-align: center;
    font-size: 14px;
    color: #86868b;
    margin: 0;
    line-height: 1.5;
}

.result-modal-footer {
    padding: 16px 24px 24px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-modal-action {
    flex: 1;
    padding: 11px 20px;
    background: #000000;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-modal-action:hover {
    background: #333333;
    transform: scale(0.98);
}

.btn-modal-secondary {
    padding: 11px 20px;
    background: #f5f5f7;
    color: #1d1d1f;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-modal-secondary:hover {
    background: #e8e8ed;
}

.btn-modal-primary {
    padding: 11px 20px;
    background: #000000;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-modal-primary:hover {
    background: #333333;
    transform: scale(0.98);
}
/* 个人中心加载弹窗样式 */
.profile-loading-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-loading-content {
    background: white;
    padding: 40px 60px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: profileLoadingFadeIn 0.3s ease;
}

@keyframes profileLoadingFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.profile-loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #000;
    border-radius: 50%;
    animation: profileLoadingSpin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes profileLoadingSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.profile-loading-text {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
}

.profile-loading-hint {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* 认证弹窗样式 - 白色为主，黑色为辅 */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: authFadeIn 0.3s ease;
}

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

.auth-modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: authSlideIn 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

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

.auth-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 32px;
    color: #666;
    cursor: pointer;
    z-index: 1;
    line-height: 1;
    transition: color 0.3s;
}

.auth-close:hover {
    color: #000;
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid #e9ecef;
}

.auth-tab {
    flex: 1;
    padding: 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
}

.auth-tab.active {
    color: #000;
    border-bottom-color: #000;
}

.auth-tab:hover {
    color: #000;
    background: #f8f9fa;
}

.auth-form {
    display: none;
    padding: 40px;
}

.auth-form.active {
    display: block;
}

.auth-form h2 {
    color: #000;
    margin-bottom: 25px;
    font-size: 28px;
    text-align: center;
    font-weight: 700;
}

.auth-input-group {
    margin-bottom: 20px;
}

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

.auth-input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
    background: white;
    color: #000;
}

.auth-input-group input:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.auth-input-hint {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.auth-invite-hint {
    background: #f8f9fa;
    border-left: 4px solid #000;
    padding: 12px 15px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #333;
    border-radius: 4px;
}

.auth-btn-primary {
    width: 100%;
    padding: 15px;
    background: #000;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.auth-btn-primary:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.auth-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.auth-message {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
}

.auth-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.auth-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.auth-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.auth-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #000;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: authSpin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes authSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.auth-loading p {
    font-size: 14px;
    color: #333;
}

/* ===== 转场效果样式 ===== */
.transition-effects-section {
    padding: 20px;
}

.transition-effects-section .section-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    padding: 0 4px;
}

.transition-effects-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    max-height: calc(100vh - 350px);
    overflow-y: auto;
    padding: 4px;
}

.transition-effect-item {
    background: #fff;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    padding: 12px;
    cursor: grab;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.transition-effect-item:hover {
    border-color: #007AFF;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.15);
    transform: translateY(-2px);
}

.transition-effect-item:active {
    cursor: grabbing;
}

.transition-preview {
    width: 100%;
    height: 80px;
    background: #f5f5f7;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.transition-demo {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
}

.demo-clip {
    position: absolute;
    width: 50%;
    height: 100%;
}

.demo-clip-left {
    left: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.demo-clip-right {
    right: 0;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* 叠化效果演示动画 */
.crossfade-demo .demo-clip-right {
    animation: crossfadeAnim 2s ease-in-out infinite;
}

@keyframes crossfadeAnim {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* 淡入淡出效果演示动画 */
.fade-demo .demo-clip-left {
    animation: fadeOutAnim 2s ease-in-out infinite;
}

.fade-demo .demo-clip-right {
    animation: fadeInAnim 2s ease-in-out infinite;
}

@keyframes fadeOutAnim {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes fadeInAnim {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* 擦除效果演示动画 */
.wipe-demo .demo-clip-right {
    animation: wipeAnim 2s ease-in-out infinite;
}

@keyframes wipeAnim {
    0%, 100% { clip-path: inset(0 100% 0 0); }
    50% { clip-path: inset(0 0 0 0); }
}

/* 推入效果演示动画 */
.slide-demo .demo-clip-right {
    animation: slideAnim 2s ease-in-out infinite;
}

@keyframes slideAnim {
    0%, 100% { transform: translateX(100%); }
    50% { transform: translateX(0); }
}

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

.transition-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-align: center;
}

.transition-description {
    font-size: 11px;
    color: #666;
    text-align: center;
}

/* 时间轴上的转场效果容器 */
.timeline-transition {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 70%;
    background: rgba(59, 130, 246, 0.15);
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 4px,
            rgba(59, 130, 246, 0.1) 4px,
            rgba(59, 130, 246, 0.1) 8px
        );
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 3px;
    cursor: move;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: rgba(37, 99, 235, 0.8);
    font-weight: 500;
    z-index: 100;
    min-width: 30px;
    max-width: 60px;
    padding: 2px 4px;
    transition: all 0.2s ease;
}

.timeline-transition::before {
    content: '';
    display: none;
}

.timeline-transition:hover {
    background: rgba(59, 130, 246, 0.25);
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 0 6px rgba(59, 130, 246, 0.3);
}

.timeline-transition.selected {
    border: 2px solid rgba(234, 179, 8, 0.9) !important;
    background: rgba(234, 179, 8, 0.2) !important;
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 4px,
        rgba(234, 179, 8, 0.15) 4px,
        rgba(234, 179, 8, 0.15) 8px
    ) !important;
    box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.3), 0 0 12px rgba(234, 179, 8, 0.5) !important;
    transform: translateY(-50%) scale(1.05) !important;
    z-index: 101 !important;
}

/* 转场放置区域高亮 */
.timeline-clip.transition-drop-target::after {
    content: '';
    position: absolute;
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 80%;
    background: rgba(0, 122, 255, 0.2);
    border: 2px dashed #007AFF;
    border-radius: 4px;
    pointer-events: none;
    z-index: 5;
}

/* 转场拖拽时的视觉反馈 */
.transition-effect-item.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

.timeline-track.transition-drag-over {
    background: rgba(0, 122, 255, 0.05);
}


/* ===== 配音卡片播放器样式 ===== */
.voice-player-section {
    padding: 16px 20px;
    background: linear-gradient(to right, #f8f9fa, #ffffff);
    border-top: 1px solid #e1e1e6;
}

.voice-player-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.voice-play-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #007aff, #0056b3);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
    flex-shrink: 0;
}

.voice-play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.4);
}

.voice-play-btn:active {
    transform: scale(0.95);
}

.voice-play-btn.playing {
    background: linear-gradient(135deg, #ff9500, #ff6b00);
    box-shadow: 0 2px 8px rgba(255, 149, 0, 0.3);
}

.voice-play-btn .play-icon {
    font-size: 14px;
    margin-left: 2px;
}

.voice-progress-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.voice-progress-bar {
    width: 100%;
    height: 6px;
    background: #e1e1e6;
    border-radius: 3px;
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.voice-progress-bar:hover {
    height: 8px;
}

.voice-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007aff, #5ac8fa);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
}

.voice-time-display {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #86868b;
    font-family: -apple-system, BlinkMacSystemFont, "SF Mono", monospace;
}

.voice-time-separator {
    color: #c7c7cc;
}

.voice-current-time {
    color: #1d1d1f;
    font-weight: 500;
}

.voice-download-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #e1e1e6;
    background: #ffffff;
    color: #007aff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 14px;
    flex-shrink: 0;
}

.voice-download-btn:hover {
    background: #f5f5f7;
    border-color: #007aff;
}

.voice-download-btn:active {
    transform: scale(0.95);
}


/* 播放器禁用状态 */
.voice-play-btn:disabled {
    background: #c7c7cc;
    cursor: not-allowed;
    box-shadow: none;
}

.voice-play-btn:disabled:hover {
    transform: none;
}

.voice-download-btn:disabled {
    color: #c7c7cc;
    border-color: #e1e1e6;
    cursor: not-allowed;
}

.voice-download-btn:disabled:hover {
    background: #ffffff;
    border-color: #e1e1e6;
}

/* 状态文字 */
.voice-status-text {
    font-size: 12px;
    color: #86868b;
    text-align: center;
    margin-top: 8px;
    padding: 4px 12px;
    background: #f5f5f7;
    border-radius: 4px;
    display: inline-block;
}

.voice-player-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
