.recharge-center {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #3f2d1e;
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    background: rgba(7, 10, 9, .76);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.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: recharge-fade-in .18s ease-out;
}

.recharge-center__dialog {
    position: relative;
    width: min(430px, 100%);
    max-height: calc(100vh - 40px);
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid #b88b4a;
    border-radius: 8px;
    background:
        linear-gradient(rgba(249, 241, 220, .97), rgba(239, 222, 187, .98)),
        #f5e9cf;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .55), inset 0 0 0 4px rgba(112, 65, 30, .12);
    animation: recharge-dialog-in .2s ease-out;
}

.recharge-center__header {
    position: relative;
    padding: 23px 56px 19px;
    color: #fff1ca;
    text-align: center;
    background: linear-gradient(135deg, #842a24, #5a1b19);
    border-bottom: 1px solid #c9a15e;
}

.recharge-center__header::after {
    content: "";
    position: absolute;
    right: 18px;
    bottom: -1px;
    left: 18px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e1bd77, transparent);
}

.recharge-center__title {
    margin: 0;
    font-family: "STKaiti", "KaiTi", serif;
    font-size: 25px;
    letter-spacing: .2em;
}

.recharge-center__subtitle {
    margin-top: 6px;
    color: rgba(255, 239, 201, .66);
    font-size: 11px;
    letter-spacing: .24em;
}

.recharge-center__close {
    position: absolute;
    top: 13px;
    right: 13px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    color: rgba(255, 245, 218, .72);
    background: transparent;
    font: 28px/1 sans-serif;
    cursor: pointer;
}

.recharge-center__close:hover {
    color: #fff;
}

.recharge-center__body {
    padding: 24px 26px 27px;
}

.recharge-center__summary {
    margin-bottom: 22px;
    border: 1px solid rgba(123, 77, 37, .2);
    background: rgba(255, 253, 245, .45);
}

.recharge-center__row {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    min-height: 46px;
    padding: 8px 13px;
    border-bottom: 1px solid rgba(123, 77, 37, .13);
}

.recharge-center__row:last-child {
    border-bottom: 0;
}

.recharge-center__label {
    color: #8b7255;
    font-size: 13px;
}

.recharge-center__value {
    overflow: hidden;
    color: #412a1b;
    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-bottom: 9px;
    color: #513827;
    font-size: 14px;
    font-weight: 700;
}

.recharge-center__ratio {
    color: #a06f32;
    font-size: 12px;
    font-weight: 400;
}

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

.recharge-center__currency {
    position: absolute;
    top: 50%;
    left: 14px;
    color: #8e2f29;
    font-family: Georgia, serif;
    font-size: 23px;
    transform: translateY(-50%);
    pointer-events: none;
}

.recharge-center__amount {
    width: 100%;
    height: 52px;
    padding: 0 55px 0 42px;
    border: 1px solid #b79764;
    border-radius: 5px;
    outline: none;
    color: #522c1f;
    background: rgba(255, 253, 245, .85);
    font-size: 21px;
    font-weight: 700;
    transition: border-color .15s, box-shadow .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: #8f302a;
    box-shadow: 0 0 0 3px rgba(143, 48, 42, .13);
}

.recharge-center__unit {
    position: absolute;
    top: 50%;
    right: 15px;
    color: #786047;
    font-size: 13px;
    transform: translateY(-50%);
    pointer-events: none;
}

.recharge-center__hint {
    min-height: 21px;
    margin: 7px 0 12px;
    color: #947a5d;
    font-size: 12px;
    line-height: 1.6;
}

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

.recharge-center__submit {
    width: 100%;
    height: 50px;
    border: 1px solid #c49b59;
    border-radius: 4px;
    color: #fff2ce;
    background: linear-gradient(135deg, #9d342d, #69201c);
    box-shadow: 0 9px 22px rgba(99, 29, 25, .24), inset 0 0 0 2px rgba(80, 17, 14, .2);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .15em;
    cursor: pointer;
}

.recharge-center__submit:hover:not(:disabled) {
    background: linear-gradient(135deg, #ad3c33, #76241f);
}

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

.recharge-center__safe {
    margin: 12px 0 0;
    color: #9a8265;
    font-size: 11px;
    line-height: 1.6;
    text-align: center;
}

@keyframes recharge-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes recharge-dialog-in {
    from { opacity: 0; transform: translateY(14px) scale(.97); }
    to { opacity: 1; transform: none; }
}

@media (max-width: 480px) {
    .recharge-center {
        padding: 12px;
    }

    .recharge-center__dialog {
        max-height: calc(100vh - 24px);
    }

    .recharge-center__header {
        padding-top: 19px;
        padding-bottom: 16px;
    }

    .recharge-center__body {
        padding: 20px 18px 22px;
    }
}

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