/* 望风Agent - 声视翻译科幻UI */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700&family=Rajdhani:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;600&display=swap');

:root {
    /* 白色背景 */
    --bg-void: #f0f2f5;
    --bg-deep: #f0f2f5;
    --bg-primary: #ffffff;
    --bg-secondary: #f7f8fa;
    --bg-card: #ffffff;
    --bg-elevated: #f7f8fa;
    --bg-hover: #e8f4ff;

    /* 蓝色主色 */
    --neon-cyan: #0070ff;
    --neon-cyan-dim: #0058cc;
    --neon-cyan-glow: rgba(0, 112, 255, 0.08);
    --neon-cyan-border: rgba(0, 112, 255, 0.3);

    /* 深蓝强调 */
    --neon-orange: #0058cc;
    --neon-orange-glow: rgba(0, 88, 204, 0.08);

    /* 浅蓝辅助 */
    --neon-purple: #4da6ff;
    --neon-purple-glow: rgba(77, 166, 255, 0.08);

    /* 成功绿 */
    --matrix-green: #00b42a;
    --matrix-green-glow: rgba(0, 180, 42, 0.08);

    /* 文字 */
    --text-bright: #1d2129;
    --text-primary: #1d2129;
    --text-secondary: #4e5969;
    --text-muted: #86909c;
    --text-dim: #c9cdd4;

    /* 边框 */
    --border: #e5e6eb;
    --border-light: #f2f3f5;
    --border-glow: rgba(0, 112, 255, 0.3);

    /* 状态 */
    --success: #00b42a;
    --success-bg: rgba(0, 180, 42, 0.06);
    --warning: #ff7d00;
    --warning-bg: rgba(255, 125, 0, 0.06);
    --error: #f53f3f;
    --error-bg: rgba(245, 63, 63, 0.06);
    --info: #0070ff;
    --info-bg: rgba(0, 112, 255, 0.06);

    /* 圆角 */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

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

body {
    font-family: 'Rajdhani', 'Noto Sans SC', sans-serif;
    background: var(--bg-void);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* 科幻网格背景 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(90deg, rgba(0, 112, 255, 0.02) 1px, transparent 1px),
        linear-gradient(rgba(0, 112, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

/* ========== 头部 ========== */
.header {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-purple) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 0 15px var(--neon-cyan-glow);
}

.logo-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    background: linear-gradient(90deg, var(--neon-cyan), var(--text-bright));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.space-badge {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 0.4rem 1rem;
    border-radius: var(--radius-md);
    font-family: 'Orbitron', monospace;
    font-size: 0.7rem;
    color: var(--neon-cyan);
    letter-spacing: 0.05em;
}

/* 用户信息栏 */
.user-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-points {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    background: linear-gradient(135deg, rgba(0, 112, 255, 0.08) 0%, rgba(0, 112, 255, 0.05) 100%);
    border: 1px solid var(--neon-cyan-border);
    border-radius: var(--radius-md);
}

.points-icon { font-size: 0.9rem; }
.points-value {
    font-family: 'Orbitron', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--neon-cyan);
}
.points-label {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.user-dropdown { position: relative; }

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-purple) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--bg-void);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.user-avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--neon-cyan-glow);
    border-color: var(--neon-cyan);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 180px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 0.75rem 1rem;
    background: rgba(0, 112, 255, 0.03);
    border-bottom: 1px solid var(--border);
}

.dropdown-username {
    font-weight: 600;
    color: var(--text-bright);
    font-size: 0.85rem;
}

.dropdown-email {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: var(--bg-elevated);
    color: var(--neon-cyan);
}

.dropdown-item.logout { color: var(--error); }
.dropdown-item.logout:hover { background: var(--error-bg); }

/* ========== 主容器 ========== */
.main-container {
    display: grid;
    grid-template-columns: 160px 1fr 280px;
    gap: 0.75rem;
    padding: 0.75rem;
    max-width: 1920px;
    margin: 0 auto;
    min-height: calc(100vh - 52px);
    position: relative;
    z-index: 1;
}

/* ========== 左侧导航 ========== */
.nav-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0.75rem 0.5rem;
}

