/**
 * 深色全站下，充值 / 兑换算力仍使用浅色皮肤（payment-ui-light 容器）
 * 加载顺序：在 design-dark-recharge.css 之后
 */

[data-theme="dark"] .payment-ui-light {
    color-scheme: light;
}

/* ── 充值弹窗 / 促销充值 ── */
[data-theme="dark"] .recharge-modal.payment-ui-light,
[data-theme="dark"] .promo-recharge-modal.payment-ui-light {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.97) 0%, rgba(248, 250, 252, 0.97) 100%) !important;
    color: #2d3748 !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    box-shadow: 0 12px 36px rgba(15, 18, 28, 0.12) !important;
}

[data-theme="dark"] .payment-ui-light .recharge-modal-content {
    color: #2d3748 !important;
    background: transparent !important;
}

[data-theme="dark"] .payment-ui-light .recharge-modal-header {
    border-bottom-color: rgba(0, 0, 0, 0.06) !important;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%) !important;
}

[data-theme="dark"] .payment-ui-light .recharge-modal-title,
[data-theme="dark"] .payment-ui-light .promo-modal-title {
    color: #2d3748 !important;
}

[data-theme="dark"] .payment-ui-light .recharge-modal-close {
    color: #718096 !important;
    background: rgba(0, 0, 0, 0.05) !important;
}

[data-theme="dark"] .payment-ui-light .recharge-modal-close:hover {
    background: rgba(0, 0, 0, 0.1) !important;
    color: #1a1a1a !important;
}

