/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Mobile Tap Fixes */
a, button {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

:root {
    /* Colors */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    
    /* Background */
    --bg-primary: #0f0f23;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #16213e;
    --bg-card: #1e1e3f;
    --bg-input: #2a2a4a;
    
    /* Text */
    --text-primary: #ffffff;
    --text-secondary: #e2e8f0;
    --text-muted: #94a3b8;
    
    /* Navbar heights */
    --nav-h-mobile: 64px;
    --nav-h-desktop: 72px;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    
    /* Shadows */
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
    
    /* Spacing */
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Border Radius */
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    
    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 50;
    height: var(--nav-h-desktop);
    display: flex;
    align-items: center;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-brand i {
    color: var(--primary);
    font-size: 1.75rem;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
    flex-shrink: 0;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
    white-space: nowrap;
    flex-shrink: 0;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition-fast);
}

.nav-link:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: radial-gradient(ellipse at top, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
                radial-gradient(ellipse at bottom, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    position: relative;
    overflow: hidden;
    padding-top: var(--nav-h-desktop);
    z-index: 0;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
    text-align: center;
}

.gradient-text {
    color: var(--primary);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    /* Fallback for browsers that don't support background-clip */
    @supports not (-webkit-background-clip: text) {
        color: var(--primary);
        -webkit-text-fill-color: initial;
    }
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-2xl);
    line-height: 1.7;
    text-align: center;
}

.hero-stats {
    display: flex;
    gap: var(--space-2xl);
    justify-content: center;
    align-items: center;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--space-sm);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Hero CTA */
.hero-cta {
    margin-top: var(--space-2xl);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.btn-large {
    padding: var(--space-lg) var(--space-3xl);
    font-size: 1.125rem;
    font-weight: 700;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl), 0 0 30px rgba(99, 102, 241, 0.3);
    transition: var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: var(--space-md);
}

.btn-large:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl), 0 0 40px rgba(99, 102, 241, 0.4);
}

.cta-subtext {
    margin-top: var(--space-md);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Responsive CTA Button */
.cta-responsive {
    width: 100%;
    max-width: 320px;
}

@media (min-width: 640px) {
    .cta-responsive {
        width: auto;
        max-width: none;
    }
}

/* CTA Subtext alignment */
.hero-cta .cta-subtext {
    margin-top: var(--space-md);
    text-align: center;
}

/* Secondary CTA */
.cta-secondary {
    margin-top: var(--space-md);
}

/* Hero Visual */
.hero-visual {
    position: relative;
    height: 400px;
    pointer-events: none;
    z-index: 1;
}

.floating-card {
    position: absolute;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-xl);
    animation: float 6s ease-in-out infinite;
    text-align: center;
    min-width: 140px;
    pointer-events: auto;
    z-index: 2;
}

.floating-card i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: var(--space-xs);
}

.floating-card span {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    text-align: center;
    line-height: 1.2;
}

.card-1 {
    top: 20%;
    left: calc(50% - 100px);
    animation-delay: 0s;
}

.card-1 i {
    color: #e4405f;
}

.card-2 {
    top: 10%;
    right: 8%;
    animation-delay: 1.2s;
}

.card-2 i {
    color: #1da1f2;
}

.card-3 {
    top: 25%;
    left: 5%;
    animation-delay: 2.8s;
}

.card-3 i {
    color: #0077b5;
}

.card-4 {
    top: 25%;
    right: 5%;
    animation-delay: 3.5s;
}

.card-4 i {
    color: #1877f2;
}

.card-5 {
    bottom: 15%;
    left: 8%;
    animation-delay: 4.2s;
}

.card-5 i {
    color: #000000;
}

.card-6 {
    bottom: 15%;
    right: 8%;
    animation-delay: 5.1s;
}

.card-6 i {
    color: #ff0000;
}

.card-7 {
    top: 10%;
    left: 8%;
    animation-delay: 2.1s;
}

.card-7 i {
    color: #e60023;
}

