/* ===== 免费降重工具 · 独立样式 v1 ===== */
/* 与平台 template/style.css 色系和谐，布局模式同 reduce-aigc */

/* 滚动发生在 .main（topbar 下方）：滚动条贴窗口右缘、从 topbar 下方开始 */
/* .main 自身不限宽，限宽只加在内层内容元素上 */
.reduce-repeat {
    padding-bottom: 40px;
    min-width: 0;
}

/* 内容超出时按容器收缩，避免出现横向滚动条 */
.reduce-repeat img,
.reduce-repeat .workbench {
    max-width: 100%;
}

/* 内层内容居中限宽（滚动容器 .main 永远全宽，滚动条贴窗口右缘） */
.reduce-repeat > * {
    max-width: min(1200px, 100%);
    margin-left: auto;
    margin-right: auto;
}

/* ---------- 页面标题 ---------- */
.page-head {
    margin: 4px auto 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}
.page-title {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: .5px;
}
.page-desc {
    margin: 0;
    font-size: 15px;
    color: var(--text-2);
    line-height: 1.6;
}

/* ---------- 下载 + 工作界面按钮 ---------- */
.action-bar {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 40px;
}
.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--brand);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    padding: 14px 36px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all .2s ease;
    box-shadow: 0 4px 14px rgba(47, 107, 255, .25);
}
.btn-download:hover {
    background: var(--brand-dark);
    box-shadow: 0 6px 20px rgba(47, 107, 255, .35);
    transform: translateY(-1px);
}
.btn-demo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--card);
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
    padding: 14px 36px;
    border-radius: 12px;
    border: 1px solid var(--border);
    cursor: pointer;
    text-decoration: none;
    transition: all .2s ease;
}
.btn-demo:hover {
    border-color: var(--brand);
    color: var(--brand);
    background: var(--brand-light);
}

/* ---------- 核心卖点 ---------- */
.features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 48px;
}
.feature-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px 20px;
    text-align: center;
    transition: box-shadow .2s ease;
}
.feature-item:hover {
    box-shadow: var(--shadow-card);
}
.feature-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    background: var(--brand-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand);
}
.feature-item h3 {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}
.feature-item p {
    margin: 0;
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.6;
}

/* ---------- 通用区块标题 ---------- */
.section-title {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    text-align: center;
}
.section-desc {
    margin: 0 0 24px;
    font-size: 14px;
    color: var(--text-2);
    text-align: center;
}

/* ---------- 工作原理（3 步） ---------- */
.principle-section {
    margin-bottom: 48px;
}
.principle-grid {
    display: flex;
    align-items: stretch;
    gap: 12px;
    justify-content: center;
}
.principle-item {
    flex: 1;
    min-width: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px 22px;
    text-align: center;
    position: relative;
    transition: box-shadow .2s ease;
}
.principle-item:hover {
    box-shadow: var(--shadow-card);
}
.principle-num {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(47, 107, 255, .3);
}
.principle-item h3 {
    margin: 10px 0 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}
