/* 充电打赏 - 文章页充电栏 */
.cxzzt-charge-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 28px;
    margin: 10px 0 12px;
    background: linear-gradient(135deg, #fff7f5 0%, #fff 60%);
    border: 1px solid #ffe0d6;
    border-radius: var(--main-radius, 12px);
    position: relative;
    overflow: hidden;
}

.single .article-content > .cxzzt-charge-bar {
    margin: 8px 0 10px !important;
}

.single .article-content > .cxzzt-charge-bar + * {
    margin-top: 12px !important;
}

.cxzzt-charge-bar__info {
    flex: 1;
}

.cxzzt-charge-bar__visual {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 85px;
}

.cxzzt-charge-bar__title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
    color: #e74c5e;
    line-height: 1.5;
}

.cxzzt-charge-bar__subtitle {
    margin: 0;
    font-size: 13px;
    color: #999;
    line-height: 1.5;
}

.cxzzt-charge-bar__btn {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    background: linear-gradient(135deg, #ff7eb3 0%, #ff758c 100%);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 117, 140, 0.35);
    white-space: nowrap;
}

.cxzzt-charge-bar__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 117, 140, 0.45);
}

.cxzzt-charge-bar__btn:active {
    transform: translateY(0);
}

.cxzzt-charge-bar__track {
    position: relative;
    width: 150px;
    height: 55px;
    overflow: hidden;
    pointer-events: none;
}

.cxzzt-charge-bar__track svg,
.cxzzt-charge-bar__track-mask svg,
.cxzzt-charge-bar__track-spark svg {
    width: 150px;
    height: 55px;
    fill: none;
}

.cxzzt-charge-bar__track-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    overflow: hidden;
    transition: width 0.8s ease;
}

.cxzzt-charge-bar__track-spark {
    position: absolute;
    top: 0;
    left: -20px;
    width: 18px;
    height: 100%;
    overflow: hidden;
    opacity: 0;
}

.cxzzt-charge-bar__track-spark svg {
    position: absolute;
    top: 0;
    left: 20px;
}

.cxzzt-charge-bar__btn:hover + .cxzzt-charge-bar__track .cxzzt-charge-bar__track-mask {
    width: 150px;
}

.cxzzt-charge-bar__btn:hover + .cxzzt-charge-bar__track .cxzzt-charge-bar__track-spark {
    opacity: 1;
    animation: cxzztChargeTrackMove 0.8s linear 0.35s infinite;
}

.cxzzt-charge-bar__btn:hover + .cxzzt-charge-bar__track .cxzzt-charge-bar__track-spark svg {
    animation: cxzztChargeTrackMoveInner 0.8s linear 0.35s infinite;
}

@keyframes cxzztChargeTrackMove {
    0% { left: -15px; }
    100% { left: 140px; }
}

@keyframes cxzztChargeTrackMoveInner {
    0% { left: 15px; }
    100% { left: -140px; }
}

/* 充电弹窗 - 遮罩层 */
.cxzzt-charge-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: cxzztChargeOverlayIn 0.25s ease;
    transition: opacity 0.18s ease, background 0.18s ease, visibility 0.18s ease;
}

@keyframes cxzztChargeOverlayIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 充电弹窗 - 主体 */
.cxzzt-charge-modal {
    width: 90%;
    max-width: 360px;
    max-height: 88vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 0;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
    animation: cxzztChargeModalIn 0.3s ease;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.cxzzt-charge-overlay.is-handoff {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: rgba(0, 0, 0, 0);
    z-index: 1030;
}

.cxzzt-charge-overlay.is-handoff .cxzzt-charge-modal {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
}

@keyframes cxzztChargeModalIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 弹窗头部 */
.cxzzt-charge-modal__header {
    position: relative;
    text-align: center;
    padding: 20px 16px 14px;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #ffa8c5 100%);
    border-radius: 0;
}

.cxzzt-charge-modal__header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 4px;
}

.cxzzt-charge-modal__header-icon svg {
    width: 28px;
    height: 28px;
}

.cxzzt-charge-modal__title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cxzzt-charge-modal__close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    border-radius: 0;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s;
    line-height: 1;
}