/* Platform-specific colors */
.platform-option:nth-child(1) .platform-icon i { color: #e4405f; } /* Instagram */
.platform-option:nth-child(2) .platform-icon i { color: #1da1f2; } /* Twitter */
.platform-option:nth-child(3) .platform-icon i { color: #0077b5; } /* LinkedIn */
.platform-option:nth-child(4) .platform-icon i { color: #1877f2; } /* Facebook */
.platform-option:nth-child(5) .platform-icon i { color: #000000; } /* TikTok */
.platform-option:nth-child(6) .platform-icon i { color: #ff0000; } /* YouTube */
.platform-option:nth-child(7) .platform-icon i { color: #e60023; } /* Pinterest */

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) translateX(0px); 
    }
    25% { 
        transform: translateY(-15px) translateX(8px); 
    }
    50% { 
        transform: translateY(-30px) translateX(-5px); 
    }
    75% { 
        transform: translateY(-15px) translateX(-8px); 
    }
}

@keyframes float-mobile {
    0%, 100% { 
        transform: translateY(0px); 
    }
    50% { 
        transform: translateY(-15px); 
    }
}

@keyframes float-mobile-1 {
    0%, 100% { 
        transform: translate(0px, 0px); 
    }
    25% { 
        transform: translate(8px, -10px); 
    }
    50% { 
        transform: translate(-5px, -15px); 
    }
    75% { 
        transform: translate(-8px, -5px); 
    }
}

@keyframes float-mobile-2 {
    0%, 100% { 
        transform: translate(0px, 0px); 
    }
    25% { 
        transform: translate(-10px, 8px); 
    }
    50% { 
        transform: translate(-15px, -5px); 
    }
    75% { 
        transform: translate(-8px, 10px); 
    }
}

@keyframes float-mobile-3 {
    0%, 100% { 
        transform: translate(0px, 0px); 
    }
    25% { 
        transform: translate(12px, 5px); 
    }
    50% { 
        transform: translate(8px, -12px); 
    }
    75% { 
        transform: translate(-6px, -8px); 
    }
}

@keyframes float-mobile-4 {
    0%, 100% { 
        transform: translate(0px, 0px); 
    }
    25% { 
        transform: translate(-6px, -12px); 
    }
    50% { 
        transform: translate(10px, -8px); 
    }
    75% { 
        transform: translate(8px, 6px); 
    }
}

@keyframes float-mobile-5 {
    0%, 100% { 
        transform: translate(0px, 0px); 
    }
    25% { 
        transform: translate(5px, 10px); 
    }
    50% { 
        transform: translate(-12px, 8px); 
    }
    75% { 
        transform: translate(-8px, -10px); 
    }
}

@keyframes float-mobile-6 {
    0%, 100% { 
        transform: translate(0px, 0px); 
    }
    25% { 
        transform: translate(-8px, -8px); 
    }
    50% { 
        transform: translate(6px, -10px); 
    }
    75% { 
        transform: translate(12px, 5px); 
    }
}

@keyframes float-mobile-7 {
    0%, 100% { 
        transform: translate(0px, 0px); 
    }
    25% { 
        transform: translate(-10px, 6px); 
    }
    50% { 
        transform: translate(8px, 12px); 
    }
    75% { 
        transform: translate(-5px, -6px); 
    }
}


/* Main Content */
.main-content {
    padding: var(--space-3xl) 0;
}

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

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Generator Form */
.generator-section {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-2xl);
    padding: var(--space-3xl);
    margin-bottom: var(--space-3xl);
    box-shadow: var(--shadow-xl);
}

.generator-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.form-container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 0;
}

@media (min-width: 1280px) {
    .form-container {
        max-width: 1200px;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.form-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.form-label i {
    color: var(--primary);
    width: 20px;
}

.form-textarea {
    background: var(--bg-input);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
    transition: var(--transition-fast);
}

.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-textarea::placeholder {
    color: var(--text-muted);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: start;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
}

.form-select {
    background: var(--bg-input);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition-fast);
}

.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Platform Selector */
.platform-selector {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

/* Responsive Platform Grid */
.platform-grid-responsive {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

@media (min-width: 640px) {
    .platform-grid-responsive {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .platform-grid-responsive {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .platform-grid-responsive {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1280px) {
    .platform-grid-responsive {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--space-lg);
    }
    
    .platform-option {
        min-height: 64px;
        padding: var(--space-lg);
    }
}

@media (max-width: 639px) {
    .platform-option {
        min-height: 50px;
        padding: var(--space-sm);
        gap: var(--space-sm);
    }
    
    .platform-option .platform-icon i {
        font-size: 1.2rem;
    }
    
    .platform-option .platform-name {
        font-size: 0.875rem;
    }
}

.platform-option {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-input);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition-fast);
    width: 100%;
    min-height: 60px;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.platform-option:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.platform-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    flex-shrink: 0;
}


.platform-icon {
    flex-shrink: 0;
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.platform-icon i {
    font-size: 1.5rem;
}

.platform-name {
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

/* Image Upload */
.image-upload-area {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    text-align: center;
    cursor: pointer;
    transition: var(--transition-fast);
    background: var(--bg-input);
    width: 100%;
    box-sizing: border-box;
}

.image-upload-area:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

@media (max-width: 768px) {
    .image-upload-area {
        padding: var(--space-xl);
    }
}

@media (max-width: 480px) {
    .image-upload-area {
        padding: var(--space-lg);
    }
}

.upload-content i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: var(--space-md);
}

.upload-content p {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.upload-content small {
    color: var(--text-muted);
}

.image-preview {
    position: relative;
    display: none;
    margin-top: var(--space-md);
}

.image-preview.show {
    display: block;
}

.image-preview img {
    width: 100%;
    max-width: 300px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.remove-image {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    background: var(--error);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.remove-image:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* Input Hint */
.input-hint {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.input-hint i {
    color: var(--primary);
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: var(--space-lg);
    justify-content: center;
    margin-top: var(--space-xl);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg) var(--space-2xl);
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-outline:hover:not(:disabled) {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.15);
}

.btn-loading {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.btn.loading .btn-loading {
    display: block;
}

.btn.loading span {
    opacity: 0;
}

/* Results Section */
.results-section {
    margin-top: var(--space-3xl);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-xl);
}

.result-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-lg);
    transition: var(--transition-fast);
}

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

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.platform-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 600;
    color: var(--text-primary);
}

.platform-info i {
    font-size: 1.5rem;
}

.copy-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.copy-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.result-content {
    color: var(--text-secondary);
    line-height: 1.7;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.result-content:empty::before {
    content: 'No content generated for this platform.';
    color: var(--text-muted);
    font-style: italic;
}

/* How It Works Section */
.how-it-works-section {
    background: var(--bg-primary);
    padding: var(--space-3xl) 0;
    position: relative;
    overflow: hidden;
}

.how-it-works-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

.steps-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xl);
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.step-card {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-2xl);
    padding: var(--space-2xl);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.step-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
    transition: var(--transition-normal);
    pointer-events: none;
    z-index: 1;
}

.step-card:hover::before {
    left: 100%;
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl), 0 0 30px rgba(99, 102, 241, 0.2);
    border-color: var(--primary);
}

.step-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    min-width: 80px;
    text-align: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.step-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-normal);
}

.step-card:hover .step-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-xl), 0 0 20px rgba(99, 102, 241, 0.4);
}

