/* frontend/style.css - 纯正 UMFUN Ai 暖色轻拟物风格 + 图像放大工作台 */

:root {
    --bg-page: #fbf9f6;
    --bg-surface: #ffffff;
    --border-color: #f7e9df;
    --border-warm: #f6d8c8;
    --border-focus: #f3aa89;
    --text-main: #1f2937;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --btn-purple-gradient: linear-gradient(135deg, #6366f1 0%, #4f46e5 50%, #4338ca 100%);
    --btn-purple-hover: linear-gradient(135deg, #4f46e5 0%, #4338ca 50%, #3730a3 100%);
    --pill-notice-bg: #fef7ed;
    --pill-notice-border: #fed7aa;
    --pill-notice-text: #c2410c;
    --pill-help-bg: #faf5ff;
    --pill-help-border: #e9d5ff;
    --pill-help-text: #9333ea;
    --shadow-soft: 0 4px 18px rgba(220, 180, 160, 0.08);
    --shadow-card: 0 2px 8px rgba(220, 180, 160, 0.06);
    --shadow-hover: 0 6px 20px rgba(220, 180, 160, 0.14);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

body {
    background-color: var(--bg-page);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    -webkit-font-smoothing: antialiased;
}

.umfun-app {
    width: 100%;
    max-width: 1480px;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ================= 1. 顶部 UMFUN 胶囊导航栏 ================= */
.top-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 20px;
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
}

.brand-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo .logo-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.8px solid #1f2937;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafaf9;
}

.brand-text-wrap {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1f2937;
    letter-spacing: -0.3px;
    line-height: 1.1;
}

.brand-subtitle {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* 中间状态胶囊 */
.nav-center-tabs {
    display: flex;
    align-items: center;
    background: #fbf8f5;
    border: 1px solid var(--border-color);
    border-radius: 22px;
    padding: 4px 6px;
    gap: 6px;
}

.nav-tab-active {
    background: #18181b;
    color: #ffffff;
    padding: 6px 16px;
    border-radius: 18px;
    font-size: 0.82rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.nav-tab-idle {
    color: var(--text-secondary);
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* 右侧多彩按钮 */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pill-btn {
    border-radius: 20px;
    padding: 7px 15px;
    font-size: 0.84rem;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.pill-notice {
    background: var(--pill-notice-bg);
    border-color: var(--pill-notice-border);
    color: var(--pill-notice-text);
}

.pill-help {
    background: var(--pill-help-bg);
    border-color: var(--pill-help-border);
    color: var(--pill-help-text);
}

.pill-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
}
/* ================= 2. 主体工作区布局 (双面板结构) ================= */
.main-content {
    display: grid;
    grid-template-columns: 460px 1fr;
    gap: 20px;
}

@media (max-width: 1100px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

.panel {
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: var(--shadow-soft);
}

.section-title {
    font-size: 1.08rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
}

.control-panel .section-title i {
    color: #f97316;
}

.preview-panel .section-title i {
    color: #6366f1;
}

/* ================= 3. 左侧控制卡片组 (UMFUN 暖色圆角外观) ================= */
.um-card {
    background: #fffdfb;
    border: 1px solid var(--border-warm);
    border-radius: 16px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: var(--shadow-card);
    transition: all 0.2s ease;
}

.um-card:hover {
    border-color: var(--border-focus);
    box-shadow: var(--shadow-hover);
}

.um-card-title {
    font-size: 0.94rem;
    font-weight: 700;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-buy-key {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #b45309;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 9999px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-buy-key:hover {
    background: #fde68a;
    color: #92400e;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.2);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #4b5563;
}

.color-correction-control {
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: #fffaf6;
}

.prompt-help {
    display: block;
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 0.74rem;
    line-height: 1.45;
}

.color-correction-control label {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.color-correction-control output {
    color: #c2410c;
    font-weight: 700;
}

.color-correction-control input[type="range"] {
    width: 100%;
    accent-color: #f97316;
}

.color-correction-control small {
    color: var(--text-muted);
    font-size: 0.74rem;
    line-height: 1.4;
}

input[type="text"],
input[type="password"],
textarea {
    width: 100%;
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid var(--border-warm);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 0.88rem;
    outline: none;
    transition: all 0.2s ease;
}

input:focus,
textarea:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.12);
}

textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}

.input-select-group {
    display: flex;
    gap: 8px;
}

.input-select-group select {
    background: #fbf8f5;
    border: 1px solid var(--border-warm);
    border-radius: 12px;
    padding: 0 10px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    outline: none;
    white-space: nowrap;
}

/* 单选框卡片组 */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.radio-item {
    display: flex;
    align-items: center;
    position: relative;
    padding: 13px 16px;
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.radio-item:hover {
    border-color: #fed7aa;
    background: #fffdfa;
}

.radio-item.active {
    background: #fffaf5;
    border-color: #f97316;
    box-shadow: 0 2px 10px rgba(249, 115, 22, 0.12);
}

.radio-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
}

.radio-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.radio-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 6px;
}

.radio-desc {
    font-size: 0.76rem;
    color: #6b7280;
    line-height: 1.4;
}

/* 药丸下拉选择框 */
.pill-select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.pill-select-wrapper select {
    width: 100%;
    appearance: none;
    background: #ffffff;
    border: 1px solid var(--border-warm);
    border-radius: 12px;
    padding: 10px 32px 10px 14px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #1f2937;
    cursor: pointer;
    outline: none;
}

.pill-arrow {
    position: absolute;
    right: 12px;
    font-size: 0.72rem;
    color: #9ca3af;
    pointer-events: none;
}

/* 开始生成大主按钮 (UMFUN 药丸大按钮) */
.btn-generate-main {
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: 18px;
    background: var(--btn-purple-gradient);
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.38), 0 2px 6px rgba(67, 56, 202, 0.25);
    transition: all 0.25s ease;
}

.btn-generate-main:hover:not(:disabled) {
    background: var(--btn-purple-hover);
    box-shadow: 0 8px 26px rgba(67, 56, 202, 0.5), 0 3px 8px rgba(55, 48, 163, 0.3);
    transform: translateY(-2px);
}

.btn-generate-main:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(67, 56, 202, 0.4);
}

.btn-generate-main:disabled {
    background: #e2e8f0;
    color: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}
/* ================= 4. 右侧预览与方案预估面板 ================= */
.drop-zone {
    border: 2px dashed #fed7aa;
    background: #fffaf5;
    border-radius: 16px;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    overflow: hidden;
    position: relative;
}

.drop-zone:hover {
    border-color: #f97316;
    background: #fff7ed;
    box-shadow: 0 4px 16px rgba(249, 115, 22, 0.08);
}

.drop-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 30px 20px;
    text-align: center;
}

