html {
    font-size: 16px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

html {
  position: relative;
  height: 100%;
}

body {
    height: 100%;
}

/* Payment page visual refresh. CSS only; payment logic and polling are unchanged. */
html {
  min-height: 100%;
  height: auto !important;
  font-size: 16px;
}

body {
  min-height: 100vh;
  height: auto !important;
  margin: 0;
  color: #171b24;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #f8fafc 0%, #eef3f8 100%);
}

.container.h-100 {
  width: min(980px, calc(100% - 32px));
  max-width: none;
  min-height: 100vh;
  height: auto !important;
  padding: 24px 0 40px;
}

main.h-100 {
  min-height: auto;
  height: auto !important;
}

main > .text-center.pt-2 {
  position: relative;
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  gap: 28px;
  margin: 0 auto;
  padding: 116px 32px 32px !important;
  text-align: left !important;
  background: #fff;
  border: 1px solid #e4e9f1;
  border-radius: 26px;
  box-shadow: 0 22px 60px rgba(21, 35, 65, .10);
  overflow: hidden;
}

main > .text-center.pt-2::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 72px;
  height: 1px;
  background: #e4e9f1;
}

main > .text-center.pt-2 > h4.display-6 {
  position: absolute;
  left: 32px;
  top: 54px;
  margin: 0;
  font-size: clamp(30px, 4.4vw, 48px);
  line-height: 1.1;
  letter-spacing: -.055em;
  font-weight: 850;
  color: #171b24;
}

main > .text-center.pt-2 > h4.display-6::before {
  content: "请使用 TRON 网络完成转账";
  display: block;
  margin-bottom: 8px;
  color: #697386;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
}

main > .text-center.pt-2 > h4.display-6::after {
  content: "等待付款";
  position: fixed;
  right: calc((100vw - min(980px, calc(100vw - 32px))) / 2);
  top: 24px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #eaf8f0;
  color: #11743d;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
}

main > .text-center.pt-2 .text-danger {
  color: #d92d42 !important;
}

main > .text-center.pt-2 > .time {
  position: absolute;
  right: 32px;
  top: 88px;
  margin: 0 !important;
  font-family: inherit !important;
  color: #697386;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.2;
  text-align: right;
}

main > .text-center.pt-2 > .time .text-danger {
  display: block;
  margin-top: 6px;
  color: #d92d42 !important;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
  letter-spacing: -.045em;
  line-height: 1;
}

main > .text-center.pt-2 > .text-danger.fw-bold.mb-2 {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  margin: 0 !important;
  padding: 14px 16px;
  border: 1px solid #ffd6de;
  border-radius: 18px;
  background: #fff5f6;
  color: transparent !important;
  font-size: 0;
  line-height: 0;
}

main > .text-center.pt-2 > .text-danger.fw-bold.mb-2::after {
  content: "请仔细核对网络和币种，转错可能导致资产无法找回。";
  color: #a91f32;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.55;
}

main > .text-center.pt-2 > .mb-2:nth-child(5) {
  grid-column: 1;
  grid-row: 1 / span 5;
  margin: 0 !important;
  padding: 18px;
  border: 1px solid #e4e9f1;
  border-radius: 22px;
  background: #fbfcff;
  text-align: center;
}

main > .text-center.pt-2 > .mb-2:nth-child(5) > .text-danger.fw-bold {
  position: static !important;
  height: auto !important;
  bottom: auto !important;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 0 14px;
  color: transparent !important;
  font-size: 0;
}

main > .text-center.pt-2 > .mb-2:nth-child(5) > .text-danger.fw-bold::before {
  content: "区块链：波场 TRON";
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e4e9f1;
  color: #d92d42;
  font-size: 14px;
  font-weight: 850;
}

main > .text-center.pt-2 > .mb-2:nth-child(5) > .text-danger.fw-bold::after {
  content: "币种：TRX";
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e4e9f1;
  color: #d92d42;
  font-size: 14px;
  font-weight: 850;
}

main > .text-center.pt-2 > .mb-2:nth-child(5) img {
  display: block;
  width: 100%;
  max-width: 326px;
  height: auto;
  margin: 0 auto;
  padding: 10px;
  background: #fff;
  border: 1px solid #eef1f5 !important;
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(17, 24, 39, .07);
}

main > .text-center.pt-2 .address {
  position: static !important;
  height: auto !important;
  top: auto !important;
  max-width: 330px;
  margin: 13px auto 0;
  color: #d92d42 !important;
  font-size: 15px !important;
  font-weight: 750 !important;
  line-height: 1.35;
  word-break: break-all;
}

