:root {
  --bg: #f2f4f7;
  --ink: #1c2237;
  --card: #ffffffcc;
  --line: #d8dbe5;
  --accent: #6f5f72;
  --accent-2: #b4a2b1;
  --yellow: #f2de62;
  --ok: #2f9d62;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  line-height: 1.5;
}

.page-bg {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 20% 15%, #efe7f0, transparent 40%),
    radial-gradient(circle at 85% 80%, #ece4d7, transparent 35%);
  z-index: -1;
}

.container {
  width: min(1120px, 92vw);
  margin: 30px auto 56px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}

.page-title {
  text-align: center;
  margin-bottom: 18px;
}

.page-title h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 6vw, 34px);
  letter-spacing: 0.5px;
}

.page-title p {
  margin: 0;
  font-size: 15px;
  color: #5c657e;
}

.section-title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
  color: #2a3148;
  grid-column: 1 / -1;
}

.top-card {
  margin-bottom: 10px;
}

.top-card .merged-contact {
  padding: 10px 12px;
  border-radius: 12px;
  box-shadow: 0 4px 10px #101f4505;
}

.top-card .merged-contact h3 {
  margin: 0 0 2px;
  font-size: 14px;
}

.top-card .merged-contact > p {
  margin: 0;
  font-size: 20px;
  color: #5c657e;
  line-height: 1.35;
  font-weight: 800;
}

.top-card .merged-contact-body {
  margin-top: 6px;
  grid-template-columns: auto 1fr;
  gap: 8px;
}

.top-card .merged-contact .card-view img {
  width: 56px;
  height: 56px;
  max-width: 56px;
  max-height: 56px;
  border-radius: 50%;
  object-fit: cover;
}

.top-card .merged-contact .card-view .tip {
  margin: 2px 0 0;
  font-size: 10px;
}

.top-card .merged-contact-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.top-card .wechat-id-wrap {
  margin-top: 0;
  padding: 4px 6px;
  font-size: 11px;
  border-radius: 8px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  text-align: center;
}

.top-card .wechat-id-wrap > span {
  font-size: 14px;
  font-weight: 700;
  color: #2a3148;
}

.top-card .wechat-id-wrap strong {
  font-size: 12px;
}

.top-card .merged-contact-info .actions {
  margin-top: 6px;
  width: 100%;
  display: flex;
  justify-content: center;
}

.top-card .merged-contact-info .btn {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 8px;
}

.merged-contact {
  width: 100%;
}

.merged-contact-body {
  margin-top: 10px;
  display: grid;
  grid-template-columns: minmax(150px, 210px) 1fr;
  gap: 16px;
  align-items: center;
}

.merged-contact .card-view {
  max-width: none;
  padding: 0;
  border: none;
  box-shadow: none;
  background: transparent;
}

.merged-contact .card-view img {
  margin-top: 0;
  width: 100%;
  max-width: 150px;
  max-height: 72px;
  height: 72px;
  object-fit: cover;
  display: block;
}

.merged-contact .card-view {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.merged-contact .card-view .tip {
  text-align: center;
  margin: 8px 0 0;
}

.merged-contact-info .actions {
  margin-top: 10px;
}

.hero {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 22px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  backdrop-filter: blur(6px);
  box-shadow: 0 14px 30px #0c163114;
}

.hero-intro {
  display: block;
  margin-top: 14px;
  padding: 18px 20px;
}

.hero-intro h2 {
  font-size: 22px;
}

.hero-intro p {
  font-size: 15px;
  line-height: 1.65;
}

.hero-intro .intro-app-name {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
  text-decoration-color: #7a5f8f;
}

.app-list {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 14px;
}

.app-list .section-title {
  margin-bottom: 4px;
}

.app-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  padding: 18px;
  box-shadow: 0 8px 18px #101f4508;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  position: relative;
  padding-right: 92px;
}

.app-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px #101f4510;
}

.app-name {
  font-size: 18px;
  font-weight: 800;
  color: #1d2440;
  letter-spacing: 0.2px;
}

.app-sub {
  font-size: 13px;
  color: #5c657e;
}

.corner-tag {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
}