.step-content {
    flex: 1;
}

.step-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.step-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 1rem;
}

.step-arrow {
    width: 60px;
    height: 60px;
    background: var(--bg-input);
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
    transition: var(--transition-normal);
}

.step-card:hover .step-arrow {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.step-card:last-child .step-arrow {
    display: none;
}

/* Demo Section */
.demo-section {
    background: var(--bg-secondary);
    padding: var(--space-3xl) 0;
}

.demo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-xl);
    margin-top: var(--space-2xl);
}

.demo-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.demo-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.demo-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.demo-header i {
    font-size: 1.5rem;
}

.demo-header span {
    font-weight: 600;
    color: var(--text-primary);
}

.instagram-demo .demo-header i { color: #e4405f; }
.twitter-demo .demo-header i { color: #1da1f2; }
.linkedin-demo .demo-header i { color: #0077b5; }

.demo-caption {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.9rem;
    margin-bottom: var(--space-md);
    white-space: pre-line;
}

.demo-caption:last-child {
    margin-bottom: 0;
}

/* Social Proof Section */
.social-proof-section {
    background: var(--bg-primary);
    padding: var(--space-3xl) 0;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
    margin: var(--space-2xl) 0;
}

.testimonial-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    transition: var(--transition-normal);
}

.testimonial-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.testimonial-content {
    margin-bottom: var(--space-lg);
}

.testimonial-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-style: italic;
    font-size: 1rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.author-avatar {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.125rem;
}

.author-info h4 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.author-info span {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.brands-logos {
    text-align: center;
    margin-top: var(--space-3xl);
    padding-top: var(--space-2xl);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.brands-logos h3 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: var(--space-xl);
}

.logos-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-2xl);
    flex-wrap: wrap;
}

.logo-item {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    opacity: 0.7;
    transition: var(--transition-fast);
}

.logo-item:hover {
    opacity: 1;
    color: var(--primary);
}

/* Features Section */
.features-section {
    background: var(--bg-secondary);
    padding: var(--space-3xl) 0;
    margin-top: var(--space-3xl);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    text-align: center;
    transition: var(--transition-fast);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-lg);
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

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

/* Footer */
.footer {
    background: var(--bg-tertiary);
    padding: var(--space-2xl) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-brand i {
    color: var(--primary);
}

.footer p {
    color: var(--text-muted);
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--success);
    color: white;
    padding: var(--space-md) var(--space-lg);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: translateX(400px);
    transition: var(--transition-normal);
    z-index: 80;
    display: none;
    pointer-events: none;
    max-width: 320px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast.show {
    display: block;
    transform: translateX(0);
    pointer-events: none;
}

.toast-error-container {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid rgba(239, 68, 68, 0.3);
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.2), 0 0 20px rgba(239, 68, 68, 0.1);
    max-width: 380px;
}

.toast-card {
    pointer-events: auto;
    cursor: pointer;
}

.toast-card.toast-error {
    background: transparent;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.toast-content i {
    font-size: 1.25rem;
}

.toast-message {
    font-weight: 500;
}

/* Insufficient Credits Toast - Special Styling */
.toast-insufficient-credits {
    padding: 0;
}

.toast-content-insufficient {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-lg);
    align-items: flex-start;
}

.toast-content-insufficient > i {
    font-size: 1.5rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.toast-message-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.toast-message-detailed {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    font-size: 0.9rem;
}

.credits-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-xs) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.credits-info:last-of-type {
    border-bottom: none;
}

.credits-label {
    color: var(--text-muted);
    font-weight: 500;
}

.credits-value {
    font-weight: 700;
    font-size: 1rem;
}

.credits-needed {
    color: var(--error);
}

.credits-remaining {
    color: var(--warning);
}

.credits-action {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-top: var(--space-sm);
    padding: var(--space-sm);
    background: rgba(99, 102, 241, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
}

.credits-action i {
    font-size: 0.75rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: translateX(0);
    }
    50% {
        opacity: 0.7;
        transform: translateX(3px);
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
        text-align: center;
    }
    
    .hero-content {
        max-width: 100%;
        width: 100%;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    /* Form row is now handled above in the main CSS */
    
    .results-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile Menu Styles */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 51;
}

.hamburger-line {
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition-fast);
    transform-origin: center;
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(15, 15, 35, 0.98);
    backdrop-filter: blur(20px);
    z-index: 60;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    padding-top: 80px;
    display: none;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    aria-hidden: true;
}

.mobile-menu.is-open {
    display: block;
    transform: translateX(0);
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
    aria-hidden: false;
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: var(--space-2xl);
    gap: var(--space-xl);
}

.mobile-nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 600;
    padding: var(--space-md);
    border-radius: var(--radius-lg);
    transition: var(--transition-fast);
    text-align: center;
    width: 100%;
    max-width: 300px;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Body scroll lock when menu is open */
body.menu-open {
    overflow: hidden;
}

/* Mobile fixed navbar with scroll shadow */
@media (max-width: 768px) {
    .navbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: rgba(15, 15, 35, 0.98);
        backdrop-filter: blur(20px);
        z-index: 50;
        height: var(--nav-h-mobile);
        transition: box-shadow 0.3s ease;
    }
    
    .navbar.scrolled {
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    }
    
    .hero {
        padding-top: calc(var(--nav-h-mobile) + 12px + env(safe-area-inset-top));
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hero-title {
        /* Use clamp for responsive sizing - override inline style for mobile */
        font-size: clamp(1.5rem, 6vw, 2rem) !important;
        line-height: 1.2;
        margin-bottom: var(--space-md);
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: var(--space-lg);
    }
    
    .hero-stats {
        justify-content: center;
        gap: var(--space-lg);
    }
    
    .generator-section {
        padding: var(--space-xl);
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .floating-card {
        position: absolute;
        margin: 0;
        width: 120px;
        min-width: 120px;
        font-size: 0.875rem;
        padding: var(--space-md);
    }
    
    .floating-card i {
        font-size: 2rem;
    }
    
    .floating-card span {
        font-size: 0.75rem;
        text-align: center;
    }
    
    /* How It Works Mobile */
    .step-card {
        flex-direction: column;
        text-align: center;
        gap: var(--space-lg);
        padding: var(--space-xl);
    }
    
    .step-number {
        font-size: 2.5rem;
        min-width: auto;
    }
    
    .step-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .step-arrow {
        display: none;
    }
    
    .hero-visual {
        position: relative;
        height: 400px;
        display: block;
        padding: var(--space-xl);
    }
    
    /* Mobile-specific card positioning with unique animations */
    .card-1 { 
        top: 20%; 
        left: 50%; 
        transform: translateX(-50%);
        animation: float-mobile-1 7s ease-in-out infinite;
    }
    .card-2 { 
        top: 8%; 
        right: 5%; 
        animation: float-mobile-2 8s ease-in-out infinite;
    }
    .card-3 { 
        top: 28%; 
        left: 5%; 
        animation: float-mobile-3 6s ease-in-out infinite;
    }
    .card-4 { 
        top: 28%; 
        right: 5%; 
        animation: float-mobile-4 9s ease-in-out infinite;
    }
    .card-5 { 
        bottom: 12%; 
        left: 5%; 
        animation: float-mobile-5 7.5s ease-in-out infinite;
    }
    .card-6 { 
        bottom: 12%; 
        right: 5%; 
        animation: float-mobile-6 6.5s ease-in-out infinite;
    }
    .card-7 { 
        top: 8%; 
        left: 5%; 
        animation: float-mobile-7 8.5s ease-in-out infinite;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-md);
    }
    
    .generator-section {
        padding: var(--space-lg);
    }
    
    .hero-title {
        /* Use clamp for very small screens */
        font-size: clamp(1.25rem, 5vw, 1.75rem) !important;
        line-height: 1.1;
        margin-bottom: var(--space-sm);
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: var(--space-md);
    }
    
    .hero-stats {
        gap: var(--space-md);
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero-container {
        padding: var(--space-md) 0;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
}

/* Loading Animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.fa-spin {
    animation: spin 1s linear infinite;
}

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

/* Pricing Hero Section */
.pricing-hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    text-align: center;
}

.pricing-header {
    max-width: 600px;
    margin: 0 auto;
}

.pricing-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    line-height: 1.1;
}

.pricing-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    line-height: 1.6;
}

