/* 大金哥建站平台 - 全局样式 */
:root {
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-light: #EFF6FF;
  --success: #16A34A;
  --danger: #DC2626;
  --warn: #D97706;
  --text: #111827;
  --text-2: #6B7280;
  --text-3: #9CA3AF;
  --bg: #F6F7F9;
  --card: #FFFFFF;
  --border: #E5E7EB;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.05);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", "Microsoft YaHei", sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.ic { display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ic svg { width: 100%; height: 100%; }

/* 布局 */
.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.row { display: flex; align-items: center; }
.row-between { display: flex; align-items: center; justify-content: space-between; }
.flex1 { flex: 1; min-width: 0; }
.gap8 { gap: 8px; } .gap12 { gap: 12px; } .gap16 { gap: 16px; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; } .mt32 { margin-top: 32px; }
.mb8 { margin-bottom: 8px; } .mb16 { margin-bottom: 16px; }
.wrap { flex-wrap: wrap; }

/* 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--text); }
.brand .logo { width: 32px; height: 32px; border-radius: 9px; overflow: hidden; }
.brand .logo svg { width: 100%; height: 100%; }
.brand small { font-weight: 500; font-size: 12px; color: var(--text-3); }

/* 导航按钮 */
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  padding: 8px 14px; border-radius: 9px; font-size: 14px; color: var(--text-2);
  display: flex; align-items: center; gap: 6px; transition: all .15s;
}
.nav-link .ic { width: 17px; height: 17px; }
.nav-link:hover { background: var(--bg); color: var(--text); }
.nav-link.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 20px; border-radius: 10px; font-size: 14px; font-weight: 600;
  transition: all .15s; white-space: nowrap; border: 1px solid transparent;
}
.btn .ic { width: 17px; height: 17px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: #fff; border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: #FEF2F2; color: var(--danger); }
.btn-danger:hover { background: #FEE2E2; }
.btn-ghost { color: var(--text-2); }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { filter: brightness(.95); }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 13px 26px; font-size: 16px; border-radius: 12px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* 卡片 */
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; border: 1px solid var(--border);
}
.card-hover { transition: all .18s; }
.card-hover:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,.08); }

/* 表单 */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.input, .textarea, select.input {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px;
  font-size: 15px; font-family: inherit; background: #fff; color: var(--text); transition: all .15s;
}
.input:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.textarea { min-height: 100px; resize: vertical; }
.input-suffix { position: relative; }
.input-suffix .input { padding-right: 44px; }
.input-suffix .suffix { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 13px; }

/* 标签 */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600;
}
.tag-green { background: #F0FDF4; color: var(--success); }
.tag-blue { background: var(--primary-light); color: var(--primary); }
.tag-gray { background: #F3F4F6; color: var(--text-2); }
.tag-red { background: #FEF2F2; color: var(--danger); }
.tag-amber { background: #FFFBEB; color: var(--warn); }

/* 提示条 */
.toast-wrap { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 999; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: #111827; color: #fff; padding: 10px 18px; border-radius: 10px;
  font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.18);
  display: flex; align-items: center; gap: 8px; animation: toastIn .2s ease;
  max-width: 88vw;
}
.toast .ic { width: 17px; height: 17px; }
.toast.err { background: var(--danger); }
.toast.ok { background: var(--success); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(17,24,39,.5); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fadeIn .15s ease;
}
.modal {
  background: #fff; border-radius: 16px; width: 100%; max-width: 420px;
  max-height: 88vh; overflow-y: auto; padding: 26px; animation: modalIn .18s ease;
  position: relative;
}
.modal-lg { max-width: 640px; }
.modal h3 { font-size: 18px; margin-bottom: 18px; display: flex; align-items: center; gap: 9px; }
.modal h3 .ic { width: 22px; height: 22px; color: var(--primary); }
.modal .close-x { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--text-3); }
.modal .close-x:hover { background: var(--bg); color: var(--text); }
.modal .close-x .ic { width: 18px; height: 18px; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.98); } }

