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

:root {
    --primary: #9b87f5;
    --primary-hover: #8b77e5;
    --primary-light: rgba(155, 135, 245, 0.1);
    --bg-dark: #ffffff;
    --bg-medium: #f8f9fa;
    --bg-light: #f0f0f5;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --border: #e0e0e0;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif;
    background: var(--bg-medium);
    color: var(--text-primary);
    overflow: hidden;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* 工具栏 */
.toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    min-height: 56px;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 1 auto;
    min-width: 0;
}

.logo i {
    color: var(--primary);
    width: 24px;
    height: 24px;
}

.logo h1 {
    font-size: 18px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

/* 按钮基础样式 */
.btn-icon {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-dark);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    box-shadow: none;
}

.btn-icon:hover:not(:disabled) {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
    transform: none;
    box-shadow: none;
}

.btn-icon:active:not(:disabled) {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: none;
    box-shadow: none;
}

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

.btn-icon i {
    width: 18px;
    height: 18px;
}

/* 主内容区 */
.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* 侧边栏 */
.left-panel {
    width: 300px;
    background: var(--bg-dark);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    padding: 20px;
}

/* 左侧面板滚动条样式 */
.left-panel::-webkit-scrollbar {
    width: 6px;
}

.left-panel::-webkit-scrollbar-track {
    background: transparent;
}

.left-panel::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
    transition: background 0.2s;
}

.left-panel::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Firefox 滚动条样式 */
.left-panel {
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.panel-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
    animation: fadeIn 0.3s ease-in-out;
}

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

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

.panel-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.panel-section h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
    text-transform: none;
    letter-spacing: 0;
}

.panel-section h3 i {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

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

.form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group select,
.form-group input[type="range"] {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-medium);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s;
}

.form-group select:hover,
.form-group select:focus {
    border-color: var(--primary);
    outline: none;
}

.form-group select:focus {
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-group input[type="range"] {
    padding: 0;
    cursor: pointer;
    accent-color: #9b87f5;
}

.form-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #9b87f5;
    border-radius: 50%;
    border: 2px solid white;
    cursor: pointer;
    margin-top: -6px;
}

.form-group input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #9b87f5;
    border-radius: 50%;
    border: 2px solid white;
    cursor: pointer;
}

.form-group input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
}

.form-group input[type="range"]::-moz-range-track {
    width: 100%;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
}

#speed-value {
    display: inline-block;
    margin-left: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.btn-primary {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(155, 135, 245, 0.2);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(155, 135, 245, 0.3);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(155, 135, 245, 0.2);
}

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

.btn-primary i {
    width: 18px;
    height: 18px;
}

.project-info {
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--bg-medium);
    padding: 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.project-info p {
    margin-bottom: 8px;
    line-height: 1.6;
}

.project-info p:last-child {
    margin-bottom: 0;
}

.project-info strong {
    color: var(--text-primary);
    font-weight: 500;
}

/* 提示文本样式 */
.hint-text {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
    line-height: 1.5;
    font-style: italic;
}

/* 中间面板 */
.center-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 视频预览 */
.video-preview {
    height: 50%;
    display: flex;
    flex-direction: column;
    background: var(--bg-medium);
    min-height: 300px;
}

.video-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    position: relative;
    min-height: 200px;
}

.empty-video {
    text-align: center;
    color: var(--text-secondary);
}