.cxzzt-charge-modal__close:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* 弹窗内容 */
.cxzzt-charge-modal__body {
    padding: 16px 18px 18px;
}

.cxzzt-charge-modal__desc {
    text-align: center;
    padding: 9px 12px;
    margin-bottom: 12px;
    background: #f8f8f8;
    border-radius: 0;
    font-size: 12px;
    color: #888;
    line-height: 1.55;
}

.cxzzt-charge-pay-form .dependency-box {
    margin-top: 12px;
}

.cxzzt-charge-pay-form .payment-method-radio {
    min-width: 0;
    min-height: 48px;
    gap: 8px;
    margin-right: 8px;
    padding: 0 12px;
    border: 2px solid transparent;
    border-radius: 0;
    background: #f5f5f5;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.cxzzt-charge-pay-form .payment-method-radio:last-child {
    margin-right: 0;
}

.cxzzt-charge-pay-form .payment-method-radio img {
    width: 22px;
    height: 22px;
}

.cxzzt-charge-pay-form .payment-method-radio:hover {
    transform: translateY(-1px);
    background: #fff3f6;
}

.cxzzt-charge-pay-form .payment-method-radio.active {
    border-color: #ff5473;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(255, 84, 115, 0.12);
}

.cxzzt-charge-pay-form .payment-method-radio > div {
    color: #333;
    font-size: 14px;
    font-weight: 600;
}

.cxzzt-charge-pay-form .muted-2-color.em09.mb6 {
    margin-bottom: 8px !important;
    font-size: 12px !important;
    color: #888 !important;
}

.cxzzt-charge-pay-form .flex.mb10 {
    display: flex;
    gap: 8px;
    margin-bottom: 14px !important;
}

.cxzzt-charge-pay-form .initiate-pay {
    width: 100%;
    margin-top: 4px !important;
    padding: 11px 0 !important;
    background: linear-gradient(135deg, #ff758c 0%, #ff7eb3 100%) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 0 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 12px rgba(255, 117, 140, 0.3) !important;
    letter-spacing: 2px;
}

.cxzzt-charge-pay-form .initiate-pay:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 117, 140, 0.5) !important;
}

.cxzzt-charge-pay-form .initiate-pay.is-loading,
.cxzzt-charge-pay-form .initiate-pay.is-loading:hover {
    transform: none;
    cursor: wait;
    opacity: 0.92;
    box-shadow: 0 4px 15px rgba(255, 117, 140, 0.35) !important;
}

.cxzzt-charge-submit__loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cxzzt-charge-pay-form .pay-price-text,
.cxzzt-charge-pay-form .pay-price-text .actual-price-number,
.cxzzt-charge-pay-form .pay-price-text .pay-mark {
    color: #fff !important;
}

.cxzzt-charge-pay-form .pay-price-text .actual-price-number {
    font-weight: 700;
}

.cxzzt-charge-pay-form .pay-price-text .pay-mark {
    padding: 0 4px 0 10px !important;
}

.cxzzt-charge-pay-fallback {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 0;
    background: #fff3f3;
    color: #e24a63;
    text-align: center;
}

/* 金额选择 */
.cxzzt-charge-amounts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

