/* OPC圈子 · 三端共用基础样式 */

/* 修复：组件类上的 display 会覆盖浏览器默认的 [hidden]{display:none} */
[hidden] {
  display: none !important;
}
:root {
  --brand: #1e5eff;
  --brand-dark: #1246d4;
  --brand-soft: #eef3ff;
  --brand-soft-2: #dbe6ff;
  --ink: #0f172a;
  --ink-2: #475569;
  --ink-3: #8894a8;
  --ink-4: #aab4c5;
  --bg: #f6f8fc;
  --card: #ffffff;
  --line: #e7ebf3;
  --line-2: #f0f3f9;
  --ok: #14934a;
  --ok-soft: #e8f7ee;
  --warn: #c47a06;
  --warn-soft: #fff5e4;
  --danger: #dc2b2b;
  --danger-soft: #fdecec;
  --purple: #6b46e5;
  --purple-soft: #f1ecfe;
  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 20px;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-2: 0 10px 28px rgba(16, 24, 40, 0.08);
  --shadow-3: 0 24px 60px rgba(15, 23, 42, 0.16);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

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

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

::selection {
  background: var(--brand-soft-2);
}

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  transition: 0.16s ease;
  white-space: nowrap;
}

.btn:hover {
  border-color: #cfd8e8;
  background: #fbfcfe;
}

.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 6px 16px rgba(30, 94, 255, 0.22);
}

.btn-primary:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink-2);
}

.btn-ghost:hover {
  background: rgba(15, 23, 42, 0.05);
}

.btn-sm {
  height: 30px;
  padding: 0 11px;
  font-size: 13px;
  border-radius: 8px;
}

.btn-lg {
  height: 46px;
  padding: 0 26px;
  font-size: 15px;
  border-radius: 11px;
}

.btn-danger {
  color: var(--danger);
  border-color: #f6cfcf;
  background: #fff;
}

.btn-danger:hover {
  background: var(--danger-soft);
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

/* ---------------- 表单 ---------------- */
.input,
.textarea,
.select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 0 12px;
  height: 40px;
  font-size: 14px;
  color: var(--ink);
  font-family: inherit;
  transition: 0.16s ease;
  outline: none;
}

.textarea {
  height: auto;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.7;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.field {
  margin-bottom: 14px;
}

.field > label {
  display: block;
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 6px;
  font-weight: 500;
}

.field .hint {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 5px;
}

/* ---------------- 卡片与容器 ---------------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}

.card-pad {
  padding: 20px;
}

.section {
  padding: 64px 0;
}

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------- 标签 ---------------- */
.tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.tag-grey {
  background: #f2f5fa;
  color: var(--ink-2);
}

.tag-green {
  background: var(--ok-soft);
  color: var(--ok);
}

.tag-amber {
  background: var(--warn-soft);
  color: var(--warn);
}

.tag-red {
  background: var(--danger-soft);
  color: var(--danger);
}

.tag-purple {
  background: var(--purple-soft);
  color: var(--purple);
}

/* ---------------- 状态 ---------------- */
.empty {
  padding: 40px 16px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
}

.empty-icon {
  font-size: 26px;
  opacity: 0.5;
  margin-bottom: 6px;
}

.skeleton {
  background: linear-gradient(90deg, #eef2f8 25%, #f6f8fc 37%, #eef2f8 63%);
  background-size: 400% 100%;
  animation: sk 1.3s ease infinite;
  border-radius: 8px;
}

@keyframes sk {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* ---------------- 头像 ---------------- */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4b7bff, #1e5eff);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 15px;
  flex: 0 0 auto;
}

.avatar-sm {
  width: 30px;
  height: 30px;
  font-size: 13px;
}

/* ---------------- 提示条 ---------------- */
.toast-host {
  position: fixed;
  left: 50%;
  top: 24px;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}

.toast {
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13.5px;
  box-shadow: var(--shadow-2);
  animation: toastIn 0.2s ease;
  max-width: 80vw;
}

.toast.err {
  background: #b91c1c;
}

.toast.ok {
  background: #12833f;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------------- 弹层 ---------------- */
.mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 900;
  padding: 24px;
  animation: fade 0.16s ease;
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.dialog {
  width: 100%;
  max-width: 460px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-3);
  overflow: hidden;
  animation: pop 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.2);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
}

.dialog.wide {
  max-width: 720px;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.dialog-head {
  padding: 18px 20px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line-2);
}

.dialog-head h3 {
  font-size: 16px;
  font-weight: 600;
}

.dialog-body {
  padding: 18px 20px;
  overflow: auto;
}

.dialog-foot {
  padding: 14px 20px 18px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line-2);
}