.empty-video i {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-video p {
    font-size: 14px;
}

#video-player {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

/* SubtitlesOctopus Canvas 样式 */
/* 由于没有使用 video.js 包装器，需要修正 Canvas 定位 */
/* SubtitlesOctopus 会创建 .libassjs-canvas-parent 作为视频的兄弟元素 */
/* 需要将 Canvas 绝对定位到视频容器中央 */
/* z-index: 105 确保字幕显示在框选修复叠加层(100)之上，但在输入面板(110)之下 */
.video-container .libassjs-canvas-parent {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    pointer-events: none;
    z-index: 105;
}

.video-container .libassjs-canvas {
    /* 重置 SubtitlesOctopus 设置的位置，让 parent 来控制 */
    position: static !important;
    top: auto !important;
    left: auto !important;
    pointer-events: none;
}

/* 字幕叠加层 - 基础样式 */
.subtitle-overlay {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    max-width: 85%;
    min-width: 200px;
    text-align: center;
    z-index: 10;
    display: none;
    flex-direction: column;
    align-items: center;
    transition: opacity 0.2s;
    /* 确保长文本自动换行 */
    word-break: break-word;
    overflow-wrap: break-word;
}

/* 原始字幕样式 - 在视频正下方 */
.subtitle-overlay.subtitle-original {
    bottom: 30px;
}

.subtitle-overlay.subtitle-original .subtitle-content {
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8), -1px -1px 2px rgba(0, 0, 0, 0.8);
}

/* 翻译字幕样式 - 在原始字幕上方（增大间距避免重叠） */
.subtitle-overlay.subtitle-translated {
    bottom: 65px;
}

.subtitle-overlay.subtitle-translated .subtitle-content {
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8), -1px -1px 2px rgba(0, 0, 0, 0.8);
}

/* 修复字幕样式 - 与修复视频叠加层完全重合 */
/* 重置 .subtitle-overlay 的基础样式，使用 JavaScript 动态定位 */
.subtitle-overlay.subtitle-repair {
    /* 重置基础样式 */
    left: auto !important;
    transform: none !important;
    min-width: 0 !important;
    max-width: none !important;
    bottom: auto !important;
    /* 修复字幕专用样式 */
    z-index: 200 !important;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.subtitle-overlay.subtitle-repair .subtitle-content {
    /* 默认样式，会被 ASS 解析的样式覆盖 */
    color: #ffffff;
    font-size: 40px;
    font-weight: normal;
    font-family: "SimHei", "Microsoft YaHei", sans-serif;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.8),
                -2px 2px 0 rgba(0, 0, 0, 0.8),
                2px -2px 0 rgba(0, 0, 0, 0.8),
                -2px -2px 0 rgba(0, 0, 0, 0.8);
    background: transparent;
    padding: 0;
    border-radius: 0;
}

/* 字幕默认样式：无背景无边框 */
.subtitle-content:not(.has-background) {
    background: transparent !important;
    background-color: transparent !important;
}

.subtitle-content:not(.has-border) {
    border: none !important;
    border-width: 0 !important;
    border-style: none !important;
}

/* 字幕内容 */
.subtitle-content {
    padding: 8px 16px;
    border-radius: 4px;
    line-height: 1.4;
    max-width: 100%;
    word-wrap: break-word;
    white-space: pre-line;  /* 保留换行符，自动换行 */
}

/* 复选框样式 */
.style-control input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.checkbox-label {
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
}

.color-row input[type="checkbox"]+.checkbox-label {
    margin-left: 8px;
}

