/* ============================================================
   MTK 授权中心 · 前端样式
   ============================================================ */

:root {
  --bg: #05070d;
  --bg-soft: #0a0f1a;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-solid: #0d1424;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e7eefb;
  --muted: #8b9ab3;
  --brand: #22d3ee;
  --brand-2: #6366f1;
  --good: #34d399;
  --bad: #f87171;
  --warn: #fbbf24;
  --radius: 16px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -0.01em; }
p { margin: 0; }
code { font-family: var(--mono); }

.wrap { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.narrow { width: min(820px, calc(100% - 40px)); }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ------------------------------ 顶栏 ------------------------------ */

.nav {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(5, 7, 13, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: 0.01em; }
.brand.small { font-size: 14px; }
.brand-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.8);
}
.nav-links { display: flex; gap: 6px; margin-left: 8px; }
.nav-links a {
  padding: 8px 12px; border-radius: 10px; color: var(--muted);
  font-size: 14px; transition: 0.18s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav-user { font-size: 14px; color: var(--muted); }
.nav-toggle {
  display: none; margin-left: auto; width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--border); background: transparent; cursor: pointer; padding: 10px;
}
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; margin: 3px 0; }

/* ------------------------------ 按钮 ------------------------------ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 12px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: 0.2s;
  font-family: inherit; white-space: nowrap;
}
.btn-lg { padding: 13px 26px; font-size: 15px; border-radius: 14px; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #041016; box-shadow: 0 10px 30px rgba(34, 211, 238, 0.25);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 34px rgba(34, 211, 238, 0.35); }
.btn-ghost { background: rgba(255, 255, 255, 0.06); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }
.btn-outline { border-color: var(--border-strong); color: var(--text); background: transparent; }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-danger { background: rgba(248, 113, 113, 0.14); color: #fca5a5; border-color: rgba(248, 113, 113, 0.35); }
.btn-danger:hover { background: rgba(248, 113, 113, 0.22); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ------------------------------ 首屏 ------------------------------ */

.hero { position: relative; padding: 84px 0 64px; overflow: hidden; }
.hero-glow {
  position: absolute; inset: -30% 10% auto; height: 620px;
  background: radial-gradient(600px 320px at 30% 20%, rgba(34, 211, 238, 0.16), transparent 70%),
              radial-gradient(520px 300px at 75% 10%, rgba(99, 102, 241, 0.18), transparent 70%);
  filter: blur(10px); pointer-events: none;
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.hero-inner > *, .grid > *, .flow > *, .two-col > * { min-width: 0; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px; font-size: 13px; color: #9fe8f5;
  background: rgba(34, 211, 238, 0.1); border: 1px solid rgba(34, 211, 238, 0.25);
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--good); box-shadow: 0 0 8px var(--good); }
.hero h1 { font-size: clamp(34px, 5vw, 54px); margin: 22px 0 18px; letter-spacing: -0.02em; }
.grad {
  background: linear-gradient(100deg, #22d3ee, #818cf8 55%, #f0abfc);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { color: var(--muted); font-size: 16px; max-width: 540px; }
.hero-actions { display: flex; gap: 14px; margin: 30px 0 40px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 42px; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; gap: 2px; }
.hero-stats strong { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.hero-stats span { font-size: 13px; color: var(--muted); }

.hero-card { position: relative; }
.code-card {
  background: linear-gradient(160deg, rgba(23, 33, 54, 0.9), rgba(10, 15, 26, 0.95));
  border: 1px solid var(--border-strong); border-radius: 22px;
  padding: 22px; box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}
.code-card-top { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--good); margin-bottom: 18px; }
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 10px var(--good); }
.code-line { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px dashed rgba(255, 255, 255, 0.07); font-size: 13px; }
.code-line span { color: var(--muted); flex: none; }
.code-line code { font-size: 13px; color: #cfe8ff; letter-spacing: 0.04em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code-progress { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); margin: 18px 0 10px; overflow: hidden; }
.code-progress i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.code-foot { font-size: 12px; color: var(--muted); }
.float-chip {
  position: absolute; padding: 9px 14px; border-radius: 12px; font-size: 12px;
  background: rgba(13, 20, 36, 0.92); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow); animation: float 5s ease-in-out infinite;
}
.float-chip.c1 { top: -18px; right: 8px; }
.float-chip.c2 { bottom: -26px; left: -22px; animation-delay: -2.4s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* ------------------------------ 通用区块 ------------------------------ */

.section { padding: 84px 0; }
.section-head { max-width: 640px; margin: 0 auto 44px; text-align: center; }
.eyebrow { display: inline-block; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--brand); margin-bottom: 12px; }
.section-head h2 { font-size: clamp(26px, 3.2vw, 36px); margin-bottom: 12px; }
.section-head p { color: var(--muted); }

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

.card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px; transition: 0.22s;
}
.card:hover { border-color: var(--border-strong); transform: translateY(-3px); background: rgba(255, 255, 255, 0.05); }