.cloud-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.1);
}

.cloud-icon-wrap i {
    font-size: 2rem;
    color: #f97316;
}

.main-tip {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1f2937;
}

.sub-tip {
    font-size: 0.82rem;
    color: #6b7280;
}

.upload-badge-bar {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.upload-pill {
    font-size: 0.75rem;
    padding: 4px 10px;
    background: #ffffff;
    border: 1px solid #f6ded3;
    border-radius: 12px;
    color: #7c2d12;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.preview-stage {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f8fafc;
    border-radius: 12px;
    overflow: hidden;
}

.preview-stage-inner {
    position: relative;
    display: inline-block;
    line-height: 0;
    max-width: 100%;
}

.preview-stage-inner img {
    max-width: 100%;
    max-height: 480px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.tile-box {
    position: absolute;
    box-sizing: border-box;
    border: 1.5px dashed rgba(249, 115, 22, 0.9);
    background: rgba(254, 215, 170, 0.12);
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: all 0.2s ease;
}

.tile-label {
    background: rgba(234, 88, 12, 0.92);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    user-select: none;
}

/* 方案预估信息栏 (4格暖色胶囊) */
.plan-info-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 14px;
    padding: 12px 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.info-item .label {
    font-size: 0.75rem;
    color: #9a3412;
    font-weight: 500;
}

.info-item .value {
    font-size: 0.92rem;
    font-weight: 700;
    color: #7c2d12;
}

/* 处理进度条 (UMFUN 灵动光感风格) */
.progress-box {
    background: #fffdfb;
    border: 1px solid var(--border-warm);
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: var(--shadow-card);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    font-weight: 600;
    color: #1f2937;
}

.progress-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.spinner-ring {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2.2px solid rgba(249, 115, 22, 0.2);
    border-top-color: #f97316;
    border-right-color: #a855f7;
    border-radius: 50%;
    animation: umfun-spin 0.8s linear infinite;
    will-change: transform;
    flex-shrink: 0;
}

@keyframes umfun-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: #f1f3f7;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #f97316 0%, #fb923c 40%, #a855f7 100%);
    border-radius: 6px;
    transition: width 0.3s ease;
    box-shadow: 0 1px 4px rgba(249, 115, 22, 0.3);
}
/* ================= 5. 结果对比查看器 (UMFUN 风格) ================= */
.result-box {
    background: #fffdfb;
    border: 1px solid var(--border-warm);
    border-radius: 18px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.success-icon-badge {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #ecfdf5;
    border: 1.5px solid #a7f3d0;
    color: #059669;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.result-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1f2937;
}

.result-tag {
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 6px;
    background: #f3f4f6;
    color: #4b5563;
    font-weight: 600;
}

.btn-download-pill {
    padding: 8px 18px;
    background: #18181b;
    color: #ffffff;
    text-decoration: none;
    border-radius: 12px;
    font-size: 0.86rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-download-pill:hover {
    background: #27272a;
    transform: translateY(-1px);
}

.comparison-slider {
    position: relative;
    width: 100%;
    min-height: 420px;
    max-height: 600px;
    overflow: hidden;
    border-radius: 16px;
    border: 1.5px solid var(--border-color);
    background: #f8fafc;
    user-select: none;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: zoom-in;
}

.zoom-hint-badge {
    position: absolute;
    bottom: 14px;
    right: 14px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(15, 23, 42, 0.75);
    color: #ffffff;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    gap: 6px;
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 12;
}

.comparison-slider:hover .zoom-hint-badge {
    background: rgba(249, 115, 22, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.4);
}

.comp-stage-inner {
    position: relative;
    display: inline-block;
    line-height: 0;
    max-width: 100%;
    max-height: 100%;
}

.comp-img {
    max-width: 100%;
    max-height: 580px;
    width: auto;
    height: auto;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

.img-before {
    position: relative;
    display: block;
}

.img-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
}

.slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: rgba(255, 255, 255, 0.95);
    cursor: ew-resize;
    transform: translateX(-50%);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.handle-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    border: 1.5px solid rgba(249, 115, 22, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ea580c;
    font-size: 0.72rem;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.18), 0 1px 3px rgba(249, 115, 22, 0.2);
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.slider-handle:hover .handle-circle,
.slider-handle:active .handle-circle {
    transform: translate(-50%, -50%) scale(1.12);
    border-color: #ea580c;
    box-shadow: 0 4px 16px rgba(234, 88, 12, 0.35);
}

.badge {
    position: absolute;
    top: 14px;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.65);
    color: #ffffff;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 5;
    pointer-events: none;
    line-height: normal;
}

.badge-before { left: 14px; }
.badge-after { right: 14px; }

/* ================= 6. 全屏放大对比查看模式 ================= */
.fullscreen-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 15, 26, 0.94);
    backdrop-filter: blur(12px);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    user-select: none;
    animation: fsFadeIn 0.2s ease-out;
}