/* 样式设置面板 */
.style-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.style-panel {
    background: var(--bg-dark);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.style-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.style-panel-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.btn-close {
    width: 32px;
    height: 32px;
    background: var(--bg-medium);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.btn-close:hover {
    background: var(--error);
    border-color: var(--error);
    color: white;
}

.style-panel-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

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

.style-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.style-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.style-control-vertical {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.color-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.opacity-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 8px;
}

.opacity-row input[type="range"] {
    flex: 1;
    height: 6px;
    background: var(--bg-light);
    border-radius: 3px;
    outline: none;
    accent-color: #9b87f5;
    cursor: pointer;
}

.opacity-label {
    font-size: 12px;
    color: var(--text-secondary);
    min-width: 50px;
}

.opacity-value {
    min-width: 45px;
    font-size: 13px;
    color: var(--text-secondary);
    text-align: right;
}

.color-input {
    flex: 1;
    padding: 8px 12px;
    background: var(--bg-medium);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 13px;
    font-family: 'Courier New', monospace;
    transition: all 0.2s;
}

.color-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.style-control input[type="range"] {
    flex: 1;
    height: 6px;
    background: var(--bg-light);
    border-radius: 3px;
    outline: none;
    accent-color: #9b87f5;
}

.style-control input[type="color"] {
    width: 60px;
    height: 40px;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    background: var(--bg-medium);
    padding: 4px;
    transition: all 0.2s;
}

.style-control input[type="color"]:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

.style-control input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.style-control input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

.style-control span {
    min-width: 60px;
    font-size: 13px;
    color: var(--text-secondary);
    text-align: right;
}

.style-preview {
    margin: 24px 0;
    padding: 20px;
    background: var(--bg-medium);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.preview-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.preview-content {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    line-height: 1.5;
}

.style-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    justify-content: flex-end;
    /* 右对齐 */
}

.btn-secondary {
    flex: none;
    /* 不拉伸，根据内容自动调整 */
    padding: 8px 16px;
    background: var(--bg-medium);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    /* 文字不换行 */
}

.btn-secondary:hover {
    background: var(--bg-light);
    border-color: var(--primary);
}

.style-actions .btn-primary {
    flex: none;
    /* 不拉伸，根据内容自动调整 */
    width: auto !important;
    /* 覆盖默认的100%宽度 */
    padding: 8px 16px;
    white-space: nowrap;
    /* 文字不换行 */
}

/* 拖动手柄 - 简化版，只显示样式按钮 */
.subtitle-drag-handle {
    position: absolute;
    top: -24px;
    right: 0;
    min-width: 24px;
    height: 24px;
    background: transparent;
    color: white;
    border-radius: 4px;
    cursor: move;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 0;
    /* 隐藏 ⋮⋮ 文字 */
    opacity: 0;
    transition: opacity 0.2s;
    user-select: none;
    padding: 0;
}

.subtitle-drag-handle:active {
    cursor: grabbing;
}

.subtitle-overlay:hover .subtitle-drag-handle {
    opacity: 1;
}

/* 样式设置按钮 */
.subtitle-style-btn {
    width: 16px;
    height: 16px;
    padding: 0;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.subtitle-style-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.subtitle-style-btn i {
    width: 12px;
    height: 12px;
    color: white;
}

/* 原始字幕的拖动手柄 */
.subtitle-original .subtitle-drag-handle {
    background: transparent;
}

/* 翻译字幕的拖动手柄 */
.subtitle-translated .subtitle-drag-handle {
    background: transparent;
}

/* 拖动时的样式 */
.subtitle-overlay.dragging {
    opacity: 0.8;
}

.subtitle-overlay.dragging .subtitle-drag-handle {
    opacity: 1;
    cursor: grabbing;
}

.video-container:hover {
    cursor: default;
}

/* ======================== 框选修复叠加层样式 ======================== */
.repair-selection-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    background: rgba(0, 0, 0, 0.3);
    cursor: crosshair;
}

.repair-selection-box {
    position: absolute;
    border: 2px dashed #9b87f5;
    background: rgba(155, 135, 245, 0.15);
    cursor: move;
    min-width: 50px;
    min-height: 30px;
}

/* 拖拽手柄基础样式 */
.resize-handle {
    position: absolute;
    background: #9b87f5;
    z-index: 10;
}

/* 四角手柄 */
.resize-handle.resize-nw,
.resize-handle.resize-ne,
.resize-handle.resize-sw,
.resize-handle.resize-se {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.resize-handle.resize-nw { top: -5px; left: -5px; cursor: nw-resize; }
.resize-handle.resize-ne { top: -5px; right: -5px; cursor: ne-resize; }
.resize-handle.resize-sw { bottom: -5px; left: -5px; cursor: sw-resize; }
.resize-handle.resize-se { bottom: -5px; right: -5px; cursor: se-resize; }

/* 四边手柄 */
.resize-handle.resize-n,
.resize-handle.resize-s {
    height: 4px;
    left: 20%;
    width: 60%;
}
.resize-handle.resize-n { top: -2px; cursor: n-resize; }
.resize-handle.resize-s { bottom: -2px; cursor: s-resize; }

.resize-handle.resize-w,
.resize-handle.resize-e {
    width: 4px;
    top: 20%;
    height: 60%;
}
.resize-handle.resize-w { left: -2px; cursor: w-resize; }
.resize-handle.resize-e { right: -2px; cursor: e-resize; }

/* 文字输入面板 - 横向布局，固定在选择框下方 */
.repair-input-panel {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 8px;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 110;
}

.repair-input-panel input[type="text"] {
    flex: 1;
    min-width: 120px;
    background: var(--bg-medium);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    padding: 6px 10px;
    font-size: 13px;
}

.repair-input-panel input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
}

.repair-input-panel input[type="text"]::placeholder {
    color: var(--text-muted);
}

/* 修复按钮 - 只显示图标 */
.repair-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.repair-btn-cancel {
    background: var(--bg-medium);
    color: var(--text-muted);
}

.repair-btn-cancel:hover {
    background: #dc3545;
    color: white;
}

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

.repair-btn-confirm:hover {
    background: var(--primary-hover);
}

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

/* 框选模式下视频容器样式 */
.video-container.repair-mode {
    cursor: crosshair;
}

.video-container.repair-mode .subtitle-overlay {
    pointer-events: none;
    opacity: 0.5;
}

.playback-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: var(--bg-dark);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    z-index: 10;
}

/* 播放控制按钮 */
.btn-control {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-medium);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: none;
}

