.deposit-modal {
    position: fixed;
    inset: 0;
    z-index: 12060;
}

.deposit-modal.deposit-hidden {
    display: none;
}

.deposit-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(3px);
}

.deposit-modal__panel {
    position: relative;
    z-index: 1;
    width: min(560px, calc(100vw - 24px));
    margin: 8vh auto 0;
    background: #020817;
    border: 1px solid #1e293b;
    border-radius: 14px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
    color: #e2e8f0;
}

.deposit-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: linear-gradient(135deg, #0e7490 0%, #0284c7 100%);
    border-radius: 14px 14px 0 0;
}

.deposit-modal__title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
}

.deposit-modal__close {
    background: transparent;
    border: 0;
    color: #e2e8f0;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.deposit-modal__body {
    padding: 14px 16px;
}

.deposit-modal__footer {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px 16px;
    border-top: 1px solid #1e293b;
    flex-wrap: wrap;
}

.deposit-field {
    margin-bottom: 12px;
}

.deposit-label {
    display: block;
    margin-bottom: 6px;
    color: #94a3b8;
    font-size: .92rem;
    font-weight: 600;
}

.deposit-input-wrap {
    display: flex;
    align-items: center;
    gap: 0;
}

.deposit-input-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid #334155;
    border-right: 0;
    background: #0f172a;
    border-radius: 10px 0 0 10px;
    color: #94a3b8;
}

.deposit-input {
    flex: 1;
    min-height: 42px;
    border: 1px solid #334155;
    border-radius: 0;
    background: #0f172a;
    color: #e2e8f0;
    padding: 0 12px;
}

.deposit-input::placeholder {
    color: #64748b;
}

.deposit-input:focus {
    outline: none;
    border-color: #0ea5e9;
}

.deposit-hint {
    color: #94a3b8;
    font-size: .82rem;
    margin-top: 6px;
}

.deposit-preview {
    color: #34d399;
    font-size: 1rem;
    margin-top: 6px;
    font-weight: 700;
}

.deposit-error-text {
    color: #f87171;
    font-size: .82rem;
    margin-top: 6px;
    text-align: center;
}

.deposit-tier-badge {
    display: inline-block;
    font-size: .74rem;
    margin: 2px 6px 0 0;
    padding: 3px 8px;
    border: 1px solid #0ea5e9;
    color: #67e8f9;
    border-radius: 999px;
}

.deposit-lixi-panel {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #1e293b;
}

.deposit-lixi-panel__head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-size: .82rem;
    font-weight: 700;
    color: #fca5a5;
}

.deposit-lixi-panel__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.deposit-lixi-panel__item {
    padding: 8px 10px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid #334155;
    border-radius: 8px;
    font-size: .8rem;
    line-height: 1.35;
}

.deposit-lixi-panel__line {
    margin: 0;
    padding: 0;
}

.deposit-lixi-panel__line + .deposit-lixi-panel__line {
    margin-top: 3px;
}

.deposit-lixi-panel__line--range {
    color: #e2e8f0;
    font-weight: 600;
}

.deposit-lixi-panel__line--bonus {
    color: #86efac;
    font-weight: 600;
}

.deposit-lixi-panel__line--muted {
    color: #94a3b8;
    font-size: .76rem;
    font-weight: 500;
}

.deposit-lixi-panel__desc {
    margin-top: 4px;
    color: #94a3b8;
    font-size: .74rem;
}

.deposit-quick-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 14px;
}

.quick-deposit-btn {
    min-width: 72px;
    height: 34px;
    border-radius: 8px;
    background: #0f172a;
    color: #e2e8f0;
    border: 1px solid #334155;
    cursor: pointer;
    font-weight: 600;
}

.quick-deposit-btn--success {
    border-color: #059669;
    color: #34d399;
}

.quick-deposit-btn--warning {
    border-color: #ca8a04;
    color: #facc15;
}

.quick-deposit-btn--danger {
    border-color: #dc2626;
    color: #f87171;
}

.deposit-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.deposit-method {
    position: relative;
    cursor: pointer;
}

.deposit-method input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.deposit-method span {
    display: block;
    text-align: center;
    padding: 10px 12px;
    border-radius: 9px;
    background: #0f172a;
    border: 1px solid #334155;
    color: #cbd5e1;
    font-weight: 700;
}

.deposit-method input:checked+span {
    background: #0ea5e9;
    border-color: #0ea5e9;
    color: #fff;
}

.deposit-btn {
    min-height: 40px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1px solid #334155;
    background: #0f172a;
    color: #e2e8f0;
    cursor: pointer;
    font-weight: 700;
}

.deposit-btn--ghost {
    border-radius: 0 10px 10px 0;
    border-left: 0;
}

.deposit-btn--muted {
    background: #334155;
    border-color: #334155;
}

.deposit-btn--primary {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    border: 0;
}

.deposit-loading {
    color: #cbd5e1;
    font-size: .9rem;
    padding: 8px 0;
}