.nav-section { margin-bottom: 1rem; }
.nav-section:last-child { margin-bottom: 0; }

.nav-title {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.4rem 0.75rem;
    margin-bottom: 0.25rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    font-size: 12px;
    margin-bottom: 2px;
}

.nav-item:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.nav-item.active,
.nav-item.highlight {
    background: linear-gradient(135deg, rgba(0, 112, 255, 0.1) 0%, rgba(0, 112, 255, 0.05) 100%);
    color: var(--neon-cyan);
    border: 1px solid var(--neon-cyan-border);
}

.nav-item.logout { color: var(--error); }
.nav-item.logout:hover { background: var(--error-bg); }

.nav-icon {
    font-size: 13px;
    width: 18px;
    text-align: center;
}

.nav-group { margin-bottom: 2px; }
.nav-group-toggle { justify-content: flex-start; }
.nav-group-toggle .nav-arrow { margin-left: auto; width: 14px; height: 14px; transition: transform 0.2s; }
.nav-group.open .nav-arrow { transform: rotate(180deg); }
.nav-group-children { display: none; padding-left: 0.5rem; }
.nav-group.open .nav-group-children { display: block; }
.nav-item.nav-sub { padding-left: 1.25rem; font-size: 11px; }

/* ========== 主内容区 - 上下两行布局 ========== */
.main-content {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.workspace-grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    grid-template-areas:
        "preview"
        "editor";
    gap: 0.75rem;
    flex: 1;
    min-height: 0;
}

/* ========== 面板通用样式 ========== */
.panel {
    background: var(--bg-primary);
    border: 1px solid var(--neon-cyan-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.panel-header {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 112, 255, 0.03);
}

.panel-icon {
    font-size: 0.9rem;
}

.panel-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--neon-cyan);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.panel-body {
    flex: 1;
    overflow: auto;
    padding: 0.5rem;
}

/* 视频预览面板 */
.preview-panel {
    grid-area: preview;
}

.preview-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    flex: 1;
}

/* 视频预览容器 */
.preview-container {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-void);
    border-radius: var(--radius-md);
    min-height: 280px;
    width: 100%;
    border: 1px solid var(--border);
}

.preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dim);
}

.placeholder-icon {
    font-size: 2.5rem;
    opacity: 0.4;
}

.placeholder-text {
    font-size: 0.8rem;
}

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

.video-player-box {
    position: relative;
    display: inline-block;
}

.video-player-box .preview-video {
    display: block;
    max-width: 100%;
    max-height: 300px;
    border-radius: var(--radius-md);
}

.subtitle-overlay {
    position: absolute;
    bottom: 48px;
    left: 0;
    right: 0;
    color: #ffffff;
    font-size: 16px;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0,0,0,0.9);
    padding: 4px 16px;
    background: rgba(0,0,0,0.4);
    pointer-events: none;
    z-index: 5;
}

.preview-video {
    max-width: 100%;
    max-height: 300px;
    border-radius: var(--radius-md);
}

.preview-poster {
    max-width: 100%;
    max-height: 300px;
    border-radius: var(--radius-md);
    display: none;
}

/* 上传工具条 */
.upload-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.upload-zone-mini {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    background: var(--bg-deep);
    border: 1px dashed var(--border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.upload-zone-mini:hover {
    border-color: var(--neon-cyan);
    background: var(--neon-cyan-glow);
}

.upload-zone-mini input { display: none; }
.upload-icon { font-size: 1rem; }
.upload-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.6rem;
    background: var(--bg-deep);
    border: 1px solid var(--neon-cyan);
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
}

.file-info-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--neon-cyan);
}

.file-info-size {
    color: var(--text-dim);
    font-size: 0.65rem;
}

.file-info-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    font-size: 0.75rem;
}

.file-info-remove:hover { color: var(--error); }

.upload-progress {
    display: none;
    flex: 1;
    max-width: 150px;
}

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