.btn-control:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    transform: none;
    box-shadow: none;
}

.btn-control:hover i {
    color: var(--primary);
}

.btn-control:active {
    background: var(--primary);
    border-color: var(--primary);
    transform: none;
    box-shadow: none;
}

.btn-control:active i {
    color: white;
}

.btn-control i {
    width: 20px;
    height: 20px;
    color: var(--text-primary);
    transition: color 0.2s;
}

.time-display {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* Element Plus Slider 容器 */
.timeline-slider-container {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 8px;
}

#timeline-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--bg-medium);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    accent-color: #9b87f5;
}

#timeline-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid white;
    cursor: pointer;
    transition: transform 0.2s;
    margin-top: -3px;
}

#timeline-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

#timeline-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid white;
    cursor: pointer;
    transition: transform 0.2s;
    margin-top: -3px;
}

#timeline-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
}

#timeline-slider::-webkit-slider-runnable-track {
    height: 6px;
    background: linear-gradient(to right, var(--primary) 0%, var(--primary) var(--progress, 0%), var(--bg-medium) var(--progress, 0%), var(--bg-medium) 100%);
    border-radius: 3px;
}

#timeline-slider::-moz-range-track {
    height: 6px;
    background: var(--bg-medium);
    border-radius: 3px;
}

#timeline-slider::-moz-range-progress {
    height: 6px;
    background: var(--primary);
    border-radius: 3px;
}

/* 时间轨道编辑器 */
.timeline-editor {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-dark);
    border-top: 1px solid var(--border);
    overflow: hidden;
    min-height: 300px;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-dark);
    flex-shrink: 0;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
}

.timeline-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
}

.timeline-header h3 i {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

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

/* 小按钮（时间轴工具） */
.btn-small {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-medium);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: none;
}

.btn-small:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    transform: none;
    box-shadow: none;
}

.btn-small:hover i {
    color: var(--primary);
}

.btn-small:active {
    background: var(--primary);
    border-color: var(--primary);
    transform: none;
    box-shadow: none;
}

.btn-small:active i {
    color: white;
}

.btn-small i {
    width: 16px;
    height: 16px;
    color: var(--text-primary);
    transition: color 0.2s;
}

.timeline-tracks {
    flex: 1;
    display: flex;
    position: relative;
    background: var(--bg-medium);
    min-height: 200px;
    overflow: hidden;
}