.principle-item p {
    margin: 0;
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.7;
}
.principle-arrow {
    color: var(--text-3);
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* ---------- 工作界面 ---------- */
.workbench-section {
    margin-bottom: 8px;
}
.workbench {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}
.workbench-head {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 12px 18px;
    background: linear-gradient(180deg, #f7f9fc, #eef2f9);
    border-bottom: 1px solid var(--border);
}
.wb-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}
.wb-dot-red { background: #ff5f57; }
.wb-dot-yellow { background: #febc2e; }
.wb-dot-green { background: #28c840; }
.wb-title {
    margin-left: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
}
.workbench-body {
    display: flex;
    align-items: stretch;
    gap: 14px;
    padding: 20px;
}
.wb-pane {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}
.wb-pane-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f8fafd;
    border-bottom: 1px solid var(--border);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-2);
}
.wb-mini-btn {
    border: none;
    background: transparent;
    color: var(--brand);
    font-size: 12.5px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
    transition: background .15s ease;
}
.wb-mini-btn:hover {
    background: var(--brand-light);
}
.wb-pane textarea {
    flex: 1;
    min-height: 220px;
    border: none;
    outline: none;
    resize: vertical;
    padding: 14px;
    font-size: 13.5px;
    line-height: 1.8;
    color: var(--text);
    font-family: inherit;
    background: #fff;
}
.wb-pane textarea::placeholder {
    color: var(--text-3);
}
.wb-mid {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.btn-reduce {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--brand);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    padding: 12px 22px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: all .2s ease;
    box-shadow: 0 4px 14px rgba(47, 107, 255, .25);
}
.btn-reduce:hover:not(:disabled) {
    background: var(--brand-dark);
    transform: translateY(-1px);
}
.btn-reduce:disabled {
    opacity: .65;
    cursor: not-allowed;
}
.workbench-foot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    padding: 10px 18px;
    border-top: 1px solid var(--border);
    background: #f8fafd;
    font-size: 12.5px;
    color: var(--text-3);
}
.workbench-img {
    padding: 20px;
}
.workbench-img img {
    width: 100%;
    border-radius: 10px;
    border: 1px solid var(--border);
    display: block;
}
.wb-status-ok {
    color: #16a34a;
    font-weight: 600;
}

/* ---------- 降重提示 ---------- */
.reduce-tip {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    padding: 16px 18px;
    margin-top: 18px;
}
.reduce-tip-icon {
    color: var(--brand);
    flex-shrink: 0;
    margin-top: 1px;
}
.reduce-tip-body {
    flex: 1;
    min-width: 0;
}
.reduce-tip-title {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}
.reduce-tip-body p {
    margin: 0;
    font-size: 13.5px;
    color: var(--text-2);
    line-height: 1.7;
}
.reduce-tip-link {
    color: var(--brand);
    text-decoration: none;
    font-weight: 600;
}
.reduce-tip-link:hover {
    text-decoration: underline;
}

/* ---------- 公众号弹窗 ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(28, 36, 51, .55);
    backdrop-filter: blur(3px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all .25s;
    padding: 20px;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    background: var(--card);
    border-radius: 16px;
    width: 100%;
    max-width: 430px;
    padding: 28px 26px;
    position: relative;
    transform: translateY(14px) scale(.97);
    transition: transform .25s;
    box-shadow: 0 20px 60px rgba(15, 30, 70, .25);
}
.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}
.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-3);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
}
.modal-close:hover {
    background: rgba(47, 107, 255, .18);
    color: var(--brand);
}
.modal-header {
    text-align: center;
    margin-bottom: 22px;
}
.modal-header h3 {
    margin: 0 0 6px;
    font-size: 19px;
    font-weight: 800;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.modal-header h3 svg {
    color: var(--brand);
    flex-shrink: 0;
}
.modal-header p {
    margin: 0;
    color: var(--text-3);
    font-size: 13px;
}
.qr-section {
    display: flex;
    gap: 18px;
    align-items: center;
}
.qr-code {
    width: 130px;
    height: 130px;
    padding: 8px;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 14px;
    flex-shrink: 0;
}
.qr-code img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.qr-tips { flex: 1; min-width: 0; }
.qr-tips p {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--text-2);
    font-size: 13.5px;
    margin: 0 0 13px;
    line-height: 1.5;
}
.qr-tips p:last-child { margin-bottom: 0; }
.qr-tips strong { color: var(--brand); }
.step-num {
    font-style: normal;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--brand-light);
    color: var(--brand);
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
    .features { grid-template-columns: repeat(2, 1fr); }
    .principle-grid { flex-direction: column; align-items: stretch; }
    .principle-arrow { justify-content: center; transform: rotate(90deg); }
    .workbench-body { flex-direction: column; }
    .wb-mid { padding: 2px 0; }
}
@media (max-width: 640px) {
    .page-title { font-size: 24px; }
    .action-bar { flex-direction: column; align-items: stretch; }
    .btn-download, .btn-demo { text-align: center; justify-content: center; }
    .features { grid-template-columns: 1fr; }
}
