.coin-dialog-mask {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    padding: 24px;
}

.coin-dialog-mask.is-open {
    display: flex;
}

.coin-dialog-card {
    width: 520px;
    max-width: 100%;
    padding: 36px;
    position: relative;
    background: linear-gradient(90deg, #211730 0%, #0A0A17 100%);
    box-shadow: 0px 20px 48px rgba(0, 0, 0, 0.46);
    overflow: hidden;
    border-radius: 20px;
    outline: 1px solid rgba(250, 189, 51, 0.42);
    outline-offset: -1px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 18px;
    display: inline-flex;
    box-sizing: border-box;
}

.coin-dialog-close {
    width: 28px;
    height: 28px;
    right: 16px;
    top: 16px;
    position: absolute;
    overflow: hidden;
    border: none;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

.coin-dialog-close-ring {
    width: 26px;
    height: 26px;
    left: 1px;
    top: 1px;
    position: absolute;
    background: rgba(255, 255, 255, 0.06);
    outline: 1px solid rgba(255, 255, 255, 0.18);
    outline-offset: -0.5px;
    border-radius: 50%;
    box-sizing: border-box;
}

.coin-dialog-close-x {
    width: 8px;
    height: 8px;
    left: 10px;
    top: 10px;
    position: absolute;
    box-sizing: border-box;
}

.coin-dialog-close-x::before,
.coin-dialog-close-x::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10px;
    height: 1.5px;
    background: #C5C0D0;
    border-radius: 1px;
}

.coin-dialog-close-x::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.coin-dialog-close-x::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.coin-dialog-icon {
    width: 58px;
    height: 58px;
    object-fit: contain;
    flex-shrink: 0;
}

.coin-dialog-title {
    text-align: center;
    color: white;
    font-size: 24px;
    font-family: "Noto Sans SC", "PingFang SC", sans-serif;
    font-weight: 700;
    line-height: 30px;
    word-wrap: break-word;
}

.coin-dialog-desc {
    text-align: center;
    color: #B2ABC4;
    font-size: 14px;
    font-family: "Noto Sans SC", "PingFang SC", sans-serif;
    font-weight: 400;
    line-height: 20px;
    word-wrap: break-word;
}

.coin-dialog-balance {
    width: 448px;
    max-width: 100%;
    height: 64px;
    padding-left: 18px;
    padding-right: 18px;
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
    border-radius: 12px;
    outline: 1px solid rgba(255, 255, 255, 0.12);
    outline-offset: -1px;
    justify-content: space-between;
    align-items: center;
    display: inline-flex;
    box-sizing: border-box;
}

.coin-dialog-balance-col {
    overflow: hidden;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 2px;
    display: inline-flex;
}

.coin-dialog-balance-col--end {
    align-items: flex-end;
}

.coin-dialog-balance-label {
    color: #948CA8;
    font-size: 12px;
    font-family: "Noto Sans SC", "PingFang SC", sans-serif;
    font-weight: 400;
    line-height: 18px;
    word-wrap: break-word;
}

.coin-dialog-balance-col--end .coin-dialog-balance-label {
    text-align: right;
}

.coin-dialog-balance-value {
    color: white;
    font-size: 16px;
    font-family: "Noto Sans SC", "PingFang SC", sans-serif;
    font-weight: 700;
    line-height: 22px;
    word-wrap: break-word;
}

.coin-dialog-balance-cost {
    text-align: right;
    color: #FABD33;
    font-size: 16px;
    font-family: "Noto Sans SC", "PingFang SC", sans-serif;
    font-weight: 700;
    line-height: 22px;
    word-wrap: break-word;
}

.coin-dialog-hint {
    text-align: center;
    color: #948CA8;
    font-size: 12px;
    font-family: "Noto Sans SC", "PingFang SC", sans-serif;
    font-weight: 400;
    line-height: 18px;
    word-wrap: break-word;
}

.coin-dialog-cta {
    width: 448px;
    max-width: 100%;
    height: 48px;
    background: linear-gradient(90deg, #F12B9E 0%, #704AFF 100%);
    overflow: hidden;
    border-radius: 24px;
    justify-content: center;
    align-items: center;
    gap: 8px;
    display: inline-flex;
    border: none;
    padding: 0;
    cursor: pointer;
    color: white;
    font-size: 16px;
    font-family: "Noto Sans SC", "PingFang SC", sans-serif;
    font-weight: 700;
    line-height: 22px;
    word-wrap: break-word;
    box-sizing: border-box;
}

.coin-dialog-cta-loading {
    display: none;
}

.coin-dialog-cta.is-loading,
.coin-dialog-cta:disabled {
    opacity: 0.75;
    cursor: not-allowed;
}

.coin-dialog-cta.is-loading .coin-dialog-cta-label {
    display: none;
}

.coin-dialog-cta.is-loading .coin-dialog-cta-loading {
    display: inline;
}

.coin-dialog-cta.is-loading::before {
    content: "";
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: coin-dialog-cta-spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes coin-dialog-cta-spin {
    to {
        transform: rotate(360deg);
    }
}

.coin-dialog-recharge {
    text-align: center;
    color: #F12B9E;
    font-size: 12px;
    font-family: "Noto Sans SC", "PingFang SC", sans-serif;
    font-weight: 700;
    line-height: 18px;
    word-wrap: break-word;
    text-decoration: none;
}

@media (max-width: 767px) {
    .coin-dialog-mask {
        background: rgba(0, 0, 0, 0.70);
        padding: 16px;
    }

    .coin-dialog-card {
        width: 311px;
        max-width: calc(100vw - 32px);
        padding: 36px;
    }

    .coin-dialog-close {
        right: 10px;
        top: 10px;
    }

    .coin-dialog-balance,
    .coin-dialog-cta {
        width: 100%;
        align-self: stretch;
    }
}