.feature-icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(140deg, rgba(34, 211, 238, 0.18), rgba(99, 102, 241, 0.18));
  border: 1px solid rgba(34, 211, 238, 0.22); color: var(--brand); margin-bottom: 18px;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature h3 { font-size: 17px; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 14px; }

/* ------------------------------ 流程 ------------------------------ */

.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: flow; }
.flow-step { position: relative; padding: 24px 22px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--panel); }
.flow-num {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  font-weight: 700; font-size: 14px; color: #041016;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); margin-bottom: 14px;
}
.flow-step h3 { font-size: 16px; margin-bottom: 6px; }
.flow-step p { color: var(--muted); font-size: 13.5px; }

/* ------------------------------ 价格 ------------------------------ */

.price-card { position: relative; display: flex; flex-direction: column; }
.price-card.featured {
  border-color: rgba(34, 211, 238, 0.4);
  background: linear-gradient(170deg, rgba(34, 211, 238, 0.08), rgba(99, 102, 241, 0.06));
  box-shadow: 0 20px 60px rgba(34, 211, 238, 0.12);
}
.price-tag {
  position: absolute; top: -12px; right: 20px; padding: 4px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600; color: #041016;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}
.price-card h3 { font-size: 18px; }
.price-desc { color: var(--muted); font-size: 13.5px; margin: 6px 0 18px; }
.price { display: flex; align-items: baseline; gap: 4px; margin-bottom: 20px; }
.price .cur { font-size: 18px; color: var(--muted); }
.price strong { font-size: 38px; letter-spacing: -0.03em; }
.price .unit { font-size: 13px; color: var(--muted); }
.price-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; font-size: 14px; color: #c3cfe2; }
.price-list li { padding-left: 22px; position: relative; }
.price-list li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 12px; height: 7px;
  border-left: 2px solid var(--good); border-bottom: 2px solid var(--good); transform: rotate(-45deg);
}
.price-card .btn { margin-top: auto; }
.pricing-note { text-align: center; color: var(--muted); font-size: 13px; margin-top: 26px; }

/* ------------------------------ FAQ ------------------------------ */

.faq { display: grid; gap: 12px; }
.faq-item { border: 1px solid var(--border); border-radius: 14px; background: var(--panel); overflow: hidden; }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 18px 22px; font-weight: 600; font-size: 15px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-icon { width: 16px; height: 16px; position: relative; flex: none; }
.faq-icon::before, .faq-icon::after {
  content: ""; position: absolute; inset: 50% 0 auto; height: 2px; background: var(--muted); border-radius: 2px; transition: 0.2s;
}
.faq-icon::after { transform: rotate(90deg); }
.faq-item[open] .faq-icon::after { transform: rotate(0); }
.faq-item[open] summary { color: var(--brand); }
.faq-body { padding: 0 22px 20px; color: var(--muted); font-size: 14px; }