/* 左侧固定标签栏 */
.timeline-labels {
    width: 150px;
    flex-shrink: 0;
    background: var(--bg-medium);
    border-right: 1px solid var(--border);
    overflow-y: scroll;
    overflow-x: hidden;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

/* 隐藏左侧标签栏滚动条 */
.timeline-labels::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

/* 右侧可滚动内容区 */
.timeline-content-wrapper {
    flex: 1;
    overflow-x: auto;
    overflow-y: auto;
    position: relative;
}

/* 时间轨道滚动条样式 - 与左侧面板一致 */
.timeline-content-wrapper::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.timeline-content-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.timeline-content-wrapper::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
    transition: background 0.2s;
}

.timeline-content-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.timeline-content-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Firefox 滚动条样式 */
.timeline-content-wrapper {
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.track-ruler-label {
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-medium);
    border-bottom: 1px solid var(--border);
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

.track-ruler {
    height: 30px;
    position: relative;
    overflow: visible;
    min-width: 2000px;
    background: var(--bg-medium);
    border-bottom: 1px solid var(--border);
}

.time-tick {
    position: absolute;
    top: 0;
    height: 100%;
    border-left: 1px solid var(--border);
    padding-left: 4px;
    min-width: 45px;
}

.time-label {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 30px;
    white-space: nowrap;
    user-select: none;
    display: inline-block;
}

.playhead {
    position: absolute;
    top: 0;
    width: 2px;
    height: 100%;
    background: var(--primary);
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 0 4px rgba(155, 135, 245, 0.5);
}

.playhead::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -6px;
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.track-label {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px;
    background: var(--bg-medium);
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-secondary);
}

.track-label>span {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    pointer-events: none;
    /* 防止文本和图标拦截点击 */
}

.track-label>span>* {
    pointer-events: none;
    /* 确保所有子元素都不拦截点击 */
}

.track-label.video-track-label {
    height: 90px;
}

.track-label i:not(.track-toggle-btn i) {
    width: 16px;
    height: 16px;
}

/* 轨道切换按钮 */
.track-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.track-toggle-btn .icon-svg {
    width: 16px;
    height: 16px;
    display: block;
    margin: 0 auto;
}

.track-toggle-btn i {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
    transition: color 0.2s;
    pointer-events: none;
    /* 防止图标拦截点击事件 */
}

.track-toggle-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
}

.track-toggle-btn:hover i {
    color: var(--primary);
}

.track-toggle-btn.active {
    background: var(--primary);
    border-color: var(--primary);
}

.track-toggle-btn.active i {
    color: white;
}

.track-toggle-btn.inactive {
    background: var(--bg-light);
    border-color: var(--border);
    opacity: 0.5;
}

.track-toggle-btn.inactive i {
    color: var(--text-secondary);
}

.track-content {
    position: relative;
    background: var(--bg-light);
    min-width: 2000px;
    height: 60px;
    border-bottom: 1px solid var(--border);
    padding-right: 20px;
}

.track-content.video-track-content {
    height: 90px;
}

.subtitle-clip,
.audio-clip {
    position: absolute;
    height: 40px;
    top: 10px;
    background: var(--primary);
    border-radius: 4px;
    padding: 8px;
    font-size: 12px;
    color: white;
    cursor: move;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border: 2px solid transparent;
    transition: all 0.2s;
    user-select: none;
    z-index: 1;
}