.deposit-alert {
    background: #7f1d1d;
    border: 1px solid #dc2626;
    color: #fecaca;
    border-radius: 8px;
    padding: 8px 10px;
    margin-top: 8px;
    font-size: .86rem;
}

.deposit-hidden {
    display: none !important;
}

.deposit-promo-codes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 6px 0 8px;
}

.deposit-promo-chip {
    background: #052e2b;
    color: #a7f3d0;
    border: 1px solid #10b981;
    border-radius: 8px;
    padding: 6px 10px;
    text-align: left;
    cursor: pointer;
}

.deposit-promo-chip span {
    display: block;
    font-size: .75rem;
    color: #d1fae5;
    opacity: .9;
}

.deposit-ok {
    color: #34d399;
    font-size: .82rem;
}

.deposit-bad {
    color: #f87171;
    font-size: .82rem;
}

.deposit-lucky-wheel-notice {
    width: 100%;
    margin: 0 0 10px;
    color: #cbd5e1;
    text-align: center;
    font-size: .88rem;
}

.deposit-sepay-content {
    margin-top: 10px;
}

.deposit-sepay-card {
    /* background: #0b1220;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 10px; */
}

.deposit-sepay-title {
    color: #e2e8f0;
    font-weight: 700;
    margin-bottom: 8px;
}

.deposit-sepay-qr {
    display: block;
    width: 95%;
    max-width: 350px;
    margin: 8px auto 20px;
    border-radius: 8px;
    background: #fff;
    padding: 8px;
}

.deposit-sepay-line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 6px 0;
    color: #cbd5e1;
    font-size: .88rem;
}

.deposit-sepay-line strong {
    color: #fff;
}

.deposit-sepay-switch {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.deposit-sepay-switch .deposit-btn {
    min-height: 34px;
}

.deposit-sepay-switch .deposit-btn.is-active {
    border-color: #38bdf8;
    color: #f8fafc;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.28) inset, 0 0 12px rgba(56, 189, 248, 0.2);
}

.deposit-sepay-status {
    margin-top: 8px;
    /* border-radius:8px; */
    padding: 10px 0;
    font-size: .84rem;
    /* border:1px solid #334155; */
}

.deposit-sepay-status.pending {
    color: gray;
    /* background:#0f172a; */
}

.deposit-sepay-status.success {
    color: yellow;
    /* background:#052e2b; */
    /* border-color:#059669;  */
}

.deposit-status-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 8px;
    border-radius: 999px;
    border: 2px solid rgba(148, 163, 184, 0.35);
    border-top-color: #22d3ee;
    vertical-align: -2px;
    animation: depositSpin .75s linear infinite;
}

@keyframes depositSpin {
    to {
        transform: rotate(360deg);
    }
}

.deposit-sepay-actions {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.deposit-sepay-actions .deposit-btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
}

.deposit-sepay-actions .deposit-btn--ghost {
    border-left: 1px solid #334155;
    border-radius: 10px;
}

#btn-deposit-back-step,
#btn-deposit-check-step,
#btn-deposit-close,
#btn-confirm-deposit {
    min-width: 190px;
    min-height: 44px;
    flex: 1 1 0;
    max-width: 260px;
}

@media (max-width: 640px) {
    .deposit-modal {
        overflow-y: auto;
        padding: 12px 0;
    }

    .deposit-modal__panel {
        width: min(560px, calc(100vw - 14px));
        margin: 0 auto;
        max-height: calc(100dvh - 24px);
        display: flex;
        flex-direction: column;
        border-radius: 12px;
    }

    .deposit-modal__header {
        padding: 12px 14px;
        border-radius: 12px 12px 0 0;
    }

    .deposit-modal__title {
        font-size: 1rem;
    }

    .deposit-modal__body {
        padding: 12px 14px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .deposit-field {
        margin-bottom: 10px;
    }

    .deposit-preview {
        font-size: .95rem;
    }

    .deposit-promo-codes {
        gap: 6px;
    }

    .deposit-promo-chip {
        padding: 6px 9px;
        border-radius: 10px;
    }

    .deposit-promo-chip b,
    .deposit-promo-chip strong {
        font-size: 1.05rem;
    }

    .deposit-sepay-actions {
        grid-template-columns: 1fr;
    }

    .deposit-modal__footer {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        padding: 10px 14px 14px;
    }

    #btn-deposit-back-step,
    #btn-deposit-check-step,
    #btn-deposit-close,
    #btn-confirm-deposit {
        width: auto;
        min-width: 110px;
        max-width: 100%;
        flex: 0 1 auto;
        min-height: 40px;
        padding: 0 14px;
    }
}