/* ------------------------------ CTA / 公告 ------------------------------ */

.notice {
  display: flex; gap: 12px; align-items: center; margin: 18px auto; padding: 14px 18px;
  border-radius: 12px; border: 1px solid rgba(251, 191, 36, 0.25); background: rgba(251, 191, 36, 0.07);
  font-size: 13.5px; color: #fcd34d;
}
.notice a { text-decoration: underline; }

.cta { padding: 70px 0 90px; }
.cta-inner {
  text-align: center; padding: 56px 30px; border-radius: 26px;
  border: 1px solid var(--border-strong);
  background: radial-gradient(600px 240px at 50% 0%, rgba(34, 211, 238, 0.16), transparent 70%), var(--panel);
}
.cta-inner h2 { font-size: clamp(24px, 3vw, 34px); margin-bottom: 10px; }
.cta-inner p { color: var(--muted); }
.cta-actions { display: flex; gap: 14px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }

/* ------------------------------ 页脚 ------------------------------ */

.footer { border-top: 1px solid var(--border); padding: 40px 0 26px; background: var(--bg-soft); }
.footer-inner { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 22px; font-size: 14px; color: var(--muted); }
.footer-links a:hover { color: var(--brand); }
.footer-bottom {
  display: flex; gap: 18px; justify-content: space-between; flex-wrap: wrap;
  margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border);
  font-size: 12.5px; color: var(--muted);
}
.footer-bottom a { color: var(--muted); }

/* ------------------------------ 表单 / 认证页 ------------------------------ */

.auth-wrap { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 60px 20px; }
.auth-card {
  width: min(430px, 100%); background: var(--panel); border: 1px solid var(--border);
  border-radius: 20px; padding: 34px; box-shadow: var(--shadow);
}
.auth-card h1 { font-size: 24px; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); font-size: 14px; margin-bottom: 24px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; }
.input, .select, .textarea {
  width: 100%; padding: 11px 14px; border-radius: 11px; font-size: 14px; font-family: inherit;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border);
  color: var(--text); transition: 0.18s; outline: none;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); background: rgba(34, 211, 238, 0.05); }
