/* 官网子页：演示收款 / 服务协议 · 对齐 yuanpay 首页壳 */
body.yp-subpage {
  margin: 0;
  background: #fff;
  font-family: "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  color: #333;
}

body.yp-subpage .header-background {
  opacity: 1 !important;
}

body.yp-subpage .footer {
  background: #fff;
  padding-top: 48px;
}

.yp-sub-main {
  min-height: calc(100vh - 80px);
  padding: 120px 24px 64px;
  box-sizing: border-box;
}

.yp-sub-inner {
  max-width: 920px;
  margin: 0 auto;
}

.yp-sub-card {
  --yp-ease: cubic-bezier(0.22, 1, 0.36, 1);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 10px 32px rgba(10, 37, 58, 0.07);
  border: 1px solid #e6eef5;
  padding: 36px 40px 32px;
  opacity: 0;
  transform: translateY(28px) scale(0.985);
  animation: ypCardEnter 0.7s var(--yp-ease) 0.08s forwards;
  transition:
    transform 0.35s var(--yp-ease),
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

.yp-sub-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(10, 37, 58, 0.11);
  border-color: #d5e6f5;
}

@keyframes ypCardEnter {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.yp-sub-card.is-live {
  opacity: 1;
  transform: none;
  animation: none;
}

.yp-sub-card.is-live:hover {
  transform: translateY(-3px);
}

.yp-sub-card h1 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 700;
  color: #0a253a;
  position: relative;
  padding-bottom: 14px;
}

.yp-sub-card h1::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 48px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, #2d8cf0, #5aa7f5);
  transform-origin: left center;
  animation: ypBarGrow 0.55s var(--yp-ease) 0.45s both;
}

@keyframes ypBarGrow {
  from {
    transform: scaleX(0);
    opacity: 0;
  }
  to {
    transform: scaleX(1);
    opacity: 1;
  }
}

.yp-sub-card .yp-sub-lead {
  margin: 0 0 28px;
  font-size: 14px;
  color: #85929d;
  line-height: 1.6;
}

/* 演示收款 */
.yp-demo-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.yp-demo-qr img,
.yp-demo-qr canvas {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.yp-demo-qr #canvas {
  width: 100%;
  max-width: 420px;
}

.yp-demo-tips {
  margin-top: 8px;
  text-align: center;
  font-size: 13px;
  color: #85929d;
  line-height: 1.8;
}

.yp-demo-cta {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #eef2f6;
  text-align: center;
  font-size: 14px;
  color: #85929d;
}

.yp-demo-cta a {
  color: #2d8cf0;
  font-weight: 600;
  text-decoration: none;
}

/* 演示收款：文案 + 手机框收银台 */
.yp-demo-layout {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
}

.yp-demo-copy h1 {
  margin: 0 0 12px;
  font-size: 32px;
  font-weight: 700;
  color: #0a253a;
}

.yp-demo-steps {
  margin: 0 0 28px;
  padding-left: 20px;
  color: #4a5560;
  font-size: 14px;
  line-height: 1.9;
}

.yp-demo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.yp-demo-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  background: linear-gradient(90deg, #5aa7f5, #2d8cf0);
  color: #fff !important;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(45, 140, 240, 0.3);
}

.yp-demo-join {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid #dbe4ee;
  color: #0a253a;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.yp-demo-visual {
  display: flex;
  align-items: flex-end;
  gap: 28px;
}

.yp-phone {
  width: 320px;
  height: 640px;
  border-radius: 36px;
  background: #0a253a;
  padding: 12px;
  box-sizing: border-box;
  position: relative;
  box-shadow: 0 20px 48px rgba(10, 37, 58, 0.22);
}

.yp-phone-notch {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 96px;
  height: 8px;
  border-radius: 8px;
  background: #1a3348;
  z-index: 2;
}

.yp-phone-screen {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 26px;
  background: #fff;
  display: block;
}

.yp-demo-qr-side {
  text-align: center;
}

