/* ============================================================
   付費牆樣式 — 免費版 vs Pro 版
   ============================================================ */

/* 鎖定區塊 */
.paywall-locked {
    position: relative;
    overflow: hidden;
    min-height: 120px;
}
.paywall-locked > *:not(.paywall-overlay):not(h3) {
    filter: blur(6px);
    pointer-events: none;
    user-select: none;
}
.paywall-locked > h3 {
    filter: none;
}

/* 遮罩層 */
.paywall-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(2px);
    border-radius: 10px;
}
.paywall-cta {
    text-align: center;
    padding: 16px;
}
.paywall-lock {
    font-size: 28px;
    display: block;
    margin-bottom: 6px;
}
.paywall-title {
    font-size: 15px;
    font-weight: 700;
    color: #374151;
    margin: 4px 0;
}
.paywall-desc {
    font-size: 12px;
    color: #6b7280;
    margin: 0 0 10px;
}
.paywall-btn {
    display: inline-block;
    padding: 8px 24px;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(249,115,22,0.3);
}
.paywall-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(249,115,22,0.4);
}

/* Tab 鎖定標記 */
.paywall-tab-locked {
    opacity: 0.6;
}

/* ============================================================
   升級彈窗
   ============================================================ */
.upgrade-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.upgrade-modal {
    background: white;
    border-radius: 20px;
    max-width: 400px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 24px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.upgrade-close {
    position: absolute;
    top: 12px; right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    color: #9ca3af;
    cursor: pointer;
    line-height: 1;
}
.upgrade-header {
    text-align: center;
    margin-bottom: 16px;
}
.upgrade-icon { font-size: 32px; }
.upgrade-header h3 {
    font-size: 22px;
    font-weight: 700;
    color: #111;
    margin: 8px 0 0;
}

/* 功能亮點 */
.upgrade-feature-highlight {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 16px;
    text-align: center;
}
.feature-name {
    font-size: 15px;
    font-weight: 600;
    color: #c2410c;
    margin: 0;
}
.feature-desc {
    font-size: 12px;
    color: #9a3412;
    margin: 4px 0 0;
}

/* 方案卡片 */
.upgrade-plans {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.plan-card {
    flex: 1;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}
.plan-card:hover {
    border-color: #f97316;
    background: #fff7ed;
}
.plan-card.popular {
    border-color: #f97316;
    background: #fff7ed;
}
.plan-badge {
    position: absolute;
    top: -10px; left: 50%;
    transform: translateX(-50%);
    background: #f97316;
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}
.plan-badge.save {
    background: #16a34a;
}
.plan-name {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}
.plan-price {
    font-size: 20px;
    font-weight: 700;
    color: #f97316;
}
.plan-price span {
    font-size: 12px;
    font-weight: 400;
    color: #9ca3af;
}
.plan-desc {
    font-size: 11px;
    color: #6b7280;
    margin-top: 4px;
}

/* 全功能列表 */
.upgrade-all-features {
    background: #f9fafb;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 12px;
}
.all-features-title {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 8px;
}
.upgrade-all-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.upgrade-all-features li {
    font-size: 12px;
    color: #6b7280;
    padding: 3px 0;
    line-height: 1.4;
}
.upgrade-all-features li::before {
    content: '✓ ';
    color: #16a34a;
    font-weight: 700;
}

/* 行銷文案 */
.upgrade-note {
    text-align: center;
    font-size: 13px;
    color: #92400e;
    font-weight: 500;
    line-height: 1.6;
    margin: 0;
    padding: 8px;
    background: #fef3c7;
    border-radius: 8px;
}



/* ============================================================
   Pro 升級橫幅 v2 — 結果頁內嵌（更醒目）
   ============================================================ */
.pro-upgrade-banner {
    background: linear-gradient(135deg, #fff1e6, #ffe8cc);
    border: 2px solid #f97316;
    border-radius: 16px;
    padding: 16px;
    margin: 12px 0 16px;
    animation: bannerSlideIn 0.4s ease;
}
@keyframes bannerSlideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.pro-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
}
.pro-banner-icon {
    font-size: 32px;
    flex-shrink: 0;
}
.pro-banner-text-block {
    flex: 1;
}
.pro-banner-title {
    font-size: 15px;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 2px;
}
.badge-free {
    display: inline-block;
    padding: 2px 8px;
    background: #9ca3af;
    color: white;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
}
.pro-banner-desc {
    font-size: 12px;
    color: #b45309;
}
.pro-banner-btn {
    flex-shrink: 0;
    padding: 10px 18px;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(249,115,22,0.4);
    transition: all 0.2s;
    text-align: center;
    line-height: 1.3;
}
.pro-banner-btn small {
    font-size: 11px;
    font-weight: 400;
    opacity: 0.9;
}
.pro-banner-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(249,115,22,0.5);
}
.pro-banner-features {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(249,115,22,0.2);
}
.pro-banner-features span {
    font-size: 11px;
    color: #92400e;
    background: rgba(249,115,22,0.1);
    padding: 3px 8px;
    border-radius: 8px;
}

/* 手機版 */
@media (max-width: 480px) {
    .pro-banner-content {
        flex-wrap: wrap;
    }
    .pro-banner-btn {
        width: 100%;
        margin-top: 8px;
    }
}


/* 強化 paywall overlay */
.paywall-overlay {
    background: rgba(255,248,240,0.92) !important;
    backdrop-filter: blur(4px) !important;
}
.paywall-btn {
    font-size: 15px !important;
    padding: 10px 28px !important;
    animation: pulseSoft 2s infinite;
}
@keyframes pulseSoft {
    0%, 100% { box-shadow: 0 2px 8px rgba(249,115,22,0.3); }
    50% { box-shadow: 0 4px 20px rgba(249,115,22,0.5); }
}

/* 手機版 */
@media (max-width: 480px) {
    .pro-upgrade-banner {
        flex-direction: column;
        text-align: center;
        padding: 12px;
    }
    .pro-banner-left {
        justify-content: center;
    }
    .pro-banner-btn {
        width: 100%;
    }
}
