/* ===== AI流程图绘图工具（next-ai-drawio）· 独立样式 v1 ===== */
/* 布局模式同 reduce-aigc / pdf2zh，与平台 template/style.css 色系和谐 */

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

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

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

/* ---------- AI 生成效果展示 ---------- */
.workbench-section {
    margin-top: 8px;
    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-img {
    padding: 20px;
}
.workbench-img img {
    width: 100%;
    border-radius: 10px;
    border: 1px solid var(--border);
    display: block;
}
.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);
}
.wb-status-ok {
    color: #16a34a;
    font-weight: 600;
}

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

/* ---------- 推荐大模型接入 ---------- */
.model-access {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    /* 只设上下间距，左右沿用 .drawio > * 的 auto 居中（同 .features 写法） */
    margin-top: 20px;
    margin-bottom: 36px;
}
.model-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 18px 20px;
}
.model-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.model-icon-sf { background: linear-gradient(135deg, #6a5cff, #3e8bff); }
.model-icon-ark { background: linear-gradient(135deg, #ff5a3c, #e2231a); }
.model-icon-xf { background: linear-gradient(135deg, #ff5a3c, #e2231a); }
.model-info { flex: 1; min-width: 0; }
.model-info h3 {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-1);
}
.model-info p {
    margin: 0;
    font-size: 13px;
    color: var(--text-3);
    line-height: 1.5;
}
.model-link {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: #1a1a1a;
    text-decoration: none;
    white-space: nowrap;
    padding: 8px 16px;
    border-radius: 999px;
    transition: background .2s;
}
.model-link:hover { background: #000; text-decoration: none; color: #fff; }

/* ---------- 响应式 ---------- */
@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; }
    .workbench-foot { gap: 14px; flex-wrap: wrap; }
    .model-access { grid-template-columns: 1fr; }
}