[data-theme="dark"] .payment-ui-light .balance-info {
    background: var(--c-dark, #1c1c24) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.25) !important;
}

[data-theme="dark"] .payment-ui-light .balance-label,
[data-theme="dark"] .payment-ui-light .current-balance .balance-label {
    color: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="dark"] .payment-ui-light .balance-value {
    color: #fff !important;
}

[data-theme="dark"] .payment-ui-light .balance-status,
[data-theme="dark"] .payment-ui-light .status-text {
    color: #e67e22 !important;
}

[data-theme="dark"] .payment-ui-light .recharge-packages,
[data-theme="dark"] .payment-ui-light .package-title,
[data-theme="dark"] .payment-ui-light .method-title {
    color: #2d3748 !important;
}

[data-theme="dark"] .payment-ui-light .package-item {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(226, 232, 240, 0.7) !important;
    color: #2d3748 !important;
}

[data-theme="dark"] .payment-ui-light .package-item:hover {
    border-color: #3444fe !important;
    background: rgba(255, 255, 255, 0.95) !important;
}

[data-theme="dark"] .payment-ui-light .package-item.selected,
[data-theme="dark"] .payment-ui-light .package-item.popular,
[data-theme="dark"] .payment-ui-light .package-item.vip {
    border-color: #3444fe !important;
    background: rgba(52, 68, 254, 0.08) !important;
}

[data-theme="dark"] .payment-ui-light .package-amount {
    color: #2d3748 !important;
}

[data-theme="dark"] .payment-ui-light .package-price {
    color: #666 !important;
}

[data-theme="dark"] .payment-ui-light .package-price-orig,
[data-theme="dark"] .payment-ui-light .promo-orig-price {
    color: #999 !important;
}

[data-theme="dark"] .payment-ui-light .custom-amount {
    background: transparent !important;
    border-color: transparent !important;
}

[data-theme="dark"] .payment-ui-light .custom-input {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(226, 232, 240, 0.8) !important;
    color: #2d3748 !important;
}

[data-theme="dark"] .payment-ui-light .custom-input::placeholder {
    color: #a0aec0 !important;
}

[data-theme="dark"] .payment-ui-light .payment-methods,
[data-theme="dark"] .payment-ui-light .promo-payment-methods {
    border-top-color: rgba(225, 229, 233, 0.8) !important;
}

[data-theme="dark"] .payment-ui-light .methods-list,
[data-theme="dark"] .payment-ui-light .promo-methods-list {
    color: #2d3748 !important;
}

[data-theme="dark"] .payment-ui-light .payment-method {
    background: rgba(255, 255, 255, 0.8) !important;
    border-color: rgba(226, 232, 240, 0.6) !important;
    color: #2d3748 !important;
}

[data-theme="dark"] .payment-ui-light .payment-method:hover {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: #3444fe !important;
}

[data-theme="dark"] .payment-ui-light .payment-method.selected,
[data-theme="dark"] .payment-ui-light .payment-method.active {
    background: rgba(52, 68, 254, 0.08) !important;
    border-color: #3444fe !important;
}

[data-theme="dark"] .payment-ui-light .method-name {
    color: #2d3748 !important;
}

[data-theme="dark"] .payment-ui-light .recharge-modal-footer,
[data-theme="dark"] .payment-ui-light .promo-recharge-footer {
    border-top-color: rgba(225, 229, 233, 0.8) !important;
    background: rgba(248, 249, 250, 0.97) !important;
}

[data-theme="dark"] .payment-ui-light .promo-selected-info,
[data-theme="dark"] .payment-ui-light .recharge-modal-footer .selected-info,
[data-theme="dark"] .payment-ui-light .selected-info {
    color: #333 !important;
}

[data-theme="dark"] .payment-ui-light .promo-modal-countdown-wrap {
    color: #64748b !important;
}

[data-theme="dark"] .payment-ui-light .promo-modal-countdown {
    color: #f97316 !important;
}

[data-theme="dark"] .payment-ui-light .promo-recharge-modal .promo-pack-card {
    background: rgba(255, 255, 255, 0.92) !important;
    border-color: rgba(226, 232, 240, 0.9) !important;
}

[data-theme="dark"] .payment-ui-light .promo-pack-price,
[data-theme="dark"] .payment-ui-light .promo-recharge-modal .promo-pack-price {
    color: #f97316 !important;
}

[data-theme="dark"] .payment-ui-light .promo-pack-amount {
    color: #2d3748 !important;
}

[data-theme="dark"] .payment-ui-light .ph-empty {
    color: #64748b !important;
}

[data-theme="dark"] .payment-ui-light .recharge-confirm-btn,
[data-theme="dark"] .payment-ui-light .promo-confirm-btn.promo-btn-ready:not(:disabled) {
    color: #fff !important;
}

[data-theme="dark"] .payment-ui-light .promo-confirm-btn.promo-btn-waiting,
[data-theme="dark"] .payment-ui-light .promo-confirm-btn.promo-btn-waiting:disabled {
    color: #1a1a1a !important;
    background: rgba(0, 0, 0, 0.13) !important;
}

/* ── 兑换算力弹窗 shell ── */
[data-theme="dark"] .buy-power-modal .modal-content.payment-ui-light {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.97) 0%, rgba(248, 250, 252, 0.97) 100%) !important;
    color: #2d3748 !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    box-shadow: 0 12px 36px rgba(15, 18, 28, 0.12) !important;
}

[data-theme="dark"] .buy-power-modal .modal-content.payment-ui-light .bpm-header,
[data-theme="dark"] .buy-power-modal .modal-content.payment-ui-light .modal-header {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%) !important;
    border-bottom-color: rgba(0, 0, 0, 0.06) !important;
    color: #2d3748 !important;
}

[data-theme="dark"] .buy-power-modal .modal-content.payment-ui-light .bpm-title,
[data-theme="dark"] .buy-power-modal .modal-content.payment-ui-light h2,
[data-theme="dark"] .buy-power-modal .modal-content.payment-ui-light h3 {
    color: #2d3748 !important;
}

[data-theme="dark"] .buy-power-modal .modal-content.payment-ui-light .bpm-close {
    color: #718096 !important;
    background: rgba(0, 0, 0, 0.05) !important;
}

[data-theme="dark"] .buy-power-modal .modal-content.payment-ui-light .bpm-close:hover {
    color: #1a1a1a !important;
    background: rgba(0, 0, 0, 0.1) !important;
}

[data-theme="dark"] .buy-power-modal .modal-content.payment-ui-light .modal-body,
[data-theme="dark"] .buy-power-modal .modal-content.payment-ui-light iframe {
    background: #f8fafc !important;
    color: #2c2c2e !important;
}