.close-x {
  border: 0;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  color: var(--ink-3);
  padding: 4px 6px;
  border-radius: 6px;
}

.close-x:hover {
  background: #f2f5fa;
  color: var(--ink);
}

/* ---------------- 通用表格 ---------------- */
.table-wrap {
  overflow: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  min-width: 720px;
}

table.data th {
  text-align: left;
  font-weight: 600;
  color: var(--ink-2);
  background: #fafbfe;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  font-size: 12.5px;
  letter-spacing: 0.02em;
}

table.data td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
  color: var(--ink);
}

table.data tr:last-child td {
  border-bottom: 0;
}

table.data tbody tr:hover {
  background: #fbfcff;
}

.cell-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.clamp-1 {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 320px;
}

/* ---------------- 段落文字 ---------------- */
.muted {
  color: var(--ink-3);
}

.small {
  font-size: 12.5px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.section-head h2 {
  font-size: 26px;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.section-head p {
  color: var(--ink-3);
  margin-top: 6px;
  font-size: 14px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* ---------- 登录弹层（PC / H5 共用） ---------- */
.btn-block {
  display: flex;
  width: 100%;
}

.auth-box {
  display: grid;
  gap: 10px;
}

.auth-wx.btn-primary {
  height: 44px;
  font-size: 15px;
  font-weight: 600;
  border-color: #07c160;
  background: #07c160;
  box-shadow: 0 6px 16px rgba(7, 193, 96, 0.22);
}

.auth-wx.btn-primary:hover {
  border-color: #06ad56;
  background: #06ad56;
}

/* 微信登录作为可选入口：白底绿字，不抢主按钮 */
.auth-wx.btn-ghost {
  height: 42px;
  font-size: 14px;
  font-weight: 500;
  color: #07a355;
  border-color: #07c160;
  background: #fff;
}

.auth-wx.btn-ghost:hover {
  color: #fff;
  border-color: #07c160;
  background: #07c160;
}

.auth-or {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-3);
  font-size: 12.5px;
  margin: 2px 0;
}

.auth-or::before,
.auth-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.auth-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 2px;
  font-size: 13px;
}

.auth-agree {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.5;
  margin: 10px 0 2px;
  cursor: pointer;
  user-select: none;
}

.auth-agree input {
  width: 15px;
  height: 15px;
  margin: 1px 0 0;
  accent-color: var(--brand);
  flex-shrink: 0;
}

.auth-agree a {
  color: var(--brand);
}

.auth-foot a {
  color: var(--ink-3);
}

.auth-foot a:hover {
  color: var(--brand);
}

.h5-auth .input {
  font-size: 16px;
}

/* ---------- 消息中心（PC / H5 共用） ---------- */
.bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: 0.16s ease;
}

.bell:hover {
  border-color: var(--brand);
}

.bell-dot {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: #ef4444;
  color: #fff;
  font-size: 10.5px;
  line-height: 17px;
  font-style: normal;
  text-align: center;
  box-shadow: 0 0 0 2px #fff;
}

.msg-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.msg-item {
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.msg-item:last-child {
  border-bottom: 0;
}

.msg-item:hover {
  background: var(--brand-soft-2);
}

.msg-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.msg-head b {
  font-size: 14px;
  color: var(--ink);
}

.msg-item.is-read .msg-head b {
  font-weight: 500;
  color: var(--ink-2);
}

.msg-body {
  margin-top: 6px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--ink-2);
  white-space: pre-wrap;
}