.subtitle-clip:hover,
.audio-clip:hover {
    border-color: white;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* 拖动手柄样式 */
.resize-handle {
    position: absolute;
    top: 0;
    width: 8px;
    height: 100%;
    cursor: ew-resize;
    background: rgba(255, 255, 255, 0.3);
    opacity: 0;
    transition: opacity 0.2s, background 0.2s;
    z-index: 20;
}

.resize-handle:hover {
    background: rgba(255, 255, 255, 0.6);
}

.resize-handle-left {
    left: 0;
    border-radius: 4px 0 0 4px;
}

.resize-handle-right {
    right: 0;
    border-radius: 0 4px 4px 0;
}

.audio-clip {
    background: var(--success);
}

.video-clip {
    position: absolute;
    height: 80px;
    top: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
    user-select: none;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.video-clip-thumbnails {
    display: flex;
    height: 100%;
    width: 100%;
    position: relative;
    flex-wrap: nowrap;
    overflow: hidden;
}

.video-clip-thumbnail {
    flex: 0 0 auto;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.video-clip-thumbnail:last-child {
    border-right: none;
}

.video-clip-label {
    position: absolute;
    bottom: 4px;
    left: 8px;
    font-size: 11px;
    color: white;
    background: rgba(0, 0, 0, 0.6);
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 500;
}

/* 修复视频片段样式 */
.repair-clip.video-clip {
    background: linear-gradient(135deg, #9b87f5 0%, #7c3aed 100%);
    border: 2px solid rgba(155, 135, 245, 0.5);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.repair-clip.video-clip:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(155, 135, 245, 0.4);
    z-index: 10;
}

.repair-clip .video-clip-thumbnails img {
    height: 100%;
    width: auto;
    object-fit: cover;
    flex-shrink: 0;
}

/* 修复视频轨道容器 */
#repair-video-track {
    min-height: 50px;
}

#repair-video-track .repair-clip {
    height: 50px;
}

/* 右侧面板标签 */
.panel-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

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

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-btn i {
    width: 16px;
    height: 16px;
}

.tab-content {
    display: none;
}

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

/* 字幕列表 */
.subtitle-list {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.subtitle-item {
    padding: 12px;
    background: var(--bg-medium);
    border-radius: 6px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border);
    position: relative;
    z-index: 1;
}

.subtitle-item:hover {
    background: var(--bg-light);
    border-color: var(--primary);
    z-index: 10;
}

.subtitle-item.active {
    border: 2px solid var(--primary);
    z-index: 5;
}

.subtitle-time {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.subtitle-text {
    font-size: 13px;
    margin-bottom: 4px;
}

.subtitle-translation {
    font-size: 13px;
    color: var(--primary);
}

.subtitle-text textarea,
.subtitle-translation textarea {
    width: 100%;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 6px;
    color: var(--text-primary);
    font-size: 13px;
    resize: vertical;
    min-height: 40px;
}

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

.empty-state i {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 13px;
}

/* 进度提示 */
.progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.progress-modal {
    background: var(--bg-dark);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    min-width: 400px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.progress-icon {
    margin-bottom: 20px;
}

.progress-icon i {
    width: 48px;
    height: 48px;
    color: var(--primary);
}

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

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

.progress-modal h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.progress-modal p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

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

.progress-bar-track {
    flex: 1;
    height: 8px;
    background: var(--bg-light);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-hover) 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.3) 50%,
            transparent 100%);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

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

.progress-percent {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    min-width: 45px;
    text-align: right;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-light);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.3s;
}

.progress-percent {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 全局滚动条样式 - 与左侧面板一致 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
    transition: background 0.2s;
}

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

/* Firefox 滚动条样式 */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

/* 音量控制滑块 */
.volume-slider {
    position: absolute;
    bottom: 50px;
    right: 10px;
    width: 40px;
    height: 120px;
    background: rgba(155, 135, 245, 0.85);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 配音音量滑块 */
.dubbed-volume-slider {
    right: 60px !important;
    background: rgba(155, 135, 245, 0.85) !important;
}

.volume-slider input[type="range"] {
    writing-mode: bt-lr;
    -webkit-appearance: slider-vertical;
    width: 8px;
    height: 100px;
    cursor: pointer;
    background: transparent;
    accent-color: rgba(255, 255, 255, 0.6);
}

.volume-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    transition: transform 0.2s;
    transform: translateX(4px);
}

.volume-slider input[type="range"]::-webkit-slider-thumb:hover {
    transform: translateX(4px) scale(1.2);
}

.volume-slider input[type="range"]::-webkit-slider-runnable-track {
    width: 8px;
    height: 100px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.volume-slider input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
    transform: translateX(4px);
}

.volume-slider input[type="range"]::-moz-range-thumb:hover {
    transform: translateX(4px) scale(1.2);
}

.volume-slider input[type="range"]::-moz-range-track {
    width: 8px;
    height: 100px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

/* 导航按钮样式 */
.toolbar-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-dark);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.toolbar-label {
    line-height: 1;
}

.nav-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

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

.nav-btn .icon-svg {
    width: 18px;
    height: 18px;
}

/* 视频自动翻译页面样式 */
.video-erase-page {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: var(--bg-medium);
}

/* 居中控制面板容器 */
.erase-center-panel {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 24px;
}

/* 控制面板卡片 */
.erase-panel-card {
    background: var(--bg-dark);
    border-radius: 16px;
    padding: 24px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    max-height: calc(100vh - 120px);
    overflow: auto;
}

/* 页面标题 */
.erase-page-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

/* 上传区域 */
.erase-upload-section {
    margin-bottom: 16px;
}

.btn-upload-large {
    width: 100%;
    padding: 18px 16px;
    background: var(--bg-medium);
    border: 2px dashed var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
}

.btn-upload-large:hover {
    border-color: var(--primary);
    background: rgba(155, 135, 245, 0.05);
    color: var(--primary);
}

.btn-upload-large span {
    font-size: 16px;
    font-weight: 500;
}

.btn-upload-large .upload-hint {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 400;
}

/* 语言选择区域 */
.erase-lang-section {
    margin-bottom: 14px;
}

/* 小屏进一步压缩，避免纵向溢出 */
@media (max-height: 820px) {
    .erase-center-panel {
        padding: 16px;
    }
    .erase-panel-card {
        padding: 18px;
        max-height: calc(100vh - 96px);
    }
    .btn-upload-large {
        padding: 14px 14px;
        gap: 10px;
    }
    .erase-page-title {
        font-size: 20px;
    }
}

.erase-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.erase-select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-medium);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 15px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.erase-select:hover,
.erase-select:focus {
    border-color: var(--primary);
    outline: none;
}

