:root {
  --page-gray: #585858;
  --content-gray: #efefef;
  --menu-gray: #787775;
  --menu-button: #8b8b8b;
  --orange: #faa61a;
  --orange-button: #ffa231;
  --text: #333333;
  --muted: #757575;
  --field: #ffffff;
  --field-alt: #f4f4f4;
  --error: #d71920;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--page-gray);
  color: var(--text);
  font-family: "Helvetica Neue", Arial, "Microsoft JhengHei", sans-serif;
}

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

a:hover {
  text-decoration: underline;
}

.content {
  width: 990px;
  min-height: calc(100vh - 142px);
  margin: 0 auto;
  overflow: hidden;
  border-radius: 0 0 0 55px;
  background: var(--content-gray);
}

.header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 990px;
  min-height: 118px;
  padding: 18px 0 0;
  font-size: 16px;
  font-weight: 700;
}

.logo {
  display: inline-block;
  margin-left: 18px;
}

.logo:hover {
  text-decoration: none;
}

.logo img {
  display: block;
  width: auto;
  height: 100px;
}

.header-links {
  padding: 6px 20px 0 0;
  line-height: 1.9;
  text-align: right;
}

.header-links a {
  color: var(--orange);
}

.menu-block {
  display: flex;
  align-items: flex-start;
  width: 990px;
  margin: 0 auto;
}

.left-menu {
  width: 245px;
  min-height: 520px;
  padding: 40px 20px;
  border-radius: 0 55px 0 55px;
  background: var(--menu-gray);
  color: #ffffff;
}

.login-but {
  position: relative;
  display: block;
  width: 100%;
  height: 88px;
  margin: 0 0 34px;
  padding: 31px 48px 0 18px;
  border-radius: 25px;
  background: var(--menu-button);
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
}

.login-but:hover {
  text-decoration: none;
}

.arrow,
.login-but .arrow,
.submit-but span {
  float: right;
  font-size: 30px;
  line-height: 0.65;
}

.menu-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 25px;
  color: var(--orange);
  cursor: default;
  font-size: 12px;
  font-weight: 700;
}

.menu-title.settings {
  margin-top: 44px;
}

.menu-items {
  display: grid;
  gap: 22px;
}

.menu-items button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  text-align: left;
}

.menu-items button.active {
  color: var(--orange);
  font-weight: 700;
}

.menu-icon {
  display: inline-block;
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex: 0 0 auto;
}

.menu-items button.active .menu-icon {
  filter: drop-shadow(0 0 0.5px var(--orange));
}

.main-content {
  width: 660px;
  margin-left: 25px;
  padding: 58px 60px 34px;
  border-radius: 25px;
  background: #ffffff;
}

.main-content h1 {
  margin: 0 0 18px;
  color: var(--orange);
  font-size: 25px;
  font-style: italic;
  line-height: 1.2;
}

.topup-form {
  margin: 0;
}

.brand-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  margin: 0 0 22px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
}

.brand-logos {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 72px;
}

.brand-logos img {
  display: block;
  max-height: 24px;
  width: auto;
}

.brand-logos .alipay-logo {
  max-height: 26px;
}

.brand-logos.is-hidden {
  display: none;
}

.input-row {
  margin: 0;
  padding: 0;
  border: 0;
}

.input-title,
.input-note {
  display: block;
  margin: 0;
  padding: 0 0 10px;
  color: var(--text);
  font-size: 12px;
  font-weight: 400;
}

.input-note {
  padding-top: 2px;
}

.input-field {
  width: 100%;
  height: 40px;
  margin: 0 0 15px;
  border-radius: 6px;
  background: var(--field-alt);
  border: 1px solid #d7d7d7;
}

.input-field.inline {
  display: inline-block;
  width: calc(100% - 32px);
  margin: 0 0 10px;
  vertical-align: middle;
}

.input-field.invalid {
  border-color: var(--error);
}

.input-field:focus-within {
  border-color: var(--orange);
  box-shadow: 0 0 0 2px rgba(250, 166, 26, 0.18);
}

