/* ============================================================
 * style.css —— 锁机宝官方站 全站样式
 * 360 国际版风格：明亮蓝色主题 · 圆润卡片 · 移动优先
 * ============================================================ */
:root {
  --blue: #0089ff;
  --blue-2: #0d6efd;
  --blue-deep: #0056b3;
  --blue-light: #e8f3ff;
  --bg: #f4f8fe;
  --surface: #ffffff;
  --line: #dce7f5;
  --text: #16233b;
  --muted: #5d7290;
  --ok: #12b76a;
  --warn: #f79009;
  --bad: #f04438;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 8px 24px rgba(13, 110, 253, .10);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
          "Noto Sans SC", "Source Han Sans SC", "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, "Courier New", monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img, video { max-width: 100%; display: block; }

/* ================= 顶栏 ================= */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1180px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; gap: 10px;
}
.icon-btn {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); cursor: pointer;
  display: grid; place-items: center; flex: none;
}
.icon-btn:hover { border-color: var(--blue); color: var(--blue); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); margin-right: auto; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  color: #fff;
}
.brand-name { font-weight: 800; font-size: 17px; letter-spacing: .3px; }
.lang-switch { display: flex; align-items: center; gap: 8px; }
.lang-select {
  appearance: none; -webkit-appearance: none;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235d7290' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 10px center;
  border: 1px solid var(--line); border-radius: 10px; color: var(--text);
  font-family: inherit; font-size: 13.5px; font-weight: 600;
  padding: 8px 30px 8px 12px; cursor: pointer; outline: none;
}
.lang-select:focus { border-color: var(--blue); }

/* ================= 侧边菜单（三条杠） ================= */
.side-mask {
  position: fixed; inset: 0; background: rgba(9, 20, 40, .45); z-index: 80;
  opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s;
}
.side-mask.open { opacity: 1; visibility: visible; }
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: 280px; max-width: 82vw; z-index: 81;
  background: var(--surface); box-shadow: 4px 0 30px rgba(9, 20, 40, .25);
  transform: translateX(-105%); transition: transform .25s ease;
  display: flex; flex-direction: column; overflow-y: auto;
}
.sidebar.open { transform: translateX(0); }
.side-head {
  padding: 16px 18px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, var(--blue), var(--blue-2)); color: #fff;
}
.side-head .t { font-weight: 800; font-size: 16px; }
.side-close {
  width: 32px; height: 32px; border-radius: 8px; border: 0; cursor: pointer;
  background: rgba(255,255,255,.2); color: #fff; display: grid; place-items: center;
}
.side-link {
  display: flex; align-items: center; gap: 12px; padding: 13px 18px;
  color: var(--text); font-size: 15px; font-weight: 600; border-bottom: 1px solid #eef3fa;
}
.side-link:hover { background: var(--blue-light); text-decoration: none; color: var(--blue); }
.side-link .ico {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  background: var(--blue-light); color: var(--blue);
  display: grid; place-items: center;
}
.side-foot { padding: 16px 18px; margin-top: auto; color: var(--muted); font-size: 12.5px; }

/* ================= 通用 ================= */
.wrap { max-width: 1180px; margin: 0 auto; padding: 24px 16px 64px; }
.section-title { font-size: 22px; font-weight: 800; margin: 8px 0 4px; }
.section-sub { color: var(--muted); font-size: 14px; margin-bottom: 20px; }