/* 开始处理按钮 */
.btn-start-large {
    width: 100%;
    padding: 16px 24px;
    background: var(--primary);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-start-large:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-start-large:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 翻译完成结果区域 */
.erase-result-actions {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.result-success-icon {
    margin-bottom: 16px;
}

.result-title {
    font-size: 20px;
    font-weight: 600;
    color: #10b981;
    margin-bottom: 20px;
}

.result-buttons {
    display: flex;
    gap: 12px;
}

.btn-result {
    flex: 1;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

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

.btn-result.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-result.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-result.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* 旧版左侧面板样式（保留兼容） */
.erase-left-panel {
    width: 280px;
    background: var(--bg-dark);
    border-right: 1px solid var(--border);
    padding: 20px;
    overflow-y: auto;
    flex-shrink: 0;
}

.erase-left-panel .panel-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.erase-left-panel .panel-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.erase-video-info {
    margin-top: 16px;
    padding: 12px;
    background: var(--bg-medium);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.erase-video-info p {
    margin-bottom: 6px;
}

.erase-video-info p:last-child {
    margin-bottom: 0;
}

.erase-video-info strong {
    color: var(--text-primary);
}

/* 视频预览主区域 */
.erase-main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.erase-video-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    position: relative;
}

#erase-video-player {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

#erase-empty-state {
    text-align: center;
    color: var(--text-secondary);
}

#erase-empty-state .icon-svg {
    margin-bottom: 16px;
    color: var(--text-secondary);
}

/* 擦除页面进度弹窗 */
.erase-progress-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.erase-progress-modal {
    background: var(--bg-dark);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    min-width: 400px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.erase-progress-modal .progress-icon {
    margin-bottom: 20px;
}

.erase-progress-modal .progress-icon .icon-svg {
    color: var(--primary);
}

.erase-progress-modal h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.erase-progress-modal p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.erase-page-header {
    text-align: center;
    margin-bottom: 48px;
}

.erase-page-header h2 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.erase-page-header h2 .icon-svg {
    color: var(--primary);
}

.erase-page-desc {
    font-size: 16px;
    color: var(--text-secondary);
}

/* 功能卡片网格 */
.erase-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.feature-card {
    background: var(--bg-dark);
    border-radius: 12px;
    padding: 32px;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.feature-icon {
    width: 72px;
    height: 72px;
    background: var(--primary-light);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--primary);
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.feature-card>p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    padding: 6px 0;
}

.feature-list li::before {
    content: '✓';
    color: var(--success);
    font-weight: 600;
}

/* 操作区域 */
.erase-action-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 48px;
}

.action-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    border-radius: 12px;
    padding: 40px;
    color: white;
}