.input-field input {
  width: calc(100% - 40px);
  height: 20px;
  margin: 10px 20px;
  border: 0;
  appearance: textfield;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  outline: 0;
}

.phone-field {
  display: flex;
  align-items: center;
}

.phone-field .dial-prefix {
  display: inline-flex;
  align-items: center;
  align-self: stretch;
  padding: 0 14px 0 18px;
  border-right: 1px solid #d7d7d7;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.phone-field input {
  flex: 1;
  width: auto;
  margin-left: 14px;
}

.input-field input::placeholder {
  color: #b2b2b2;
}

.input-field input[type="number"]::-webkit-inner-spin-button,
.input-field input[type="number"]::-webkit-outer-spin-button {
  appearance: none;
  margin: 0;
}

.radio-content {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.radio-content input {
  width: 16px;
  height: 16px;
  accent-color: var(--orange-button);
}

.amount-options {
  display: grid;
  gap: 0;
  margin: 0 0 2px;
}

.amount-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 0 10px;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.amount-option input {
  width: 16px;
  height: 16px;
  accent-color: var(--orange-button);
}

.amount-option:has(input:checked) span {
  color: #9a5d00;
}

.amount-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.radio-content {
  width: 24px;
  height: 40px;
  justify-content: center;
  padding-bottom: 10px;
}

.button-row {
  padding-top: 6px;
}

.submit-but {
  position: relative;
  width: 300px;
  max-width: 100%;
  min-height: 40px;
  padding: 7px 32px;
  border: 0;
  border-radius: 25px;
  background: var(--orange-button);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 18px;
  font-weight: 700;
}

.submit-but:hover {
  filter: brightness(1.03);
}

.official-link {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  word-break: break-all;
}

.official-link a {
  color: var(--orange);
  font-weight: 700;
}

.footer {
  width: 100%;
  background: var(--page-gray);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  width: 990px;
  margin: 0 auto;
  padding: 28px 0 34px;
  color: #c3c3c3;
  font-size: 13px;
  font-weight: 700;
}

.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.45);
}

.dialog-backdrop[hidden] {
  display: none;
}

.confirm-card {
  width: min(100%, 430px);
  padding: 30px 32px 28px;
  border-radius: 25px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.confirm-card h2 {
  margin: 0 0 16px;
  color: var(--orange);
  font-size: 25px;
  font-style: italic;
  line-height: 1.2;
}

.confirm-card p {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.7;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 26px;
}

.dialog-btn {
  min-width: 104px;
  min-height: 40px;
  padding: 7px 22px;
  border: 0;
  border-radius: 25px;
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
}

.dialog-btn.primary {
  background: var(--orange-button);
  color: #ffffff;
}

.dialog-btn.secondary {
  background: var(--field-alt);
  color: var(--text);
}

@media (max-width: 1020px) {
  .content,
  .header,
  .menu-block,
  .footer-inner {
    width: min(100%, 720px);
  }

  .content {
    border-radius: 0 0 0 36px;
  }

  .menu-block {
    display: block;
    padding: 0 18px 24px;
  }

  .left-menu {
    width: 100%;
    min-height: 0;
    margin-bottom: 18px;
    padding: 22px;
    border-radius: 0 36px 0 36px;
  }

  .login-but {
    height: 62px;
    padding-top: 19px;
    margin-bottom: 22px;
  }

  .menu-items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .main-content {
    width: 100%;
    margin-left: 0;
    padding: 34px 28px;
  }
}

@media (max-width: 560px) {
  .header {
    min-height: 96px;
    padding-top: 14px;
  }

  .logo {
    margin-left: 14px;
  }

  .logo img {
    height: 72px;
  }

  .header-links {
    padding-right: 14px;
    font-size: 12px;
  }

  .menu-block {
    padding: 0 12px 18px;
  }

  .left-menu {
    padding: 18px;
  }

  .menu-items {
    grid-template-columns: 1fr;
  }

  .main-content {
    padding: 28px 20px;
  }

  .submit-but {
    width: 100%;
  }

  .footer-inner {
    padding-inline: 14px;
  }
}
