/*
 * X-DUCK 站点页样式（登录 / 下载中心）。
 *
 * 定位：**商务风格**。不追求动效炫技，追求三件事：
 *   1. 一眼看出这是什么产品（左侧品牌区讲清楚，不靠大图轮播）；
 *   2. 表单是视觉焦点（右侧白卡片、唯一实心按钮、字段少到不用思考）；
 *   3. 在 1366×768 的老笔记本上也一屏放得下（不做需要滚动才看到按钮的
 *      "沉浸式"首屏 —— 那是最常见的商务页事故）。
 *
 * 配色：深海军蓝 + 暖金。深蓝是金融/工具的默认语义，暖金只用在细节点缀上，
 * 避免变成"促销页"。
 */

:root {
  --navy: #0b1220;
  --navy-2: #101c33;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --bg: #f5f7fa;
  --card: #ffffff;
  --accent: #b8860b;
  --accent-soft: rgba(184, 134, 11, 0.12);
  --primary: #12325c;
  --primary-hover: #0d2647;
  --danger: #b91c1c;
  --ok: #15803d;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 32px rgba(15, 23, 42, 0.08);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', 'Noto Sans SC', sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body.site-body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  text-decoration: underline;
}

/* ------------------------------------------------------------------ 登录页 */
.auth {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr);
  min-height: 100vh;
}

/* 左：品牌区 */
.auth-brand {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 48px clamp(32px, 5vw, 72px) 36px;
  background:
    radial-gradient(1100px 520px at 8% -12%, rgba(56, 116, 203, 0.28), transparent 62%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 62%, #0a1526 100%);
  color: #e8eef7;
}

/* 细网格：暗示"图表 / 坐标"，比放一张随机图片克制 */
.auth-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(148, 163, 184, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.07) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(120% 90% at 20% 10%, #000 30%, transparent 78%);
  pointer-events: none;
}

.brand-glow {
  position: absolute;
  right: -160px;
  bottom: -180px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184, 134, 11, 0.22), transparent 68%);
  pointer-events: none;
}

.brand-top {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f0d69a;
}

.brand-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.brand-sub {
  font-size: 12px;
  color: #94a3b8;
  padding-left: 10px;
  border-left: 1px solid rgba(148, 163, 184, 0.32);
}

.brand-title {
  position: relative;
  margin: 6px 0 0;
  font-size: clamp(26px, 2.7vw, 38px);
  line-height: 1.32;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: #f8fafc;
}

.brand-lead {
  position: relative;
  margin: 0;
  max-width: 30em;
  color: #a9b6c9;
  font-size: 14.5px;
  line-height: 1.75;
}

.brand-points {
  position: relative;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
  max-width: 32em;
}

.brand-points li {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  align-items: start;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.brand-points b {
  font-size: 13px;
  font-weight: 600;
  color: #f0d69a;
  letter-spacing: 0.02em;
}

.brand-points span {
  font-size: 13.5px;
  color: #9fb0c6;
  line-height: 1.65;
}

.brand-foot {
  position: relative;
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: 22px;
  font-size: 13px;
  color: #7d8ea6;
}

.brand-foot a {
  color: #c9d6e6;
}

.brand-foot a:hover {
  color: #fff;
}

.brand-copy {
  margin-left: auto;
  color: #64748b;
  font-size: 12px;
}

/* 右：表单区 */
.auth-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 40px clamp(20px, 4vw, 56px);
  background: var(--card);
}

.auth-card {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card-head h2 {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.card-sub {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: 0.02em;
}

.field input {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input::placeholder {
  color: #9aa8b8;
}

.field input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(18, 50, 92, 0.12);
}

.field-row {
  position: relative;
  display: flex;
  align-items: center;
}

.field-row input {
  padding-right: 46px;
}

.ghost-btn {
  position: absolute;
  right: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.ghost-btn:hover {
  background: #f1f5f9;
  color: var(--ink-2);
}

.field-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
}

.check input {
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
}

.link-quiet {
  color: var(--muted);
  font-size: 13px;
}

.link-quiet:hover {
  color: var(--primary);
}

.form-msg {
  margin: 0;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 13px;
  line-height: 1.5;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--danger);
}

.form-msg.ok {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: var(--ok);
}

.primary-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  border: 0;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.06s ease;
}

.primary-btn:hover:not(:disabled) {
  background: var(--primary-hover);
}

.primary-btn:active:not(:disabled) {
  transform: translateY(1px);
}

.primary-btn:disabled {
  opacity: 0.72;
  cursor: progress;
}

.btn-spin {
  display: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.36);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}

.primary-btn.busy .btn-spin {
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.card-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 4px;
  font-size: 13px;
  color: var(--muted);
}

.legal {
  max-width: 380px;
  margin: 0;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

/* ------------------------------------------------------------------ 下载中心 */
.dl-page {
  min-height: 100vh;
  background:
    radial-gradient(900px 380px at 12% -10%, rgba(56, 116, 203, 0.16), transparent 60%),
    var(--bg);
}

.dl-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px clamp(18px, 5vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.dl-top .brand-name {
  color: var(--ink);
  letter-spacing: 0.12em;
}

.dl-top nav {
  margin-left: auto;
  display: flex;
  gap: 18px;
  font-size: 13px;
}

.dl-top nav a {
  color: var(--ink-2);
}

.dl-wrap {
  max-width: 940px;
  margin: 0 auto;
  padding: 40px clamp(18px, 5vw, 32px) 72px;
}

.dl-head h1 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 650;
}

.dl-head p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 14px;
}

.dl-hint {
  margin: 18px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid rgba(184, 134, 11, 0.24);
  color: #7a5a08;
  font-size: 13px;
  line-height: 1.65;
}

.dl-list {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.dl-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dl-item:hover {
  border-color: var(--line-2);
  box-shadow: var(--shadow);
}

.dl-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 11px;
  background: #eef2f8;
  color: var(--primary);
}

.dl-main {
  min-width: 0;
  flex: 1;
}

.dl-name {
  font-weight: 600;
  font-size: 14.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dl-file {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dl-size {
  flex: 0 0 auto;
  color: var(--ink-2);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.dl-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 16px;
  border-radius: 9px;
  background: var(--primary);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
}

.dl-btn:hover {
  background: var(--primary-hover);
  text-decoration: none;
}

.dl-empty {
  margin-top: 24px;
  padding: 40px 24px;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  background: #fff;
  text-align: center;
  color: var(--muted);
}

.dl-foot {
  margin-top: 26px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}

/* ------------------------------------------------------------------ 响应式 */
@media (max-width: 960px) {
  .auth {
    grid-template-columns: 1fr;
  }

  /* 窄屏把品牌区收成一条"抬头"：标题 + 一句话，其余删掉。
     保留产品身份，但不让登录按钮掉到两屏之后。 */
  .auth-brand {
    gap: 14px;
    padding: 26px 22px 22px;
  }

  .brand-title {
    font-size: 22px;
    line-height: 1.35;
  }

  .brand-title br {
    display: none;
  }

  .brand-lead,
  .brand-points {
    display: none;
  }

  .brand-foot {
    padding-top: 6px;
  }

  .brand-copy {
    display: none;
  }

  .auth-panel {
    justify-content: flex-start;
    padding: 26px 20px 40px;
  }

  .auth-card {
    max-width: 440px;
  }

  .legal {
    max-width: 440px;
  }

  .dl-item {
    flex-wrap: wrap;
    gap: 12px;
  }

  .dl-main {
    flex-basis: calc(100% - 58px);
  }

  .dl-size {
    margin-left: 58px;
  }

  .dl-btn {
    margin-left: auto;
  }
}