.hero-logo {
  width: 100%;
  border-radius: 16px;
  border: 1px solid #ddd;
}

h1 {
  margin: 0 0 10px;
  font-size: 34px;
  letter-spacing: 1px;
}

.hero h2 {
  margin: 0 0 10px;
  font-size: 22px;
  letter-spacing: 0.5px;
}

.hero p {
  margin: 0;
  font-size: 17px;
  color: #4b5269;
}

.guide-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(290px, 1fr));
  gap: 16px;
}

.platform-card,
.contact-card,
.card-view,
.key-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  padding: 18px;
  box-shadow: 0 8px 18px #101f4508;
}

h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.title-row {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  align-items: center;
}

.tag {
  border-radius: 999px;
  font-size: 12px;
  padding: 4px 10px;
  font-weight: 700;
  white-space: nowrap;
}

.tag-apple {
  background: #eceaf8;
  color: #3f4882;
}

.tag-android {
  background: #e5f5ea;
  color: #226841;
}

.tag-harmony {
  background: #f5ebea;
  color: #7b4242;
}

h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.desc {
  margin: 0;
  color: #51596f;
}

ol {
  margin: 0;
  padding-left: 20px;
  color: #434b64;
  line-height: 1.75;
}

.steps-panel {
  margin-top: 12px;
  border: 1px solid #e3e7f2;
  border-radius: 12px;
  background: #fbfcff;
  padding: 8px 10px;
}

.steps-panel summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  font-size: 14px;
  color: #323a58;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.steps-panel summary::-webkit-details-marker {
  display: none;
}

.steps-panel summary::after {
  content: "展开";
  font-size: 12px;
  color: #666f8c;
  border: 1px solid #d7dded;
  padding: 2px 8px;
  border-radius: 999px;
}

.steps-panel[open] summary::after {
  content: "收起";
}

.steps-panel[open] ol {
  margin-top: 10px;
}

.actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  border: none;
  border-radius: 12px;
  padding: 11px 16px;
  font-size: 15px;
  min-height: 44px;
  line-height: 1.25;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn.primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 8px 15px #6f5f7235;
}

.btn.secondary {
  background: #fff;
  border: 1px solid #cfd4e5;
  color: #28314f;
}

.demo-video-btn {
  position: relative;
  border: 1px solid #d7dced;
  background: linear-gradient(120deg, #ffffff, #f6f3fb);
  color: #2a3148;
  box-shadow: 0 10px 18px #101f450a;
  padding-left: 44px;
  overflow: hidden;
}

.demo-video-btn::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 22px;
  height: 22px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 14px #6f5f7230;
}

.demo-video-btn::after {
  content: "";
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 7px solid #fff;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.demo-video-btn:hover {
  box-shadow: 0 14px 26px #101f4512;
}

.demo-video-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px #8f7f9b33, 0 14px 26px #101f4512;
}

@media (prefers-reduced-motion: no-preference) {
  .demo-video-btn {
    animation: demo-video-pulse 2.4s ease-in-out infinite;
  }
}

@keyframes demo-video-pulse {
  0%,
  70%,
  100% {
    transform: translateY(0);
  }
  75% {
    transform: translateY(-1px);
  }
  80% {
    transform: translateY(0);
  }
  85% {
    transform: translateY(-1px);
  }
}

.btn.is-processing {
  box-shadow: 0 0 0 3px #8f7f9b33;
  opacity: 0.92;
}

#get-key {
  animation: key-btn-shake 1.6s ease-in-out infinite;
  transform-origin: center;
}

@keyframes key-btn-shake {
  0%,
  82%,
  100% {
    transform: translateX(0);
  }
  85% {
    transform: translateX(-3px) scale(1.02);
  }
  88% {
    transform: translateX(3px) scale(1.02);
  }
  91% {
    transform: translateX(-2px);
  }
  94% {
    transform: translateX(2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  #get-key {
    animation: none;
  }

  .demo-video-btn {
    animation: none;
  }
}

.extra-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(240px, 1fr);
  gap: 16px;
}

.wechat-id-wrap {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  background: #f6f8fd;
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 10px;
}

.wechat-id-wrap strong {
  color: #222;
  font-size: 18px;
}

