/* ================= 全局与布局 ================= */
body {
    background-color: #f8fafc; /* 极简浅灰背景 */
    color: #0f172a;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.main-content {
    display: flex;
    gap: 24px;
    padding: 20px 10%;
    max-width: 1440px;
    margin: 0 auto;
    align-items: stretch;
}

/* ================= 顶部标题栏 ================= */
.toolbar {
    padding: 10px 10%;
    background: transparent;
}

.page-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: bold;
    color: #1e293b;
    margin: 0;
}

.ai-tag {
    background-color: #ecfdf5;
    color: #059669;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    border: 1px solid #a7f3d0;
    font-weight: 500;
}

/* ================= 左侧控制面板 (卡片) ================= */
.control-card {
    width: 380px;
    flex-shrink: 0;
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 16px;
    font-weight: bold;
    color: #1e293b;
    margin: 0 0 20px 0;
}

.controls-group {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* --- 上传区域 --- */
.upload-area {
    margin-bottom: 24px;
}

.upload-box {
    width: 100%;
    min-height: 110px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.upload-box:hover, .upload-box.drag-over {
    border-color: #a855f7;
    background: #faf5ff;
}

.upload-content-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
}

.upload-icon-wrapper {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #e879f9 0%, #c084fc 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.upload-icon-wrapper img {
    width: 22px;
    height: 22px;
}

.upload-text-info {
    text-align: left;
}

.main-text {
    font-size: 15px;
    font-weight: bold;
    color: #334155;
    margin-bottom: 4px;
}

.sub-text {
    color: #94a3b8;
    font-size: 12px;
    margin: 0;
    line-height: 1.4;
}

/* --- 设置虚线框 --- */
.settings-box {
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 8px 16px;
    background-color: #ffffff;
    margin-bottom: auto; /* 推挤底部按钮 */
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed #f1f5f9;
}

.setting-row:last-child {
    border-bottom: none;
}

.row-label {
    font-size: 13px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot-purple::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #a855f7;
}

.row-value {
    font-size: 13px;
}

.highlight-purple {
    color: #7c3aed;
    font-weight: bold;
}

.bold-black {
    color: #0f172a;
    font-weight: bold;
}

/* --- 下拉菜单 --- */
.custom-select-wrapper {
    position: relative;
    min-width: 110px;
}

.select-trigger {
    cursor: pointer;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    color: #0f172a;
}

.arrow-icon {
    font-size: 10px;
    color: #94a3b8;
    font-style: normal;
}

.style-options-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    padding: 8px 0;
    margin: 8px 0 0 0;
    list-style: none;
    display: none;
    z-index: 100;
    border: 1px solid #f1f5f9;
    min-width: 140px;
}

.style-options-menu.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.style-options-menu li {
    padding: 10px 16px;
    font-size: 13px;
    cursor: pointer;
    text-align: right;
    color: #475569;
}

.style-options-menu li:hover {
    background-color: #faf5ff;
    color: #7c3aed;
}

.style-options-menu li.active {
    color: #7c3aed;
    font-weight: bold;
}

/* --- 底部按钮区 --- */
.action-area {
    margin-top: 30px;
}

.translate-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.25);
}

