/* payment.css - 支付方案、定价卡片与 FAQ */

.payment-section {
    padding: 60px 0 100px;
    background: white;
    border-top: 1px solid #eee;
    text-align: center;
}

.payment-section h2 {
    margin-bottom: 8px;
    font-size: 2rem;
}

.sub-h2 {
    color: var(--text-sub);
    margin-bottom: 40px;
}

.back-link {
    position: absolute;
    top: 0;
    left: 20px;
    font-size: 0.9rem;
    color: var(--text-sub);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.2s;
}

.back-link:hover {
    background: #f3f4f6;
    color: #000;
}

/* 移动端返回链接修复 */
@media (max-width: 600px) {
    .back-link {
        position: fixed;
        top: 12px;
        left: 12px;
        z-index: 100;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(8px);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        padding: 8px 14px;
        border-radius: 20px;
        font-weight: 500;
    }
}

/* Pricing Tabs */
.pricing-tabs-container {
    display: inline-flex;
    background: #F3F4F6;
    padding: 4px;
    border-radius: 50px;
    margin-bottom: 40px;
}

.pricing-tab {
    padding: 10px 32px;
    border-radius: 40px;
    border: none;
    background: transparent;
    color: var(--text-sub);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

.pricing-tab.active {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 会员订阅按钮 - 绿色高亮 */
.pricing-tab.subscription-tab {
    position: relative;
}

.pricing-tab.subscription-tab.active {
    background: #07c160;
    color: white;
}

.tab-save-badge {
    display: inline-block;
    background: #DCFCE7;
    color: #166534;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 4px;
    vertical-align: middle;
}

.pricing-tab.subscription-tab.active .tab-save-badge {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

.plans-grid {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    animation: fadeIn 0.3s ease-out;
}

/* Billing Tabs (Secondary) */
.billing-tabs-container {
    display: inline-flex;
    background: #F3F4F6;
    padding: 3px;
    border-radius: 50px;
    margin-bottom: 30px;
}

.billing-tab-sm {
    padding: 6px 20px;
    border-radius: 40px;
    border: none;
    background: transparent;
    color: var(--text-sub);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.billing-tab-sm.active {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.discount-tag {
    background: #DCFCE7;
    color: #166534;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 4px;
}

.pricing-grid {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    animation: fadeIn 0.3s ease-out;
}

.pricing-card {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    padding: 32px;
    width: 280px;
    box-shadow: var(--shadow-sm);
    position: relative;
    transition: transform 0.2s;
}

.pricing-card.recommended {
    border: 2px solid var(--primary-color);
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
    z-index: 10;
}

.pricing-card:hover {
    transform: translateY(-4px) scale(1.05);
}

/* Free Plan Card Styles */
.free-plan-card {
    background: #1F2937;
    border: 1px solid #374151;
    color: #E5E7EB;
}

.free-plan-card .tag {
    background: #374151;
    color: #9CA3AF;
}

.free-plan-card .price {
    color: white;
}

.free-plan-card .price-per-image {
    color: #9CA3AF;
}

.free-plan-card .features-list {
    color: #D1D5DB !important;
}

.free-plan-card .features-list div {
    color: #D1D5DB;
}

.current-plan-label {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #374151;
    color: #9CA3AF;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.current-btn {
    background: #374151 !important;
    border-color: #4B5563 !important;
    color: #9CA3AF !important;
    cursor: not-allowed;
}

.current-btn:hover {
    background: #374151 !important;
    transform: none !important;
}

.recommend-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.price {
    font-size: 2rem;
    font-weight: 800;
    margin: 16px 0 4px;
    white-space: nowrap;
}

.unit {
    font-size: 1rem;
    font-weight: normal;
    color: var(--text-sub);
}

/* 年付原价和优惠标签 */
.original-price {
    text-decoration: line-through;
    color: #9CA3AF;
    font-size: 0.75rem;
    font-weight: normal;
    margin-right: 2px;
}

.yearly-discount-tag {
    display: inline-block;
    background: #07c160;
    color: white;
    font-size: 0.55rem;
    font-weight: 600;
    padding: 1px 4px;
    border-radius: 2px;
    margin-left: 2px;
    vertical-align: middle;
}

.price-per-image {
    font-size: 0.85rem;
    color: #6B7280;
    margin-top: -4px;
    margin-bottom: 20px;
    font-weight: 500;
}

.desc {
    color: var(--text-sub);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.buy-btn {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: none;
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    cursor: pointer;
}

.buy-btn.outline {
    background: white;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.buy-btn.outline:hover {
    background: #fdfdfd;
}

.buy-btn-container {
    position: relative;
    width: 100%;
}

.save-tag-sm {
    position: absolute;
    top: -14px;
    right: -10px;
    background: #EF4444;
    /* Bright Red for savings */
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
    z-index: 5;
    transform: rotate(5deg);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: rotate(5deg) scale(1);
    }

    50% {
        transform: rotate(5deg) scale(1.05);
    }

    100% {
        transform: rotate(5deg) scale(1);
    }
}

/* FAQ */
.faq-section {
    padding: 60px 0;
    background: var(--bg-color);
    border-top: 1px solid #E5E7EB;
}

.faq-item {
    margin-bottom: 24px;
    text-align: left;
}

.faq-item h4 {
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
}

.faq-item p {
    color: var(--text-sub);
    font-size: 0.95rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 600px) {
    .pricing-card {
        width: 100%;
        max-width: 300px;
    }

    .pricing-card.recommended {
        transform: scale(1);
    }
}