/* ==========================================================================
   CC-GEN BILLING â€” PRICING & SUBSCRIPTION SUCCESS PAGES
   Shared stylesheet for pricing.html and billing-success.html.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --primary-gradient: linear-gradient(135deg, #EB001B 0%, #B80016 100%);
    --primary-gradient-hover: linear-gradient(135deg, #C40017 0%, #C40017 100%);
    --primary-color: #EB001B;
    --accent-orange: #B80016;
    --accent-green: #475569;
    --accent-green-dark: #334155;

    --bg-page: #F8FAFC;
    --bg-surface: #FFFFFF;
    --bg-subtle: #F1F5F9;
    --bg-dark: #0F172A;
    --bg-dark-surface: #1E293B;

    --text-heading: #0F172A;
    --text-body: #334155;
    --text-muted: #64748B;
    --text-light: #F8FAFC;

    --border-color: #E2E8F0;

    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 10px 30px -5px rgba(235, 0, 27, 0.25);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Inter', sans-serif;

    --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-page: #0F172A;
    --bg-surface: #1E293B;
    --bg-subtle: #334155;
    --text-heading: #F8FAFC;
    --text-body: #CBD5E1;
    --text-muted: #94A3B8;
    --border-color: #334155;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    background: var(--bg-page);
    color: var(--text-body);
    line-height: 1.65;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    animation: billingFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes billingFadeIn {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes checkPop {
    0% { transform: scale(0.4); opacity: 0; }
    60% { transform: scale(1.12); opacity: 1; }
    100% { transform: scale(1); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--transition-fast); }
button, input { font-family: inherit; outline: none; }
button { cursor: pointer; border: none; }

.container {
    width: 100%;
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

/* ------------------------------------------------------------------
   Header (matches site pattern, simplified)
   ------------------------------------------------------------------ */

.site-header {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-top: 16px;
    padding-bottom: 16px;
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--text-heading);
}

.brand-logo-img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.brand-badge {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-light);
    background: var(--primary-gradient);
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 26px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
}

.nav-link:hover { color: var(--text-heading); }
.nav-link.active { color: var(--primary-color); }

.header-right-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.desktop-auth-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.btn-link {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-body);
    padding: 8px 4px;
}

.btn-link:hover { color: var(--primary-color); }

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--primary-gradient);
    color: #FFFFFF;
    font-weight: 700;
    font-size: 0.92rem;
    padding: 11px 22px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-glow);
    transition: transform var(--transition-base), background var(--transition-base), box-shadow var(--transition-base);
}

.btn-primary:hover {
    background: var(--primary-gradient-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--border-color);
    color: var(--text-body);
    font-weight: 700;
    font-size: 0.92rem;
    padding: 11px 22px;
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    transition: transform var(--transition-base), background var(--transition-base);
}

.btn-secondary:hover {
    background: var(--bg-subtle);
    transform: translateY(-2px);
}

.theme-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-base), border-color var(--transition-base);
}

.theme-toggle-btn:hover { color: var(--primary-color); border-color: var(--primary-color); }

/* ------------------------------------------------------------------
   Pricing hero
   ------------------------------------------------------------------ */

.pricing-hero {
    padding: 72px 0 40px;
    text-align: center;
}

.pricing-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-body);
    margin-bottom: 20px;
}

.pricing-hero h1 {
    font-size: clamp(2rem, 4.5vw, 2.9rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-heading);
    line-height: 1.15;
    margin-bottom: 14px;
}

.pricing-hero h1 span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pricing-hero p {
    font-family: var(--font-body);
    font-size: 1.02rem;
    color: var(--text-muted);
    max-width: 620px;
    margin: 0 auto;
}

/* ------------------------------------------------------------------
   Plan grid
   ------------------------------------------------------------------ */

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding-bottom: 32px;
    align-items: stretch;
}

.plan-card {
    position: relative;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 34px 30px 30px;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.plan-card.plan-featured {
    border: 2px solid transparent;
    background:
        linear-gradient(var(--bg-surface), var(--bg-surface)) padding-box,
        var(--primary-gradient) border-box;
    box-shadow: var(--shadow-glow);
}

.plan-flag {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-gradient);
    color: #FFFFFF;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    white-space: nowrap;
    box-shadow: var(--shadow-glow);
}

.plan-flag.save-flag {
    background: var(--accent-green);
    box-shadow: 0 10px 30px -5px rgba(71, 85, 105, 0.35);
}

.plan-name {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-heading);
    margin-bottom: 4px;
}

