/* ============================================================
   安徽云端 - 子页面样式
   pricing 套餐 / tools 工具 / support & docs 文档
   ============================================================ */

/* ---------- 套餐卡片 ---------- */
.packages-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px;
  max-width: 1100px; margin: 0 auto 80px; align-items: stretch;
}
.package-card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 38px 30px; text-align: center; position: relative;
  transition: transform .3s ease, box-shadow .3s ease;
  display: flex; flex-direction: column;
}
.package-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-hover); }
.package-card.featured {
  border: 2px solid var(--primary);
  box-shadow: 0 12px 36px rgba(15, 160, 245, .18);
}
.package-card.featured::before {
  content: "最受欢迎"; position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff; font-size: 12px;
  padding: 4px 16px; border-radius: 20px; letter-spacing: 1px;
}
.package-card .p-name { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.package-card .p-price { font-family: var(--font-mono); margin-bottom: 22px; }
.package-card .p-price .amount { font-size: 42px; font-weight: 700; color: var(--ink); }
.package-card .p-price .amount small { font-size: 16px; }
.package-card .p-price .unit { color: var(--ink-faint); font-size: 13px; }
.package-card ul { list-style: none; text-align: left; margin-bottom: 28px; flex: 1; }
.package-card li {
  padding: 8px 0 8px 26px; position: relative; font-size: 13.5px; color: var(--ink-light);
  border-bottom: 1px dashed var(--line);
}
.package-card li::before {
  content: ""; position: absolute; left: 2px; top: 14px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--primary-light) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%230fa0f5" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>') center/9px no-repeat;
}
.package-card li.off { color: var(--ink-faint); text-decoration: line-through; }
.package-card li.off::before { background-color: #f2f4f6; }

/* ---------- 证书服务 ---------- */
.cert-band {
  max-width: 1100px; margin: 0 auto 80px;
  background: linear-gradient(135deg, #22313f 0%, #31465c 100%);
  border-radius: 16px; padding: 50px 54px; color: #fff;
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center;
}
.cert-band h2 { font-size: 26px; margin-bottom: 12px; }
.cert-band p { color: #b8c9d6; font-size: 14px; margin-bottom: 24px; }
.cert-band ul { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cert-band li { font-size: 13.5px; color: #d7e3ec; padding-left: 22px; position: relative; }
.cert-band li::before { content: "◆"; position: absolute; left: 0; color: #35c3ff; font-size: 10px; top: 4px; }
.cert-qr {
  background: rgba(255, 255, 255, .08); border: 1px dashed rgba(255, 255, 255, .3);
  border-radius: 12px; padding: 30px; text-align: center;
}
.cert-qr .qr-box {
  width: 150px; height: 150px; margin: 0 auto 14px; border-radius: 10px;
  background:
    repeating-conic-gradient(#fff 0% 25%, #22313f 0% 50%) 0 0/22px 22px;
  border: 6px solid #fff;
}
.cert-qr span { font-size: 12.5px; color: #b8c9d6; }

/* ---------- FAQ 手风琴 ---------- */
.faq-list { max-width: 820px; margin: 0 auto 90px; }
.faq-item { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 14px; overflow: hidden; background: #fff; }
.faq-q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  padding: 18px 22px; font-size: 15px; font-weight: 600; color: var(--ink);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font-family: inherit;
}
.faq-q .arrow { transition: transform .3s; color: var(--primary); font-size: 13px; flex: none; }
.faq-item.open .faq-q .arrow { transform: rotate(180deg); }
.faq-a {
  max-height: 0; overflow: hidden; transition: max-height .35s ease;
  color: var(--ink-light); font-size: 14px;
}
.faq-a > div { padding: 0 22px 20px; }
.faq-item.open .faq-a { max-height: 300px; }
.faq-item.open { border-color: rgba(15, 160, 245, .5); box-shadow: var(--shadow-card); }

/* ---------- 微信支付弹窗 ---------- */
.pay-modal-mask {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(24, 42, 56, .55); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: .3s;
}
.pay-modal-mask.show { opacity: 1; visibility: visible; }
.pay-modal {
  background: #fff; border-radius: 14px; padding: 36px 40px 30px;
  width: 340px; text-align: center; position: relative;
  transform: translateY(24px) scale(.96); transition: .3s;
}
.pay-modal-mask.show .pay-modal { transform: none; }
.pay-modal h2 { font-size: 19px; margin-bottom: 6px; }
.pay-modal .pay-price { color: var(--primary); font-size: 26px; font-weight: 700; font-family: var(--font-mono); margin-bottom: 18px; }
.pay-modal .pay-qr {
  width: 190px; height: 190px; margin: 0 auto 14px; border-radius: 10px;
  background:
    repeating-conic-gradient(#2c3e50 0% 25%, #fff 0% 50%) 0 0/20px 20px;
  border: 8px solid #f2f6f9;
  position: relative;
}
.pay-modal .pay-qr::after {
  content: "微信"; position: absolute; inset: 0; margin: auto;
  width: 52px; height: 52px; background: #07c160; color: #fff;
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; border: 4px solid #fff;
}
.pay-modal .pay-tip { color: var(--ink-faint); font-size: 12.5px; }
.pay-modal .pay-close {
  position: absolute; top: 12px; right: 14px; border: 0; background: none;
  font-size: 20px; color: var(--ink-faint); cursor: pointer; line-height: 1;
}
.pay-modal .pay-close:hover { color: var(--ink); }
/* 弹窗内的下单表单 */
.pay-form { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.pay-form input, .pay-form textarea {
  width: 100%; box-sizing: border-box;
  border: 1px solid #e2e8ee; border-radius: 8px; padding: 10px 12px;
  font: inherit; font-size: 14px; color: var(--ink); background: #fbfcfd;
}
.pay-form textarea { min-height: 62px; resize: vertical; }
.pay-form input:focus, .pay-form textarea:focus {
  outline: none; border-color: var(--primary); background: #fff;
}
.pay-form .btn { width: 100%; justify-content: center; }
.pay-msg { font-size: 13px; min-height: 18px; }
.pay-msg.err { color: #e0533c; }
.pay-msg.ok { color: #12a05c; font-weight: 600; }
.pay-form.is-done .btn, .pay-form.is-done input, .pay-form.is-done textarea { display: none; }

/* ---------- 需求工单表单 ---------- */
.ticket-section { max-width: 900px; margin: 70px auto 0; }
.ticket-form {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 28px; box-shadow: var(--shadow-card);
}
.ticket-form .full { grid-column: 1 / -1; }
.ticket-form label { display: block; font-size: 13px; color: var(--ink-light); margin-bottom: 6px; }
.ticket-form input, .ticket-form select, .ticket-form textarea {
  width: 100%; box-sizing: border-box;
  border: 1px solid #e2e8ee; border-radius: 8px; padding: 10px 12px;
  font: inherit; font-size: 14px; color: var(--ink); background: #fbfcfd;
}
.ticket-form textarea { min-height: 96px; resize: vertical; }
.ticket-form input:focus, .ticket-form select:focus, .ticket-form textarea:focus {
  outline: none; border-color: var(--primary); background: #fff;
}
.ticket-msg { grid-column: 1 / -1; font-size: 13.5px; min-height: 20px; }
.ticket-msg.err { color: #e0533c; }
.ticket-msg.ok { color: #12a05c; font-weight: 600; }
@media (max-width: 640px) {
  .ticket-form { grid-template-columns: 1fr; padding: 20px; }
  .pay-modal { width: calc(100vw - 36px); padding: 30px 20px 24px; }
}

/* ---------- 工具页 ---------- */
.tools-page-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px;
  max-width: 1000px; margin: 0 auto 90px;
}
.tool-panel {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 36px 32px; transition: transform .3s ease, box-shadow .3s ease;
}
.tool-panel:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.tool-panel .t-badge {
  display: inline-block; font-family: var(--font-mono); font-weight: 700;
  font-size: 14px; letter-spacing: 1px; color: var(--primary);
  border: 2px dashed rgba(15, 160, 245, .4); border-radius: 10px;
  padding: 10px 16px; margin-bottom: 16px;
}
.tool-panel h3 { font-size: 18px; margin-bottom: 8px; }
.tool-panel p { color: var(--ink-light); font-size: 13.5px; margin-bottom: 18px; }

.wallpapers-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  max-width: 1100px; margin: 0 auto 90px;
}
.wallpaper {
  border-radius: 12px; overflow: hidden; position: relative; aspect-ratio: 9/16;
  cursor: pointer; box-shadow: var(--shadow-card);
  transition: transform .3s ease;
}
.wallpaper:hover { transform: scale(1.04); }
.wallpaper .wp-inner {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; color: #fff; gap: 8px;
}
.wallpaper .wp-inner svg { width: 42px; height: 42px; opacity: .95; }
.wallpaper .wp-inner span { font-size: 12px; letter-spacing: 2px; opacity: .8; }
.wallpaper .wp-dl {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 10px;
  background: rgba(0, 0, 0, .45); color: #fff; text-align: center; font-size: 12.5px;
  opacity: 0; transform: translateY(100%); transition: .3s;
}
.wallpaper:hover .wp-dl { opacity: 1; transform: none; }
.wallpaper.w1 { background: linear-gradient(160deg, #0fa0f5, #35c3ff); }
.wallpaper.w2 { background: linear-gradient(160deg, #22313f, #4a6a86); }
.wallpaper.w3 { background: linear-gradient(160deg, #7b5cff, #35c3ff); }
.wallpaper.w4 { background: linear-gradient(160deg, #0dbf8a, #9be15d); }

/* ---------- 源码商品卡（知识付费风格） ---------- */
.src-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
  max-width: 1100px; margin: 0 auto;
}
.src-card {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; transition: transform .3s ease, box-shadow .3s ease;
  display: flex; flex-direction: column;
}
.src-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-hover); }
.src-cover {
  height: 110px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 17px; font-weight: 700; letter-spacing: 2px;
  position: relative; overflow: hidden;
}
.src-cover::after {
  content: "</>"; position: absolute; right: 10px; bottom: 4px;
  font-family: var(--font-mono); font-size: 34px; opacity: .18;
}
.src-body { padding: 16px 16px 18px; display: flex; flex-direction: column; flex: 1; }
.src-body h3 { font-size: 15px; margin-bottom: 8px; }
.src-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.src-tags span {
  font-size: 11px; font-family: var(--font-mono); color: var(--primary-dark);
  background: var(--primary-light); border-radius: 4px; padding: 2px 8px;
}
.src-body p { color: var(--ink-light); font-size: 12.5px; flex: 1; margin-bottom: 12px; }
.src-foot { display: flex; align-items: center; justify-content: space-between; }
.src-price { color: #f5573b; font-weight: 700; font-size: 17px; font-family: var(--font-mono); }
.src-foot .btn { padding: 6px 16px; font-size: 13px; }

/* ---------- 文档页（support / docs） ---------- */
.doc-layout {
  max-width: 1200px; margin: 0 auto; padding: 40px 5% 90px;
  display: grid; grid-template-columns: 230px 1fr; gap: 48px; align-items: start;
}
.doc-toc {
  position: sticky; top: 90px;
  border-left: 2px solid var(--line); padding-left: 0;
}
.doc-toc a {
  display: block; padding: 7px 18px; color: var(--ink-light); font-size: 13.5px;
  border-left: 2px solid transparent; margin-left: -2px;
  transition: .2s;
}
.doc-toc a:hover { color: var(--primary); }
.doc-toc a.active { color: var(--primary); border-left-color: var(--primary); font-weight: 600; }
.doc-content { min-width: 0; }
.doc-content h1 {
  font-size: 26px; margin: 38px 0 16px; padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.doc-content h1:first-child { margin-top: 0; }
.doc-content h2 { font-size: 20px; margin: 30px 0 12px; }
.doc-content h3 { font-size: 16px; margin: 22px 0 10px; }
.doc-content p { color: var(--ink-light); margin-bottom: 14px; }
.doc-content ul, .doc-content ol { color: var(--ink-light); margin: 0 0 14px 22px; }
.doc-content li { margin-bottom: 6px; }
.doc-content img { border-radius: 8px; border: 1px solid var(--line); margin: 12px 0; }
.doc-content code {
  font-family: var(--font-mono); font-size: 13px;
  background: var(--primary-light); color: var(--primary-dark);
  padding: 2px 7px; border-radius: 4px;
}
.doc-content pre {
  background: #22313f; color: #b8e6ff; border-radius: 10px;
  padding: 18px 20px; overflow-x: auto; margin: 14px 0 20px;
  font-family: var(--font-mono); font-size: 13px; line-height: 1.7;
}
.doc-content pre code { background: none; color: inherit; padding: 0; }
.doc-content pre .c-kw { color: #35c3ff; }
.doc-content pre .c-str { color: #7ee0a3; }
.doc-content pre .c-cmt { color: #6b7f8f; }
.doc-table {
  width: 100%; border-collapse: collapse; margin: 14px 0 22px; font-size: 13.5px;
}
.doc-table th, .doc-table td {
  border: 1px solid var(--line); padding: 10px 14px; text-align: left;
}
.doc-table th { background: var(--bg-soft); font-weight: 600; }
.doc-table td code { font-size: 12.5px; }
.doc-tip {
  border-left: 4px solid var(--primary); background: var(--primary-light);
  border-radius: 0 8px 8px 0; padding: 14px 18px; margin: 16px 0;
  color: var(--ink-light); font-size: 13.5px;
}

/* ---------- 区块标题（居中，与下方内容容器对齐） ---------- */
.section-head { max-width: 1100px; margin: 0 auto 30px; text-align: center; }
.section-head h2 { font-size: 28px; font-weight: 700; color: var(--ink); margin: 0; letter-spacing: .5px; }
.section-head h2::after {
  content: ""; display: block; width: 44px; height: 3px; border-radius: 3px;
  background: var(--primary); margin: 14px auto 0;
}
.section-head p { color: var(--ink-light); font-size: 14.5px; line-height: 1.7; max-width: 640px; margin: 14px auto 0; }
/* 跟随窄容器（如 FAQ 列表 820px）时使用 */
.section-head.narrow { max-width: 820px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1000px) {
  .packages-grid { grid-template-columns: 1fr; max-width: 460px; }
  .cert-band { grid-template-columns: 1fr; padding: 36px 28px; }
  .tools-page-grid { grid-template-columns: 1fr; }
  .src-grid { grid-template-columns: repeat(2, 1fr); }
  .tools-page-grid[style*="repeat(4"] { grid-template-columns: repeat(2, 1fr) !important; }
  .wallpapers-grid { grid-template-columns: repeat(2, 1fr); }
  .doc-layout { grid-template-columns: 1fr; }
  .doc-toc { position: static; display: flex; flex-wrap: wrap; border-left: 0; gap: 4px; }
  .doc-toc a { border-left: 0; border: 1px solid var(--line); border-radius: 20px; padding: 4px 14px; }
  .doc-toc a.active { border-color: var(--primary); }
}
@media (max-width: 560px) {
  .src-grid { grid-template-columns: 1fr; }
  .section-head { margin-bottom: 22px; }
  .section-head h2 { font-size: 22px; }
  .section-head p { font-size: 13.5px; }
}
