:root {
    --pay-ink: #151914;
    --pay-paper: #eee8d8;
    --pay-paper-deep: #ded5bf;
    --pay-orange: #db5b32;
    --pay-amber: #dcaa56;
    --pay-muted: #72756b;
    --pay-line: rgba(31, 39, 31, .2);
}

.recharge-center {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    color: var(--pay-ink);
    background: rgba(8, 12, 9, .82);
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

.recharge-center,
.recharge-center *,
.recharge-center *::before,
.recharge-center *::after { box-sizing: border-box; }

.recharge-center button,
.recharge-center input {
    margin: 0;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
}

.recharge-center.is-open {
    display: flex;
    animation: pay-overlay-in .18s ease-out;
}

.recharge-center__dialog {
    position: relative;
    width: min(420px, 100%);
    max-height: calc(100svh - 36px);
    overflow-x: hidden;
    overflow-y: auto;
    border: 0;
    border-top: 6px solid var(--pay-orange);
    border-radius: 0;
    background: var(--pay-paper);
    box-shadow: 12px 12px 0 rgba(220, 170, 86, .9), 0 28px 70px rgba(0, 0, 0, .45);
    scrollbar-width: thin;
    scrollbar-color: rgba(31, 39, 31, .35) transparent;
    animation: pay-sheet-in .22s ease-out;
}

.recharge-center__header {
    position: relative;
    min-height: 98px;
    padding: 25px 68px 21px 25px;
    color: #f1e7cf;
    background: var(--pay-ink);
    border: 0;
    text-align: left;
}

.recharge-center__header::after { display: none; }

.recharge-center__title {
    margin: 0 0 7px;
    font-family: "STKaiti", "KaiTi", serif;
    font-size: 28px;
    line-height: 1;
    letter-spacing: .14em;
}

.recharge-center__subtitle {
    margin: 0;
    color: var(--pay-amber);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .2em;
}

.recharge-center__close {
    position: absolute;
    top: 23px;
    right: 23px;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 0;
    color: rgba(255, 255, 255, .65);
    background: transparent;
    font: 22px/1 sans-serif;
    cursor: pointer;
    transition: color .2s, border-color .2s, background .2s;
}

.recharge-center__close:hover {
    color: #fff;
    border-color: var(--pay-orange);
    background: var(--pay-orange);
}

.recharge-center__body { padding: 25px; }

.recharge-center__summary {
    margin: 0 0 26px;
    border: 0;
    border-top: 1px solid var(--pay-line);
    background: transparent;
}

.recharge-center__row {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    min-height: 43px;
    padding: 8px 0;
    border-bottom: 1px solid var(--pay-line);
}

.recharge-center__label {
    color: var(--pay-muted);
    font-size: 11px;
    letter-spacing: .1em;
}

.recharge-center__value {
    overflow: hidden;
    color: var(--pay-ink);
    font-size: 14px;
    font-weight: 700;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recharge-center__field-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 9px;
    color: var(--pay-ink);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .05em;
}

.recharge-center__ratio {
    color: var(--pay-orange);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
}

.recharge-center__amount-wrap { position: relative; }

.recharge-center__currency {
    position: absolute;
    top: 50%;
    left: 15px;
    color: var(--pay-orange);
    font: 700 20px Georgia, serif;
    transform: translateY(-50%);
    pointer-events: none;
}

.recharge-center__amount {
    width: 100%;
    height: 52px;
    padding: 0 54px 0 42px;
    border: 1px solid rgba(31, 39, 31, .42);
    border-radius: 0;
    outline: none;
    color: var(--pay-ink);
    background: rgba(255, 255, 255, .3);
    box-shadow: none;
    font-size: 20px;
    font-weight: 700;
    transition: border-color .15s, background .15s;
    -moz-appearance: textfield;
}

.recharge-center__amount::-webkit-inner-spin-button,
.recharge-center__amount::-webkit-outer-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.recharge-center__amount:focus {
    border-color: var(--pay-orange);
    background: rgba(255, 255, 255, .55);
    box-shadow: none;
}

.recharge-center__unit {
    position: absolute;
    top: 50%;
    right: 15px;
    color: var(--pay-muted);
    font-size: 12px;
    transform: translateY(-50%);
    pointer-events: none;
}

.recharge-center__hint {
    min-height: 19px;
    margin: 7px 0 15px;
    color: var(--pay-muted);
    font-size: 11px;
    line-height: 1.6;
}

.recharge-center__hint.is-error { color: #b63629; }

.recharge-center__submit {
    width: calc(100% - 7px);
    height: 50px;
    margin: 0 7px 7px 0;
    border: 0;
    border-radius: 0;
    color: #f3ead5;
    background: var(--pay-ink);
    box-shadow: 7px 7px 0 var(--pay-amber);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .16em;
    cursor: pointer;
    transition: transform .18s, box-shadow .18s, background .18s;
}

.recharge-center__submit:hover:not(:disabled) {
    background: #293029;
    transform: translate(3px, 3px);
    box-shadow: 4px 4px 0 var(--pay-amber);
}

.recharge-center__submit:disabled { cursor: wait; opacity: .58; }

.recharge-center__safe {
    margin: 17px 0 0;
    padding-top: 13px;
    color: #898b80;
    border-top: 1px solid var(--pay-line);
    font-size: 10px;
    line-height: 1.65;
    text-align: left;
}

@keyframes pay-overlay-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pay-sheet-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

@media (max-width: 480px) {
    .recharge-center { align-items: flex-end; padding: 9px; }
    .recharge-center__dialog { width: 100%; max-height: calc(100svh - 18px); box-shadow: 7px 7px 0 var(--pay-amber); }
    .recharge-center__header { min-height: 88px; padding: 21px 62px 18px 20px; }
    .recharge-center__close { top: 18px; right: 18px; }
    .recharge-center__body { padding: 21px 20px 23px; }
}

@media (prefers-reduced-motion: reduce) {
    .recharge-center, .recharge-center__dialog { animation: none; }
}
