:root {
    --primary-color: #4F46E5;
    --primary-hover: #4338CA;
    --secondary-color: #F3F4F6;
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --border-color: #E5E7EB;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --error-color: #EF4444;
    --max-width: 1200px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: #FFFFFF;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: #FFFFFF;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.brand-logo {
    height: 40px;
    width: auto;
    margin-right: 0.75rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    padding: 5rem 0;
    text-align: center;
    background: linear-gradient(135deg, #F5F3FF 0%, #FFFFFF 100%);
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-image {
    max-width: 100%;
    height: auto;
    margin: 2rem auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.cta-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

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

.hero-features {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.feature-tag {
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Features Section */
.features {
    padding: 4rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--secondary-color);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-secondary);
}

/* Pricing Section */
.pricing {
    padding: 4rem 0;
    background: var(--secondary-color);
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.pricing-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    position: relative;
    border: 2px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.pricing-card.popular {
    border-color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.15);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.plan-name {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.plan-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.plan-price span {
    font-size: 1rem;
    color: var(--text-secondary);
}

.plan-description {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.plan-features {
    list-style: none;
    margin-bottom: 2rem;
}

.plan-features li {
    padding: 0.5rem 0;
    color: var(--text-primary);
}

.plan-button {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.plan-button.primary {
    background: var(--primary-color);
    color: white;
}

.plan-button:hover {
    background: var(--primary-color);
    color: white;
}

.plan-button.primary:hover {
    background: var(--primary-hover);
}

/* Subscription Section */
.subscription-section {
    padding: 4rem 0;
    min-height: 60vh;
}

.subscription-section.hidden {
    display: none;
}

.subscription-content {
    max-width: 600px;
    margin: 0 auto;
}

.loading {
    text-align: center;
    padding: 3rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 1s linear infinite;
}

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

.subscription-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.subscription-header {
    text-align: center;
    margin-bottom: 2rem;
}

.subscription-details {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-label {
    font-weight: 600;
}

.detail-value {
    color: var(--text-secondary);
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-badge.active {
    background: #D1FAE5;
    color: #065F46;
}

.status-badge.trialing {
    background: #DBEAFE;
    color: #1E40AF;
}

.status-badge.canceled {
    background: #FEE2E2;
    color: #991B1B;
}

.action-buttons {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
}

.action-button {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.action-button.primary {
    background: var(--primary-color);
    color: white;
}

.action-button.danger {
    background: white;
    color: var(--error-color);
    border: 2px solid var(--error-color);
}

.action-button:hover {
    transform: translateY(-2px);
}

.action-button.primary:hover {
    background: var(--primary-hover);
}

.action-button.danger:hover {
    background: var(--error-color);
    color: white;
}

/* Inline Pricing Cards for Subscription */
.pricing-cards-inline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.pricing-option {
    background: var(--secondary-color);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    position: relative;
    transition: all 0.3s;
}

.pricing-option.recommended {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
}

.recommended-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.option-header h4 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.option-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.option-price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.savings {
    color: #059669;
    font-weight: 600;
    margin-bottom: 1rem;
}

.option-button {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.option-button.primary {
    background: var(--primary-color);
    color: white;
}

.option-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.option-button.primary:hover {
    background: var(--primary-hover);
}

.trial-info {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 1.5rem;
}

/* Payment Success/Error Icons */
.payment-success-icon,
.payment-error-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.payment-success-icon svg {
    animation: scaleIn 0.5s ease-out;
}

.payment-error-icon svg {
    animation: shake 0.5s ease-out;
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.redirect-message {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 1.5rem;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* How It Works */
.how-it-works {
    padding: 4rem 0;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.step {
    text-align: center;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.step h3 {
    margin-bottom: 0.5rem;
}

.step p {
    color: var(--text-secondary);
}

/* Contact Section */
.contact {
    padding: 4rem 0;
    background: var(--secondary-color);
    text-align: center;
}

.contact-text {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.contact-button {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
}

.contact-button:hover {
    background: var(--primary-hover);
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer-links {
    margin-top: 1rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    margin: 0 1rem;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
    }
    
    .hero-features {
        flex-wrap: wrap;
    }
    
    .pricing-card.popular {
        transform: none;
    }
    
    .steps {
        grid-template-columns: 1fr;
    }
}

.hidden {
    display: none !important;
}