/* 视频配音页面样式 */

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

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.dubbing-page {
    min-height: 100vh;
    background: #f5f7fa;
    padding: 24px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.dubbing-page .page-header {
    margin-bottom: 20px;
}

.dubbing-page .page-title {
    font-size: 26px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0;
}

.dubbing-page .page-desc {
    font-size: 15px;
    color: #8a8f99;
    margin-top: 6px;
    margin-bottom: 0;
}

.tips-section-wide {
    width: 100%;
    background: #ffffff;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.tips-content {
    display: flex;
    gap: 16px;
}

.tips-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #f75444;
    font-size: 15px;
    font-weight: 600;
    flex-shrink: 0;
}

.tips-title svg {
    width: 20px;
    height: 20px;
}

.tips-text {
    flex: 1;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.8;
    margin: 0;
    text-align: justify;
}

.dubbing-container {
    display: flex;
    gap: 20px;
    flex: 1;
    min-height: 0;
    max-height: calc(100vh - 180px);
    width: 100%;
    overflow: hidden;
}

.left-panel {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.upload-area {
    background: #ffffff;
    border: 2px dashed #d0d5dd;
    border-radius: 14px;
    padding: 32px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: #f75444;
    background: #fff5f5;
}

.upload-icon {
    width: 160px;
    height: 50px;
    margin: 0 auto 12px;
    object-fit: contain;
    transition: color 0.3s ease;
}

.upload-area:hover .upload-icon {
    color: #f75444;
}

.upload-area p {
    color: #8a8f99;
    font-size: 14px;
    margin: 0;
}

.upload-area input[type="file"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn svg {
    width: 16px;
    height: 16px;
}

.btn-primary {
    background: linear-gradient(135deg, #f75444 0%, #ff7875 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(247, 84, 68, 0.35);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(247, 84, 68, 0.45);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-large {
    padding: 14px 24px;
    font-size: 15px;
}

.video-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: #ffffff;
    border-radius: 10px;
    font-size: 14px;
    color: #666;
}

.btn-remove {
    padding: 8px 16px;
    background: #fff1f0;
    border: none;
    border-radius: 6px;
    color: #ff4d4f;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-remove:hover {
    background: #ffccc7;
}

.right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: calc(100% - 300px);
    min-height: 0;
}

.preview-section {
    background: #ffffff;
    border-radius: 14px;
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    width: 100%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.preview-header {
    margin-bottom: 8px;
    flex-shrink: 0;
}

.preview-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0;
}

.preview-content {
    display: flex;
    gap: 12px;
    flex: 1;
    min-height: 0;
    width: 100%;
    justify-content: center;
    align-items: center;
}

.video-box {
    flex: 0 1 360px;
    background: #1a1a2e;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    max-width: 360px;
    max-height: calc(100vh - 280px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-box.video-loaded {
    max-height: calc(100vh - 280px);
}

.video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.video-placeholder img {
    width: 64px;
    height: 64px;
}

.video-placeholder p {
    margin-top: 12px;
    color: #999;
    font-size: 13px;
}

.preview-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-box.video-loaded .preview-video {
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    opacity: 1;
    transition: opacity 0.3s ease;
}

.play-btn {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.play-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 1);
}

.play-btn svg {
    width: 20px;
    height: 20px;
    margin-left: 2px;
}

.split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
    gap: 12px;
    width: 100%;
    max-height: calc(100vh - 280px);
}

.split-col {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #1a1a2e;
    border-radius: 10px;
    max-height: calc(100vh - 280px);
}

.split-label {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    padding: 4px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
}

.before-label {
    background: rgba(0, 0, 0, 0.55);
}

.after-label {
    background: rgba(52, 152, 219, 0.85);
}

.split-image-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a2e;
    position: relative;
    overflow: hidden;
}

.split-image-wrap video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #000;
}

.video-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.video-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    text-align: center;
}

@media (min-width: 1920px) and (max-width: 2559px) {
    .dubbing-page {
        padding: 32px;
    }

    .dubbing-page .page-title {
        font-size: 32px;
    }

    .dubbing-page .page-desc {
        font-size: 17px;
    }

    .dubbing-container {
        gap: 30px;
    }

    .left-panel {
        width: 340px;
    }

    .upload-area {
        padding: 40px 20px;
        border-radius: 18px;
    }

    .upload-icon {
        width: 64px;
        height: 64px;
        margin-bottom: 16px;
    }

    .upload-area p {
        font-size: 15px;
    }

    .btn {
        padding: 14px 24px;
        font-size: 15px;
        border-radius: 12px;
    }

    .btn svg {
        width: 18px;
        height: 18px;
    }

    .preview-section {
        padding: 20px;
        border-radius: 18px;
        min-height: 600px;
    }

    .preview-header h3 {
        font-size: 16px;
    }

    .preview-content {
        gap: 20px;
        min-height: 480px;
    }

    .video-box {
        border-radius: 14px;
        min-height: 460px;
    }
}

@media (min-width: 2560px) {
    .dubbing-page {
        padding: 40px;
    }

    .dubbing-page .page-title {
        font-size: 38px;
    }

    .dubbing-page .page-desc {
        font-size: 19px;
    }

    .dubbing-container {
        gap: 40px;
    }

    .left-panel {
        width: 400px;
    }

    .upload-area {
        padding: 50px 24px;
        border-radius: 22px;
    }

    .upload-icon {
        width: 72px;
        height: 72px;
        margin-bottom: 20px;
    }

    .upload-area p {
        font-size: 16px;
    }

    .btn {
        padding: 16px 28px;
        font-size: 16px;
        border-radius: 14px;
    }

    .btn svg {
        width: 20px;
        height: 20px;
    }

    .preview-section {
        padding: 24px;
        border-radius: 22px;
        min-height: 700px;
    }

    .preview-header h3 {
        font-size: 18px;
    }

    .preview-content {
        gap: 24px;
        min-height: 560px;
    }

    .video-box {
        border-radius: 16px;
        min-height: 540px;
    }
}

@media (max-width: 768px) {
    .dubbing-container {
        flex-direction: column;
        gap: 16px;
        width: 100%;
    }

    .left-panel {
        width: 100%;
    }

    .preview-content {
        flex-direction: column;
        gap: 10px;
        min-height: 300px;
        width: 100%;
    }

    .video-box {
        min-height: 280px;
        width: 100%;
        min-width: auto;
    }

    .split-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
    }

    .split-col:first-child {
        border-right: none;
        border-bottom: 1px solid #eee;
    }

    .split-grid {
        grid-template-rows: minmax(200px, auto) minmax(200px, auto);
    }

    .dubbing-page {
        padding: 16px;
    }

    .dubbing-page .page-title {
        font-size: 22px;
    }

    .dubbing-page .page-desc {
        font-size: 14px;
    }

    .upload-area {
        padding: 24px 12px;
    }

    .upload-icon {
        width: 48px;
        height: 48px;
    }

    .btn {
        padding: 11px 16px;
        font-size: 13px;
    }
}