.progress-bar-container {
    height: 4px;
    background: var(--bg-deep);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
    width: 0%;
    transition: width 0.3s;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.6rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.url-upload {
    display: flex;
    gap: 0.35rem;
    flex: 1;
    max-width: 200px;
}

.url-upload .form-input {
    flex: 1;
    font-size: 0.7rem;
    padding: 0.35rem 0.5rem;
}

.btn-upload {
    padding: 0.4rem 1rem;
    white-space: nowrap;
}

/* 字幕编辑面板 */
.editor-panel {
    grid-area: editor;
}

.editor-body {
    padding: 0.5rem;
    background: var(--bg-void);
}

.editor-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: auto;
}

.editor-status {
    margin-right: 0.5rem;
}

/* ========== 右侧面板 ========== */
.sidebar-right {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* 卡片样式 */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.card-header {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(0, 112, 255, 0.02);
}

.card-icon {
    font-size: 0.85rem;
}

.card-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--neon-cyan);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    flex: 1;
}

.card-body {
    padding: 0.75rem;
}

/* 翻译设置卡片 */
.settings-card {
    border-color: var(--neon-cyan-border);
}

.settings-card .card-header {
    background: linear-gradient(90deg, rgba(0, 112, 255, 0.05), transparent);
}

/* 项目卡片 */
.project-card {
    border-color: var(--neon-cyan-border);
}

/* ========== 表单组件 ========== */
.form-group {
    margin-bottom: 0.6rem;
}

.form-label {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.4rem 0.6rem;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan-glow);
}

.form-input::placeholder {
    color: var(--text-dim);
    font-size: 0.7rem;
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='%2300f5ff' viewBox='0 0 16 16'%3E%3Cpath d='M8 12L2 6h12l-6 6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    padding-right: 1.5rem;
}

/* 语言选择行 */
.form-row {
    display: flex;
    gap: 0.5rem;
}

.lang-row .form-group {
    flex: 1;
}

/* 翻译类型按钮组 */
.type-btn-group {
    display: flex;
    gap: 0.35rem;
}

.type-btn {
    flex: 1;
    padding: 0.4rem 0.5rem;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--text-muted);
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.type-btn:hover {
    border-color: var(--border-light);
    color: var(--text-secondary);
}

.type-btn.active {
    background: linear-gradient(135deg, var(--neon-cyan-glow), rgba(0, 112, 255, 0.05));
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

/* 积分定价展示 */
.pricing-summary {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.6;
}
.pricing-summary .price-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.pricing-summary .price-original {
    text-decoration: line-through;
    color: var(--text-muted);
    margin-right: 0.5rem;
}
.pricing-summary .price-discount {
    color: var(--neon-cyan);
    font-weight: 600;
}
.pricing-summary .discount-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--neon-cyan-glow), rgba(0, 112, 255, 0.1));
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
    border-radius: var(--radius-sm);
    margin-left: 0.35rem;
}

/* 状态过滤下拉 */
.status-filter {
    margin-bottom: 0.5rem;
}

/* ========== 开关组件 ========== */
.switch-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.35rem 0;
}

.switch-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.switch {
    position: relative;
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.switch-slider::before {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    left: 2px;
    bottom: 2px;
    background: var(--text-dim);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.switch input:checked + .switch-slider {
    background: var(--neon-cyan-glow);
    border-color: var(--neon-cyan);
}

.switch input:checked + .switch-slider::before {
    transform: translateX(20px);
    background: var(--neon-cyan);
}

.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0.6rem 0;
}

/* 范围滑块 */
.range-group {
    margin-bottom: 0.4rem;
}

.range-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.3rem;
}

.range-value {
    font-family: 'Orbitron', monospace;
    font-size: 0.65rem;
    color: var(--neon-cyan);
    background: var(--neon-cyan-glow);
    padding: 0.1rem 0.35rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--neon-cyan-border);
}

.form-range {
    width: 100%;
    height: 4px;
    background: var(--bg-deep);
    border-radius: 2px;
    appearance: none;
    cursor: pointer;
}

.form-range::-webkit-slider-thumb {
    appearance: none;
    width: 12px;
    height: 12px;
    background: var(--neon-cyan);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 8px var(--neon-cyan);
}

