/* ===== 降AIGC工具 · 独立样式 v2 ===== */
/* 与平台 template/style.css 色系和谐 */

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

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

/* 内层内容居中限宽（滚动容器 .main 永远全宽，滚动条贴窗口右缘） */
.reduce-aigc > * {
    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;
}

/* ---------- AIGC检测对比（上下排列） ---------- */
.compare-section {
    margin-bottom: 48px;
}
.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;
}
.compare-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}
.compare-card {
    width: 100%;
    max-width: 1200px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: box-shadow .2s ease;
}
.compare-card:hover {
    box-shadow: var(--shadow-card);
}
.compare-before {
    border-color: rgba(220, 38, 38, .2);
}
.compare-after {
    border-color: rgba(22, 163, 74, .2);
}
.compare-label {
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    border-bottom: 1px solid var(--border);
}
.compare-before .compare-label {
    color: #dc2626;
    background: #fef2f2;
}
.compare-after .compare-label {
    color: #16a34a;
    background: #f0fdf4;
}
.compare-img {
    padding: 16px;
    text-align: center;
}
.compare-img img {
    width: 100%;
    border-radius: 10px;
    display: block;
    margin: 0 auto;
}
.compare-rate {
    padding: 12px 20px;
    font-size: 17px;
    font-weight: 700;
    text-align: center;
    border-top: 1px solid var(--border);
}
.rate-high {
    color: #dc2626;
    background: #fef2f2;
}
.rate-low {
    color: #16a34a;
    background: #f0fdf4;
}
.compare-arrow {
    color: var(--text-3);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(90deg);
}

/* ===== 操作演示页 ===== */
.demo-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.demo-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text-2);
    font-size: 14px;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all .2s ease;
}
.demo-tab:hover {
    border-color: var(--brand);
    color: var(--brand);
}
.demo-tab.active {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}
.demo-tab-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--brand-light);
    color: var(--brand);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.demo-tab.active .demo-tab-num {
    background: rgba(255, 255, 255, .25);
    color: #fff;
}

/* 步骤面板 */
.demo-content {
    min-height: 360px;
}
.demo-step-panel {
    display: none;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}
.demo-step-panel.active {
    display: block;
}
.demo-step-info {
    padding: 24px 28px 16px;
    text-align: center;
}
.demo-step-info h2 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}
.demo-step-info p {
    margin: 0;
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto;
}
.demo-step-img {
    padding: 0 28px 28px;
    text-align: center;
}
.demo-step-img img {
    width: 100%;
    border-radius: 10px;
    border: 1px solid var(--border);
    display: block;
    margin: 0 auto;
}

/* 底部翻页 */
.demo-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 28px;
}
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-2);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color .2s ease;
}
.btn-back:hover { color: var(--brand); }
.btn-next-step {
    background: var(--brand);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    padding: 10px 28px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all .2s ease;
}
.btn-next-step:hover {
    background: var(--brand-dark);
}

/* ---------- 公众号弹窗 ---------- */
.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); }
}
@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; }
}