.input::placeholder { color: #5d6b83; }
.select option { background: #0d1424; }
.textarea { min-height: 96px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.form-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 20px; font-size: 13px; color: var(--muted); }

.alert { padding: 11px 15px; border-radius: 10px; font-size: 13.5px; margin-bottom: 16px; border: 1px solid; }
.alert-success { background: rgba(52, 211, 153, 0.1); border-color: rgba(52, 211, 153, 0.3); color: #6ee7b7; }
.alert-error { background: rgba(248, 113, 113, 0.1); border-color: rgba(248, 113, 113, 0.3); color: #fca5a5; }
.alert-info { background: rgba(34, 211, 238, 0.1); border-color: rgba(34, 211, 238, 0.3); color: #7dd3fc; }
.alert-warn { background: rgba(251, 191, 36, 0.1); border-color: rgba(251, 191, 36, 0.3); color: #fcd34d; }

/* ------------------------------ 控制台 ------------------------------ */

.dash { padding: 36px 0 70px; }
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.dash-head h1 { font-size: 26px; }
.dash-head p { color: var(--muted); font-size: 14px; }
.tabs { display: flex; gap: 6px; padding: 5px; border-radius: 13px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border); overflow-x: auto; margin-bottom: 24px; }
.tabs a { padding: 9px 16px; border-radius: 9px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.tabs a.active { background: rgba(34, 211, 238, 0.14); color: var(--brand); }
.tabs a:hover:not(.active) { color: var(--text); }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 26px; }
.stat {
  padding: 20px; border-radius: 14px; border: 1px solid var(--border); background: var(--panel);
}
.stat .k { font-size: 12.5px; color: var(--muted); }
.stat .v { font-size: 26px; font-weight: 700; margin-top: 4px; letter-spacing: -0.02em; }

.panel { border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.panel-head h2 { font-size: 16px; }
.panel-body { padding: 22px; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left; padding: 12px 16px; color: var(--muted); font-weight: 500;
  font-size: 12.5px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: 13px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.045); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: rgba(255, 255, 255, 0.02); }
.table code { font-size: 12.5px; color: #bfe3ff; letter-spacing: 0.05em; }

.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; border: 1px solid; white-space: nowrap; }
.tag.good { color: var(--good); border-color: rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.1); }
.tag.bad { color: var(--bad); border-color: rgba(248, 113, 113, 0.35); background: rgba(248, 113, 113, 0.1); }
.tag.muted { color: var(--muted); border-color: var(--border); background: rgba(255, 255, 255, 0.04); }
.tag.warn { color: var(--warn); border-color: rgba(251, 191, 36, 0.35); background: rgba(251, 191, 36, 0.1); }

.copy-btn { background: none; border: 1px solid var(--border); color: var(--muted); border-radius: 7px; padding: 2px 8px; font-size: 12px; cursor: pointer; font-family: inherit; }
.copy-btn:hover { color: var(--brand); border-color: var(--brand); }

.empty { text-align: center; padding: 46px 20px; color: var(--muted); font-size: 14px; }
.empty strong { display: block; color: var(--text); font-size: 15px; margin-bottom: 6px; }

.pager { display: flex; gap: 10px; justify-content: center; align-items: center; margin-top: 22px; font-size: 13px; }
.pager .pg { padding: 6px 14px; border-radius: 8px; border: 1px solid var(--border); color: var(--text); }
.pager .pg:hover { border-color: var(--brand); color: var(--brand); }
.pager .pg.disabled { opacity: 0.4; pointer-events: none; }
.pager .pg-now { color: var(--muted); }

/* ------------------------------ 文档 ------------------------------ */

.doc { line-height: 1.85; }
.doc h2 { font-size: 22px; margin: 36px 0 14px; }
.doc h3 { font-size: 17px; margin: 26px 0 10px; }
.doc p, .doc li { color: #c3cfe2; font-size: 14.5px; }
.doc ul, .doc ol { padding-left: 22px; }
.doc code { background: rgba(34, 211, 238, 0.1); padding: 1px 6px; border-radius: 5px; font-size: 13px; color: #a5f3fc; }
pre {
  background: #070c17; border: 1px solid var(--border); border-radius: 12px;
  padding: 18px; overflow-x: auto; font-size: 13px; line-height: 1.7; color: #cfe8ff; margin: 14px 0;
}
pre code { background: none; padding: 0; color: inherit; }
.doc table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 13.5px; }
.doc th, .doc td { border: 1px solid var(--border); padding: 9px 12px; text-align: left; }
.doc th { background: rgba(255, 255, 255, 0.04); color: var(--muted); font-weight: 500; }

/* ------------------------------ 响应式 ------------------------------ */

@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-card { max-width: 460px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .flow { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .nav-inner { height: 60px; gap: 14px; }
  .nav-links { display: none; }
  .nav-actions { display: none; }
  .nav-toggle { display: block; }
  body.nav-open .nav-links {
    display: flex; position: absolute; top: 60px; left: 0; right: 0;
    flex-direction: column; padding: 12px 20px 18px;
    background: rgba(5, 7, 13, 0.97); border-bottom: 1px solid var(--border);
  }
  body.nav-open .nav-actions {
    display: flex; position: absolute; top: 250px; left: 0; right: 0;
    padding: 0 20px 18px; background: rgba(5, 7, 13, 0.97); z-index: 41;
  }
  .hero { padding: 52px 0 40px; }
  .hero-stats { gap: 26px; }
  .section { padding: 58px 0; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-links { flex-wrap: wrap; }
  .float-chip { display: none; }
  .tabs { margin-left: -20px; margin-right: -20px; border-radius: 0; border-left: 0; border-right: 0; }
}