/* ================= Hero ================= */
.hero {
  background:
    radial-gradient(900px 400px at 85% -20%, rgba(0, 137, 255, .16), transparent 60%),
    radial-gradient(700px 400px at 0% 10%, rgba(13, 110, 253, .10), transparent 55%),
    linear-gradient(180deg, #eaf3ff, var(--bg));
  text-align: center; padding: 52px 16px 44px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid #cfe4ff;
  color: var(--blue); font-size: 13px; font-weight: 700;
  padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
  box-shadow: 0 4px 14px rgba(0, 137, 255, .10);
}
.hero h1 { font-size: clamp(28px, 5.5vw, 46px); font-weight: 900; line-height: 1.15; letter-spacing: .5px; }
.hero h1 .grad {
  background: linear-gradient(90deg, var(--blue), var(--blue-2), #38bdf8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { color: var(--muted); max-width: 620px; margin: 14px auto 0; font-size: 15px; }
.hero-cta { margin-top: 24px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ================= 按钮 ================= */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 0; cursor: pointer; font-family: inherit;
  font-size: 15px; font-weight: 700; padding: 11px 22px; border-radius: 10px;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: linear-gradient(135deg, var(--blue), var(--blue-2)); color: #fff; box-shadow: 0 6px 18px rgba(0, 137, 255, .30); }
.btn-primary:hover { box-shadow: 0 8px 24px rgba(0, 137, 255, .45); }
.btn-ghost { background: var(--surface); color: var(--blue); border: 1px solid #cfe4ff; }
.btn-ghost:hover { border-color: var(--blue); }
.btn-green { background: linear-gradient(135deg, var(--ok), #17c26b); color: #fff; }
.btn-cyan { background: linear-gradient(135deg, #0ea5e9, var(--blue)); color: #fff; }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none !important; }

/* ================= 卡片 / 网格 ================= */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.card-link { display: flex; flex-direction: column; gap: 12px; color: var(--text); transition: transform .15s ease, border-color .15s ease; }
.card-link:hover { transform: translateY(-3px); border-color: var(--blue); text-decoration: none; box-shadow: 0 12px 30px rgba(0,137,255,.14); }
.app-icon {
  width: 52px; height: 52px; border-radius: 14px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--blue-light), #d6ecff);
  color: var(--blue);
}
.card-title { font-size: 17px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.card-tag { color: var(--muted); font-size: 13.5px; }
.card-version { color: var(--blue); font-size: 13px; font-weight: 700; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.badge {
  display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px;
  border-radius: 999px; white-space: nowrap;
}
.badge-ok { background: rgba(18, 183, 106, .12); color: var(--ok); }
.badge-warn { background: rgba(247, 144, 9, .12); color: var(--warn); }
.badge-bad { background: rgba(240, 68, 56, .12); color: var(--bad); }
.badge-blue { background: rgba(0, 137, 255, .12); color: var(--blue); }

/* ================= 套装区 ================= */
.suite-box {
  background: linear-gradient(135deg, #eaf4ff, #f4f9ff);
  border: 1px solid #cfe4ff; border-radius: var(--radius);
  padding: 22px; display: flex; flex-direction: column; gap: 14px;
}
.suite-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.suite-device {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid #cfe4ff; border-radius: 999px;
  padding: 5px 14px; font-size: 13px; font-weight: 700; color: var(--blue);
}

/* ================= 表单 ================= */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.input, .select, textarea.input {
  width: 100%; padding: 11px 14px; font-size: 15px; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: inherit; outline: none;
}
.input:focus, .select:focus, textarea.input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 137, 255, .12); }
textarea.input { min-height: 90px; resize: vertical; line-height: 1.6; }
.key-input { font-family: var(--mono); letter-spacing: 2px; text-align: center; text-transform: uppercase; font-size: 17px; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1 1 160px; }

/* ================= 密钥展示 ================= */
.key-box {
  font-family: var(--mono); word-break: break-all; user-select: all;
  background: #f0f6ff; border: 1px dashed #9cc6f5; border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 14px; color: var(--blue-deep); line-height: 1.7;
}

/* ================= 提示 ================= */
.alert { border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; margin: 14px 0; }
.alert-ok { background: rgba(18, 183, 106, .10); border: 1px solid rgba(18, 183, 106, .4); color: var(--ok); }
.alert-bad { background: rgba(240, 68, 56, .10); border: 1px solid rgba(240, 68, 56, .4); color: var(--bad); }
.alert-info { background: rgba(0, 137, 255, .08); border: 1px solid rgba(0, 137, 255, .35); color: var(--blue-deep); }
.alert-warn { background: rgba(247, 144, 9, .08); border: 1px solid rgba(247, 144, 9, .35); color: #b25e00; }

/* ================= 更新日志 ================= */
.changelog { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.changelog li { position: relative; padding-left: 20px; color: var(--text); font-size: 14px; }
.changelog li::before {
  content: ''; position: absolute; left: 4px; top: 9px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--blue);
}
.meta-line { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; flex-wrap: wrap; }

/* ================= 标签页 ================= */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.tab-btn {
  background: var(--surface); color: var(--muted); border: 1px solid var(--line);
  padding: 9px 16px; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer;
  font-family: inherit;
}
.tab-btn.active { color: var(--blue); border-color: var(--blue); background: var(--blue-light); }

/* ================= 表格 ================= */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13.5px; }
table.tbl th, table.tbl td { padding: 10px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.tbl th { color: var(--muted); font-weight: 700; white-space: nowrap; }
table.tbl td { word-break: break-all; }
table.tbl .mono { font-family: var(--mono); font-size: 12px; color: var(--blue-deep); }

/* ================= 视频 ================= */
.video-frame {
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  background: #0b1428; aspect-ratio: 16 / 9; display: grid; place-items: center;
}
.video-frame video { width: 100%; height: 100%; object-fit: contain; }
.video-placeholder { color: #b9c8e2; font-size: 14px; text-align: center; padding: 24px; }

/* ================= 页脚 ================= */
.footer {
  border-top: 1px solid var(--line); color: var(--muted);
  font-size: 13px; padding: 22px 16px; text-align: center;
}

/* ================= 聊天助手 ================= */
.chat-fab {
  position: fixed; right: 16px; bottom: 16px; z-index: 90;
  width: 54px; height: 54px; border-radius: 50%; border: 0; cursor: pointer;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  color: #fff; display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(0, 137, 255, .40);
}
.chat-panel {
  position: fixed; right: 16px; bottom: 80px; z-index: 91; width: min(340px, calc(100vw - 32px));
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 16px 40px rgba(9, 20, 40, .25); display: flex; flex-direction: column; overflow: hidden;
  max-height: 60vh;
}
.chat-head {
  padding: 12px 14px; background: linear-gradient(135deg, var(--blue), var(--blue-2)); color: #fff;
  font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px;
}
.chat-head .dot { width: 8px; height: 8px; border-radius: 50%; background: #7CFFB2; }
.chat-head .sub { margin-left: auto; font-weight: 400; font-size: 12px; opacity: .85; }
.chat-body { padding: 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.chat-msg { max-width: 84%; padding: 8px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.55; }
.chat-msg.bot { background: #f0f6ff; align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-msg.me { background: linear-gradient(135deg, var(--blue), var(--blue-2)); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--line); }
.chat-bar { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.chat-bar .input { flex: 1; }
.chip {
  background: #f0f6ff; border: 1px solid #cfe4ff; color: var(--blue-deep);
  font-size: 12.5px; padding: 5px 10px; border-radius: 999px; cursor: pointer; font-family: inherit;
}
.chip:hover { border-color: var(--blue); }
.hidden { display: none !important; }

/* ================= 响应式 ================= */
@media (max-width: 640px) {
  body { font-size: 15px; }
  .card-tag, .section-sub, .hint, .meta-line, .alert, .changelog li { font-size: 14px; }
  .input, .select, textarea.input, .key-input { font-size: 16px; }
}
@media (min-width: 640px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 64px 16px 56px; }
}
