/* 节目列表样式 */
.upload-area {
    background: white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    padding: 10px;
    margin-bottom: 10px;
    text-align: center;
    border: 2px dashed #ccc;
    cursor: pointer;
    position: relative;
    transition: border-color 0.2s, background 0.2s;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #4a90d9;
    background: #f0f6ff;
}

.upload-area #fileInput {
    display: none;
}

.drop-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #888;
    font-size: 13px;
    user-select: none;
}

.drop-icon {
    font-size: 22px;
    color: #bbb;
}

.upload-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: #eee;
    overflow: hidden;
}

.progress-bar-inner {
    height: 100%;
    background: #4a90d9;
    width: 0%;
    transition: width 0.2s;
}

#progressText {
    font-size: 12px;
    color: #666;
    min-width: 36px;
}

.upload-msg {
    margin-top: 6px;
    font-size: 12px;
    min-height: 18px;
    transition: opacity 0.3s;
}

.upload-msg.error {
    color: #e74c3c;
}

.upload-msg.success {
    color: #27ae60;
}

.program-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.program-table th,
.program-table td {
    padding: 6px 10px;
    text-align: left;
    font-size: 12px;
    border-bottom: 1px solid #eee;
}

.program-table th {
    background: #fafafa;
    font-weight: 500;
    color: #333;
}

.program-table tr:hover {
    background: #f9f9f9;
}

.program-table .btn {
    height: 24px;
    line-height: 24px;
    padding: 0 8px;
    font-size: 11px;
}

.program-table .file-name {
    color: #4a90d9;
    cursor: pointer;
    text-decoration: none;
}

.program-table .file-name:hover {
    text-decoration: underline;
}

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.transcoding {
    background: #e8f0fe;
    color: #1a73e8;
}

.transcode-progress {
    display: flex;
    align-items: center;
    gap: 8px;
}

.transcode-bar {
    flex: 1;
    height: 6px;
    background: #e8f0fe;
    border-radius: 3px;
    overflow: hidden;
    min-width: 80px;
}

.transcode-bar-inner {
    height: 100%;
    background: #1a73e8;
    width: 0%;
    border-radius: 3px;
    transition: width 0.3s;
}

.transcode-pct {
    font-size: 12px;
    color: #1a73e8;
    font-weight: 500;
    min-width: 32px;
    text-align: right;
}

.transcode-queued {
    font-size: 12px;
    color: #f5a623;
    font-weight: 500;
}

.status-badge.done {
    background: #e6f4ea;
    color: #1e8e3e;
}

.status-badge.error {
    background: #fce8e6;
    color: #d93025;
}

.empty-tip {
    text-align: center;
    color: #999;
    padding: 40px 0;
    font-size: 14px;
}

/* 设置按钮 */
.btn-config {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border: none;
    background: #eee;
    color: #666;
    font-size: 18px;
    cursor: pointer;
    border-radius: 4px;
    line-height: 1;
    z-index: 1;
}

.btn-config:hover {
    background: #ddd;
    color: #333;
}

/* 设置弹窗 */
.config-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.config-modal-overlay.show {
    display: flex;
}

.config-modal {
    background: white;
    width: 420px;
    max-width: 90vw;
}

.config-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid #eee;
    font-size: 15px;
    font-weight: 500;
}

.config-modal-header .close-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

.config-modal-header .close-btn:hover {
    color: #333;
}

.config-modal-body {
    padding: 18px;
}

.config-modal-body h4 {
    font-size: 13px;
    font-weight: 500;
    color: #888;
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.config-modal-body h4:not(:first-child) {
    margin-top: 18px;
}

.config-field {
    margin-bottom: 10px;
}

.config-field label {
    display: block;
    font-size: 13px;
    color: #555;
    margin-bottom: 4px;
}

.config-field input,
.config-field select {
    width: 100%;
    height: 34px;
    padding: 0 10px;
    border: 1px solid #ddd;
    font-size: 13px;
    box-sizing: border-box;
    background: #fafafa;
}

.config-field input:focus,
.config-field select:focus {
    outline: none;
    border-color: #4a90d9;
    background: #fff;
}

.config-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 18px;
    border-top: 1px solid #eee;
}

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

.video-modal-overlay.show {
    display: flex;
}

.video-modal {
    position: relative;
    background: #000;
    max-width: 90vw;
    max-height: 90vh;
}

.video-modal video {
    display: block;
    max-width: 90vw;
    max-height: 85vh;
}

.video-modal .close-btn {
    position: absolute;
    top: -36px;
    right: 0;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
}

/* 转写文本模态框 */
.text-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.text-modal-overlay.show {
    display: flex;
}

.text-modal {
    position: relative;
    background: var(--t-bg, #111);
    width: min(760px, 92vw);
    max-height: 86vh;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--t-border, #333);
}

.text-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--t-border, #333);
    color: var(--t-cyan, #0ff);
    font-size: 14px;
}

.text-modal-header .close-btn {
    color: var(--t-text, #ccc);
    font-size: 22px;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
}

.text-modal-body {
    margin: 0;
    padding: 14px 18px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.8;
    color: var(--t-text, #ccc);
}