/* ========== 按钮 ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.btn-primary {
    background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-cyan-dim) 100%);
    color: var(--bg-void);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px var(--neon-cyan-glow);
}

.btn-primary:hover {
    box-shadow: 0 0 25px var(--neon-cyan-glow);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

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

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #00cc6a 100%);
    color: var(--bg-void);
    border-color: var(--success);
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.65rem;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    padding: 0.25rem 0.4rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

.btn-icon:hover {
    color: var(--neon-cyan);
}

.btn-submit {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
}

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

/* ========== 视频列表 ========== */
.video-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-height: 200px;
    overflow-y: auto;
}

.video-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0.6rem;
    background: var(--bg-deep);
    border-left: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.video-item:hover {
    background: var(--bg-elevated);
    border-left-color: var(--neon-cyan);
}

.video-item.selected {
    background: var(--neon-cyan-glow);
    border-left-color: var(--neon-cyan);
}

.video-title {
    font-size: 0.75rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.video-duration {
    font-family: 'Orbitron', monospace;
    font-size: 0.65rem;
    color: var(--neon-orange);
    margin-left: 0.5rem;
}

/* ========== 项目列表 ========== */
.project-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 280px;
    overflow-y: auto;
}

.project-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem;
    background: var(--bg-deep);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.project-item:hover {
    background: var(--bg-elevated);
    border-color: var(--border);
}

.project-item.active {
    background: var(--neon-cyan-glow);
    border-color: var(--neon-cyan);
}

.project-thumb {
    width: 44px;
    height: 26px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--text-dim);
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--border);
}

.project-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.project-title {
    font-size: 0.7rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

.project-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.6rem;
    color: var(--text-dim);
}

.project-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--bg-deep);
}

.project-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
}

/* 状态徽章 */
.status-badge {
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    font-family: 'Orbitron', monospace;
    font-size: 0.55rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-processing {
    background: var(--info-bg);
    color: var(--info);
    border: 1px solid rgba(0, 184, 255, 0.3);
}

.status-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.status-failed {
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid rgba(255, 51, 102, 0.3);
}

.status-paused {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid rgba(255, 170, 0, 0.3);
}

.status-uploaded {
    background: #f0f2f5;
    color: #86909c;
    border: 1px solid #e5e6eb;
}

/* ========== 控制台面板 ========== */
.console-view {
    grid-column: 2 / -1;
    padding: 20px;
    overflow-y: auto;
}

.stat-card-mini {
    background: #fff;
    border: 1px solid #e5e6eb;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}
.stat-card-mini .stat-num {
    font-size: 28px;
    font-weight: 700;
    color: #1d2129;
}
.stat-card-mini .stat-label {
    font-size: 13px;
    color: #86909c;
    margin-top: 4px;
}
.console-card {
    background: #fff;
    border: 1px solid #e5e6eb;
    border-radius: 8px;
    padding: 16px 20px;
}
.console-card-title {
    font-size: 15px;
    font-weight: 600;
    color: #1d2129;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f2f3f5;
}

/* ========== 字幕编辑器 ========== */
.utterance-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-height: calc(100vh - 400px);
    overflow-y: auto;
}

.utterance-item {
    padding: 0.5rem;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.utterance-item:hover {
    border-color: var(--border-light);
}

.utterance-item.modified {
    border-color: var(--warning);
    box-shadow: 0 0 10px var(--neon-orange-glow);
}

.utterance-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
    font-size: 0.65rem;
}

.utterance-index {
    font-family: 'Orbitron', monospace;
    color: var(--text-dim);
    font-weight: 600;
}

.utterance-time {
    font-family: 'Consolas', monospace;
    color: var(--neon-cyan);
    font-size: 0.6rem;
    margin-left: auto;
    background: var(--neon-cyan-glow);
    padding: 0.1rem 0.35rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--neon-cyan-border);
}

.compare-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.compare-source,
.compare-target {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.compare-label {
    font-size: 0.55rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.compare-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding: 0.4rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    min-height: 40px;
    line-height: 1.4;
    border: 1px solid var(--border);
}

.compare-target textarea {
    width: 100%;
    min-height: 40px;
    padding: 0.4rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.75rem;
    resize: vertical;
    line-height: 1.4;
    transition: all 0.2s;
}

.compare-target textarea:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan-glow);
}