/* Billing Toggle */
.billing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.billing-option {
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 8px;
    background: transparent;
}

.billing-option.active {
    color: white;
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.toggle-switch {
    position: relative;
    width: 60px;
    height: 32px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch label {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 32px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.toggle-switch label:before {
    content: '';
    position: absolute;
    height: 24px;
    width: 24px;
    left: 2px;
    bottom: 2px;
    background: var(--primary);
    border-radius: 50%;
    transition: var(--transition-fast);
}

.toggle-switch input:checked + label {
    background: var(--primary);
    border-color: var(--primary);
}

.toggle-switch input:checked + label:before {
    transform: translateX(28px);
}

/* Pricing Section */
.pricing-section {
    padding: 80px 0;
    background: var(--bg-primary);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    /* Ensure all cards stretch to equal height */
    align-items: stretch;
}

/* Pricing Cards */
.pricing-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: var(--space-xl);
    text-align: center;
    position: relative;
    transition: var(--transition-fast);
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Ensure consistent alignment for all cards */
    align-items: center;
    /* Uniform height for consistent visual balance */
    min-height: 520px;
}

.pricing-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.pricing-card.featured {
    border: 2px solid #9b6bff;
    transform: scale(1.03);
    box-shadow: 0 0 25px rgba(120, 90, 255, 0.4);
    /* Z-index layering: featured card above regular cards */
    z-index: 10;
    position: relative;
}

.pricing-card.featured:hover {
    transform: scale(1.03) translateY(-4px);
    box-shadow: 0 0 30px rgba(120, 90, 255, 0.5);
}

/* Enhanced CTA for Most Popular card */
.pricing-card.featured .plan-cta {
    background: linear-gradient(135deg, #9b6bff 0%, #7c3aed 100%);
    box-shadow: 0 4px 16px rgba(120, 90, 255, 0.4);
    font-weight: 600;
}

.pricing-card.featured .plan-cta:hover {
    background: linear-gradient(135deg, #a67dff 0%, #8b4ced 100%);
    box-shadow: 0 6px 20px rgba(120, 90, 255, 0.5);
    transform: translateY(-2px);
}

.plan-badge {
    /* Perfect centering above the featured card */
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    /* Z-index layering: badge above featured card */
    z-index: 20;
    /* Styling */
    background: linear-gradient(135deg, #9b6bff 0%, #7c3aed 100%);
    color: white;
    padding: 8px 24px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(120, 90, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    /* Prevent blocking clicks */
    pointer-events: none;
}

/* Legacy classes - now handled by new structure */
.plan-header {
    margin-bottom: var(--space-lg);
    width: 100%;
}

.plan-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

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

.plan-price {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
    width: 100%;
}

/* Override legacy styles for new structure */
.pricing-card .plan-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px 0;
    flex-shrink: 0; /* Prevent title from shrinking */
}

.pricing-card .plan-sub {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
    line-height: 1.4;
    text-align: center;
    flex-shrink: 0; /* Prevent subtitle from shrinking */
    
    /* Force 2-line maximum - SIMPLE AND AGGRESSIVE */
    max-height: 2.8em; /* 2 lines × 1.4 line-height = 2.8em */
    overflow: hidden;
    display: block;
}

.plan-total-year {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-align: center;
    margin-top: 0.5rem;
    margin-bottom: 0;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, max-height 0.3s ease, margin 0.3s ease;
    width: 100%;
}

.plan-total-year.is-visible {
    opacity: 1;
    max-height: 30px;
    margin-bottom: 0.5rem;
}

.plan-credits {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: var(--space-xl);
    margin-top: 0.5rem;
    text-align: center;
    opacity: 0.8;
    width: 100%;
}

.price-currency {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-secondary);
    vertical-align: top;
}

.price-amount {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    transition: opacity 0.15s ease;
}

.price-period {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.plan-features {
    flex-grow: 1;
    margin-bottom: var(--space-xl);
    width: 100%;
}

.plan-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.plan-features i {
    color: var(--success);
    font-size: 0.875rem;
    flex-shrink: 0;
}

/* CTA wrapper for proper centering */
.pricing-card__cta {
    width: 100%;
    margin-top: auto;
    /* Ensure wrapper doesn't interfere with button positioning */
}

.plan-cta {
    width: 100%;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 70;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-fast);
    padding: var(--space-lg);
    pointer-events: none;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 16px;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: var(--transition-fast);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-xl) var(--space-xl) 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: var(--space-lg);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--space-sm);
    border-radius: 8px;
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-body {
    padding: 0 var(--space-xl) var(--space-xl);
}

.modal-description {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    line-height: 1.6;
}

.modal-description span {
    color: var(--primary);
    font-weight: 600;
}

.waitlist-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.form-group label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-group input {
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition-fast);
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}


/* Body scroll lock when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Pricing Mobile Responsive */
@media (max-width: 768px) {
    .pricing-hero {
        padding: calc(var(--nav-h-mobile) + 40px) 0 60px;
    }
    
    .pricing-grid {
        /* Mobile: single column, centered cards with consistent spacing */
        grid-template-columns: 1fr;
        gap: 24px;
        max-width: 400px;
        margin: 0 auto;
        /* Center cards horizontally */
        justify-items: center;
    }
    
    .pricing-card {
        /* Ensure cards are fully centered on mobile */
        width: 100%;
        max-width: 400px;
        /* Symmetric padding to prevent left/right offset */
        padding-inline: 16px;
        box-sizing: border-box;
        /* Remove min-height on mobile for natural stacking */
        min-height: auto;
    }
    
    .pricing-card.featured {
        /* Subtle scale on mobile, maintain border and badge centering */
        transform: scale(1.01);
        border: 2px solid #9b6bff;
    }
    
    .pricing-card.featured:hover {
        transform: scale(1.01) translateY(-4px);
    }
    
    .plan-badge {
        /* Ensure badge stays centered on mobile */
        left: 50%;
        transform: translateX(-50%);
    }
    
    /* Mobile: Perfect CTA centering for all pricing cards */
    .pricing-card__cta {
        /* Flexbox centering wrapper - centers button horizontally */
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        text-align: center;
        /* Remove any inherited padding that could offset centering */
        padding-inline: 0 !important;
        /* Maintain vertical spacing from features */
        margin-top: 20px;
        /* Override any parent alignment that pulls button left */
        align-self: center;
    }
    
    .pricing-card__cta .plan-cta,
    .pricing-card__cta .btn,
    .pricing-card__cta .btn-primary {
        /* Button styling for perfect centering on iOS/Safari */
        display: inline-flex;
        justify-content: center;
        align-items: center;
        /* Fixed max-width for consistent visual appearance */
        width: 100%;
        max-width: 320px;
        /* Auto margins for centering within wrapper */
        margin: 0 auto !important;
        /* Clear any transforms/positioning that could offset button */
        transform: none !important;
        left: auto !important;
        right: auto !important;
    }
    
    /* Ensure card body doesn't pull CTA left */
    .pricing-card .card-body {
        align-items: stretch;
    }
    
    .modal-content {
        margin: var(--space-md);
        max-width: none;
    }
    
    .toast {
        top: 10px;
        right: 10px;
        left: 10px;
        transform: translateY(-100px);
        max-width: none;
    }
    
    .toast.show {
        transform: translateY(0);
    }
}

/* Desktop: Perfect badge centering and card alignment */
@media (min-width: 1024px) {
    .pricing-grid {
        /* Desktop: 4-column grid with consistent alignment */
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
        align-items: stretch;
    }
    
    .plan-badge {
        /* Desktop: Ensure badge is perfectly centered above featured card */
        position: absolute;
        top: -12px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 20;
    }
}

/* ---------- PRICING SYMMETRY FIX ---------- */
:root {
    --subtitle-min-h: 60px;      /* same space for all subtitles (fits 3 lines) */
    --price-min-h: 120px;        /* same space for price + billed + total */
    --features-gap-top: 16px;    /* space between price block and features */
}

/* Ensure card flexbox structure */
.pricing-card .card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 1) Titles/Subtitles - Fixed min-height for alignment */
.pricing-card .plan-name {
    margin: 0 0 8px 0;
}

.pricing-card .subtitle {
    min-height: 60px; /* Force consistent height for 3-line descriptions */
    display: flex;
    align-items: center;
    text-align: center;
    margin: 0;
    justify-content: center;
    line-height: 1.4;
}

/* 2) Price block - Fixed min-height keeps alignment even when billed note hidden */
.pricing-card .price-section {
    min-height: var(--price-min-h);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-top: var(--space-lg);
}

.pricing-card .price-section .price-line {
    display: flex;
    align-items: baseline;
    gap: 4px;
    justify-content: center;
}

.pricing-card .price-section .currency {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-secondary);
    vertical-align: top;
}

