.video-translate-body .main-content * {
   
    box-sizing: border-box;
}

body.video-translate-body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f7fa;
    min-height: 100vh;
    display: flex;
    padding-top: 0 !important;
    margin: 0;
    overflow-x: hidden;
}

body.video-translate-body .sidebar {
    width: var(--sidebar-width, 200px);
    height: 100vh;
    min-height: 100vh;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 0;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.06);
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    border-right: 1px solid rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
}

body.video-translate-body .sidebar .logo,
body.video-translate-body .sidebar .logo-icon,
body.video-translate-body .sidebar .logo-icon img {
    background: transparent !important;
}

.main-content {
    flex: 1;
    min-height: 100vh;
    margin-left: var(--sidebar-width, 200px);
}

.video-translate-page {
    min-height: 100vh;
    background: #f5f7fa;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

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

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

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

.translate-container {
    display: flex;
    gap: 20px;
    width: 100%;
    flex: 1;
}

.left-section {
    width: 360px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.right-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

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

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

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

.tips-list {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.8;
}

.tips-list p {
    margin: 0 0 8px 0;
}

.tips-list p:last-child {
    margin-bottom: 0;
}

.action-section {
    flex: 1;
}

.action-section .form-box {
    background: #ffffff;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.action-section .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.action-section .form-group label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.action-section .form-group select {
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    color: #374151;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-section .form-group select:hover {
    border-color: #f75444;
}

.action-section .upload-area {
    background: #f9fafb;
    border: 2px dashed #d0d5dd;
    border-radius: 12px;
    padding: 30px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

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

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

.action-section .upload-icon svg {
    width: 100%;
    height: 100%;
}

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

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

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

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

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

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

.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 {
    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;
}

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

.right-section .preview-header {
    margin-bottom: 16px;
}

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

.right-section .preview-content {
    flex: 1;
    display: flex;
    gap: 20px;
    min-height: 0;
}

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

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

.right-section .video-box {
    background: #1a1a2e;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

.right-section .preview-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: none;
    background: #000;
}

@media (max-width: 900px) {
    .translate-container {
        flex-direction: column;
        height: auto;
    }
    
    .left-section {
        width: 100%;
    }
    
    .right-section {
        height: auto;
    }
    
    .right-section .preview-content {
        flex-direction: column;
    }
    
    .right-section .video-box {
        min-height: 250px;
    }
}



@media (max-width: 768px) {
    .video-translate-page {
        padding: 12px;
    }

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

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

    .tips-list p {
        font-size: 12px;
    }

    .action-section .form-box {
        padding: 16px;
    }

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

    .right-section .preview-section {
        padding: 16px;
    }

    .right-section .preview-content {
        gap: 12px;
    }

    .right-section .video-box {
        min-height: 200px;
    }
}

/* Mode picker */
.mode-picker {
    position: relative;
    width: 100%;
}
.mode-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: border-color 0.2s;
}
.mode-trigger:hover { border-color: #40a9ff; }
.mode-arrow { font-size: 10px; color: #999; transition: transform 0.2s; }
.mode-picker.open .mode-arrow { transform: rotate(180deg); }
.mode-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    z-index: 200;
    overflow: hidden;
}
.mode-picker.open .mode-dropdown { display: block; }
.mode-option {
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.15s;
}
.mode-option:hover { background: #f5f5f5; }
.mode-option.selected { background: #f0f7ff; }
.mode-option-name { font-size: 14px; font-weight: 500; margin-bottom: 3px; }
.badge-tag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 8px; font-weight: 500; }
.badge-gold { background: #fff7e6; color: #d48806; }
.badge-green { background: #e8f8ee; color: #389e0d; }

/* Keep the work surface within one viewport; only the left controls scroll. */
body.video-translate-body {
    min-height: 0;
    overflow: hidden;
}

.video-translate-page {
    height: calc(100vh - 68px);
    min-height: 0;
    width: calc(100% - var(--sidebar-width, 200px));
    margin-left: var(--sidebar-width, 200px);
    padding: 20px 40px 16px;
    overflow: hidden;
    align-items: stretch;
}

.video-translate-page .page-header {
    flex-shrink: 0;
    margin-bottom: 14px;
    text-align: center;
}

.video-translate-page .page-desc { display: none; }

.translate-container {
    flex: 1;
    gap: 24px;
    min-height: 0;
    max-width: 100%;
}

.left-section {
    display: flex;
    flex: 0 0 380px;
    flex-direction: column;
    width: 380px;
    min-height: 0;
    max-height: 100%;
    padding: 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .1);
}

.left-scroll {
    flex: 1;
    min-height: 0;
    padding-right: 6px;
    overflow-y: auto;
}

.left-scroll::-webkit-scrollbar { width: 6px; }
.left-scroll::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.tips-section {
    background: #fff;
    border-radius: 0;
    padding: 0 0 12px;
    box-shadow: none;
}

.tips-section .tips-title {
    gap: 0;
    margin: 0 0 12px;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.tips-section .tips-title h3 {
    margin: 0;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: 1.4;
}

.tips-section .tips-title svg { display: none; }

.tips-list {
    padding: 12px;
    background: #fff7f5;
    border: 1px solid #ffe8e4;
    border-radius: 9px;
    color: #ff5148;
    font-size: 13px;
    line-height: 1.6;
}

.tips-list p { margin: 0 0 8px; }
.tips-list p:last-child { margin-bottom: 0; }
.tips-list strong { font-weight: 400; }

.action-section { flex: none; }
.action-section .form-box {
    padding: 20px 0 0;
    background: transparent;
    box-shadow: none;
}

.action-footer {
    flex-shrink: 0;
    padding-top: 14px;
    background: #fff;
}

.action-footer .btn-large { width: 100%; }

.right-section {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    padding: 24px 30px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .1);
}

.right-section .preview-section {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.right-section .preview-content {
    flex: 1;
    min-height: 0;
}

.right-section .video-wrapper,
.right-section .video-box {
    min-height: 0;
}

@media (max-width: 900px) {
    body.video-translate-body { overflow: auto; }
    .video-translate-page {
        height: auto;
        min-height: 100vh;
        width: 100%;
        margin-left: 0;
        overflow: visible;
    }
    .translate-container { flex-direction: column; }
    .left-section {
        flex-basis: auto;
        width: 100%;
    }
    .left-scroll { overflow: visible; }
    .right-section { height: auto; }
}

@media (max-width: 768px) {
    .video-translate-page { padding: 20px; }
    .left-section { padding: 16px; }
    .right-section { padding: 16px; }
}