.plan-desc {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 22px;
}

.plan-price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 4px;
}

.plan-price {
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-heading);
    line-height: 1;
}

.plan-price-period {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 600;
}

.plan-price-note {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    min-height: 20px;
}

.plan-price-note .strike {
    text-decoration: line-through;
    margin-right: 6px;
}

.plan-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 28px;
    flex-grow: 1;
}

.plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-body);
}

.plan-features li svg {
    flex-shrink: 0;
    margin-top: 3px;
    color: var(--accent-green);
}

.plan-features li.locked svg {
    color: var(--text-muted);
}

.plan-features li.locked {
    color: var(--text-muted);
}

.plan-action-btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 0.98rem;
}

.plan-current-note {
    text-align: center;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--accent-green-dark);
    font-weight: 700;
    padding: 12px 0 2px;
}

[data-theme="dark"] .plan-current-note { color: var(--accent-green); }

/* ------------------------------------------------------------------
   Trust strip
   ------------------------------------------------------------------ */

.billing-trust-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 28px;
    padding: 18px 0 64px;
}

.trust-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
}

.trust-item svg { color: var(--accent-green); }

/* ------------------------------------------------------------------
   Cancelled notice
   ------------------------------------------------------------------ */

.checkout-notice {
    max-width: 620px;
    margin: 0 auto 28px;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-body);
    text-align: center;
    display: none;
}

.checkout-notice.visible { display: block; }

/* ------------------------------------------------------------------
   Footer (matches site pattern, simplified)
   ------------------------------------------------------------------ */

.site-footer {
    background: var(--bg-dark);
    color: var(--text-light);
    margin-top: auto;
    padding: 40px 0 28px;
}

[data-theme="dark"] .site-footer {
    background: #0B1220;
    border-top: 1px solid var(--border-color);
}

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    margin-top: 26px;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--text-light-muted, #94A3B8);
}

/* ------------------------------------------------------------------
   Success page card
   ------------------------------------------------------------------ */

.auth-wrapper {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 72px 24px 80px;
}

.success-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 48px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.success-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--primary-gradient);
}

.success-icon-badge {
    width: 84px;
    height: 84px;
    margin: 0 auto 24px;
    border-radius: var(--radius-full);
    background: var(--primary-gradient);
    box-shadow: var(--shadow-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: checkPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

.checkmark-icon {
    color: #FFFFFF;
    font-size: 40px;
    font-weight: 700;
    line-height: 1;
}

.success-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-heading);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.subtitle {
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 26px;
}

.pro-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 auto 26px;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    background: var(--primary-gradient);
    color: #FFFFFF;
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: var(--shadow-glow);
}

.billing-detail-box {
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px 22px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
}

.billing-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    font-family: var(--font-body);
    font-size: 0.9rem;
}

.billing-detail-row .label { color: var(--text-muted); }
.billing-detail-row .value {
    color: var(--text-heading);
    font-weight: 700;
    text-align: right;
}

.session-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 18px 0 8px;
}

.spinner {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-full);
    border: 4px solid var(--bg-subtle);
    border-top-color: var(--primary-color);
    animation: spin 0.8s linear infinite;
}

.session-loading p {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-muted);
}

.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 26px;
}

.action-buttons.single { grid-template-columns: 1fr; }

/* ------------------------------------------------------------------
   Responsive header (mobile navigation, matches the site pattern)
   ------------------------------------------------------------------ */

/* Desktop defaults */
.mobile-nav-auth {
    display: none;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.mobile-nav-auth .btn-link,
.mobile-nav-auth .btn-primary {
    width: 100%;
    text-align: center;
    padding: 12px;
}

.mobile-menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-muted);
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* ------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------ */

@media (max-width: 900px) {
    .pricing-grid { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
    .plan-card.plan-featured { order: -1; }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }

    .desktop-auth-actions {
        display: none;
    }

    .mobile-nav-auth {
        display: flex;
    }

    .main-nav.mobile-open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 76px;
        left: 0;
        right: 0;
        background: var(--bg-surface);
        padding: 24px;
        box-shadow: var(--shadow-xl);
        border-bottom: 1px solid var(--border-color);
        gap: 16px;
        z-index: 999;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .pricing-hero {
        padding: 48px 0 32px;
    }
}

@media (max-width: 480px) {
    .success-card { padding: 38px 24px; }
    .success-title { font-size: 22px; }
    .action-buttons { grid-template-columns: 1fr; }
}