/* ── buy_power.php iframe 内容页：盖住 design-dark 的 html/body 深色底衬 ── */
[data-theme="dark"] html.payment-ui-light-doc,
[data-theme="dark"] html:has(> body.payment-ui-light),
[data-theme="dark"] html.payment-ui-light-doc body,
[data-theme="dark"] body.payment-ui-light,
[data-theme="dark"] body.payment-ui-light .page-wrap,
[data-theme="dark"] body.payment-ui-light .scroll-area {
    background: #f8fafc !important;
    color: #2c2c2e !important;
    color-scheme: light !important;
}

[data-theme="dark"] html.payment-ui-light-doc,
[data-theme="dark"] body.payment-ui-light {
    scrollbar-color: rgba(0, 0, 0, 0.18) transparent !important;
}

[data-theme="dark"] html.payment-ui-light-doc ::-webkit-scrollbar-track,
[data-theme="dark"] body.payment-ui-light ::-webkit-scrollbar-track,
[data-theme="dark"] body.payment-ui-light .scroll-area::-webkit-scrollbar-track {
    background: transparent !important;
}

[data-theme="dark"] html.payment-ui-light-doc ::-webkit-scrollbar-thumb,
[data-theme="dark"] body.payment-ui-light ::-webkit-scrollbar-thumb,
[data-theme="dark"] body.payment-ui-light .scroll-area::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.12) !important;
}

[data-theme="dark"] html.payment-ui-light-doc ::-webkit-scrollbar-thumb:hover,
[data-theme="dark"] body.payment-ui-light ::-webkit-scrollbar-thumb:hover,
[data-theme="dark"] body.payment-ui-light .scroll-area::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.18) !important;
}

[data-theme="dark"] body.payment-ui-light .balance-bar {
    background: #1c1c24 !important;
    color: #fff !important;
}

[data-theme="dark"] body.payment-ui-light .bal-val {
    color: #fff !important;
}

[data-theme="dark"] body.payment-ui-light .bal-lbl {
    color: rgba(255, 255, 255, 0.55) !important;
}

[data-theme="dark"] body.payment-ui-light .pkg-heading {
    color: #2d3748 !important;
}

[data-theme="dark"] body.payment-ui-light .pkg-power {
    color: #2d3748 !important;
}

[data-theme="dark"] body.payment-ui-light .pkg-card {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(226, 232, 240, 0.7) !important;
    color: #2d3748 !important;
}

[data-theme="dark"] body.payment-ui-light .pkg-card:hover {
    border-color: #3444fe !important;
    background: rgba(255, 255, 255, 0.95) !important;
}

[data-theme="dark"] body.payment-ui-light .pkg-card.active {
    border-color: #3444fe !important;
    background: rgba(52, 68, 254, 0.06) !important;
}

[data-theme="dark"] body.payment-ui-light .pkg-card.hot {
    border-color: #b8a04e !important;
    background: rgba(184, 160, 78, 0.05) !important;
}

[data-theme="dark"] body.payment-ui-light .confirm-btn:disabled {
    background: rgba(0, 0, 0, 0.13) !important;
    color: #fff !important;
    box-shadow: none !important;
}

[data-theme="dark"] body.payment-ui-light .pkg-price {
    color: #3444fe !important;
}

[data-theme="dark"] body.payment-ui-light .pkg-unit,
[data-theme="dark"] body.payment-ui-light .exchange-note,
[data-theme="dark"] body.payment-ui-light .footer-pay-label,
[data-theme="dark"] body.payment-ui-light .after-power {
    color: #999 !important;
}

[data-theme="dark"] body.payment-ui-light .footer-pay-val {
    color: #2d3748 !important;
}

[data-theme="dark"] body.payment-ui-light .cost-highlight {
    color: #3444fe !important;
}

[data-theme="dark"] body.payment-ui-light .page-footer {
    background: rgba(248, 249, 250, 0.97) !important;
    border-top-color: rgba(225, 229, 233, 0.8) !important;
}

[data-theme="dark"] body.payment-ui-light .recharge-link-btn {
    color: #4a7a50 !important;
    background: transparent !important;
}

[data-theme="dark"] body.payment-ui-light .msg-error,
[data-theme="dark"] body.payment-ui-light .msg-success {
    color: inherit !important;
}