/* ========== Toast ========== */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    z-index: 1000;
}

.toast {
    padding: 0.6rem 0.9rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    animation: toastSlide 0.3s ease;
    backdrop-filter: blur(10px);
}

.toast-success { border-color: var(--success); box-shadow: 0 0 15px var(--matrix-green-glow); }
.toast-error { border-color: var(--error); box-shadow: 0 0 15px var(--error-bg); }
.toast-warning { border-color: var(--warning); box-shadow: 0 0 15px var(--neon-orange-glow); }
.toast-info { border-color: var(--info); box-shadow: 0 0 15px var(--info-bg); }

@keyframes toastSlide {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ========== 空状态 & 加载 ========== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.empty-state-icon {
    font-size: 1.5rem;
    margin-bottom: 0.4rem;
    opacity: 0.5;
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border);
    border-top-color: var(--neon-cyan);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* 分页 */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
    margin-top: 0.5rem;
}

.page-btn {
    padding: 0.2rem 0.4rem;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.65rem;
    transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
    border-color: var(--neon-cyan-border);
    color: var(--neon-cyan);
}

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

.page-info {
    font-family: 'Orbitron', monospace;
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* ========== 滚动条 ========== */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--neon-cyan-border);
}

/* ========== 响应式 ========== */
@media (max-width: 1400px) {
    .main-container {
        grid-template-columns: 140px 1fr 250px;
    }
    .workspace-grid {
        grid-template-columns: 240px 1fr;
    }
    .video-preview-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1100px) {
    .main-container {
        grid-template-columns: 1fr;
        padding-bottom: 70px;
    }
    .nav-sidebar {
        display: none;
    }
    .sidebar-right {
        order: -1;
    }
    .workspace-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "preview"
            "video-space"
            "editor"
            "project-list";
    }
    .console-view {
        grid-column: 1;
    }
    .mobile-bottom-nav {
        display: flex !important;
    }
}

/* ========== 移动端适配 ========== */
@media (max-width: 768px) {
    .header {
        padding: 0.4rem 0.75rem;
    }
    .header-center {
        display: none;
    }
    .logo-text {
        font-size: 0.85rem;
    }
    .logo-icon {
        width: 30px;
        height: 30px;
    }
    .user-points {
        padding: 0.25rem 0.5rem;
    }
    .points-label {
        display: none;
    }
    .user-avatar {
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
    }
    .main-container {
        gap: 0.5rem;
        padding: 0.5rem;
        padding-bottom: 70px;
    }
    .console-view {
        padding: 12px;
    }
    .preview-container {
        min-height: 180px;
    }
    .preview-video, .preview-poster {
        max-height: 200px;
    }
    .upload-toolbar {
        flex-wrap: wrap;
        gap: 0.35rem;
    }
    .url-upload {
        max-width: 100%;
        flex-basis: 100%;
    }
    .form-row {
        flex-direction: column;
    }
    .compare-content {
        grid-template-columns: 1fr;
    }
    .stat-card-mini {
        padding: 12px;
    }
    .stat-card-mini .stat-num {
        font-size: 20px;
    }
    .card-body {
        padding: 0.5rem;
    }
    .dropdown-menu {
        right: -0.5rem;
        min-width: 160px;
    }
    .toast-container {
        right: 0.5rem;
        left: 0.5rem;
    }
}

/* 底部移动导航栏 */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    z-index: 200;
    justify-content: space-around;
    padding: 0.4rem 0;
    padding-bottom: max(0.4rem, env(safe-area-inset-bottom));
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}
.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.6rem;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    background: none;
    border: none;
    transition: color 0.2s;
}
.mobile-nav-item.active {
    color: var(--neon-cyan);
}

/* 移动端表格自适应 */
@media (max-width: 640px) {
    .data-table { font-size: 0.75rem; }
    .data-table th, .data-table td { padding: 0.5rem 0.4rem; }
    .data-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

::selection {
    background: var(--neon-cyan);
    color: var(--bg-void);
}
