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

:root {
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --secondary: #64748b;
    --success: #10b981;
    --background: #f8fafc;
    --surface: #ffffff;
    --border: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.payment-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 480px;
    width: 100%;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.product-header {
    padding: 32px 32px 24px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.product-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.025em;
}

.subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 400;
    margin: 0;
}

/* Product Preview */
.product-preview {
    padding: 24px 32px;
    border-bottom: 1px solid var(--border);
}

.product-image {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.product-image img {
    width: 100%;
    height: auto;
    display: block;
}

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--success);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.025em;
}

/* Features */
.features-section {
    padding: 24px 32px;
    border-bottom: 1px solid var(--border);
}

.feature-item {
    margin-bottom: 24px;
}

.feature-item:last-child {
    margin-bottom: 0;
}

.feature-item h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.feature-item p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.format-note {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Pricing */
.pricing-section {
    padding: 24px 32px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

/* Scoped default (non-minimal) pricing pill */
.pricing-section:not(.pricing-minimal) .price-display {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    padding: 16px 24px;
    border-radius: 50px;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.025em;
    transition: all 0.2s ease;
}

.pricing-section:not(.pricing-minimal) .price-display:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Refactored Minimal Pricing Variant */
.pricing-section.pricing-minimal {
    padding: 20px 32px;
    background: transparent;
}

.pricing-section.pricing-minimal .price-display {
    display: flex;
    align-items: baseline;
    gap: 4px;
    background: none;
    padding: 0;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    color: var(--text-primary);
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.05;
    font-variant-numeric: tabular-nums;
    transition: none;
}

.pricing-section.pricing-minimal .price-display:hover {
    background: none;
    transform: none;
    box-shadow: none;
}

.pricing-section.pricing-minimal .price-currency {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0;
    transform: translateY(-2px);
}

.pricing-section.pricing-minimal .price-amount {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.pricing-section.pricing-minimal .pricing-context {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0;
}

@media (max-width: 480px) {
    .pricing-section.pricing-minimal .price-display {
        font-size: 24px;
    }
    .pricing-section.pricing-minimal .price-amount {
        font-size: 32px;
    }
    .pricing-section.pricing-minimal .price-currency {
        font-size: 14px;
        transform: translateY(-2px);
    }
}

/* Payment Section */
.payment-section {
    padding: 24px 32px;
    border-bottom: 1px solid var(--border);
}

.loading-spinner {
    display: none;
    width: 24px;
    height: 24px;
    border: 2px solid var(--border);
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#paypal-button-container {
    min-height: 48px;
    width: 100%;
}


/* Trust line below PayPal */
.checkout-trust {
    margin-top: 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    line-height: 1.2;
}

.checkout-trust .lock-icon {
    font-size: 14px;
    line-height: 1;
}

/* Trust Indicators */
.trust-indicators {
    padding: 20px 32px;
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.trust-badge {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Error Messages */
.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin: 16px 0;
    font-size: 14px;
    font-weight: 500;
}

/* Success Page Styles */
.success-container {
    max-width: 560px;
}

.success-icon {
    text-align: center;
    margin-bottom: 24px;
    font-size: 48px;
    animation: scaleIn 0.5s ease-out 0.2s both;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.success-message {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--success);
    margin-bottom: 24px;
}

.order-details {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    margin: 24px 32px;
    text-align: center;
}

.order-id .label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.order-id .value {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
    display: inline-block;
}

.download-section {
    padding: 32px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.download-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--primary);
}

.download-button.enhanced {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--success);
    color: white;
    padding: 16px 24px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.download-button.enhanced:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.additional-info {
    padding: 24px 32px;
    border-bottom: 1px solid var(--border);
}

.additional-info h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    text-align: center;
}

.included-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.included-items .item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.included-items .item:hover {
    background: var(--surface);
    transform: translateX(2px);
}

.included-items .icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.support-info {
    padding: 20px 32px;
    background: var(--background);
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
}

/* Minimalist Success Styles */
.minimal-success {
    max-width: 520px;
    padding: 0;
}

.success-header {
    padding: 48px 40px 32px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.success-check {
    margin-bottom: 24px;
}

.success-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.success-header p {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0;
}

.download-section {
    padding: 32px 40px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.download-button.primary {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--primary);
    color: white;
    padding: 16px 32px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    min-width: 200px;
    justify-content: center;
}

.download-button.primary:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.package-contents {
    padding: 32px 40px;
    border-bottom: 1px solid var(--border);
}

.package-contents h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-align: center;
}

.content-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.content-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--background);
    border-radius: var(--radius-md);
    font-size: 15px;
    color: var(--text-primary);
}

.item-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.next-steps {
    padding: 32px 40px;
    border-bottom: 1px solid var(--border);
}

.next-steps h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-align: center;
}

.steps-list {
    list-style: none;
    counter-reset: step-counter;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.steps-list li {
    counter-increment: step-counter;
    padding: 16px 20px;
    background: var(--background);
    border-radius: var(--radius-md);
    font-size: 15px;
    color: var(--text-primary);
    position: relative;
    padding-left: 60px;
}

.steps-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.support-section {
    padding: 32px 40px;
    text-align: center;
}

.support-section p {
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

.support-section p:last-child {
    margin-bottom: 0;
}

.support-section a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.support-section a:hover {
    text-decoration: underline;
}

/* Minimalist Cancel Styles */
.minimal-cancel {
    max-width: 440px;
}

.cancel-header {
    padding: 48px 40px 32px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.cancel-icon {
    margin-bottom: 24px;
}

.cancel-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.cancel-header p {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0;
}

.action-section {
    padding: 32px 40px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.link-secondary {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.link-secondary:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.help-section {
    padding: 24px 40px;
    text-align: center;
}

.help-section p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

.help-section a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.help-section a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 16px;
    }
    
    .payment-container {
        max-width: 100%;
    }
    
    .product-header,
    .product-preview,
    .features-section,
    .pricing-section,
    .payment-section {
        padding-left: 24px;
        padding-right: 24px;
    }
    
    .product-header h1 {
        font-size: 20px;
    }
    
    .trust-indicators {
        padding: 16px 24px;
        gap: 12px;
    }
    
    .trust-badge {
        font-size: 11px;
    }
    
    .order-details {
        margin: 24px 24px;
    }
    
    .download-section,
    .additional-info {
        padding: 24px;
    }

    .success-header,
    .download-section,
    .package-contents,
    .next-steps,
    .support-section,
    .cancel-header,
    .action-section,
    .help-section {
        padding-left: 32px;
        padding-right: 32px;
    }
}

@media (max-width: 480px) {
    .product-header,
    .product-preview,
    .features-section,
    .pricing-section,
    .payment-section {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .trust-indicators {
        flex-direction: column;
        gap: 8px;
        padding: 16px 20px;
    }
    
    .price-display {
        font-size: 18px;
        padding: 14px 20px;
    }

    .success-header,
    .download-section,
    .package-contents,
    .next-steps,
    .support-section,
    .cancel-header,
    .action-section,
    .help-section {
        padding-left: 24px;
        padding-right: 24px;
    }
    
    .success-header h1,
    .cancel-header h1 {
        font-size: 24px;
    }
    
    .download-button.primary {
        width: 100%;
        padding: 18px 24px;
    }
    
    .steps-list li {
        padding-left: 56px;
    }
    
    .paypal-shell {
        padding: 12px 14px;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* PayPal button styling */
#paypal-button-container iframe {
    border-radius: var(--radius-md) !important;
}

/* ...existing code for other specialized styles... */