/* ===== 在线录屏专属样式（布局/表单/卡片/说明复用 common.css） ===== */

/* 设置项提示 */
.setting-hint {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 6px;
    line-height: 1.5;
}

/* 设置项内下拉框占满整行（视觉沿用 common.css .form-select） */
.setting-item .form-select {
    width: 100%;
}

/* 音频选项 */
.audio-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.audio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    color: #374151;
}

.setting-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    color: #374151;
}

.setting-option:hover {
    border-color: #c4b5fd;
    background: #faf5ff;
}

.setting-option input {
    width: 16px;
    height: 16px;
    accent-color: #8b5cf6;
    cursor: pointer;
}

.audio-option:hover {
    border-color: #c4b5fd;
    background: #faf5ff;
}

/* 实时预览 */
.preview-container {
    position: relative;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #111;
    max-height: 480px;
}

.preview-video {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 480px;
    object-fit: contain;
    background: #000;
}

.rec-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
    color: #fff;
    font-size: 13px;
}

.rec-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ef4444;
    animation: rec-blink 1s steps(2, start) infinite;
}
.rec-dot.paused {
    animation-play-state: paused;
    background: #f59e0b;
}

@keyframes rec-blink {
    to { opacity: 0; }
}

.rec-text {
    font-weight: 600;
}

.rec-tip {
    margin-left: auto;
    font-size: 12px;
    opacity: 0.85;
}

/* 空状态 */
.empty-preview {
    min-height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    background: #fafafa;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.empty-text {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.empty-hint {
    font-size: 13px;
    color: #9ca3af;
}

/* 片段列表 - 卡片网格布局（参考 shipinyasuo） */
.recording-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 16px;
}

.recording-card {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.recording-card:hover {
    border-color: #8b5cf6;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.12);
}

.recording-card-header {
    position: relative;
    width: 100%;
    height: 140px;
    background: #111;
    overflow: hidden;
}

.recording-card-header video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recording-card-duration {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 1;
}

.recording-card-body {
    padding: 14px;
}

.recording-card-filename {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.recording-card-filename .recording-file-name-input {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    color: #374151;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 5px 8px;
    background: #fff;
}

.recording-card-filename .recording-file-name-input:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.15);
}

.recording-card-filename .recording-time-range {
    display: inline-block;
    font-size: 13px;
    color: #374151;
    font-weight: 600;
}

.recording-card-filename .recording-file-ext {
    display: none;
}

.recording-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.recording-card-format {
    font-size: 11px;
    font-weight: 600;
    color: #8b5cf6;
    background: #f3e8ff;
    padding: 2px 8px;
    border-radius: 4px;
}

.recording-card-size {
    font-size: 13px;
    color: #6b7280;
}

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

.recording-card-btn {
    flex: 1;
    padding: 7px 0;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.recording-card-btn-download {
    background: #8b5cf6;
    color: #fff;
}

.recording-card-btn-download:hover {
    background: #7c3aed;
}

.recording-card-btn-delete {
    background: #fee2e2;
    color: #dc2626;
}

.recording-card-btn-delete:hover {
    background: #fecaca;
}

/* 实时状态信息栏 */
.live-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-top: 12px;
    padding: 14px 20px;
    background: #f8f9ff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
}
.live-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
}
.live-stat-label {
    font-size: 12px;
    color: #9ca3af;
}
.live-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: #8b5cf6;
    font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
}
.live-stat-divider {
    width: 1px;
    height: 36px;
    background: #e5e7eb;
}

/* ===== 暗色模式 ===== */
body.dark .setting-hint { color: #9ca3af; }

body.dark .audio-option {
    background: #2b3035;
    border-color: #495057;
    color: #e0e0e0;
}

body.dark .setting-option {
    background: #2b3035;
    border-color: #495057;
    color: #e0e0e0;
}

body.dark .setting-option input {
    accent-color: #a78bfa;
}

body.dark .audio-option:hover {
    border-color: #8b5cf6;
    background: #3a2f4a;
}

body.dark .setting-option:hover {
    border-color: #8b5cf6;
    background: #3a2f4a;
}

body.dark .empty-preview {
    background: #1b1f23;
    border-color: #495057;
}

body.dark .empty-text { color: #e0e0e0; }
body.dark .empty-hint { color: #9ca3af; }

body.dark .recording-card {
    background: #212529;
    border-color: #3a3a45;
}

body.dark .recording-card:hover {
    border-color: #8b5cf6;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.2);
}

body.dark .recording-card-filename .recording-file-name-input {
    background: #2b3035;
    border-color: #495057;
    color: #fff;
}

body.dark .recording-card-filename .recording-time-range {
    color: #e2e8f0;
}

body.dark .recording-card-size { color: #adb5bd; }

body.dark .live-stats {
    background: #1e1e2e;
    border-color: #3a3a45;
}
body.dark .live-stat-value { color: #c4b5fd; }
body.dark .live-stat-divider { background: #3a3a45; }

/* 录制中实时音源开关（位于录制预览区下方） */
.live-audio-toggles {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
    padding: 10px 0;
}
.live-audio-hint {
    width: 100%;
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 6px;
    line-height: 1.5;
}
body.dark .live-audio-hint { color: #6b7280; }
.live-audio-tip {
    font-size: 13px;
    color: #6b7280;
}
.live-audio-btn {
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    color: #374151;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}
.live-audio-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    filter: brightness(0.97);
}
.live-audio-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.live-audio-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    filter: none;
}
.live-audio-btn.on {
    background: #ecfdf5;
    border-color: #34d399;
    color: #047857;
}
.live-audio-btn.off {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #b91c1c;
}
body.dark .live-audio-tip { color: #9aa0a6; }
body.dark .live-audio-btn {
    background: #23252b;
    border-color: #3a3a45;
    color: #e5e7eb;
}
body.dark .live-audio-btn.on {
    background: #052e23;
    border-color: #34d399;
    color: #6ee7b7;
}
body.dark .live-audio-btn.off {
    background: #2a1414;
    border-color: #f87171;
    color: #fca5a5;
}
body.dark .live-audio-btn:hover {
    filter: brightness(1.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
body.dark .live-audio-btn:active {
    filter: brightness(1.05);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}