@keyframes fsFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fullscreen-topbar {
    height: 60px;
    background: rgba(15, 23, 42, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    flex-shrink: 0;
    z-index: 10;
}

.fullscreen-title {
    color: #f8fafc;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.fullscreen-badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(249, 115, 22, 0.2);
    border: 1px solid rgba(249, 115, 22, 0.5);
    color: #fb923c;
}

.fullscreen-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fs-view-modes {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 3px;
    gap: 4px;
}

.fs-mode-btn {
    padding: 6px 14px;
    border-radius: 9px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    outline: none;
    color: #cbd5e1;
    background: transparent;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.fs-mode-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.fs-mode-btn.active {
    color: #ffffff;
    background: #f97316;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.4);
}

.fullscreen-btn {
    padding: 8px 18px;
    border-radius: 12px;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    outline: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.fullscreen-btn.pill-download {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.35);
}

.fullscreen-btn.pill-download:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.fullscreen-btn.pill-close {
    background: rgba(255, 255, 255, 0.12);
    color: #f1f5f9;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.fullscreen-btn.pill-close:hover {
    background: rgba(239, 68, 68, 0.85);
    border-color: rgba(239, 68, 68, 1);
    color: #ffffff;
}

.fullscreen-stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    padding: 20px;
    cursor: ew-resize;
    overscroll-behavior: contain;
    touch-action: none;
}

.fullscreen-comp-inner {
    position: relative;
    display: inline-block;
    /* The transformed canvas must keep its output-pixel dimensions. Flexbox
       must not shrink it before the fit transform is applied. */
    flex: 0 0 auto;
    line-height: 0;
    max-width: none;
    max-height: none;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    border-radius: 12px;
    overflow: hidden;
    transform-origin: center center;
    will-change: transform;
}

.fs-comp-img {
    max-width: none;
    max-height: none;
    width: auto;
    height: auto;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

.fs-img-before {
    position: relative;
    display: block;
}

.fs-img-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    clip-path: none;
}

/* 全图预览模式：隐藏对比线与原图标签，成图100%显示 */
.fullscreen-modal.mode-full .slider-handle,
.fullscreen-modal.mode-full .badge-before {
    display: none !important;
}

.fullscreen-modal.mode-full .fs-img-after {
    clip-path: none !important;
}

.fullscreen-modal.mode-full .badge-after {
    right: 14px;
}

/* 弹窗样式 */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal-dialog {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.16);
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f3f4f6;
}