.msg-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
}

/* ---------- 站点公告条（PC / H5 共用） ---------- */
.announce {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 1200px;
  margin: 12px auto 0;
  padding: 10px 14px;
  border: 1px solid #bfd3ff;
  border-radius: 12px;
  background: linear-gradient(90deg, #eef4ff, #f6f9ff);
  font-size: 13.5px;
  line-height: 1.6;
}

.announce.is-warn {
  border-color: #fcd34d;
  background: linear-gradient(90deg, #fffbeb, #fffdf5);
}

.announce-tag {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.announce.is-warn .announce-tag {
  background: #d97706;
}

.announce-body {
  flex: 1;
  min-width: 0;
}

.announce-body b {
  margin-right: 8px;
}

.announce-body span {
  color: var(--ink-2);
}

.announce-link {
  flex-shrink: 0;
  color: var(--brand);
  font-weight: 600;
}

.announce-close {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-3);
  font-size: 14px;
  cursor: pointer;
}

.announce-close:hover {
  background: rgba(0, 0, 0, 0.05);
}

@media (max-width: 760px) {
  .announce {
    margin: 10px 12px 0;
  }
  .announce-body span {
    display: none;
  }
}

/* ---------- 加载态（PC 侧补充） ---------- */
.loading-line {
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-4);
  padding: 18px 0;
}

/* ---------- 合作咨询（PC 页脚上方） ---------- */
.lead-cta {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #f7f9ff, #fff);
}

.lead-cta .wrap {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-top: 44px;
  padding-bottom: 44px;
}

.lead-cta-info {
  flex: 1;
}

.lead-cta-info h3 {
  font-size: 22px;
  margin-bottom: 10px;
}

.lead-cta-info p {
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.8;
}

.lead-cta-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 420px;
}

.lead-cta-form .input {
  width: 100%;
}

.lead-cta-form textarea {
  grid-column: 1 / -1;
}

.lead-cta-form .btn {
  grid-column: 1 / -1;
}

@media (max-width: 860px) {
  .lead-cta .wrap {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }
  .lead-cta-form {
    width: 100%;
  }
}

/* ================= 视觉精修层 · 全局（UI Polish v2） ================= */

::selection {
  background: rgba(30, 94, 255, 0.16);
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}

/* 主按钮：品牌渐变 + 微交互 */
.btn-primary {
  background: linear-gradient(135deg, #2f6bff 0%, #1e5eff 55%, #1246d4 100%);
  border: none;
  box-shadow: 0 6px 16px rgba(30, 94, 255, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(30, 94, 255, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(30, 94, 255, 0.26);
}

.btn-primary:disabled {
  transform: none;
  opacity: 0.6;
  box-shadow: none;
}

/* 次按钮 hover 精修 */
.btn:not(.btn-primary):not(.btn-ghost):not(.btn-danger):hover {
  border-color: #cdd9ee;
  background: #f8faff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-1);
}

/* 卡片悬浮语言：统一上浮 + 阴影加深 + 边框提亮 */
.card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(16, 24, 40, 0.1);
  border-color: #d9e2f2;
}

/* 区块标题：渐变竖条 + 字阶强化 */
.section-head h2 {
  position: relative;
  padding-left: 14px;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.section-head h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, #2f6bff, #6b46e5);
}

.section-head p {
  margin-bottom: 4px;
}

/* 数字统一等宽，仪表感 */
.hero-stat b,
.kv-item b,
.cnt,
.badge {
  font-variant-numeric: tabular-nums;
}

/* 全局滚动条 */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: #c9d4e6;
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #a9b9d4;
}

::-webkit-scrollbar-track {
  background: transparent;
}

/* 弹层进场动效 */
.mask .dialog {
  animation: dialog-in 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
