/* ==========================================
   PRICING / CREDITS PAGE STYLES
   ========================================== */

/* Credits Hero */
.credits-hero {
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--secondary-purple) 100%);
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.credits-hero-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        linear-gradient(45deg, rgba(255,255,255,0.03) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255,255,255,0.03) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.03) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.03) 75%);
    background-size: 60px 60px;
    pointer-events: none;
}

.credits-hero .container {
    position: relative;
    z-index: 1;
}

.credits-hero-title {
    font-size: 40px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 12px;
}

.credits-hero-subtitle {
    font-size: 18px;
    color: rgba(255,255,255,0.85);
    margin-bottom: 24px;
}

.credits-balance-hero {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    padding: 10px 24px;
    border-radius: 50px;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
}

.credits-balance-hero strong {
    font-weight: 700;
}

/* ==========================================
   SUCCESS / ERROR MESSAGES
   ========================================== */

.cp-success-msg {
    padding: 14px 0;
    font-size: 15px;
    font-weight: 500;
}

.cp-msg-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.cp-msg-close {
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.5;
    padding: 0 4px;
}

.cp-msg-close:hover {
    opacity: 1;
}

.cp-msg-success {
    background: #f0fdf4;
    color: #166534;
}

.cp-msg-error {
    background: #fef2f2;
    color: #991b1b;
}

.cp-msg-info {
    background: #eff6ff;
    color: #1e40af;
}

/* ==========================================
   YEARLY UNLIMITED PLAN
   ========================================== */

.pricing-yearly {
    padding: 60px 0 0;
    background: var(--off-white);
}

.yearly-card {
    background: #fff;
    border: 2px solid var(--primary-purple);
    border-radius: 20px;
    padding: 40px;
    position: relative;
    box-shadow: 0 8px 32px rgba(124, 58, 237, 0.12);
    max-width: 840px;
    margin: 0 auto;
}

.yearly-card-badge {
    position: absolute;
    top: -14px;
    left: 40px;
    background: linear-gradient(135deg, var(--primary-purple), var(--secondary-purple));
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 5px 20px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.yearly-card-body {
    display: flex;
    align-items: center;
    gap: 40px;
}

.yearly-card-info {
    flex: 1;
}

.yearly-card-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.yearly-card-desc {
    font-size: 15px;
    color: var(--text-gray);
    margin-bottom: 16px;
    line-height: 1.6;
}

.yearly-card-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.yearly-card-features li {
    padding: 5px 0;
    font-size: 14px;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    gap: 8px;
}

.yearly-card-features li::before {
    content: '';
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f0fdf4;
    flex-shrink: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2322c55e' stroke-width='3'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px;
}

.yearly-card-action {
    text-align: center;
    min-width: 220px;
    flex-shrink: 0;
}

.yearly-card-price-wrap {
    margin-bottom: 20px;
}

.yearly-card-price {
    font-size: 48px;
    font-weight: 800;
    color: var(--primary-purple);
}

.yearly-card-period {
    font-size: 16px;
    color: var(--text-light);
    font-weight: 500;
}

/* Active yearly plan banner */
.yearly-active {
    max-width: 840px;
    margin: 0 auto;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 20px 28px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.yearly-active strong {
    color: #166534;
    font-size: 16px;
}

.yearly-active p {
    color: #15803d;
    font-size: 14px;
    margin-top: 4px;
}

/* ==========================================
   SECTION TITLES
   ========================================== */

.credits-section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 8px;
}

.credits-section-desc {
    font-size: 16px;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 40px;
}

/* ==========================================
   CREDIT PACK CARDS
   ========================================== */

.credits-packages {
    padding: 60px 0;
    background: var(--off-white);
}

.credits-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.credit-pack-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.credit-pack-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(124,58,237,0.1);
}

.credit-pack-card.popular {
    border-color: var(--primary-purple);
    box-shadow: 0 4px 20px rgba(124,58,237,0.15);
}

.credit-pack-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary-purple), var(--secondary-purple));
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 16px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.credit-pack-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.credit-pack-credits {
    font-size: 48px;
    font-weight: 800;
    color: var(--primary-purple);
    line-height: 1;
    margin-bottom: 4px;
}

.credit-pack-credits span {
    display: block;
    font-size: 14px;
    font-weight: 400;
    color: var(--text-light);
    margin-top: 4px;
}

.credit-pack-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
}

/* PayPal button container inside pack cards */
.credit-pack-paypal {
    min-height: 45px;
}

/* ==========================================
   SIGNUP CTA BUTTON
   ========================================== */

.btn-signup-cta {
    display: inline-block;
    width: 100%;
    padding: 12px 24px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-purple), var(--secondary-purple));
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: opacity 0.2s, transform 0.2s;
    box-sizing: border-box;
}

.btn-signup-cta:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* ==========================================
   PAYPAL BUTTON WRAP (yearly plan)
   ========================================== */

.paypal-btn-wrap {
    min-height: 45px;
}

.cp-paypal-placeholder {
    color: var(--text-light);
    font-size: 13px;
    padding: 12px;
}

/* ==========================================
   CREDIT HISTORY
   ========================================== */

.credits-history {
    padding: 60px 0;
    background: #fff;
}

.credits-history-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    max-width: 800px;
    margin: 24px auto 0;
}

.credits-history-table {
    width: 100%;
    border-collapse: collapse;
}

.credits-history-table th {
    background: #f9fafb;
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.credits-history-table td {
    padding: 14px 20px;
    font-size: 14px;
    color: var(--text-dark);
    border-bottom: 1px solid #f3f4f6;
}

.credits-history-table tr:last-child td {
    border-bottom: none;
}

.credits-history-empty {
    text-align: center;
    color: var(--text-light);
    font-size: 15px;
    padding: 40px 0;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 900px) {
    .credits-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .yearly-card-body {
        flex-direction: column;
        text-align: center;
    }

    .yearly-card-features {
        display: inline-block;
        text-align: left;
    }

    .yearly-card-action {
        min-width: unset;
        width: 100%;
        max-width: 280px;
    }
}

@media (max-width: 560px) {
    .credits-grid {
        grid-template-columns: 1fr;
        max-width: 340px;
    }

    .credits-hero-title {
        font-size: 28px;
    }

    .yearly-card {
        padding: 28px 20px;
    }

    .yearly-card-title {
        font-size: 22px;
    }

    .yearly-card-price {
        font-size: 36px;
    }

    .yearly-card-badge {
        left: 20px;
    }
}
