/* 卡速腾商城 · 客服中心 center.css */

:root {
  --hc-blue: #1a6ef5;
  --hc-blue-dark: #0f56d0;
  --hc-blue-deep: #0f2b5b;
  --hc-blue-soft: #e8f1fe;
  --hc-ink: #1f2937;
  --hc-ink-soft: #4b5563;
  --hc-ink-mute: #6b7280;
  --hc-line: #e2e8f2;
  --hc-bg: #f4f7fc;
  --hc-card: #ffffff;
  --hc-radius: 12px;
  --hc-shadow: 0 2px 10px rgba(15, 43, 91, 0.06);
  --hc-shadow-lift: 0 8px 24px rgba(15, 43, 91, 0.12);
}

[hidden] {
  display: none !important;
}

body.help-center {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--hc-ink);
  background: var(--hc-bg);
  line-height: 1.6;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

:where(body.help-center) a {
  color: var(--hc-blue);
  text-decoration: none;
}

:where(body.help-center) a:hover {
  text-decoration: underline;
}

body.help-center h1,
body.help-center h2,
body.help-center h3,
body.help-center p {
  margin: 0;
}

body.help-center :focus-visible {
  outline: 2px solid var(--hc-blue);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- 顶部 ---------- */

#centerHeader {
  background: var(--hc-card);
  border-bottom: 1px solid var(--hc-line);
}

.hc-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.hc-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--hc-ink);
  font-weight: 700;
  font-size: 18px;
}

.hc-brand:hover {
  text-decoration: none;
}

#centerLogo {
  height: 32px;
  width: auto;
  display: block;
}

.hc-brand-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--hc-blue);
  background: var(--hc-blue-soft);
  border-radius: 999px;
  padding: 2px 10px;
}

.hc-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.hc-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  color: var(--hc-ink-soft);
  font-size: 14px;
  border-radius: 8px;
}

.hc-nav a:hover {
  color: var(--hc-blue);
  background: var(--hc-blue-soft);
  text-decoration: none;
}

/* ---------- 主区 ---------- */

#centerMain {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 24px 48px;
}

/* Hero */

.hc-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--hc-radius);
  background:
    radial-gradient(600px 240px at 85% -20%, rgba(255, 255, 255, 0.22), transparent 70%),
    radial-gradient(420px 200px at 60% 120%, rgba(255, 255, 255, 0.14), transparent 70%),
    linear-gradient(120deg, var(--hc-blue-deep), var(--hc-blue) 70%, #3d8bff);
  color: #fff;
}

.hc-hero-inner {
  padding: 40px 36px;
  max-width: 720px;
}

#centerTitle {
  font-size: 30px;
  line-height: 1.25;
  font-weight: 700;
}

#centerDescription {
  margin-top: 10px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.92);
}

.hc-hero-hours {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
}

.hc-hero-hours svg,
.hc-hero-hours i {
  width: 16px;
  height: 16px;
  flex: none;
}