.pricing-card .price-section .price {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    transition: opacity 0.15s ease;
}

.pricing-card .price-section .per {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.pricing-card .price-section .billed-note,
.pricing-card .price-section .price-total {
    margin: 4px 0 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.pricing-card .price-section .billed-note {
    display: none; /* Hidden by default (Monthly mode) */
}

.pricing-card .price-section .price-total {
    display: none; /* Hidden by default (Monthly mode) */
}

/* 3) Features start at same vertical baseline across cards */
.pricing-card .features {
    margin-top: var(--features-gap-top);
    list-style: none;
    padding: 0;
    text-align: left;
}

.pricing-card .features li {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.pricing-card .features li i {
    color: var(--success);
    font-size: 0.875rem;
    flex-shrink: 0;
}

/* 4) CTA wrapper - Pushes to bottom and centers */
.pricing-card .pricing-card__cta {
    margin-top: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    text-align: center;
}

.pricing-card .pricing-card__cta .plan-cta {
    display: inline-flex;
    margin-inline: auto;
    width: 100%;
    max-width: 100%;
}

/* 5) Responsive tuning for mobile */
@media (max-width: 768px) {
    :root {
        --subtitle-min-h: 60px; /* Keep same height on mobile for 3-line descriptions */
        --price-min-h: 108px;
    }
    
    .pricing-card .plan-sub,
    .pricing-card .subtitle {
        font-size: 0.95rem;
        /* Force 2-line maximum on mobile - SIMPLE */
        max-height: 2.66em; /* 2 lines × 1.4 line-height × 0.95rem */
        overflow: hidden;
        display: block;
    }
    
    .pricing-card .pricing-card__cta .plan-cta {
        max-width: 420px;
    }
}

/* === FINAL PRICING ALIGNMENT POLISH === */

/* Price section height normalization - Override for perfect alignment */
.price-section {
    min-height: 130px !important; /* equal height for all cards */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Small text adjustments */
.price-section .billed-note,
.price-section .price-total {
    margin-top: 6px;
    opacity: 0.85;
    font-size: 0.85rem;
    line-height: 1.3;
}

/* Make sure features start at the same height */
.features {
    margin-top: 20px !important;
}

/* CTA alignment refinement */
.pricing-card__cta {
    margin-top: auto;
    padding-top: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.plan-cta {
    width: 100%;
    max-width: 240px;
}

/* Mobile optimization */
@media (max-width: 768px) {
    .price-section {
        min-height: 120px !important;
    }
    .plan-cta {
        max-width: 320px;
    }
}

/* ---------- ABSOLUTE PRICING SYMMETRY WITH FLEXBOX ---------- */
.pricing-card {
    display: flex !important;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    /* Ensure consistent height and alignment */
    height: 100%;
}

/* Override any legacy wrapper styles */
.pricing-card .card-body {
    display: contents; /* Remove any wrapper styling that could interfere */
}

/* Tabular nums for perfect number alignment */
.pricing-card, .price-row, .price-amount {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1, "lnum" 1;
}

/* PRICE BLOCK - Perfect baseline alignment */
.pricing-card .price-block {
    display: grid !important;
    grid-template-rows: auto auto auto; /* price-row, price-note, total-annual */
    gap: 8px;
    align-items: start;
    justify-items: center;
    width: 100%;
    flex-shrink: 0; /* Prevent price block from shrinking */
}

.pricing-card .price-row {
    display: flex !important;
    justify-content: center; /* Horizontally center */
    align-items: center;     /* Vertically center - THE KEY FIX */
    min-height: 65px;        /* Force a consistent height for the container - THE KEY FIX */
    gap: 10px;
    line-height: 1;
    width: 100%;
}

.pricing-card .price-row .currency {
    font-size: clamp(18px, 1.4vw, 20px) !important;
    opacity: .9;
    transform: translateY(2px);
    line-height: 1;
}

.pricing-card .price-row .price-amount {
    font-size: clamp(44px, 5.5vw, 56px) !important;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1;
}

.pricing-card .price-row .price-unit {
    font-size: clamp(14px, 1.4vw, 16px) !important;
    opacity: .85;
    line-height: 1;
}

.pricing-card .price-note {
    font-size: 12px !important;
    opacity: .85;
    min-height: 1em; /* keeps space even if hidden */
    transition: opacity 0.3s ease, visibility 0.3s ease;
    width: 100%;
    text-align: center;
}

.pricing-card .price-total-annual {
    font-size: 13px !important;
    color: var(--success);
    font-weight: 600;
    opacity: 0; /* Hidden by default */
    max-height: 0; /* Collapsed by default */
    overflow: hidden;
    margin-top: 8px;
    padding: 6px 16px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0.12) 100%);
    border-radius: 20px;
    border: 1px solid rgba(16, 185, 129, 0.2);
    transition: opacity 0.4s ease, max-height 0.4s ease, transform 0.4s ease;
    width: auto;
    text-align: center;
    display: inline-block;
    transform: translateY(-10px);
}

/* When the yearly view is active, reveal the element with beautiful animation */
.yearly-view-active .pricing-card .price-total-annual {
    opacity: 1;
    max-height: 40px; /* Increased for padding */
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}

/* Icon styling inside total annual */
.pricing-card .price-total-annual i {
    font-size: 12px;
    margin-right: 6px;
    color: var(--success);
}

/* FEATURES with equal height across cards - THE FINAL FIX */
.pricing-card .features {
    display: grid;
    gap: 10px;
    align-content: start;
    min-height: var(--features-min-h, auto); /* set by JS */
    /* THE KEY: Absorb extra space and push CTA to bottom */
    flex-grow: 1;
    /* Creates stable buffer zone that absorbs description height differences */
}

/* Features list item alignment */
.features li {
    display: grid;
    grid-template-columns: 18px 1fr;
    align-items: start;
    column-gap: 10px;
}

/* CTA centered and pushed to bottom */
.pricing-card .pricing-card__cta {
    display: flex !important;
    justify-content: center;
    align-items: center;
    margin-top: auto; /* Pushes to bottom in flex container */
    flex-shrink: 0; /* Prevents CTA from shrinking */
}

.pricing-card .pricing-card__cta .plan-cta {
    display: inline-flex;
    justify-content: center;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .pricing-card { 
        gap: 14px; 
        padding: 20px; 
    }

    .price-row .price-amount { 
        font-size: clamp(36px, 9vw, 48px); 
    }
    
    .price-row .price-unit { 
        font-size: 14px; 
    }
}