.cxzzt-charge-amount-btn {
    appearance: none;
    -webkit-appearance: none;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    background: #f5f5f5;
    border: 2px solid transparent;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.cxzzt-charge-overlay .cxzzt-charge-amount-btn:hover {
    background: #fff0f0;
    border-color: #ffd0d0;
}

.cxzzt-charge-overlay .cxzzt-charge-amount-btn.active,
.single .cxzzt-charge-overlay .cxzzt-charge-amount-btn.active,
.cxzzt-charge-overlay .cxzzt-charge-amount-btn.active:hover,
.single .cxzzt-charge-overlay .cxzzt-charge-amount-btn.active:hover {
    background: #fff !important;
    border-color: #ff5473 !important;
    box-shadow: 0 0 0 1px rgba(255, 84, 115, 0.12);
}

.cxzzt-charge-overlay .cxzzt-charge-amount-btn.active::after {
    content: '';
    position: absolute;
    top: -1px;
    right: -1px;
    width: 16px;
    height: 16px;
    background: #ff758c;
    border-radius: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white' width='12' height='12'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 10px;
}

.cxzzt-charge-overlay .cxzzt-charge-amount-btn.active .cxzzt-charge-amount-btn__price,
.single .cxzzt-charge-overlay .cxzzt-charge-amount-btn.active .cxzzt-charge-amount-btn__price {
    color: #ff5473 !important;
}

.cxzzt-charge-amount-btn__price {
    font-size: 16px;
    font-weight: 700;
    color: #ff758c;
}

.cxzzt-charge-amount-btn--custom {
    color: #ff758c;
}

.cxzzt-charge-amount-btn--custom svg {
    opacity: 0.7;
}

/* 输入框 */
.cxzzt-charge-input {
    width: 100%;
    padding: 9px 12px;
    background: #f5f5f5;
    border: 1px solid #eee;
    border-radius: 0;
    font-size: 13px;
    color: #333;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
    box-sizing: border-box;
}

.cxzzt-charge-input:focus {
    background: #fff;
    border-color: #ff758c;
}

.cxzzt-charge-input::placeholder {
    color: #bbb;
}

.cxzzt-charge-field {
    margin-bottom: 8px;
}

.cxzzt-charge-custom-wrap {
    margin-bottom: 8px;
}

/* 支付方式 */
.cxzzt-charge-pay-label {
    font-size: 12px;
    color: #888;
    margin: 12px 0 8px;
}

.cxzzt-charge-pay-methods {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.cxzzt-charge-pay-btn {
    appearance: none;
    -webkit-appearance: none;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 0;
    background: #f5f5f5;
    border: 2px solid transparent;
    border-radius: 0;
    cursor: pointer;
    font-size: 13px;
    color: #555;
    transition: all 0.2s;
}

.cxzzt-charge-overlay .cxzzt-charge-pay-btn:hover {
    background: #f0f0f0;
}

.cxzzt-charge-overlay .cxzzt-charge-pay-btn.active,
.single .cxzzt-charge-overlay .cxzzt-charge-pay-btn.active,
.cxzzt-charge-overlay .cxzzt-charge-pay-btn.active:hover {
    border-color: #ff758c;
    background: #fff;
    color: #333;
}

/* 支付图标 */
.cxzzt-charge-pay-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 4px;
}

.cxzzt-charge-pay-icon--wechat {
    background-color: #07c160;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white' width='16' height='16'%3E%3Cpath d='M8.691 2.188C3.891 2.188 0 5.476 0 9.53c0 2.212 1.17 4.203 3.002 5.55a.59.59 0 0 1 .213.665l-.39 1.48c-.019.07-.048.141-.048.213 0 .163.13.295.29.295a.326.326 0 0 0 .167-.054l1.903-1.114a.864.864 0 0 1 .717-.098 10.16 10.16 0 0 0 2.837.403c.276 0 .543-.027.811-.05-.857-2.578.157-4.972 1.932-6.446 1.703-1.415 3.882-1.98 5.853-1.838-.576-3.583-4.196-6.348-8.596-6.348zM5.785 5.991c.642 0 1.162.529 1.162 1.18a1.17 1.17 0 0 1-1.162 1.178A1.17 1.17 0 0 1 4.623 7.17c0-.651.52-1.18 1.162-1.18zm5.813 0c.642 0 1.162.529 1.162 1.18a1.17 1.17 0 0 1-1.162 1.178 1.17 1.17 0 0 1-1.162-1.178c0-.651.52-1.18 1.162-1.18zm5.34 2.867c-1.797-.052-3.746.512-5.28 1.786-1.72 1.428-2.687 3.72-1.78 6.22.942 2.453 3.666 4.229 6.884 4.229.826 0 1.622-.12 2.361-.336a.72.72 0 0 1 .598.082l1.584.926a.272.272 0 0 0 .14.047c.134 0 .24-.111.24-.247 0-.06-.023-.12-.038-.177l-.327-1.233a.582.582 0 0 1-.023-.156.49.49 0 0 1 .201-.398C23.024 18.48 24 16.82 24 14.98c0-3.21-2.931-5.837-7.062-6.122zM14.53 13.1c.535 0 .969.44.969.983a.976.976 0 0 1-.969.983.976.976 0 0 1-.969-.983c0-.542.434-.983.97-.983zm4.844 0c.535 0 .969.44.969.983a.976.976 0 0 1-.969.983.976.976 0 0 1-.969-.983c0-.542.434-.983.97-.983z'/%3E%3C/svg%3E");
    background-size: 16px;
}

.cxzzt-charge-pay-icon--alipay {
    background-color: #1677ff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white' width='16' height='16'%3E%3Cpath d='M21.422 15.358c-.348-.171-3.073-1.329-3.58-1.481-.507-.151-1.224-.317-1.868.317-.644.633-1.644 1.576-2.04 1.909-.396.334-.78.348-1.461.032s-2.633-.97-5.015-3.093c-1.854-1.653-3.105-3.691-3.468-4.313-.363-.622-.039-.958.273-1.268.28-.28.622-.73.933-1.095.311-.365.414-.622.622-1.037.207-.414.104-.778-.052-.1090-.156-.311-1.417-3.415-1.941-4.676-.511-1.228-1.031-1.062-1.417-1.082-.367-.018-.787-.022-1.207-.022-.42 0-1.103.159-1.681.778C.928 1.261 0 2.117 0 4.134c0 2.017 1.482 3.966 1.688 4.238.207.272 2.913 4.449 7.062 6.24.987.426 1.757.68 2.357.87.991.315 1.893.271 2.604.164.794-.119 2.447-.999 2.793-1.964.346-.965.346-1.793.242-1.964-.104-.172-.381-.276-.795-.467z'/%3E%3C/svg%3E");
    background-size: 16px;
}

.cxzzt-charge-pay-icon--balance {
    background-color: #ff6c37;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white' width='16' height='16'%3E%3Cpath d='M21 18v1c0 1.1-.9 2-2 2H5c-1.11 0-2-.9-2-2V5c0-1.1.89-2 2-2h14c1.1 0 2 .9 2 2v1h-9c-1.11 0-2 .9-2 2v8c0 1.1.89 2 2 2h9zm-9-2h10V8H12v8zm4-2.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5z'/%3E%3C/svg%3E");
    background-size: 16px;
}

/* 提交按钮 */
.cxzzt-charge-submit {
    width: 100%;
    padding: 11px 0;
    background: linear-gradient(135deg, #ff758c 0%, #ff7eb3 100%);
    color: #fff;
    border: none;
    border-radius: 0;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(255, 117, 140, 0.3);
    letter-spacing: 2px;
}

.cxzzt-charge-submit:hover {
    box-shadow: 0 6px 20px rgba(255, 117, 140, 0.5);
    transform: translateY(-1px);
}

.cxzzt-charge-submit:active {
    transform: translateY(0);
}

.cxzzt-charge-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 响应式 */
@media (max-width: 480px) {
    .cxzzt-charge-bar {
        flex-direction: column;
        text-align: center;
        gap: 12px;
        padding: 16px 20px;
        margin: 8px 0 10px;
    }

    .cxzzt-charge-bar__visual {
        width: 100%;
        justify-content: center;
        min-height: auto;
    }

    .cxzzt-charge-bar__btn {
        width: 100%;
        justify-content: center;
    }

    .cxzzt-charge-bar__track {
        display: none;
    }

    .cxzzt-charge-modal {
        width: 94%;
        max-width: 340px;
        max-height: 86vh;
    }

    .cxzzt-charge-amounts {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }

    .cxzzt-charge-amount-btn {
        height: 38px;
    }

    .cxzzt-charge-amount-btn__price {
        font-size: 14px;
    }

    .cxzzt-charge-modal__body {
        padding: 14px 14px 16px;
    }

    .cxzzt-charge-pay-form .payment-method-radio {
        min-height: 44px;
        padding: 0 10px;
    }

    .cxzzt-charge-pay-form .payment-method-radio > div {
        font-size: 13px;
    }
}