main > .text-center.pt-2 > .text-start.m-auto {
  grid-column: 2;
  grid-row: 2;
  width: auto !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

main > .text-center.pt-2 > .d-flex {
  grid-column: 2;
  grid-row: 3;
  display: block !important;
  margin: 0 !important;
}

main > .text-center.pt-2 > .d-flex .input-group {
  width: auto !important;
  margin: 0 !important;
  display: flex;
  align-items: stretch;
  gap: 10px;
}

main > .text-center.pt-2 .form-control {
  flex: 1;
  min-width: 0;
  height: auto;
  padding: 14px 16px;
  border: 1px solid #e4e9f1;
  border-radius: 18px !important;
  background: #f8fafc;
  color: #171b24;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
  word-break: break-all;
}

main > .text-center.pt-2 .btn {
  border: 0;
  border-radius: 12px !important;
  background: #1267ff !important;
  color: #fff !important;
  padding: 11px 15px;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 6px 14px rgba(18, 103, 255, .18);
}

main > .text-center.pt-2 > .text-start.m-auto > .mb-2 {
  margin: 0 !important;
  padding: 15px 16px;
  border: 1px solid #e4e9f1;
  border-radius: 18px;
  background: #f8fafc;
  color: #697386;
  font-size: 13px;
  font-weight: 850;
}

main > .text-center.pt-2 > .text-start.m-auto > .mb-2 span {
  display: block;
  margin-top: 8px;
  color: #171b24 !important;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
  word-break: break-all;
}

main > .text-center.pt-2 > .text-start.m-auto > .mb-2:first-child span {
  display: inline-block;
  margin: 0 10px 0 8px;
  color: #d92d42 !important;
  font-size: 32px;
  font-weight: 950;
  letter-spacing: -.045em;
  vertical-align: middle;
}

main > .text-center.pt-2 > .text-start.m-auto > .mb-2:first-child .btn {
  margin-left: 0 !important;
}

main > .text-center.pt-2 > .text-start.m-auto > .mb-2:nth-child(2) {
  position: absolute;
  left: 32px;
  top: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #171b24;
  font-size: 20px;
  font-weight: 850;
  letter-spacing: -.03em;
}

main > .text-center.pt-2 > .text-start.m-auto > .mb-2:nth-child(2) span {
  display: inline;
  margin: 0;
  color: #171b24 !important;
  font-size: inherit;
  font-weight: inherit;
}

main > .text-center.pt-2 > .text-start.m-auto > .mt-4 {
  display: none !important;
}

@media (max-width: 860px) {
  .container.h-100 {
    width: min(100% - 20px, 640px);
    padding-top: 12px;
  }

  main > .text-center.pt-2 {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 122px 20px 20px !important;
  }

  main > .text-center.pt-2::before {
    top: 76px;
  }

  main > .text-center.pt-2 > h4.display-6 {
    left: 20px;
    right: 20px;
    top: 54px;
    font-size: 32px;
  }

  main > .text-center.pt-2 > h4.display-6::after {
    position: fixed;
    right: 20px;
    top: 16px;
  }

  main > .text-center.pt-2 > .time {
    position: static;
    grid-column: 1;
    grid-row: 2;
    text-align: left;
  }

  main > .text-center.pt-2 > .mb-2:nth-child(5) {
    grid-column: 1;
    grid-row: 3;
  }

  main > .text-center.pt-2 > .text-danger.fw-bold.mb-2 {
    grid-column: 1;
    grid-row: 4;
  }

  main > .text-center.pt-2 > .text-start.m-auto {
    grid-column: 1;
    grid-row: 5;
  }

  main > .text-center.pt-2 > .d-flex {
    grid-column: 1;
    grid-row: 6;
  }

  main > .text-center.pt-2 > .text-start.m-auto > .mb-2:nth-child(2) {
    left: 20px;
    top: 20px;
    right: 110px;
    font-size: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 520px) {
  main > .text-center.pt-2 {
    padding: 116px 16px 16px !important;
  }

  main > .text-center.pt-2 > h4.display-6 {
    font-size: 28px;
  }

  main > .text-center.pt-2 > .d-flex .input-group {
    flex-direction: column;
  }

  main > .text-center.pt-2 .btn {
    width: 100%;
  }

  main > .text-center.pt-2 .form-control {
    font-size: 16px;
  }

  main > .text-center.pt-2 > .text-start.m-auto > .mb-2:first-child span {
    display: block;
    margin: 8px 0 10px;
    font-size: 30px;
  }
}

/* Payment page layout refinement: prevent long currency names from crowding. */
main > .text-center.pt-2 {
  grid-template-columns: 400px minmax(0, 1fr);
  gap: 34px 42px;
  padding: 100px 32px 38px !important;
}

main > .text-center.pt-2 > h4.display-6 {
  position: static;
  grid-column: 1 / -1;
  grid-row: 1;
  max-width: 980px;
  margin: 0 0 2px;
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.12;
  letter-spacing: -.045em;
}

main > .text-center.pt-2 > h4.display-6::before {
  display: none;
}

main > .text-center.pt-2 > .time {
  position: static;
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  min-height: 90px;
  padding: 18px 20px;
  border: 1px solid #e4e9f1;
  border-radius: 18px;
  background: #f8fafc;
  text-align: left;
}

main > .text-center.pt-2 > .time .text-danger {
  font-size: clamp(30px, 3.8vw, 46px);
}

main > .text-center.pt-2 > .mb-2:nth-child(5) {
  grid-column: 1;
  grid-row: 2 / span 5;
}

main > .text-center.pt-2 > .text-danger.fw-bold.mb-2 {
  grid-column: 2;
  grid-row: 3;
}

main > .text-center.pt-2 > .text-start.m-auto {
  grid-column: 2;
  grid-row: 4;
}

main > .text-center.pt-2 > .d-flex {
  grid-column: 2;
  grid-row: 5;
}

main > .text-center.pt-2 > .text-start.m-auto > .mb-2:first-child span {
  font-size: clamp(28px, 3.4vw, 42px);
}

main > .text-center.pt-2 > .text-start.m-auto > .mb-2:nth-child(3) {
  min-height: 86px;
}

main > .text-center.pt-2 > .text-start.m-auto > .mb-2:nth-child(2) {
  top: 26px;
  font-size: 19px;
  max-width: calc(100% - 210px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

main > .text-center.pt-2 > .text-start.m-auto > .mb-2:nth-child(2)::before {
  content: "";
}

main > .text-center.pt-2 > .mb-2:nth-child(5) img {
  max-width: 310px;
}

@media (max-width: 980px) {
  main > .text-center.pt-2 {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 96px 22px 24px !important;
  }

  main > .text-center.pt-2 > h4.display-6,
  main > .text-center.pt-2 > .time,
  main > .text-center.pt-2 > .mb-2:nth-child(5),
  main > .text-center.pt-2 > .text-danger.fw-bold.mb-2,
  main > .text-center.pt-2 > .text-start.m-auto,
  main > .text-center.pt-2 > .d-flex {
    grid-column: 1;
  }

  main > .text-center.pt-2 > h4.display-6 { grid-row: 1; }
  main > .text-center.pt-2 > .time { grid-row: 2; }
  main > .text-center.pt-2 > .mb-2:nth-child(5) { grid-row: 3; }
  main > .text-center.pt-2 > .text-danger.fw-bold.mb-2 { grid-row: 4; }
  main > .text-center.pt-2 > .text-start.m-auto { grid-row: 5; }
  main > .text-center.pt-2 > .d-flex { grid-row: 6; }
}

/* Payment page final balance pass: align column scale and order actions by user flow. */
main > .text-center.pt-2 {
  grid-template-columns: minmax(330px, 0.88fr) minmax(420px, 1.12fr);
  column-gap: 44px;
  row-gap: 22px;
  padding: 108px 42px 42px !important;
}

main > .text-center.pt-2 > h4.display-6 {
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1.15;
  max-width: 100%;
  margin-bottom: 8px;
}

main > .text-center.pt-2 > .mb-2:nth-child(5) {
  grid-column: 1;
  grid-row: 2 / span 5;
  align-self: start;
  padding: 20px 20px 22px;
  min-height: auto;
}

main > .text-center.pt-2 > .mb-2:nth-child(5) img {
  max-width: 288px;
}

main > .text-center.pt-2 .address {
  max-width: 310px;
  font-size: 14px !important;
}

main > .text-center.pt-2 > .text-start.m-auto {
  display: contents;
}

main > .text-center.pt-2 > .text-start.m-auto > .mb-2:first-child {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 104px;
  padding: 18px 20px;
}

main > .text-center.pt-2 > .text-start.m-auto > .mb-2:first-child span {
  flex: 1;
  margin: 0;
  font-size: clamp(30px, 3.1vw, 44px);
  line-height: 1;
  white-space: nowrap;
}

main > .text-center.pt-2 > .d-flex {
  grid-column: 2;
  grid-row: 3;
}

main > .text-center.pt-2 > .d-flex::before {
  content: "收款地址";
  display: block;
  margin-bottom: 8px;
  color: #697386;
  font-size: 13px;
  font-weight: 850;
}

main > .text-center.pt-2 > .d-flex .input-group {
  align-items: stretch;
}

main > .text-center.pt-2 > .d-flex .input-group .btn {
  width: auto !important;
  min-width: 82px;
  min-height: 72px;
  padding: 11px 15px;
}

main > .text-center.pt-2 .form-control {
  min-height: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
}

main > .text-center.pt-2 > .text-danger.fw-bold.mb-2 {
  grid-column: 2;
  grid-row: 4;
  min-height: auto;
  padding: 16px 18px;
}

main > .text-center.pt-2 > .time {
  grid-column: 2;
  grid-row: 5;
  min-height: 84px;
  padding: 16px 18px;
}

main > .text-center.pt-2 > .time .text-danger {
  font-size: clamp(28px, 3vw, 40px);
}

main > .text-center.pt-2 > .text-start.m-auto > .mb-2:nth-child(3) {
  grid-column: 2;
  grid-row: 6;
  min-height: 80px;
  padding: 16px 18px;
}

main > .text-center.pt-2 > .text-start.m-auto > .mb-2:nth-child(2) {
  top: 30px;
  left: 42px;
  max-width: calc(100% - 240px);
}

@media (max-width: 1100px) {
  main > .text-center.pt-2 {
    grid-template-columns: 360px minmax(0, 1fr);
    column-gap: 32px;
    padding-left: 30px !important;
    padding-right: 30px !important;
  }

  main > .text-center.pt-2 > .mb-2:nth-child(5) img {
    max-width: 260px;
  }
}

@media (max-width: 900px) {
  main > .text-center.pt-2 {
    grid-template-columns: 1fr;
    padding: 104px 22px 24px !important;
  }

  main > .text-center.pt-2 > h4.display-6,
  main > .text-center.pt-2 > .text-start.m-auto > .mb-2:first-child,
  main > .text-center.pt-2 > .d-flex,
  main > .text-center.pt-2 > .text-danger.fw-bold.mb-2,
  main > .text-center.pt-2 > .time,
  main > .text-center.pt-2 > .text-start.m-auto > .mb-2:nth-child(3),
  main > .text-center.pt-2 > .mb-2:nth-child(5) {
    grid-column: 1;
  }

  main > .text-center.pt-2 > h4.display-6 { grid-row: 1; }
  main > .text-center.pt-2 > .text-start.m-auto > .mb-2:first-child { grid-row: 2; }
  main > .text-center.pt-2 > .d-flex { grid-row: 3; }
  main > .text-center.pt-2 > .mb-2:nth-child(5) { grid-row: 4; }
  main > .text-center.pt-2 > .text-danger.fw-bold.mb-2 { grid-row: 5; }
  main > .text-center.pt-2 > .time { grid-row: 6; }
  main > .text-center.pt-2 > .text-start.m-auto > .mb-2:nth-child(3) { grid-row: 7; }

  main > .text-center.pt-2 > .mb-2:nth-child(5) img {
    max-width: 320px;
  }

  main > .text-center.pt-2 > .text-start.m-auto > .mb-2:nth-child(2) {
    left: 22px;
    top: 22px;
  }
}

/* Final payment info tuning. */
main > .text-center.pt-2 > .text-start.m-auto > .mb-2:first-child span {
  font-size: clamp(26px, 2.6vw, 36px) !important;
}

main > .text-center.pt-2 > .text-start.m-auto > .mb-2:nth-child(3) {
  display: none !important;
}

/* Restore dynamic network/currency text above the QR code. */
main > .text-center.pt-2 > .mb-2:nth-child(5) > .text-danger.fw-bold {
  color: #d92d42 !important;
  font-size: 0 !important;
}

main > .text-center.pt-2 > .mb-2:nth-child(5) > .text-danger.fw-bold::before,
main > .text-center.pt-2 > .mb-2:nth-child(5) > .text-danger.fw-bold::after {
  content: none !important;
}

/* Keep both copy buttons the same compact size. */
main > .text-center.pt-2 .btn[data-clipboard-target] {
  width: 61px !important;
  min-width: 61px !important;
  height: 45px !important;
  min-height: 45px !important;
  padding: 11px 15px !important;
}