.hc-hero-actions {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* 按钮 */

.hc-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  color: var(--hc-blue);
  background: var(--hc-card);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease,
    color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.hc-button svg,
.hc-button i {
  width: 18px;
  height: 18px;
  flex: none;
}

.hc-button:hover {
  text-decoration: none;
}

.hc-button:active {
  transform: translateY(1px);
}

.help-center [data-chat-open]:disabled {
  opacity: .65;
  cursor: not-allowed;
  transform: none;
}

.hc-primary {
  background: var(--hc-blue);
  color: #fff;
  box-shadow: 0 4px 14px rgba(26, 110, 245, 0.35);
}

.hc-primary:hover {
  background: var(--hc-blue-dark);
  color: #fff;
}

.hc-hero .hc-primary {
  background: #fff;
  color: var(--hc-blue);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.hc-hero .hc-primary:hover {
  background: var(--hc-blue-soft);
  color: var(--hc-blue-dark);
}

.hc-ghost {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}

.hc-ghost:hover {
  background: rgba(255, 255, 255, 0.24);
  color: #fff;
}

.hc-quiet {
  background: var(--hc-card);
  border-color: var(--hc-line);
  color: var(--hc-ink-soft);
  font-size: 14px;
  min-height: 44px;
  padding: 8px 16px;
}

.hc-quiet:hover {
  border-color: var(--hc-blue);
  color: var(--hc-blue);
}

/* 状态行 */

.hc-status-row {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.hc-status {
  font-size: 14px;
  color: var(--hc-ink-mute);
}

/* 四个功能入口 */

.hc-features {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.hc-feature {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 44px;
  padding: 20px;
  background: var(--hc-card);
  border: 1px solid var(--hc-line);
  border-radius: var(--hc-radius);
  box-shadow: var(--hc-shadow);
  color: var(--hc-ink);
  font-family: inherit;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease,
    transform 0.2s ease;
}

.hc-feature:hover {
  border-color: var(--hc-blue);
  box-shadow: var(--hc-shadow-lift);
  transform: translateY(-2px);
  text-decoration: none;
}

.hc-feature > svg,
.hc-feature > i {
  width: 24px;
  height: 24px;
  color: var(--hc-blue);
}

.hc-feature-title {
  font-weight: 700;
  font-size: 16px;
}

.hc-feature-desc {
  font-size: 13px;
  color: var(--hc-ink-mute);
  line-height: 1.5;
}

/* 双栏：FAQ + 联系方式 */

.hc-columns {
  margin-top: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}

.hc-col-main,
.hc-col-side {
  min-width: 0;
}

#centerFAQ,
#centerContacts,
.hc-guide {
  background: var(--hc-card);
  border: 1px solid var(--hc-line);
  border-radius: var(--hc-radius);
  box-shadow: var(--hc-shadow);
  padding: 24px;
}

#centerFAQ h2,
#centerContacts h2,
.hc-guide h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
}

/* 搜索 */

.hc-search-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--hc-ink-soft);
  margin-bottom: 8px;
}

.hc-search {
  position: relative;
  margin-bottom: 16px;
}

.hc-search > svg,
.hc-search > i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--hc-ink-mute);
  pointer-events: none;
}

#centerSearch {
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
  padding: 10px 14px 10px 42px;
  font-size: 15px;
  font-family: inherit;
  color: var(--hc-ink);
  background: #fff;
  border: 1px solid var(--hc-line);
  border-radius: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#centerSearch:focus {
  outline: none;
  border-color: var(--hc-blue);
  box-shadow: 0 0 0 3px rgba(26, 110, 245, 0.18);
}

/* 常见问题（JS 生成 .hc-question） */

#centerQuestionList {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  color: var(--hc-ink-mute);
}

.hc-question {
  border: 1px solid var(--hc-line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.hc-question:hover {
  border-color: #c9d8f2;
}

.hc-question[open] {
  border-color: var(--hc-blue);
}

.hc-question > summary {
  position: relative;
  display: block;
  padding: 14px 44px 14px 16px;
  min-height: 44px;
  box-sizing: border-box;
  font-size: 15px;
  font-weight: 600;
  color: var(--hc-ink);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.hc-question > summary::-webkit-details-marker {
  display: none;
}

.hc-question > summary::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--hc-ink-mute);
  border-bottom: 2px solid var(--hc-ink-mute);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
}

.hc-question[open] > summary::after {
  transform: translateY(-30%) rotate(225deg);
}

.hc-question > summary:hover {
  color: var(--hc-blue);
}

.hc-question > p {
  padding: 14px 16px;
  border-top: 1px solid var(--hc-line);
  font-size: 14px;
  color: var(--hc-ink-soft);
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  background: #fafcff;
}

#centerEmpty {
  padding: 24px 16px;
  text-align: center;
  font-size: 14px;
  color: var(--hc-ink-mute);
  border: 1px dashed var(--hc-line);
  border-radius: 10px;
}

/* 联系方式（JS 生成 .hc-contact） */

#centerContactList {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
  color: var(--hc-ink-mute);
}