.modal-header h3 {
    font-size: 1.02rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #9ca3af;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

.info-modal-dialog {
    max-width: 620px;
}

.info-modal-body h4 {
    margin: 0 0 8px;
    font-size: 1rem;
    color: #1f2937;
}

.notice-panel {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px;
    border: 1px solid #fed7aa;
    border-radius: 14px;
    background: #fff7ed;
}

.notice-icon {
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    color: #ea580c;
    background: #ffedd5;
    border-radius: 50%;
    font-size: 1.1rem;
}

.info-modal-body p {
    margin: 4px 0;
    color: #4b5563;
    line-height: 1.5;
}

.info-modal-body small {
    color: #9ca3af;
    line-height: 1.45;
}

.wechat-line {
    color: #9a3412 !important;
    font-size: 1.05rem;
}

.wechat-line strong {
    letter-spacing: 0.08em;
    color: #c2410c;
}

.help-panel h4 {
    display: flex;
    gap: 8px;
    align-items: center;
}

.help-panel ol {
    margin: 10px 0 14px 22px;
    padding: 0;
    color: #4b5563;
    line-height: 1.65;
}

.help-tip {
    display: flex;
    gap: 9px;
    margin-top: 10px;
    padding: 11px 12px;
    border-radius: 10px;
    color: #7c2d12;
    background: #fff7ed;
    line-height: 1.5;
    font-size: 0.84rem;
}

.help-tip > i {
    margin-top: 3px;
    color: #f97316;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 14px 20px;
    border-top: 1px solid #f3f4f6;
    background: #fafaf9;
}

.btn-modal-save {
    background: #18181b;
    color: #ffffff;
    border: none;
    padding: 8px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
}