/* --- V2: match html/popupnaptien.html style --- */
.deposit-modal__backdrop {
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.deposit-modal__panel {
    width: min(460px, calc(100vw - 24px));
    margin: 4vh auto 0;
    background: linear-gradient(to bottom, #1a1f2e, #0f121b);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow: 0 20px 60px -15px rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

.deposit-glow-tr,
.deposit-glow-bl {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    z-index: 0;
}

.deposit-glow-tr {
    top: -50px;
    right: -50px;
    background-color: rgba(16, 185, 129, 0.15);
}

.deposit-glow-bl {
    bottom: -50px;
    left: -50px;
    background-color: rgba(59, 130, 246, 0.1);
}

.deposit-modal__header,
.deposit-modal__body,
.deposit-modal__footer {
    position: relative;
    z-index: 2;
}

.deposit-modal__header {
    padding: 20px 24px;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.deposit-modal__title {
    gap: 12px;
    letter-spacing: 0.3px;
}

.deposit-title-icon {
    padding: 8px;
    border-radius: 12px;
    display: inline-flex;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.deposit-modal__close {
    font-size: 14px;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.deposit-modal__close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.deposit-modal__body {
    padding: 22px 24px;
}

.deposit-label {
    color: #cbd5e1;
}

.deposit-input-wrap {
    gap: 8px;
}

.deposit-input-icon {
    display: none;
}

.deposit-amount-display {
    text-align: center;
    margin-bottom: 4px;
}

.deposit-amount-input-wrap {
    width: 100%;
}

.deposit-input {
    min-height: 46px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(10, 13, 20, 0.5);
}

.deposit-input--amount {
    border: 0;
    min-height: 68px;
    font-size: 46px;
    line-height: 1.1;
    font-weight: 800;
    text-align: center;
    padding: 6px 10px;
    background: transparent;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    text-overflow: ellipsis;
    width: 100%;
}

.deposit-input--amount::-webkit-outer-spin-button,
.deposit-input--amount::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.deposit-input--amount[type=number] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.deposit-amount-divider {
    height: 1px;
    width: 75%;
    margin: 6px auto 8px;
    background: linear-gradient(to right, transparent, rgba(16, 185, 129, 0.5), transparent);
}

.deposit-currency-label {
    color: rgba(16, 185, 129, 0.85);
    font-size: 13px;
    font-weight: 600;
}

.deposit-input--amount.is-len-11 {
    font-size: 40px;
}

.deposit-input--amount.is-len-14 {
    font-size: 34px;
}

.deposit-input--amount.is-len-17 {
    font-size: 29px;
}

.deposit-quick-list {
    justify-content: center;
    margin: 10px 0 18px;
}

.quick-deposit-btn {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: #cbd5e1;
    min-width: 86px;
}

.quick-deposit-btn:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.35);
    color: #34d399;
}

.deposit-promo-codes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.deposit-promo-chip {
    background: rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px 8px;
    text-align: center;
}

.deposit-promo-chip strong {
    display: block;
    color: #fff;
}

.deposit-promo-chip span {
    color: #94a3b8;
    font-size: 11px;
    line-height: 1.2;
}

.deposit-promo-chip:hover {
    border-color: rgba(16, 185, 129, 0.45);
}

.deposit-btn {
    min-height: 48px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.06);
}

.deposit-btn--inline {
    min-width: 102px;
}

.deposit-btn--ghost {
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}

.deposit-btn--muted {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

.deposit-btn--primary {
    background: linear-gradient(to right, #10b981, #059669);
    border: 0;
    color: #fff;
}

.deposit-btn--icon {
    width: 54px;
    min-width: 54px;
    padding: 0;
}

.deposit-modal__footer {
    gap: 12px;
    padding: 0 24px 24px;
    border-top: 0;
}

#btn-deposit-back-step,
#btn-deposit-check-step,
#btn-deposit-close,
#btn-confirm-deposit {
    min-width: auto;
    max-width: none;
    flex: 1 1 auto;
}

#btn-deposit-back-step {
    flex: 0 0 auto;
}

.deposit-lucky-wheel-notice {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 12px;
}

.deposit-preview {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    line-height: 1.35;
}

.deposit-preview-item {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
}

.deposit-preview-item strong {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

.deposit-preview-dot {
    opacity: 0.7;
}

.deposit-sepay-card {
    /* background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 16px; */
}

.deposit-sepay-qr {
    width: min(240px, 100%);
    border-radius: 16px;
    padding: 10px;
}

.deposit-sepay-line {
    padding: 7px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.deposit-sepay-line:last-of-type {
    border-bottom: 0;
}

.deposit-sepay-status.pending {
    color: #34d399;
}

.deposit-sepay-status.success {
    color: #22c55e;
}

@media (max-width: 640px) {
    .deposit-modal__panel {
        width: min(460px, calc(100vw - 14px));
        border-radius: 16px;
    }

    .deposit-modal__header {
        padding: 14px 16px;
    }

    .deposit-modal__body {
        padding: 14px 16px;
    }

    .deposit-modal__footer {
        padding: 0 16px 16px;
    }

    .deposit-input--amount {
        font-size: 38px;
    }

    .deposit-input--amount.is-len-11 {
        font-size: 33px;
    }

    .deposit-input--amount.is-len-14 {
        font-size: 29px;
    }

    .deposit-input--amount.is-len-17 {
        font-size: 24px;
    }

    .deposit-promo-codes {
        grid-template-columns: 1fr;
    }
}