.yp-demo-qr-box {
  width: 156px;
  height: 156px;
  margin: 0 auto 10px;
  padding: 8px;
  border: 1px solid #eef2f6;
  border-radius: 12px;
  background: #fff;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

.yp-demo-qr-box canvas,
.yp-demo-qr-box table {
  max-width: 140px !important;
  max-height: 140px !important;
}

.yp-demo-qr-side p {
  margin: 0;
  font-size: 13px;
  color: #85929d;
}

@media (max-width: 900px) {
  .yp-demo-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .yp-demo-visual {
    justify-content: center;
    flex-wrap: wrap;
  }

  .yp-phone {
    width: 280px;
    height: 560px;
  }
}

/* 演示页：宽卡填满 + 零收通色系 + 动态交互 */
.mp-console {
  --mp-ink: #0a253a;
  --mp-muted: #6b7c8a;
  --mp-line: #e6eef5;
  --mp-soft: #f3f7fb;
  --mp-brand: #2d8cf0;
  --mp-brand-deep: #1f6fd0;
  --mp-warn: #c62828;
  --mp-warn-bg: #fff5f5;
  --mp-ease: cubic-bezier(0.22, 1, 0.36, 1);
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(28px) scale(0.985);
  animation: mpEnter 0.7s var(--mp-ease) 0.08s forwards;
}

@keyframes mpEnter {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.mp-shell {
  background: #fff;
  border: 1px solid var(--mp-line);
  border-radius: 18px;
  box-shadow: 0 10px 32px rgba(10, 37, 58, 0.07);
  overflow: hidden;
  transition:
    transform 0.35s var(--mp-ease),
    box-shadow 0.35s ease;
}

.mp-shell:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(10, 37, 58, 0.11);
}

.mp-channel {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #fff;
  border-bottom: 3px solid var(--mp-brand);
}

.mp-channel-item {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 58px;
  font-size: 15px;
  font-weight: 600;
  color: var(--mp-muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  user-select: none;
  transition:
    color 0.25s ease,
    background 0.25s ease,
    transform 0.25s var(--mp-ease);
}

.mp-channel-item img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  transition: transform 0.3s var(--mp-ease), filter 0.3s ease;
}

.mp-channel-item:hover {
  color: var(--mp-ink);
  background: rgba(45, 140, 240, 0.04);
}

.mp-channel-item:hover img {
  transform: scale(1.08);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.12));
}

.mp-channel-item:active {
  transform: scale(0.985);
}

.mp-channel-item.is-on {
  color: var(--mp-ink);
}

.mp-channel-item.is-on img {
  transform: scale(1.06);
}

.mp-panel {
  padding: 28px 36px 32px;
}

.mp-meta,
.mp-pay,
.mp-foot {
  opacity: 0;
  transform: translateY(14px);
  animation: mpRise 0.55s var(--mp-ease) forwards;
}

.mp-console.is-live .mp-meta,
.mp-console.is-live .mp-pay,
.mp-console.is-live .mp-foot {
  opacity: 1;
  transform: none;
  animation: none;
}

.mp-console.is-live .mp-pay.is-switching {
  animation: mpSwitch 0.42s var(--mp-ease) forwards;
}

.mp-meta {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  background: var(--mp-soft);
  border: 1px solid var(--mp-line);
  border-radius: 12px;
  animation-delay: 0.18s;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.mp-meta:hover {
  border-color: #d5e6f5;
  box-shadow: 0 4px 14px rgba(45, 140, 240, 0.06);
}

.mp-meta-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.mp-meta-label {
  font-size: 13px;
  color: var(--mp-muted);
  flex-shrink: 0;
}

.mp-meta-value {
  font-size: 14px;
  color: var(--mp-ink);
  font-weight: 500;
  word-break: break-all;
  text-align: right;
  transition: color 0.2s ease;
}

.mp-pay {
  margin-top: 28px;
  text-align: center;
  animation-delay: 0.28s;
}

@keyframes mpRise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes mpSwitch {
  0% {
    opacity: 0.35;
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.mp-price {
  color: var(--mp-brand);
  margin: 0 0 18px;
  letter-spacing: 0.02em;
  display: inline-block;
  transition: transform 0.3s var(--mp-ease);
}

.mp-price:hover {
  transform: scale(1.04);
}

.mp-price > span:first-child {
  font-size: 44px;
  font-weight: 700;
  line-height: 1;
}

.mp-price-unit {
  font-size: 18px;
  font-weight: 600;
  margin-left: 4px;
  color: var(--mp-brand-deep);
}

.mp-qr {
  position: relative;
  width: 240px;
  height: 240px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--mp-line);
  border-radius: 14px;
  box-shadow: inset 0 0 0 8px var(--mp-soft);
  overflow: hidden;
  transition:
    transform 0.35s var(--mp-ease),
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

.mp-qr::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 0 rgba(45, 140, 240, 0.18);
  animation: mpQrPulse 2.8s ease-in-out infinite;
}

.mp-qr:hover {
  transform: scale(1.03);
  border-color: #cfe3f7;
  box-shadow:
    inset 0 0 0 8px var(--mp-soft),
    0 10px 24px rgba(45, 140, 240, 0.12);
}

.mp-qr.is-ready canvas,
.mp-qr.is-ready table {
  animation: mpQrReveal 0.55s var(--mp-ease) both;
}

@keyframes mpQrPulse {
  0%,
  100% {
    box-shadow: inset 0 0 0 0 rgba(45, 140, 240, 0);
  }
  50% {
    box-shadow: inset 0 0 0 10px rgba(45, 140, 240, 0.07);
  }
}

@keyframes mpQrReveal {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.mp-qr canvas,
.mp-qr table {
  position: relative;
  z-index: 1;
  max-width: 200px !important;
  max-height: 200px !important;
}

.mp-msg {
  max-width: 520px;
  margin: 0 auto;
  padding: 14px 18px;
  background: var(--mp-warn-bg);
  border: 1px solid #f7d6d6;
  border-radius: 12px;
  transition: transform 0.3s var(--mp-ease), box-shadow 0.3s ease;
}

.mp-msg:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(198, 40, 40, 0.08);
}

.mp-msg p {
  color: var(--mp-warn);
  font-weight: 600;
  line-height: 1.85;
  margin: 0;
  font-size: 14px;
}

.mp-msg-main {
  font-size: 16px !important;
  font-weight: 700 !important;
}

.mp-note {
  color: var(--mp-warn);
  font-size: 20px;
  font-weight: 700;
  display: inline-block;
  transition: transform 0.2s var(--mp-ease);
}

.mp-note.is-tick {
  animation: mpTick 0.28s var(--mp-ease);
}

@keyframes mpTick {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.12);
  }
  100% {
    transform: scale(1);
  }
}

