/* ======================== 视频制作模块样式 ======================== */

.video-production-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 12px;
}

.video-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.video-main {
    display: flex;
    flex: 1;
    gap: 12px;
    min-height: 0;
}

.video-preview-panel {
    flex: 1;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.video-preview-header {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.video-preview-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 12px;
    gap: 12px;
}

.video-screen {
    flex: 1;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    min-height: 200px;
}

.video-screen-content {
    text-align: center;
    color: var(--text-secondary);
}

.video-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--input-bg);
    border-radius: 6px;
}

.video-control-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background: var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.video-control-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.video-progress {
    flex: 1;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}

.video-progress-bar {
    height: 100%;
    background: var(--accent-color);
    transition: width 0.1s;
}

.video-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    min-width: 80px;
    text-align: center;
}

.timeline-panel {
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.timeline-header {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.timeline-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.timeline-ruler {
    height: 24px;
    background: var(--input-bg);
    border-radius: 4px;
    margin-bottom: 8px;
    position: relative;
}

.timeline-ruler-mark {
    position: absolute;
    top: 0;
    height: 100%;
    border-left: 1px solid var(--border-color);
    font-size: 0.65rem;
    padding-left: 4px;
    color: var(--text-tertiary);
}

.timeline-tracks {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.timeline-track {
    display: flex;
    align-items: center;
    gap: 8px;
}

.track-label {
    width: 80px;
    padding: 6px 8px;
    background: var(--input-bg);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
    flex-shrink: 0;
}

.track-label.video { background: #3f51b520; color: #3f51b5; }
.track-label.audio { background: #4caf5020; color: #4caf50; }
.track-label.subtitle { background: #ff980020; color: #ff9800; }
.track-label.effect { background: #e91e6320; color: #e91e63; }

.track-content {
    flex: 1;
    height: 40px;
    background: var(--input-bg);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.track-clip {
    position: absolute;
    height: 100%;
    background: var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding: 0 8px;
    font-size: 0.7rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}

.track-clip:hover {
    filter: brightness(1.1);
}

.track-clip.video { background: #3f51b5; color: white; }
.track-clip.audio { background: #4caf50; color: white; }
.track-clip.subtitle { background: #ff9800; color: white; }
.track-clip.effect { background: #e91e63; color: white; }

.track-clip-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-settings-panel {
    width: 260px;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.video-settings-header {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

.video-settings-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.video-settings-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.video-settings-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.video-settings-form label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.video-settings-form .form-input,
.video-settings-form select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 0.875rem;
}

/* 渲染进度 */
.render-progress {
    padding: 12px;
    background: var(--input-bg);
    border-radius: 6px;
    margin-top: 12px;
}

.render-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.render-progress-title {
    font-size: 0.8rem;
    font-weight: 500;
}

.render-progress-percent {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.render-progress-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.render-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), #764ba2);
    transition: width 0.3s;
}

/* 片段编辑对话框 */
.clip-edit-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.clip-edit-form .form-row {
    display: flex;
    gap: 12px;
}

.clip-edit-form .form-row .form-group {
    flex: 1;
}

.clip-edit-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.clip-edit-form label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.clip-edit-form .form-input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 0.875rem;
}

/* 素材库 */
.media-library {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.media-item {
    aspect-ratio: 16/9;
    background: var(--input-bg);
    border-radius: 6px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.2s;
}

.media-item:hover {
    border-color: var(--accent-color);
}
