/* ============================================================
 * 工程工具集官网样式  v1.0
 * ============================================================ */
:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --primary-light: #3b82f6;
  --gradient: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  --text: #1e293b;
  --text-sub: #64748b;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --bg-card: #ffffff;
  --success: #16a34a;
  --warn: #d97706;
  --danger: #dc2626;
  --radius: 14px;
  --shadow: 0 4px 24px rgba(37, 99, 235, .10);
  --shadow-lg: 0 12px 40px rgba(37, 99, 235, .16);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- 导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; gap: 28px;
  height: 64px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 19px; color: var(--text);
}
.nav-logo .logo-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--gradient); color: #fff; font-size: 16px; font-weight: 800;
}
.nav-logo .logo-img {
  width: 34px; height: 34px; border-radius: 9px;
  object-fit: cover; display: inline-block;
}
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a {
  color: var(--text); font-size: 15px; font-weight: 500;
  padding: 6px 2px; border-bottom: 2px solid transparent;
  transition: border-color .2s, color .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); border-color: var(--primary); }

.nav-user { display: flex; gap: 10px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 20px; border-radius: 9px; border: none; cursor: pointer;
  font-size: 14px; font-weight: 600; font-family: inherit;
  transition: all .2s;
}
.btn-primary { background: var(--gradient); color: #fff; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn-ghost { background: #fff; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-ghost:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 12px 30px; font-size: 16px; border-radius: 12px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 90px 0 80px;
  background:
    radial-gradient(1000px 500px at 85% -10%, rgba(79,70,229,.14), transparent 60%),
    radial-gradient(800px 400px at 10% 110%, rgba(37,99,235,.10), transparent 60%),
    var(--bg);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 60px; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(37,99,235,.08); color: var(--primary);
  padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
  margin-bottom: 20px;
}
.hero h1 { font-size: 44px; line-height: 1.25; letter-spacing: -1px; margin-bottom: 18px; }
.hero h1 .grad {
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p.sub { font-size: 17px; color: var(--text-sub); margin-bottom: 32px; max-width: 500px; }
.hero-actions { display: flex; gap: 14px; margin-bottom: 38px; }
.hero-stats { display: flex; gap: 40px; }
.hero-stat b { font-size: 28px; color: var(--primary); display: block; }
.hero-stat span { font-size: 13px; color: var(--text-sub); }

/* Hero 右侧软件窗口模型 */
.app-mock {
  background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg);
  border: 1px solid var(--line); overflow: hidden;
}
.app-mock-title {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; background: #f2f5fa; border-bottom: 1px solid var(--line);
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.r { background: #f87171; } .dot.y { background: #fbbf24; } .dot.g { background: #34d399; }
.app-mock-title span { margin-left: 10px; font-size: 12px; color: var(--text-sub); }
.app-mock-body { display: grid; grid-template-columns: 150px 1fr; min-height: 330px; }
.mock-side { background: #f8fafc; border-right: 1px solid var(--line); padding: 14px 12px; }
.mock-side .mtag {
  display: block; padding: 8px 12px; border-radius: 8px;
  font-size: 13px; color: var(--text); margin-bottom: 6px;
}
.mock-side .mtag.on { background: var(--gradient); color: #fff; font-weight: 600; }
.mock-main { padding: 16px; }
.mock-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.mock-chip {
  padding: 5px 12px; border-radius: 7px; font-size: 12px;
  background: #f1f5f9; color: var(--text); border: 1px solid var(--line);
}
.mock-line {
  height: 12px; border-radius: 6px; background: #eef2f7; margin-bottom: 10px;
}
.mock-line.w60 { width: 60%; } .mock-line.w40 { width: 40%; }
.mock-btn {
  display: inline-block; padding: 6px 18px; border-radius: 8px;
  background: var(--gradient); color: #fff; font-size: 12.5px; font-weight: 600;
}

/* ---------- 通用 Section ---------- */
.section { padding: 88px 0; }
.section.alt { background: #fff; }
.section-head { text-align: center; max-width: 660px; margin: 0 auto 54px; }
.section-head .tag {
  display: inline-block; color: var(--primary); font-size: 13px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase; margin-bottom: 12px;
}
.section-head h2 { font-size: 32px; margin-bottom: 14px; }
.section-head p { color: var(--text-sub); font-size: 16px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.card {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 32px 28px;
  transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card .ico {
  width: 52px; height: 52px; border-radius: 13px;
  background: rgba(37,99,235,.09);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin-bottom: 18px;
}
.card h3 { font-size: 19px; margin-bottom: 10px; }
.card p { color: var(--text-sub); font-size: 14.5px; }
.card .feature-list { list-style: none; margin-top: 14px; }
.card .feature-list li {
  position: relative; padding-left: 26px; font-size: 14px; color: var(--text-sub);
  margin-bottom: 8px;
}
.card .feature-list li::before {
  content: "✓"; position: absolute; left: 2px; color: var(--success); font-weight: 700;
}

/* ---------- 行业方向格 ---------- */
.industry-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.industry-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  transition: border-color .2s, transform .2s;
}
.industry-item:hover { border-color: var(--primary); transform: translateY(-3px); }
.industry-item b { display: flex; align-items: center; gap: 8px; font-size: 15.5px; margin-bottom: 6px; }
.industry-item i { font-style: normal; font-size: 19px; }
.industry-item span { font-size: 13px; color: var(--text-sub); line-height: 1.65; display: block; }

/* ---------- 下载卡片 ---------- */
.dl-card {
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 28px 34px;
  position: relative;
  transition: transform .25s, box-shadow .25s;
}
.dl-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.dl-card .pico { font-size: 42px; margin-bottom: 16px; }
.dl-card h3 { font-size: 20px; margin-bottom: 8px; }
.dl-card .meta { font-size: 13px; color: var(--text-sub); margin-bottom: 20px; }
.dl-card .meta b { color: var(--warn); }
.dl-card .btn { width: 100%; }
.dl-card .locked {
  display: none;
  background: rgba(217,119,6,.08); color: var(--warn);
  font-size: 12.5px; padding: 8px; border-radius: 8px; margin-top: 12px;
}
.dl-card .require-login .locked { display: block; }
.dl-card .free-tag {
  display: block;
  background: rgba(22,163,74,.08); color: #16a34a;
  font-size: 12.5px; padding: 8px; border-radius: 8px; margin-top: 12px;
}
.dl-card .free-download .locked { display: none !important; }

/* ---------- 登录/注册 ---------- */
.auth-wrap {
  min-height: calc(100vh - 64px);
  display: flex; align-items: center; justify-content: center;
  padding: 50px 20px;
  background:
    radial-gradient(700px 400px at 20% 20%, rgba(37,99,235,.10), transparent 60%),
    radial-gradient(700px 400px at 80% 80%, rgba(79,70,229,.10), transparent 60%),
    var(--bg);
}
.auth-card {
  width: 100%; max-width: 420px;
  background: #fff; border-radius: 18px;
  box-shadow: var(--shadow-lg); border: 1px solid var(--line);
  padding: 42px 38px;
}
.auth-card .head { text-align: center; margin-bottom: 30px; }
.auth-card .head .logo-ico {
  width: 48px; height: 48px; border-radius: 12px; font-size: 22px;
  background: var(--gradient); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; margin-bottom: 14px;
}
.auth-card h2 { font-size: 24px; margin-bottom: 6px; }
.auth-card .sub { font-size: 14px; color: var(--text-sub); }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 7px; }
.field input {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--line); border-radius: 10px;
  font-size: 14.5px; font-family: inherit; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.field .hint { font-size: 12px; color: var(--text-sub); margin-top: 5px; }
.auth-msg { font-size: 13.5px; padding: 10px 14px; border-radius: 9px; margin-bottom: 18px; display: none; }
.auth-msg.error { display: block; background: rgba(220,38,38,.08); color: var(--danger); }
.auth-msg.success { display: block; background: rgba(22,163,74,.08); color: var(--success); }
.auth-foot { text-align: center; font-size: 13.5px; color: var(--text-sub); margin-top: 22px; }

/* ---------- 会员中心横幅 ---------- */
.user-bar {
  display: none;
  background: var(--gradient); color: #fff;
  border-radius: 13px; padding: 18px 24px;
  margin-bottom: 30px;
  align-items: center; gap: 14px;
}
.user-bar.show { display: flex; }
.user-bar b { font-size: 16px; }
.user-bar span { font-size: 13px; opacity: .85; }
.user-bar .btn { margin-left: auto; background: rgba(255,255,255,.18); color: #fff; }
.user-bar .btn:hover { background: rgba(255,255,255,.3); }

/* ---------- 页脚 ---------- */
.footer { background: #0f172a; color: #94a3b8; padding: 56px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer .brand { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 18px; font-weight: 700; margin-bottom: 14px; }
.footer .brand .logo-ico { width: 30px; height: 30px; font-size: 14px; border-radius: 8px; background: var(--gradient); display: inline-flex; align-items: center; justify-content: center; }
.footer p { font-size: 13.5px; line-height: 1.8; max-width: 320px; }
.footer h4 { color: #e2e8f0; font-size: 14px; margin-bottom: 14px; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 9px; }
.footer ul a { color: #94a3b8; font-size: 13.5px; transition: color .2s; }
.footer ul a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(148,163,184,.15);
  padding-top: 24px; text-align: center; font-size: 12.5px; color: #64748b;
}

/* ---------- 提示条 ---------- */
.notice {
  background: rgba(37,99,235,.06);
  border: 1px solid rgba(37,99,235,.18);
  border-radius: 12px; padding: 14px 18px;
  font-size: 13.5px; color: var(--primary-dark);
  margin-bottom: 26px;
}
.notice b { color: var(--primary); }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero h1 { font-size: 34px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero { padding: 60px 0 50px; }
  .hero-stats { gap: 24px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
}

/* ============================================================
 * 会员中心 user.html
 * ============================================================ */
.user-page {
  min-height: 100vh; padding: 46px 0 90px;
  background:
    radial-gradient(900px 500px at 90% -10%, rgba(79,70,229,.10), transparent 60%),
    radial-gradient(700px 400px at 0% 110%, rgba(37,99,235,.08), transparent 60%),
    var(--bg);
}

/* —— 档案卡 —— */
.profile-card {
  display: grid; grid-template-columns: 100px 1fr auto; gap: 26px; align-items: center;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 18px; padding: 32px 36px; box-shadow: var(--shadow);
  margin-bottom: 30px;
}
.avatar {
  width: 100px; height: 100px; border-radius: 50%;
  background: var(--gradient); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; font-weight: 800; user-select: none;
  box-shadow: 0 6px 20px rgba(37,99,235,.28);
}
.profile-info .greet { font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.profile-info .badge {
  background: linear-gradient(135deg,#fbbf24,#f59e0b);
  color: #fff; font-size: 11.5px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px; letter-spacing: 1px;
}
.profile-info .meta { font-size: 13.5px; color: var(--text-sub); margin-top: 6px; }
.profile-info .meta i { font-style: normal; margin-right: 16px; }
.profile-stats { display: flex; gap: 14px; margin-top: 16px; }
.stat-chip {
  background: #f8fafc; border: 1px solid var(--line);
  border-radius: 11px; padding: 10px 20px; text-align: center; min-width: 92px;
}
.stat-chip b { display: block; font-size: 19px; color: var(--primary); }
.stat-chip span { font-size: 12px; color: var(--text-sub); }

/* —— 会员中心布局 —— */
.user-grid { display: grid; grid-template-columns: 260px 1fr; gap: 26px; align-items: start; }
.user-side {
  background: #fff; border: 1px solid var(--line); border-radius: 15px;
  overflow: hidden; box-shadow: var(--shadow); position: sticky; top: 84px;
}
.user-side h4 {
  padding: 18px 22px 10px; font-size: 14px; color: var(--text-sub);
  letter-spacing: 2px;
}
.user-side a {
  display: flex; align-items: center; gap: 11px;
  padding: 13px 22px; color: var(--text); font-size: 14.5px; font-weight: 500;
  border-left: 3px solid transparent; transition: all .18s;
}
.user-side a i { font-style: normal; font-size: 17px; }
.user-side a:hover { background: #f8fafc; }
.user-side a.active { background: rgba(37,99,235,.06); color: var(--primary); border-color: var(--primary); font-weight: 600; }
.user-main { min-height: 400px; }

.panel {
  background: #fff; border: 1px solid var(--line);
  border-radius: 15px; box-shadow: var(--shadow); overflow: hidden;
  display: none;
}
.panel.show { display: block; }
.panel-head {
  padding: 20px 26px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center;
}
.panel-head h3 { font-size: 17px; }
.panel-head .p-ico {
  width: 38px; height: 38px; border-radius: 10px; margin-right: 12px;
  background: rgba(37,99,235,.08); display: flex; align-items: center; justify-content: center;
  font-size: 17px;
}
.panel-body { padding: 26px; }

/* —— 表格 —— */
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-size: 12.5px; color: var(--text-sub);
  font-weight: 600; padding: 12px 16px; background: #f8fafc;
  border-bottom: 1px solid var(--line);
}
.table td { padding: 13px 16px; font-size: 13.5px; border-bottom: 1px solid #f1f5f9; }
.table tr:last-child td { border-bottom: none; }
.table .tag-ok, .table .tag-no {
  font-size: 11.5px; font-weight: 700; padding: 2px 10px; border-radius: 999px;
}
.table .tag-ok { background: rgba(22,163,74,.1); color: var(--success); }
.table .tag-no { background: rgba(220,38,38,.09); color: var(--danger); }
.table .muted { color: var(--text-sub); font-size: 12.5px; }
.empty-tip {
  text-align: center; padding: 44px 0; color: var(--text-sub); font-size: 14px;
}
.empty-tip .big { font-size: 40px; display: block; margin-bottom: 10px; }

/* —— 修改密码表单 —— */
.form-box { max-width: 440px; }
.form-box .btn { width: 100%; margin-top: 8px; }

/* —— toast —— */
.toast {
  position: fixed; left: 50%; top: 76px; transform: translateX(-50%) translateY(-20px);
  padding: 12px 24px; border-radius: 11px;
  background: #0f172a; color: #fff; font-size: 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,.25);
  opacity: 0; pointer-events: none; z-index: 999;
  transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 900px) {
  .user-grid { grid-template-columns: 1fr; }
  .user-side { position: static; }
  .user-side a { display: inline-flex; padding: 10px 16px; }
  .user-side h4 { display: none; }
  .profile-card { grid-template-columns: 72px 1fr; padding: 24px; }
  .avatar { width: 72px; height: 72px; font-size: 28px; }
  .profile-stats { flex-wrap: wrap; }
}

/* ============================================================
 * 教程页 tutorial.html
 * ============================================================ */
.doc-page { padding: 56px 0 80px; }
.doc-hero { text-align: center; margin-bottom: 50px; }
.doc-hero h1 { font-size: 34px; margin: 10px 0 14px; }
.doc-hero p { color: var(--text-sub); font-size: 16px; max-width: 620px; margin: 0 auto; }

.steps-grid { counter-reset: step; display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-bottom: 60px; }
.step-card {
  counter-increment: step; position: relative;
  background: #fff; border: 1px solid var(--line); border-radius: 15px;
  padding: 30px 28px 26px; transition: transform .22s, box-shadow .22s;
}
.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.step-card::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; top: 22px; right: 26px;
  font-size: 40px; font-weight: 800; color: rgba(37,99,235,.10); line-height: 1;
}
.step-card .ico {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--gradient); color: #fff; font-size: 21px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.step-card h3 { font-size: 18px; margin-bottom: 9px; }
.step-card p { font-size: 14px; color: var(--text-sub); margin-bottom: 10px; }
.step-card .kbd-row { display: flex; gap: 8px; flex-wrap: wrap; }
.kbd {
  background: #f1f5f9; border: 1px solid var(--line); border-bottom-width: 2.5px;
  border-radius: 7px; padding: 3px 11px; font-size: 12px; font-weight: 600;
  font-family: Consolas, monospace; color: var(--text);
}
.tip-box {
  background: rgba(37,99,235,.05); border: 1px solid rgba(37,99,235,.16);
  border-left: 4px solid var(--primary);
  border-radius: 12px; padding: 18px 22px; font-size: 14px; color: var(--text);
  margin-top: 14px;
}
.tip-box b { color: var(--primary); }
.warn-box {
  background: rgba(217,119,6,.06); border: 1px solid rgba(217,119,6,.2);
  border-left: 4px solid var(--warn);
  border-radius: 12px; padding: 18px 22px; font-size: 14px;
}

@media (max-width: 860px) { .steps-grid { grid-template-columns: 1fr; } }