.card-view img {
  width: 100%;
  margin-top: 8px;
  border-radius: 12px;
  border: 1px solid #ddd;
}

.tip {
  color: #5c657e;
  font-size: 13px;
}

.danger-tip {
  margin: 10px 0 0;
  color: #d02727;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

.page-footer {
  margin-top: 14px;
  text-align: center;
  color: #5f6780;
  font-size: 13px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(18px);
  background: #1f2538;
  color: #fff;
  padding: 10px 14px;
  border-radius: 9px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.browser-guide-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.browser-guide-modal.show {
  display: flex;
}

.browser-guide-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 22, 40, 0.55);
}

.browser-guide-dialog {
  position: relative;
  width: min(420px, 92vw);
  background: #fff;
  border-radius: 16px;
  padding: 20px 18px;
  box-shadow: 0 18px 40px #0c163130;
}

.browser-guide-dialog h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: #1d2440;
}

.browser-guide-dialog p {
  margin: 0 0 10px;
  font-size: 14px;
  color: #51596f;
  line-height: 1.6;
}

.browser-guide-dialog ol {
  margin: 0 0 14px;
  padding-left: 20px;
  color: #434b64;
  line-height: 1.75;
  font-size: 14px;
}

.browser-guide-dialog .btn {
  width: 100%;
}

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 1001;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.video-modal.show {
  display: flex;
}

.video-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 22, 40, 0.62);
}

.video-dialog {
  position: relative;
  width: min(860px, 96vw);
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 18px 40px #0c163130;
}

.video-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #eef1fb;
}

.video-header h3 {
  margin: 0;
  font-size: 16px;
  color: #1d2440;
}

.video-close {
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  padding: 4px 8px;
  cursor: pointer;
  color: #5c657e;
}

.video-body {
  padding: 12px;
  background: #0f1424;
}

.video-player {
  width: 100%;
  max-height: min(66vh, 540px);
  border-radius: 10px;
  background: #0f1424;
}

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
  }

  .hero-logo {
    max-width: 180px;
  }

  .guide-grid,
  .extra-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .app-list {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .merged-contact-body {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 10px;
  }

  .merged-contact .card-view img {
    max-width: 140px;
    max-height: 66px;
    height: 66px;
  }

  .top-card .merged-contact .card-view img {
    width: 52px;
    height: 52px;
    max-width: 52px;
    max-height: 52px;
  }

  .top-card .merged-contact h3 {
    font-size: 13px;
  }

  .top-card .merged-contact > p {
    font-size: 16px;
  }

  .top-card .merged-contact-info .btn {
    min-height: 30px;
    font-size: 11px;
  }

  .hero-intro {
    padding: 16px;
  }

  .hero-intro h2 {
    font-size: clamp(18px, 5.2vw, 22px);
  }

  .hero-intro p {
    font-size: 14px;
  }

  h1 {
    font-size: clamp(24px, 6.5vw, 30px);
  }

  h2 {
    font-size: clamp(18px, 5.2vw, 22px);
  }

  h3 {
    font-size: clamp(17px, 4.9vw, 20px);
  }

  .hero p,
  .desc,
  ol,
  .tip {
    font-size: 14px;
    line-height: 1.65;
  }

  .platform-card,
  .contact-card,
  .card-view,
  .key-card {
    padding: 14px;
    border-radius: 14px;
  }

  .steps-panel {
    padding: 8px 9px;
    margin-top: 10px;
  }

  .actions {
    gap: 8px;
  }

  .actions .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
    display: inline-flex;
    align-items: center;
    min-height: 46px;
    font-size: 15px;
  }

  .wechat-id-wrap {
    width: 100%;
    justify-content: space-between;
  }

  .top-card .wechat-id-wrap {
    justify-content: center;
  }
}

@media (max-width: 420px) {
  .container {
    width: 94vw;
    margin-top: 14px;
    margin-bottom: 24px;
  }

  .hero-logo {
    max-width: 150px;
    border-radius: 12px;
  }

  ol {
    padding-left: 18px;
  }

  .btn {
    border-radius: 10px;
    padding: 11px 12px;
  }

  .title-row {
    align-items: flex-start;
  }
}