/* 区块标题 */
.sec-title { font-size: 17px; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.sec-title .ic { width: 20px; height: 20px; color: var(--primary); }

/* 空状态 */
.empty { text-align: center; padding: 48px 20px; color: var(--text-3); }
.empty .ic { width: 44px; height: 44px; margin: 0 auto 12px; opacity: .5; }

/* 表格 */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; padding: 10px 12px; color: var(--text-2); font-weight: 600; font-size: 12.5px; border-bottom: 1px solid var(--border); background: #FAFAFB; white-space: nowrap; }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: #FBFBFD; }

/* 步骤条 */
.steps { display: flex; align-items: center; gap: 0; margin: 24px 0; }
.step { display: flex; align-items: center; gap: 8px; flex: 1; }
.step .dot {
  width: 30px; height: 30px; border-radius: 50%; background: #E5E7EB; color: #9CA3AF;
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex: none;
}
.step .dot .ic { width: 15px; height: 15px; }
.step .lbl { font-size: 13px; color: var(--text-3); white-space: nowrap; }
.step.on .dot { background: var(--primary); color: #fff; }
.step.on .lbl { color: var(--primary); font-weight: 600; }
.step.done .dot { background: var(--success); color: #fff; }
.step.done .lbl { color: var(--success); }
.step .line { flex: 1; height: 2px; background: #E5E7EB; margin: 0 8px; }
.step.done .line, .step.on .line { background: var(--primary); }

/* 加载 */
.loading { display: flex; align-items: center; justify-content: center; padding: 40px; color: var(--text-3); gap: 10px; font-size: 14px; }
.spin { width: 22px; height: 22px; border: 2.5px solid #E5E7EB; border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 站点卡片 */
.site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.site-card .site-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.site-card .site-ic { width: 42px; height: 42px; border-radius: 11px; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; flex: none; }
.site-card .site-ic .ic { width: 21px; height: 21px; }
.site-card .domain { font-weight: 700; font-size: 15px; word-break: break-all; }
.site-card .sub { font-size: 12px; color: var(--text-3); }
.site-card .site-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* 价格卡 */
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-top: 8px; }
.price-card { text-align: center; padding: 28px 20px; position: relative; }
.price-card.hot { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary), var(--shadow); }
.price-card .p-name { font-size: 16px; font-weight: 700; }
.price-card .p-price { font-size: 34px; font-weight: 800; margin: 12px 0 4px; color: var(--primary); }
.price-card .p-price small { font-size: 14px; font-weight: 500; color: var(--text-3); }
.price-card .p-desc { font-size: 13px; color: var(--text-2); min-height: 38px; }
.price-card .hot-badge { position: absolute; top: -10px; right: 14px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 99px; }

/* 支付弹窗 */
.pay-qr { text-align: center; padding: 10px 0 6px; }
.pay-qr img { width: 210px; height: 210px; margin: 0 auto; border-radius: 10px; border: 1px solid var(--border); }
.pay-status { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--text-2); font-size: 13.5px; margin-top: 12px; }
.pay-status .spin { width: 16px; height: 16px; }

/* AI 生成页 */
.ai-stage { min-height: 200px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 12px; color: var(--text-2); }
.ai-stage .big-spin { width: 40px; height: 40px; border-width: 3px; }
.preview-frame { width: 100%; height: 520px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }

/* 代码输入 */
.code-input { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }

/* 页脚 */
.footer { border-top: 1px solid var(--border); padding: 26px 0; text-align: center; color: var(--text-3); font-size: 13px; margin-top: 48px; }

/* 响应式 */
@media (max-width: 720px) {
  .container { padding: 0 14px; }
  .nav-link span.lbl { display: none; }
  .nav-link { padding: 8px 10px; }
  .topbar-inner { height: 54px; }
  .brand small { display: none; }
  .site-grid { grid-template-columns: 1fr; }
  .modal { padding: 20px; }
  .preview-frame { height: 420px; }
}