.hc-contact {
  border: 1px solid var(--hc-line);
  border-radius: 10px;
  padding: 16px;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hc-contact:hover {
  border-color: var(--hc-blue);
  box-shadow: var(--hc-shadow);
}

.hc-contact > svg,
.hc-contact > i {
  width: 22px;
  height: 22px;
  color: var(--hc-blue);
  margin-bottom: 8px;
}

.hc-contact > h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--hc-ink);
  margin-bottom: 4px;
}

.hc-contact > p {
  font-size: 14px;
  color: var(--hc-ink-soft);
  word-break: break-all;
}

.hc-contact-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hc-contact-actions .hc-button {
  min-height: 44px;
  padding: 8px 16px;
  font-size: 14px;
}

/* 服务指引 */

.hc-guide {
  margin-top: 24px;
}

.hc-guide-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  counter-reset: hc-step;
}

.hc-guide-steps li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 18px 18px 56px;
  border: 1px solid var(--hc-line);
  border-radius: 10px;
  background: #fafcff;
}

.hc-guide-steps li::before {
  counter-increment: hc-step;
  content: counter(hc-step);
  position: absolute;
  left: 18px;
  top: 18px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--hc-blue);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hc-guide-steps li > svg,
.hc-guide-steps li > i {
  display: none;
}

.hc-guide-steps strong {
  font-size: 15px;
}

.hc-guide-steps span {
  font-size: 13px;
  color: var(--hc-ink-mute);
  line-height: 1.5;
}

/* 反馈提示 */

.hc-feedback {
  margin-top: 20px;
  padding: 14px 18px;
  border-radius: 10px;
  background: var(--hc-blue-soft);
  border: 1px solid #c9d8f2;
  color: var(--hc-blue-deep);
  font-size: 14px;
}

/* 二维码弹窗 */

dialog#centerQRDialog {
  border: none;
  border-radius: 14px;
  padding: 28px 28px 24px;
  max-width: min(92vw, 360px);
  width: 100%;
  box-sizing: border-box;
  box-shadow: 0 20px 60px rgba(15, 43, 91, 0.3);
  color: var(--hc-ink);
}

dialog#centerQRDialog::backdrop {
  background: rgba(15, 23, 42, 0.55);
}

#centerQRTitle {
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  padding-right: 32px;
}

#centerQRBody {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-height: 120px;
  justify-content: center;
  font-size: 14px;
  color: var(--hc-ink-soft);
}

#centerQRBody img {
  max-width: 220px;
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--hc-line);
  border-radius: 10px;
}

.hc-dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: 10px;
  color: var(--hc-ink-mute);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.hc-dialog-close:hover {
  background: var(--hc-blue-soft);
  color: var(--hc-blue);
}

.hc-dialog-close svg,
.hc-dialog-close i {
  width: 20px;
  height: 20px;
}

/* 页脚 */

.hc-footer {
  background: var(--hc-card);
  border-top: 1px solid var(--hc-line);
}

.hc-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.hc-footer-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.hc-footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  font-size: 14px;
  border-radius: 8px;
}

.hc-footer-nav a:hover {
  background: var(--hc-blue-soft);
  text-decoration: none;
}

.hc-footer-note {
  font-size: 13px;
  color: var(--hc-ink-mute);
}

/* ---------- 响应式 ---------- */

@media (max-width: 960px) {
  .hc-features {
    grid-template-columns: repeat(2, 1fr);
  }

  .hc-columns {
    grid-template-columns: 1fr;
  }

  .hc-guide-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  #centerMain {
    padding: 16px 12px 40px;
  }

  .hc-header-inner {
    padding: 0 12px;
  }

  .hc-hero-inner {
    padding: 28px 20px;
  }

  #centerTitle {
    font-size: 24px;
  }

  .hc-hero-actions .hc-button {
    flex: 1 1 100%;
  }

  .hc-features {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  #centerFAQ,
  #centerContacts,
  .hc-guide {
    padding: 18px 14px;
  }

  .hc-footer-inner {
    padding: 16px 12px;
  }
}

/* ---------- 动效降级 ---------- */

@media (prefers-reduced-motion: reduce) {
  body.help-center *,
  body.help-center *::before,
  body.help-center *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .hc-feature:hover {
    transform: none;
  }

  .hc-button:active {
    transform: none;
  }
}