.mp-foot {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px dashed var(--mp-line);
  color: var(--mp-muted);
  font-size: 14px;
  text-align: center;
  animation-delay: 0.4s;
  transition: color 0.25s ease, opacity 0.25s ease;
}

.mp-console[data-channel="wx"] .mp-foot,
.mp-console[data-channel="ali"] .mp-foot {
  opacity: 1;
}

@media (max-width: 720px) {
  .mp-panel {
    padding: 22px 18px 26px;
  }

  .mp-price > span:first-child {
    font-size: 36px;
  }

  .mp-qr {
    width: 220px;
    height: 220px;
  }

  .mp-meta-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .mp-meta-value {
    text-align: left;
  }

  .mp-shell:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mp-console,
  .mp-meta,
  .mp-pay,
  .mp-foot,
  .mp-qr::before,
  .mp-qr.is-ready canvas,
  .mp-qr.is-ready table,
  .mp-note.is-tick,
  .mp-pay.is-switching {
    animation: none !important;
    opacity: 1;
    transform: none;
  }

  .mp-shell,
  .mp-channel-item,
  .mp-qr,
  .mp-price,
  .mp-msg {
    transition: none;
  }
}

/* 服务协议正文 + 动态交互 */
.yp-agree-body .yp-agree-notice {
  margin: 0 0 28px;
  padding: 16px 18px;
  background: #f3f7fb;
  border: 1px solid #e6eef5;
  border-left: 3px solid #2d8cf0;
  border-radius: 12px;
  transition:
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.yp-agree-body .yp-agree-notice:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(45, 140, 240, 0.08);
  border-color: #cfe3f7;
}

.yp-agree-body .yp-agree-notice p {
  margin: 0;
}

.yp-agree-body .yp-agree-block {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.yp-agree-body .yp-agree-block.is-in {
  opacity: 1;
  transform: translateY(0);
}

.yp-agree-body h3 {
  margin: 28px 0 12px;
  font-size: 18px;
  color: #0a253a;
  transition: color 0.25s ease;
}

.yp-agree-body .yp-agree-block:hover h3 {
  color: #1f6fd0;
}

.yp-agree-body h3:first-of-type {
  margin-top: 0;
}

.yp-agree-body p {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.85;
  color: #4a5560;
}

.yp-agree-body p strong,
.yp-agree-body p b {
  color: #0a253a;
}

@media (max-width: 768px) {
  .yp-sub-main {
    padding: 100px 16px 48px;
  }

  .yp-sub-card {
    padding: 24px 18px 22px;
  }

  .yp-sub-card:hover,
  .yp-sub-card.is-live:hover {
    transform: none;
  }

  .yp-sub-card h1 {
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .yp-sub-card,
  .yp-sub-card h1::after,
  .yp-agree-body .yp-agree-block {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