.action-card h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
}

.action-card p {
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.6;
    margin-bottom: 24px;
}

.action-buttons {
    display: flex;
    gap: 16px;
}

.action-buttons .btn-primary {
    background: white;
    color: var(--primary);
    width: auto;
    padding: 12px 24px;
}

.action-buttons .btn-primary:hover {
    background: var(--bg-light);
    transform: translateY(-2px);
}

.action-buttons .btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-color: rgba(255, 255, 255, 0.4);
}

.action-buttons .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
}

/* 服务状态卡片 */
.service-status-card {
    background: var(--bg-dark);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border);
}

.service-status-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-secondary);
}

.status-item:last-child {
    border-bottom: none;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.online {
    background: var(--success);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.status-dot.offline {
    background: var(--error);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

.status-label {
    margin-left: auto;
    font-size: 12px;
    color: var(--success);
    font-weight: 500;
}

/* 使用提示区域 */
.erase-tips-section {
    background: var(--bg-dark);
    border-radius: 12px;
    padding: 32px;
    border: 1px solid var(--border);
}

.erase-tips-section h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.erase-tips-section h3 .icon-svg {
    color: var(--primary);
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.tip-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--bg-medium);
    border-radius: 8px;
}

.tip-number {
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.tip-item p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* 顶部导航栏响应式 */
@media (max-width: 1100px) {
    .toolbar {
        gap: 10px;
        padding: 10px 12px;
    }

    .logo h1 {
        font-size: 16px;
        max-width: 11em;
    }

    .nav-btn {
        padding: 8px 14px;
        font-size: 13px;
    }

    .btn-icon {
        padding: 8px 12px;
        font-size: 13px;
    }
}

@media (max-width: 860px) {
    .toolbar {
        flex-wrap: wrap;
        row-gap: 8px;
    }

    .logo {
        flex: 1 1 auto;
    }

    .toolbar-actions {
        margin-left: auto;
    }

    .toolbar-nav {
        flex: 1 1 100%;
        order: 3;
        justify-content: stretch;
    }

    .toolbar-nav .nav-btn {
        flex: 1 1 0;
        min-width: 0;
    }
}

@media (max-width: 600px) {
    .toolbar {
        min-height: 52px;
        padding: 8px 10px;
    }

    .logo {
        gap: 8px;
    }

    .logo h1 {
        font-size: 15px;
        max-width: 9em;
    }

    .toolbar-label {
        display: none;
    }

    .nav-btn,
    .toolbar-actions .btn-icon {
        padding: 8px 10px;
        gap: 0;
    }

    .nav-btn .icon-svg,
    .toolbar-actions .btn-icon .icon-svg {
        margin-right: 0;
    }
}

@media (max-width: 400px) {
    .logo h1 {
        display: none;
    }

    .toolbar-nav .nav-btn {
        padding: 8px;
    }

    .toolbar-actions .btn-icon {
        padding: 8px;
    }
}

/* 响应式布局 */
@media (max-width: 768px) {
    .erase-action-section {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }
}