/**
 * 付费内容前端样式
 * 
 * @package UserAuthPro
 * @subpackage PaidContent
 * @since 2.0.0
 */

/* ========================================
   付费墙容器（标准版）
   ======================================== */

.uap-paywall {
    margin: 32px 0;
    padding: 0;
}

.uap-paywall-container {
    position: relative;
    max-width: 100%;
    margin: 0;
    padding: 0;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    text-align: left;
    box-shadow: 
        0 10px 25px -5px rgba(0, 0, 0, 0.05),
        0 4px 10px -3px rgba(0, 0, 0, 0.02),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.uap-paywall-container:hover {
    box-shadow: 
        0 16px 32px -8px rgba(0, 0, 0, 0.08),
        0 6px 12px -3px rgba(0, 0, 0, 0.03),
        inset 0 1px 0 rgba(255, 255, 255, 1);
}

.uap-paywall-container::before {
    content: '';
    display: block;
    height: 3px;
    background: linear-gradient(90deg, #d97706 0%, #f59e0b 50%, #d97706 100%);
    box-shadow: 0 1px 6px rgba(245, 158, 11, 0.35);
}

.uap-paywall-standard__main {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 20px 24px;
}

.uap-paywall-standard__copy {
    flex: 1;
    min-width: 0;
}

.uap-paywall-standard__kicker {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #d97706;
    line-height: 1.2;
}

.uap-paywall-standard__heading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.uap-paywall-standard__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.uap-paywall-standard__icon svg {
    width: 20px;
    height: 20px;
    stroke: #ffffff;
    stroke-width: 2;
}

.uap-paywall-container .uap-paywall-title {
    margin: 0;
    font-size: 18px;
    font-weight: 650;
    color: #111827;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.uap-paywall-container .uap-paywall-desc {
    margin: 8px 0 0;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
    max-width: none;
}

.uap-paywall-container .uap-paywall-desc .uap-read-quota-message {
    justify-content: flex-start;
}

.uap-paywall-container .uap-paywall-standard__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}

.uap-paywall-container .uap-paywall-standard__facts li {
    margin: 0;
    padding: 3px 10px;
    background: rgba(15, 23, 42, 0.035);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 550;
    color: #475569;
    line-height: 1.4;
    list-style: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.uap-paywall-standard__offer {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    min-width: 168px;
}

.uap-paywall-container .uap-paywall-price {
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    text-align: right;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11", "tnum";
}

.uap-paywall-standard__price-free {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
    font-size: 13px;
    font-weight: 650;
    border-radius: 999px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.uap-paywall-standard__price-discount {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 8px;
    font-feature-settings: "tnum";
}

.uap-price-original {
    font-size: 13px;
    color: #94a3b8;
    text-decoration: line-through;
    font-weight: 500;
}

.uap-price-current {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1.1;
    font-feature-settings: "tnum";
}

.uap-paywall-standard__price-current {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    font-feature-settings: "tnum";
}

.uap-price-currency {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin-right: 2px;
}

.uap-price-value {
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1;
    font-feature-settings: "tnum";
}

.uap-paywall-container .uap-paywall-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.uap-paywall-container .uap-btn {
    min-width: 0;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 650;
    border-radius: 10px;
    white-space: nowrap;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.uap-paywall-container a.uap-btn,
.uap-paywall-container a.uap-btn:link,
.uap-paywall-container a.uap-btn:visited,
.uap-paywall-container a.uap-btn:hover,
.uap-paywall-container a.uap-btn:focus,
.uap-paywall-container a.uap-btn:focus-visible,
.uap-paywall-container a.uap-btn:active {
    text-decoration: none !important;
}

.uap-paywall-container a.uap-btn--primary,
.uap-paywall-container a.uap-btn--primary:link,
.uap-paywall-container a.uap-btn--primary:visited,
.uap-paywall-container .uap-btn--primary {
    color: #ffffff !important;
    background: #0f172a;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.uap-paywall-container a.uap-btn--primary:hover,
.uap-paywall-container a.uap-btn--primary:focus,
.uap-paywall-container a.uap-btn--primary:focus-visible,
.uap-paywall-container .uap-btn--primary:hover {
    color: #ffffff !important;
    background: #1e293b;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-1.5px);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.uap-paywall-container a.uap-btn--primary:active,
.uap-paywall-container .uap-btn--primary:active {
    transform: scale(0.975);
}

.uap-paywall-container a.uap-btn--secondary,
.uap-paywall-container a.uap-btn--secondary:link,
.uap-paywall-container a.uap-btn--secondary:visited,
.uap-paywall-container .uap-btn--secondary {
    color: #1e293b !important;
    background: #ffffff;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.uap-paywall-container a.uap-btn--secondary:hover,
.uap-paywall-container a.uap-btn--secondary:focus,
.uap-paywall-container a.uap-btn--secondary:focus-visible,
.uap-paywall-container .uap-btn--secondary:hover {
    color: #0f172a !important;
    background: #f8fafc;
    border: 1px solid #cbd5e1 !important;
    transform: translateY(-1.5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.uap-paywall-container a.uap-btn--secondary:active,
.uap-paywall-container .uap-btn--secondary:active {
    transform: scale(0.975);
}

.uap-paywall-container .uap-paywall-tip {
    margin: 0;
    max-width: 220px;
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.45;
    text-align: right;
}

.uap-read-quota-message {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px 6px;
}

.uap-paywall-compact__quota-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    margin: 0 2px 0 0;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 5px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: .01em;
    line-height: 1.4;
    white-space: nowrap;
    vertical-align: middle;
}

.uap-read-quota-label,
.uap-download-quota-label {
    color: #64748b;
    font-weight: 500;
}

.uap-read-quota-remaining,
.uap-download-quota-remaining {
    display: inline;
    min-width: 0;
    margin: 0;
    padding: 0;
    color: #0f766e;
    background: transparent;
    border: 0;
    border-radius: 0;
    font-size: 1em;
    font-weight: 700;
    line-height: inherit;
    letter-spacing: -.01em;
    font-variant-numeric: tabular-nums;
}

.uap-read-unlock-form {
    display: inline-flex;
    margin: 0;
}

.uap-read-unlock-btn.is-loading {
    cursor: wait;
    opacity: .72;
}

.uap-paywall--standard .uap-paywall-compact__benefits {
    border-top: 1px solid #f3f4f6;
}

.uap-paywall-container .uap-paywall-compact__benefits-list {
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
}

/* ========================================
   按钮组件（BEM）
   ======================================== */

.uap-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    min-width: 0;
    letter-spacing: -0.01em;
}

.uap-btn__icon {
    width: 20px;
    height: 20px;
}

.uap-btn--primary {
    background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
    color: #ffffff;
    box-shadow: 
        0 8px 16px -4px rgba(17, 24, 39, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.uap-btn--primary:hover {
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    transform: translateY(-2px);
    box-shadow: 
        0 12px 20px -4px rgba(17, 24, 39, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

a.uap-btn--primary:hover{
    color: #FFFFFF;
}

.uap-btn--primary:active {
    transform: translateY(0);
}

.uap-btn--secondary {
    background: #ffffff;
    color: #111827;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.04);
}

.uap-btn--secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.08);
}

.uap-btn__loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ========================================
   模态框组件（BEM）- 紧凑优化版
   ======================================== */

.uap-purchase-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.uap-purchase-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    animation: uapOverlayFadeIn 0.25s ease;
}

@keyframes uapOverlayFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.uap-purchase-modal__wrapper {
    position: relative;
    width: 100%;
    max-width: 420px;
    margin: 0 16px;
    z-index: 1;
}

.uap-purchase-modal__container {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 
        0 25px 60px -15px rgba(15, 23, 42, 0.25),
        0 0 0 1px rgba(15, 23, 42, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    animation: uapModalSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

@keyframes uapModalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 头部 - 极简设计 */
.uap-purchase-modal__header {
    position: relative;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #f3f4f6;
}

.uap-purchase-modal__header .uap-purchase-modal__title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    letter-spacing: -0.01em;
}

.uap-purchase-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.uap-purchase-modal__close:hover {
    background: #f3f4f6;
}

.uap-purchase-modal__close svg {
    width: 18px;
    height: 18px;
    stroke: #9ca3af;
    stroke-width: 2;
}

/* 主体内容 - 紧凑布局 */
.uap-purchase-modal__body {
    padding: 20px 24px;
}

/* 价格展示 - 突出显示 */
.uap-purchase-modal__price-display {
    text-align: center;
    padding: 16px 0;
    margin-bottom: 16px;
}

.uap-purchase-modal__price-label {
    font-size: 13px;
    color: #9ca3af;
    margin-bottom: 8px;
    font-weight: 500;
}

.uap-purchase-modal__price-amount {
    font-size: 36px;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.02em;
    line-height: 1;
}

/* 订单详情 - 紧凑列表 */
.uap-purchase-modal__details {
    background: #fafafa;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

.uap-purchase-modal__detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 8px 0;
}

.uap-purchase-modal__detail-row:first-child {
    padding-top: 0;
}

.uap-purchase-modal__detail-row:last-child {
    padding-bottom: 0;
}

.uap-purchase-modal__detail-row + .uap-purchase-modal__detail-row {
    border-top: 1px solid #f3f4f6;
}

.uap-purchase-modal__detail-label {
    flex-shrink: 0;
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.uap-purchase-modal__detail-value {
    flex: 1;
    font-size: 14px;
    color: #111827;
    font-weight: 500;
    text-align: right;
    word-wrap: break-word;
    word-break: break-word;
    line-height: 1.5;
}

/* 支付方式 - 紧凑设计 */
.uap-purchase-modal__payment {
    margin-bottom: 0;
}

.uap-purchase-modal__payment-label {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.uap-purchase-modal__payment-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.uap-purchase-modal__payment-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    color: #9ca3af;
    font-size: 13px;
}

.uap-content-payment-method {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #ffffff;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.uap-content-payment-method:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    transform: translateY(-1px);
}

.uap-content-payment-method.selected {
    border-color: var(--uap-primary, #4f46e5);
    background: rgba(79, 70, 229, 0.035);
    box-shadow: 0 0 0 3px var(--uap-primary-glow, rgba(79, 70, 229, 0.15));
}

.uap-content-payment-method__icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
}

.uap-content-payment-method__icon img {
    max-width: 100%;
    max-height: 100%;
}

.uap-content-payment-method__info {
    flex: 1;
    min-width: 0;
}

.uap-content-payment-method__name {
    font-size: 14px;
    font-weight: 650;
    color: #111827;
    line-height: 1.4;
    letter-spacing: -0.01em;
    margin: 0;
}

.uap-content-payment-method__desc {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.3;
    margin-top: 2px;
}

.uap-content-payment-method__radio {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    position: relative;
    transition: all 0.2s ease;
}

.uap-content-payment-method.selected .uap-content-payment-method__radio {
    border-color: var(--uap-primary, #4f46e5);
    background: var(--uap-primary, #4f46e5);
}

.uap-content-payment-method.selected .uap-content-payment-method__radio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #ffffff;
    border-radius: 50%;
}

/* 底部按钮 - 紧凑布局 */
.uap-purchase-modal__footer {
    display: flex;
    gap: 10px;
    padding: 16px 24px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
}

.uap-purchase-modal__footer .uap-btn {
    flex: 1;
    min-width: 0;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 650;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.uap-purchase-modal__cancel {
    background: #ffffff;
    color: #64748b;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.uap-purchase-modal__cancel:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #1e293b;
}

.uap-purchase-modal__confirm {
    background: var(--uap-primary, #4f46e5);
    background: linear-gradient(135deg, var(--uap-primary, #4f46e5) 0%, var(--uap-primary-gradient, #818cf8) 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 4px 14px var(--uap-primary-glow, rgba(79, 70, 229, 0.35)),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.uap-purchase-modal__confirm:hover {
    background: var(--uap-primary, #4f46e5);
    background: linear-gradient(135deg, var(--uap-primary, #4f46e5) 0%, var(--uap-primary-gradient, #818cf8) 100%);
    filter: brightness(1.06);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 20px var(--uap-primary-glow, rgba(79, 70, 229, 0.45)),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    color: #ffffff;
}

.uap-purchase-modal__confirm:active {
    transform: scale(0.98);
}

/* ========================================
   加载动画组件（BEM）
   ======================================== */

.uap-spinner {
    width: 16px;
    height: 16px;
    animation: uapSpin 1s linear infinite;
}

@keyframes uapSpin {
    to {
        transform: rotate(360deg);
    }
}

.uap-spinner__track {
    stroke: rgba(17, 24, 39, 0.2);
}

.uap-spinner__head {
    stroke: currentColor;
    stroke-dasharray: 50;
    stroke-dashoffset: 25;
}

.uap-btn__loading .uap-spinner__track {
    stroke: rgba(255, 255, 255, 0.3);
}

.uap-btn__loading .uap-spinner__head {
    stroke: #ffffff;
}

/* 禁用body滚动 */
body.uap-modal-open {
    overflow: hidden;
}

/* ========================================
   响应式设计
   ======================================== */

@media (max-width: 768px) {
    .uap-paywall-standard__main {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .uap-paywall-standard__offer {
        align-items: stretch;
        min-width: 0;
    }

    .uap-paywall-container .uap-paywall-price,
    .uap-paywall-container .uap-paywall-tip {
        text-align: left;
    }

    .uap-paywall-standard__price-discount,
    .uap-paywall-standard__price-current {
        justify-content: flex-start;
    }

    .uap-paywall-container .uap-paywall-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .uap-paywall-standard__main {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        padding: 16px;
    }

    .uap-paywall-container .uap-paywall-title {
        font-size: 16px;
    }

    .uap-paywall-container .uap-paywall-desc {
        font-size: 13px;
    }

    .uap-paywall-standard__offer {
        align-items: stretch;
        min-width: 0;
        width: 100%;
    }

    .uap-paywall-container .uap-paywall-price {
        text-align: left;
    }

    .uap-paywall-standard__price-discount,
    .uap-paywall-standard__price-current {
        justify-content: flex-start;
    }

    .uap-price-current {
        font-size: 20px;
    }

    .uap-price-value {
        font-size: 22px;
    }

    .uap-paywall-container .uap-paywall-actions {
        justify-content: stretch;
        width: 100%;
    }

    .uap-paywall-container .uap-paywall-actions .uap-btn {
        flex: 1;
        width: auto;
    }

    .uap-paywall-container .uap-paywall-actions .uap-read-unlock-form {
        display: flex;
        flex: 1;
        width: auto;
    }

    .uap-paywall-container .uap-paywall-tip {
        max-width: none;
        text-align: left;
    }

    /* 购买弹窗移动端优化 - 紧凑版 */
    .uap-purchase-modal__wrapper {
        max-width: 100%;
        margin: 0 12px;
    }
    
    .uap-purchase-modal__header {
        padding: 16px 20px 14px;
    }
    
    .uap-purchase-modal__header .uap-purchase-modal__title {
        font-size: 17px;
    }
    
    .uap-purchase-modal__close {
        top: 14px;
        right: 14px;
        width: 30px;
        height: 30px;
    }
    
    .uap-purchase-modal__close svg {
        width: 16px;
        height: 16px;
    }
    
    .uap-purchase-modal__body {
        padding: 16px 20px;
    }
    
    .uap-purchase-modal__price-display {
        padding: 12px 0;
        margin-bottom: 14px;
    }
    
    .uap-purchase-modal__price-label {
        font-size: 12px;
    }
    
    .uap-purchase-modal__price-amount {
        font-size: 32px;
    }
    
    .uap-purchase-modal__details {
        padding: 10px 14px;
        margin-bottom: 14px;
    }
    
    .uap-purchase-modal__detail-row {
        padding: 7px 0;
    }
    
    .uap-purchase-modal__detail-label {
        font-size: 13px;
    }
    
    .uap-purchase-modal__detail-value {
        font-size: 13px;
    }
    
    .uap-purchase-modal__payment-label {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .uap-content-payment-method {
        padding: 9px 11px;
        gap: 10px;
    }
    
    .uap-content-payment-method__icon {
        width: 34px;
        height: 34px;
    }
    
    .uap-content-payment-method__name {
        font-size: 13px;
    }
    
    .uap-content-payment-method__desc {
        font-size: 11px;
    }
    
    .uap-content-payment-method__radio {
        width: 18px;
        height: 18px;
    }
    
    .uap-content-payment-method.selected .uap-content-payment-method__radio::after {
        width: 8px;
        height: 8px;
    }
    
    .uap-purchase-modal__footer {
        padding: 14px 20px;
        gap: 8px;
    }
    
    .uap-purchase-modal__footer .uap-btn {
        padding: 11px 18px;
        font-size: 14px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 375px) {
    .uap-purchase-modal__wrapper {
        margin: 0 10px;
    }
    
    .uap-purchase-modal__header {
        padding: 14px 16px 12px;
    }
    
    .uap-purchase-modal__body {
        padding: 14px 16px;
    }
    
    .uap-purchase-modal__footer {
        padding: 12px 16px;
    }
}

/* ========================================
   打印样式
   ======================================== */

@media print {
    .uap-paywall,
    .uap-download-area {
        display: none;
    }
}


/* ========================================
   紧凑型付费墙
   ======================================== */

.uap-paywall--compact {
    margin: 40px 0;
    padding: 0;
}

.uap-paywall-compact {
    max-width: 100%;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* 顶部装饰线 */
.uap-paywall-compact::before {
    content: '';
    display: block;
    height: 3px;
    background: linear-gradient(90deg, #d97706 0%, #f59e0b 50%, #d97706 100%);
}

/* 主要内容行 */
.uap-paywall-compact__main {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
}

/* 图标 */
.uap-paywall-compact__icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(17, 24, 39, 0.2);
}

.uap-paywall-compact__icon svg {
    width: 22px;
    height: 22px;
    stroke: #ffffff;
    stroke-width: 2;
}

/* 信息区 */
.uap-paywall-compact__info {
    flex: 1;
    min-width: 0;
}

.uap-paywall-compact__title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    line-height: 1.3;
    margin-bottom: 2px;
}

.uap-paywall-compact__desc {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
}

/* 价格区 */
.uap-paywall-compact__price {
    flex-shrink: 0;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.uap-paywall-compact__price-free {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
}

.uap-paywall-compact__price-original {
    font-size: 14px;
    color: #9ca3af;
    text-decoration: line-through;
}

.uap-paywall-compact__price-current {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.02em;
}

/* 按钮区 */
.uap-paywall-compact__actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 紧凑按钮 */
.uap-paywall .uap-btn-compact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.uap-btn-compact--primary {
    background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
    color: #ffffff;
    box-shadow: 0 4px 8px rgba(17, 24, 39, 0.2);
}

.uap-btn-compact--primary:hover {
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(17, 24, 39, 0.25);
}

.uap-paywall .uap-btn-compact--primary {
    background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
    color: #ffffff;
    box-shadow: 0 4px 8px rgba(17, 24, 39, 0.2);
}

.uap-paywall .uap-btn-compact--primary:hover {
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(17, 24, 39, 0.25);
    border: none;
}

a.uap-btn-compact--primary:hover {
    color: #ffffff;
}

.uap-btn-compact--secondary {
    background: #ffffff;
    color: #111827;
    border: 1px solid #e5e7eb;
}

.uap-paywall .uap-btn-compact--secondary {
    background: #ffffff;
    color: #111827;
    border: 1px solid #e5e7eb;
}

.uap-btn-compact--secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.uap-paywall .uap-btn-compact--secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

a.uap-btn-compact--secondary:hover {
    color: #111827;
}

/* 会员权益折叠区 */
.uap-paywall-compact__benefits {
    border-top: 1px solid #f3f4f6;
}

.uap-paywall-compact__benefits-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 24px;
    background: #fafafa;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.2s ease;
}

.uap-paywall-compact__benefits-desc {
    color: #d97706;
    font-size: 13px;
    font-weight: 500;
}

.uap-paywall-compact__benefits-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.uap-paywall-compact__benefits-toggle:hover {
    background: #f5f5f5;
    color: #374151;
}

.uap-paywall-compact__benefits-toggle:focus {
    outline: none;
    background: #fafafa;
    color: #6b7280;
}

.uap-paywall-compact__benefits-toggle:focus-visible {
    outline: 2px solid #d1d5db;
    outline-offset: -2px;
}

.uap-paywall-compact__benefits-arrow {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.uap-paywall-compact__benefits-toggle.active .uap-paywall-compact__benefits-arrow {
    transform: rotate(180deg);
}

.uap-paywall-compact__benefits-content {
    padding: 16px 24px 20px;
    background: #fafafa;
}

.uap-paywall-compact__benefits-list {
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
}

.uap-paywall-compact__benefits-list li {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #374151;
}

.uap-paywall-compact__benefits-list svg {
    width: 16px;
    height: 16px;
    color: #10b981;
    flex-shrink: 0;
}

.uap-paywall .uap-paywall-compact__benefits-link {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    font-weight: 500;
    color: #d97706;
    text-decoration: none;
    transition: color 0.2s ease;
}

.uap-paywall-compact__benefits-link:hover {
    color: #b45309;
}

/* 紧凑型响应式 */
@media (max-width: 768px) {
    .uap-paywall-compact__main {
        flex-wrap: wrap;
        gap: 12px;
        padding: 16px 20px;
    }
    
    .uap-paywall-compact__icon {
        width: 40px;
        height: 40px;
    }
    
    .uap-paywall-compact__icon svg {
        width: 20px;
        height: 20px;
    }
    
    .uap-paywall-compact__info {
        flex: 1;
        min-width: 0;
    }
    
    .uap-paywall-compact__title {
        font-size: 15px;
    }
    
    .uap-paywall-compact__desc {
        font-size: 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .uap-paywall-compact__price {
        flex-shrink: 0;
    }
    
    .uap-paywall-compact__price-current {
        font-size: 18px;
    }
    
    .uap-paywall-compact__price-original {
        font-size: 12px;
    }
    
    .uap-paywall-compact__price-free {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .uap-paywall-compact__actions {
        width: 100%;
        justify-content: stretch;
    }
    
    .uap-paywall-compact__actions .uap-btn-compact {
        flex: 1;
    }

    .uap-paywall-compact__actions .uap-read-unlock-form {
        display: flex;
        flex: 1;
    }
    
    .uap-paywall-compact__benefits-toggle {
        flex-direction: column;
        gap: 6px;
        padding: 10px 20px;
        font-size: 12px;
    }

    .uap-paywall-compact__benefits-desc {
        font-size: 12px;
    }
    
    .uap-paywall-compact__benefits-content {
        padding: 14px 20px 16px;
    }
    
    .uap-paywall-compact__benefits-list {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .uap-paywall-compact__main {
        padding: 14px 16px;
        gap: 10px;
    }
    
    .uap-paywall-compact__icon {
        width: 36px;
        height: 36px;
    }
    
    .uap-paywall-compact__icon svg {
        width: 18px;
        height: 18px;
    }
    
    .uap-paywall-compact__title {
        font-size: 14px;
    }
    
    .uap-paywall-compact__desc {
        display: none;
    }

    .uap-paywall-compact__desc--quota {
        display: block;
        overflow: visible;
        white-space: normal;
        text-overflow: clip;
    }
    
    .uap-paywall-compact__price-current {
        font-size: 16px;
    }
    
    .uap-btn-compact {
        padding: 9px 16px;
        font-size: 13px;
    }
}

/* ========================================
   标准版下载区域
   ======================================== */

.uap-download-area--standard {
    margin: 32px 0;
}

.uap-download-area--standard .uap-download-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.uap-download-area--standard .uap-download-container::before {
    content: '';
    display: block;
    height: 3px;
    background: linear-gradient(90deg, #10b981 0%, #059669 50%, #10b981 100%);
}

.uap-download-area--standard .uap-download-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 16px 20px;
    background: #fafafa;
    border-bottom: 1px solid #f3f4f6;
    text-align: left;
}

.uap-download-header__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #059669;
    border-radius: 10px;
}

.uap-download-header__icon svg {
    width: 20px;
    height: 20px;
    stroke: #ffffff;
    stroke-width: 2.5;
}

.uap-download-header__text {
    flex: 1;
    min-width: 0;
}

.uap-download-area--standard .uap-download-title {
    margin: 0;
    font-size: 16px;
    font-weight: 650;
    color: #111827;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.uap-download-area--standard .uap-download-desc {
    margin: 3px 0 0;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
}

.uap-download-area--standard .uap-download-access-message--quota {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.uap-download-area--standard .uap-download-access-message--quota.is-exhausted {
    color: #b91c1c;
}

.uap-download-area--standard .uap-download-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 12px 16px 16px;
}

.uap-download-area--standard .uap-download-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.uap-download-area--standard .uap-download-item:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.uap-download-item__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.uap-download-item__icon svg {
    width: 20px;
    height: 20px;
    stroke: #6b7280;
}

.uap-download-item__content {
    flex: 1;
    min-width: 0;
}

.uap-download-area--standard .uap-download-item__title {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.uap-download-item__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #6b7280;
}

.uap-download-item__type {
    padding: 1px 6px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #4b5563;
}

.uap-download-item__code strong {
    color: #d97706;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: 0.04em;
}

.uap-download-area--standard .uap-download-item__btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #111827;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease;
}

.uap-download-area--standard .uap-download-item__btn:hover {
    background: #1f2937;
    color: #ffffff;
}

.uap-download-area--standard .uap-download-item__btn.is-disabled,
.uap-download-area--standard .uap-download-item__btn.is-disabled:hover {
    opacity: 0.48;
    cursor: not-allowed;
}

.uap-download-area--standard .uap-download-item__btn svg {
    width: 16px;
    height: 16px;
}

.uap-download-area--standard .uap-download-notice {
    margin: 0;
    padding: 0 20px 14px;
    background: transparent;
    border: 0;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.5;
}

@media (max-width: 640px) {
    .uap-download-area--standard .uap-download-header {
        padding: 12px 14px;
        gap: 10px;
    }

    .uap-download-header__icon {
        width: 32px;
        height: 32px;
    }

    .uap-download-header__icon svg {
        width: 16px;
        height: 16px;
    }

    .uap-download-area--standard .uap-download-title {
        font-size: 14px;
    }

    .uap-download-area--standard .uap-download-desc {
        font-size: 12px;
    }

    .uap-download-area--standard .uap-download-list {
        padding: 10px 12px 12px;
    }

    .uap-download-area--standard .uap-download-item {
        flex-wrap: wrap;
        padding: 10px 12px;
    }

    .uap-download-area--standard .uap-download-item__btn {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   紧凑型下载区域
   ======================================== */

.uap-download-area--compact {
    margin: 40px 0;
}

.uap-download-compact {
    max-width: 100%;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* 顶部装饰线 */
.uap-download-compact::before {
    content: '';
    display: block;
    height: 3px;
    background: linear-gradient(90deg, #10b981 0%, #059669 50%, #10b981 100%);
}

/* 标题行 */
.uap-download-compact__header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: #fafafa;
    border-bottom: 1px solid #f3f4f6;
}

.uap-download-compact__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.2);
}

.uap-download-compact__icon svg {
    width: 20px;
    height: 20px;
    stroke: #ffffff;
    stroke-width: 2.5;
}

.uap-download-compact__title {
    flex: 1;
    line-height: 1.2;
}

.uap-download-compact__title strong {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 2px;
}

.uap-download-compact__title span {
    font-size: 13px;
    color: #6b7280;
}

.uap-download-compact__title span.uap-paywall-compact__quota-badge {
    color: #92400e;
    background: #fffbeb;
    border-color: #fde68a;
    font-size: 11px;
}

.uap-download-compact__title .uap-download-quota-label {
    color: #64748b;
    font-weight: 500;
}

.uap-download-compact__title .uap-download-access-message--quota {
    display: flex;
    align-items: center;
    gap: 6px;
}

.uap-download-compact__title .uap-download-quota-remaining {
    display: inline;
    min-width: 0;
    margin: 0;
    padding: 0;
    color: #0f766e;
    background: transparent;
    border: 0;
    border-radius: 0;
    font-size: 13px;
    font-weight: 700;
    line-height: inherit;
    letter-spacing: -.01em;
    font-variant-numeric: tabular-nums;
}

.uap-download-compact__title .uap-download-access-message--quota.is-exhausted {
    color: #b91c1c;
}

/* 下载列表 */
.uap-download-compact__list {
    padding: 12px 16px;
}

.uap-download-compact__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.15s ease;
}

.uap-download-compact__item:last-child {
    margin-bottom: 0;
}

.uap-download-compact__item:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.uap-download-compact__item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.uap-download-compact__item-title {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.uap-download-compact__item-code {
    flex-shrink: 0;
    font-size: 12px;
    color: #6b7280;
    padding: 3px 8px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
}

.uap-download-compact__item-code strong {
    color: #d97706;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.05em;
}

.uap-download-compact__item .uap-download-compact__item-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px;
    background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 2px 4px rgba(17, 24, 39, 0.2);
}

.uap-download-compact__item .uap-download-compact__item-btn:hover {
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(17, 24, 39, 0.25);
    border-bottom: none!important;
}

.uap-download-compact__item .uap-download-compact__item-btn.is-disabled,
.uap-download-compact__item .uap-download-compact__item-btn.is-disabled:hover {
    opacity: 0.48;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.uap-download-compact__item-btn:focus {
    outline: none;
    color: #ffffff;
}

.uap-download-compact__item-btn svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
}

/* 紧凑下载区响应式 */
@media (max-width: 640px) {
    .uap-download-compact__header {
        padding: 12px 14px;
        gap: 10px;
    }
    
    .uap-download-compact__icon {
        width: 32px;
        height: 32px;
    }
    
    .uap-download-compact__icon svg {
        width: 16px;
        height: 16px;
    }
    
    .uap-download-compact__title strong {
        font-size: 13px;
    }
    
    .uap-download-compact__title span {
        font-size: 11px;
    }

    .uap-download-compact__title .uap-download-quota-remaining {
        font-size: 11px;
    }
    
    .uap-download-compact__list {
        padding: 8px 10px;
    }
    
    .uap-download-compact__item {
        flex-wrap: nowrap;
        gap: 8px;
        padding: 8px 10px;
        margin-bottom: 6px;
    }
    
    .uap-download-compact__item-info {
        flex: 1;
        min-width: 0;
        gap: 6px;
    }
    
    .uap-download-compact__item-title {
        font-size: 12px;
        flex: 1;
        min-width: 0;
    }
    
    .uap-download-compact__item-code {
        font-size: 10px;
        padding: 2px 5px;
        flex-shrink: 0;
    }
    
    .uap-download-compact__item-btn {
        flex-shrink: 0;
        padding: 5px 10px;
        font-size: 11px;
        gap: 3px;
    }
    
    .uap-download-compact__item-btn svg {
        width: 12px;
        height: 12px;
    }
}

@media (max-width: 400px) {
    .uap-download-compact__header {
        padding: 10px 12px;
        gap: 8px;
    }
    
    .uap-download-compact__icon {
        width: 28px;
        height: 28px;
    }
    
    .uap-download-compact__icon svg {
        width: 14px;
        height: 14px;
    }
    
    .uap-download-compact__title strong {
        font-size: 12px;
    }
    
    .uap-download-compact__title span {
        display: none;
    }

    .uap-download-compact__title .uap-download-access-message--quota,
    .uap-download-compact__title .uap-download-access-message--quota > span,
    .uap-download-compact__title .uap-download-quota-remaining {
        display: inline-flex;
    }
    
    .uap-download-compact__list {
        padding: 6px 8px;
    }
    
    .uap-download-compact__item {
        gap: 6px;
        padding: 6px 8px;
        margin-bottom: 4px;
    }
    
    .uap-download-compact__item-info {
        gap: 4px;
    }
    
    .uap-download-compact__item-title {
        font-size: 11px;
    }
    
    .uap-download-compact__item-code {
        display: none;
    }
    
    .uap-download-compact__item-btn {
        padding: 4px 8px;
        font-size: 10px;
        gap: 2px;
    }
    
    .uap-download-compact__item-btn svg {
        width: 10px;
        height: 10px;
    }
}