.translate-btn:hover {
    background: linear-gradient(135deg, #9333ea 0%, #6d28d9 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

.cost-notice {
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
    margin-top: 12px;
}

/* ================= 右侧沉浸式播放器 ================= */
.immersive-player {
    flex-grow: 1;
    background: #231e2e; /* 参考图深色背景 */
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    min-height: 600px;
}

.preview-content {
    flex-grow: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: radial-gradient(circle at center, #352a45 0%, #231e2e 100%);
}

/* 悬浮胶囊 Tabs */
.floating-tabs {
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 4px;
    display: flex;
    gap: 2px;
    z-index: 10;
}

.preview-tab {
    padding: 8px 20px;
    border: none;
    background: transparent;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.3s;
}

.preview-tab:hover {
    color: #fff;
}

.preview-tab.active {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-weight: bold;
}

.preview-panel {
    display: none;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.preview-panel.active {
    display: flex;
}

.preview-panel video {
    max-width: 100%;
    max-height: 650px;
    object-fit: contain;
    background: #000;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* ================= 进度条遮罩 ================= */
.progress-overlay {
    position: absolute;
    inset: 0;
    background: rgba(35, 30, 46, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 16px;
}

.progress-number {
    font-size: 36px;
    font-weight: bold;
    color: #c084fc;
    text-shadow: 0 0 15px rgba(192, 132, 252, 0.5);
    margin-bottom: 8px;
}

.progress-text {
    color: #e2e8f0;
    font-size: 14px;
}

.progress-ring-circle {
    transition: stroke-dashoffset 0.3s;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    stroke-dasharray: 565.48;
    stroke-dashoffset: 565.48;
}

@keyframes glowing {
    0% { box-shadow: 0 0 5px rgba(168, 85, 247, 0.5); }
    50% { box-shadow: 0 0 20px rgba(168, 85, 247, 0.8); }
    100% { box-shadow: 0 0 5px rgba(168, 85, 247, 0.5); }
}
.progress-circle::after {
    animation: glowing 2s infinite;
    opacity: 0.3;
}

/* ================= 移动端响应式 (Phone & Tablet) ================= */
@media screen and (max-width: 768px) {
    body {
        background-color: #f8fafc;
    }

    /* 手机端主布局：改为上下垂直堆叠 */
    .main-content {
        flex-direction: column;
        padding: 12px;
        gap: 16px;
    }

    .toolbar {
        padding: 12px 16px;
    }

    .page-title {
        font-size: 18px;
    }

    /* 让播放器排在上面，符合移动端操作习惯 */
    .immersive-player {
        order: -1;
        min-height: 300px; /* 移动端高度调整 */
        height: 50vh;
        border-radius: 12px;
    }

    .preview-content {
        padding: 16px;
    }

    .preview-panel video {
        max-height: 100%;
        border-radius: 8px;
    }

    /* 控制面板适应屏幕宽度 */
    .control-card {
        width: 100%;
        padding: 16px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.04);
        border-radius: 12px;
    }

    .card-title {
        font-size: 15px;
        margin-bottom: 16px;
    }

    /* 上传区域微调 */
    .upload-box {
        min-height: 80px;
    }
    
    .upload-content-wrapper {
        padding: 12px;
        gap: 12px;
    }

    .upload-icon-wrapper {
        width: 36px;
        height: 36px;
    }

    .upload-icon-wrapper img {
        width: 18px;
        height: 18px;
    }

    .main-text {
        font-size: 14px;
    }
    .sub-text {
        font-size: 11px;
    }

    /* 底部按钮缩减间距 */
    .action-area {
        margin-top: 16px;
    }

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

    /* 下拉菜单调整为向上弹出，避免在底部被遮挡 */
    .style-options-menu {
        bottom: calc(100% + 10px);
        top: auto;
        right: 0;
        transform-origin: bottom right;
    }

    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(5px); }
        to { opacity: 1; transform: translateY(0); }
    }
}

.seo-article-block {
    max-width: 1440px;
    margin: 40px auto;
    padding: 0 10%;
}
.seo-article-inner {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.seo-article-inner h2 {
    font-size: 20px;
    color: #1e293b;
    margin-top: 0;
    margin-bottom: 16px;
}

.seo-article-inner p {
    font-size: 14px;
    color: #64748b;
    line-height: 1.8;
    margin-bottom: 24px;
}

.seo-article-inner strong {
    color: #a855f7;
    font-weight: bold;
}

.seo-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.seo-feature-item {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.seo-feature-item h4 {
    font-size: 15px;
    color: #334155;
    margin-top: 0;
    margin-bottom: 10px;
}

.seo-feature-item p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.6;
}

@media screen and (max-width: 768px) {
    .seo-article-block {
        padding: 0 12px;
        margin-top: 20px;
    }
    .seo-article-inner {
        padding: 20px;
    }
    .seo-features {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}