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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1a202c;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    font-size: 16px;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 30px 0;
    position: relative;
}

/* Section-specific backgrounds */
.demo.section {
    background: #ffffff;
    padding-top: 60px;
}

.features.section {
    background: rgba(248, 250, 252, 0.8);
    backdrop-filter: blur(10px);
    padding-top: 60px;
}

.cta.section {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    padding-top: 60px;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 0;
}

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

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #6366f1;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: #6366f1;
}

.nav-cta {
    background: #6366f1;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.nav-cta:hover {
    background: #5855eb;
    transform: translateY(-1px);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 160px 0 120px;
    position: relative;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.hero-content h1 {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.1;
    color: #0f172a;
    margin-bottom: 24px;
}

.hero-content .highlight {
    color: #6366f1;
}

.hero-content p {
    font-size: 20px;
    color: #64748b;
    margin-bottom: 40px;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-primary {
    background: #6366f1;
    color: white;
    padding: 16px 32px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background: #5855eb;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.2);
}

.btn-secondary {
    background: transparent;
    color: #6366f1;
    padding: 16px 32px;
    border: 2px solid #6366f1;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    border-color: #6366f1;
    color: #6366f1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
}

.hero-card {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
    border: 1px solid #f1f5f9;
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #10b981;
}

.animated-dot {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { 
        background: #10b981;
        transform: scale(1);
    }
    50% { 
        background: #06d6a0;
        transform: scale(1.2);
        box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
    }
}

.card-title {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
}

/* Compact Animated Demo */
.demo-input {
    margin-bottom: 16px;
    transition: filter 0.5s ease;
}

.demo-input.blur-on-output {
    animation: blurCycle 6s infinite;
}

@keyframes blurCycle {
    0%, 50% {
        filter: blur(0px);
        opacity: 1;
    }
    66.67%, 100% {
        filter: blur(1px);
        opacity: 0.7;
    }
}

.input-label, .processing-label, .output-label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 8px;
}

.demo-output {
    position: relative;
    height: 90px; /* Increased height for better padding */
}

.processing-state, .output-state {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.processing-state {
    animation: processingCycle 6s infinite;
}

.output-state {
    animation: outputCycle 6s infinite;
}

@keyframes processingCycle {
    0%, 33.33% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0;
    }
}

@keyframes outputCycle {
    0%, 50% {
        opacity: 0;
    }
    66.67%, 100% {
        opacity: 1;
    }
}

.processing-bar {
    background: #e2e8f0;
    border-radius: 8px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 8px;
    width: 0%;
    animation: fillProgress 2s ease-in-out infinite;
}

@keyframes fillProgress {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }
}

.code-display {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 11px;
    line-height: 1.5;
}

.code-display.broken-static {
    border-left: 4px solid #f87171;
    background: #fef7f7;
}

.code-display.fixed-static {
    border-left: 4px solid #10b981;
    background: #f0fdf4;
    padding-bottom: 14px; /* Add 2px extra to account for last line margin-bottom */
}

.code-line {
    display: block;
    margin-bottom: 2px;
}

.tag {
    color: #6366f1;
    font-weight: 500;
}

.broken-tag {
    color: #f87171;
    font-weight: 500;
    background: rgba(248, 113, 113, 0.15);
    padding: 1px 2px;
    border-radius: 2px;
}

.fixed-tag {
    color: #10b981;
    font-weight: 500;
    background: rgba(16, 185, 129, 0.15);
    padding: 1px 2px;
    border-radius: 2px;
    animation: highlightFix 1s ease infinite;
}

@keyframes highlightFix {
    0%, 100% {
        background: rgba(16, 185, 129, 0.15);
    }
    50% {
        background: rgba(16, 185, 129, 0.3);
    }
}

/* Demo Section */
.demo {
    padding: 120px 0;
    background: white;
}

.demo-header {
    text-align: center;
    margin-bottom: 80px;
}

.demo-header h2 {
    font-size: 40px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 16px;
}

.demo-header p {
    font-size: 20px;
    color: #64748b;
}

/* Feature Selection Section */
.feature-selection {
    padding: 24px 32px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 1px solid #e2e8f0;
}

/* Input/Output Container */
.io-container {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.io-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 500px;
}

.io-panel {
    display: flex;
    flex-direction: column;
    position: relative;
}

.io-panel.input-panel {
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
}

.io-panel.output-panel {
    background: #ffffff;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    min-height: 68px;
}

.input-panel .panel-header {
    background: #f1f5f9;
}

.panel-icon {
    font-size: 20px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #6366f1;
    border-radius: 8px;
    filter: grayscale(1);
}

.output-panel .panel-icon {
    background: #10b981;
}

.panel-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    flex: 1;
}

.feature-buttons-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.feature-button-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

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

.feature-btn {
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    justify-content: center;
    min-height: 44px;
}

.feature-subtext {
    margin: 6px 0 0 0;
    font-size: 13px;
    color: #555;
    text-align: center;
    line-height: 1.4;
    font-weight: 400;
}

.smart-fix-btn {
    background: #6366f1;
    color: white;
}

.smart-fix-btn:hover {
    background: #5855eb;
    transform: translateY(-1px);
}

.email-safe-btn {
    background: #10b981;
    color: white;
}

.email-safe-btn:hover {
    background: #059669;
    transform: translateY(-1px);
}

.email-safe-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.lite-safe-btn {
    background: #22c55e;
    color: white;
}

.lite-safe-btn:hover {
    background: #16a34a;
    transform: translateY(-1px);
}

.free-badge {
    background: #fbbf24;
    color: #92400e;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    text-transform: uppercase;
}

.free-run-text {
    font-size: 10px;
    opacity: 0.8;
    font-weight: 500;
}

.export-toolbar {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 20px 24px 24px 24px;
    padding: 16px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.copy-btn, .download-btn {
    background: #6366f1;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.copy-btn:hover, .download-btn:hover {
    background: #5855eb;
    transform: translateY(-1px);
}

.download-btn {
    background: #059669;
}

.download-btn:hover {
    background: #047857;
}

.free-run-banner {
    background: linear-gradient(45deg, #22c55e, #16a34a);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

.upgrade-prompt {
    background: linear-gradient(45deg, #f59e0b, #d97706);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

.email-safe-toast {
    background: linear-gradient(45deg, #10b981, #059669);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cleanup-report {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
}

.cleanup-report h4 {
    color: #1e293b;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.cleanup-report ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cleanup-report li {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 6px;
    font-size: 13px;
    color: #475569;
}

.cleanup-report li:last-child {
    margin-bottom: 0;
}

.cleanup-report .fix-count {
    color: #10b981;
    font-weight: 600;
}

.code-textarea, .io-panel .code-display {
    flex: 1;
    width: 100%;
    min-height: 300px;
    border: none;
    padding: 24px;
    font-family: 'SF Mono', 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    line-height: 1.6;
    resize: none;
    background: transparent;
    color: #374151;
}

.code-textarea {
    color: #1f2937;
}

.code-textarea:focus {
    outline: none;
}

.io-panel .code-display {
    background: #ffffff;
    color: #6b7280;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    cursor: text;
    min-height: 400px;
}

.io-panel .code-display:focus {
    outline: 2px solid #6366f1;
    outline-offset: -2px;
}

/* Results Section */
.results-section {
    padding: 24px;
    background: #f9fafb;
    border-top: 1px solid #e2e8f0;
}

.copy-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: #059669;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 32px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    color: #6366f1;
}

.stat-label {
    font-size: 14px;
    color: #64748b;
    margin-top: 4px;
}

.status-message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 500;
}

.status-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.status-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Email Client Preview Section */
.email-preview {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.preview-header {
    text-align: center;
    margin-bottom: 40px;
}

.preview-header h2 {
    font-size: 42px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 16px;
}

.preview-header p {
    font-size: 20px;
    color: #64748b;
}

/* Email Client Preview Component */
.email-client-preview {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

/* Preview Controls */
.preview-controls {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f1f5f9;
}

.controls-row {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: center;
}

.control-label {
    font-weight: 600;
    color: #374151;
    margin-right: 12px;
}

.preset-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.preset-checkboxes {
    display: flex;
    gap: 16px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #6b7280;
}

.checkbox-item input {
    margin: 0;
}

.width-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.width-controls select {
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.toggle-controls {
    display: flex;
    gap: 16px;
}

.toggle-item {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #6b7280;
}

.reset-btn {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    transition: all 0.2s;
}

.reset-btn:hover {
    background: #e5e7eb;
}

/* Diff Summary */
.diff-summary {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 24px;
    font-size: 14px;
    color: #92400e;
}

.diff-content {
    line-height: 1.5;
}

/* Preview Panes */
.preview-panes-container {
    position: relative;
}

.preview-panes {
    display: grid;
    gap: 24px;
}

.preview-panes.panes-1 {
    grid-template-columns: 1fr;
}

.preview-panes.panes-2 {
    grid-template-columns: 1fr 1fr;
}

.preview-panes.panes-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

.preview-pane {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.pane-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: white;
    border-bottom: 1px solid #e2e8f0;
}

.pane-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.client-icon {
    font-size: 20px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.gmail-icon {
    background: linear-gradient(135deg, #ea4335 0%, #fbbc05 100%);
}

.outlook-icon {
    background: linear-gradient(135deg, #0078d4 0%, #106ebe 100%);
}

.apple-icon {
    background: linear-gradient(135deg, #007aff 0%, #5856d6 100%);
}

.pane-title h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.client-type {
    background: #f1f5f9;
    color: #6b7280;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.limitations-ribbon {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fef3c7;
    color: #92400e;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.info-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #92400e;
    font-size: 14px;
}

.pane-content {
    padding: 20px;
}

.no-content {
    text-align: center;
    color: #9ca3af;
    font-style: italic;
    padding: 60px 20px;
    background: #f9fafb;
    border-radius: 12px;
    border: 2px dashed #e5e7eb;
}

/* Mobile Chrome */
.mobile-chrome {
    margin-bottom: 12px;
}

.mobile-header {
    background: #000;
    color: white;
    padding: 8px 16px;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: center;
    position: relative;
    font-size: 14px;
    font-weight: 600;
}

.mobile-notch {
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: #000;
    border-radius: 0 0 4px 4px;
}

/* Mobile Tabs */
.preview-tabs {
    margin-bottom: 20px;
}

.tab-buttons {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    color: #6b7280;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tab-btn:hover,
.tab-btn.active {
    color: #6366f1;
    border-bottom-color: #6366f1;
}

/* Limitations Modal */
.limitations-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 32px;
    max-width: 500px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-content h3 {
    margin: 0 0 20px 0;
    color: #1f2937;
}

.modal-content ul {
    margin: 16px 0;
    padding-left: 20px;
}

.modal-content li {
    margin-bottom: 8px;
    color: #4b5563;
}

.modal-content button {
    background: #6366f1;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    margin-top: 20px;
}

/* Preview Limitations Notice */
.preview-limitations {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #f1f5f9;
    text-align: center;
}

.preview-limitations p {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
}

.preview-limitations a {
    color: #6366f1;
    text-decoration: none;
}

.preview-limitations a:hover {
    text-decoration: underline;
}

/* Newsletter Builder CTA Section */
.newsletter-builder-cta {
    background: linear-gradient(135deg, #000000 0%, #1f2937 100%);
    color: white;
}

.builder-cta-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.builder-cta-content.centered {
    display: block;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.builder-cta-text h2 {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.1;
    margin: 0 0 24px 0;
    color: white;
}

.builder-cta-text p {
    font-size: 18px;
    line-height: 1.6;
    margin: 0 0 32px 0;
    color: #e5e7eb;
}

.builder-cta-btn {
    display: inline-block;
    background: #6366f1;
    color: white;
    padding: 16px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.2s;
}

.builder-cta-btn:hover {
    background: #5856d6;
    transform: translateY(-1px);
}

.builder-cta-visual {
    display: flex;
    justify-content: center;
}

.builder-preview-card {
    background: #1f2937;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #374151;
    max-width: 400px;
    width: 100%;
    animation: builderFloat 6s ease-in-out infinite, builderGlow 4s ease-in-out infinite alternate;
    transform-origin: center center;
    position: relative;
    overflow: hidden;
}

.builder-preview-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #6366f1, #8b5cf6, #06b6d4, #10b981);
    background-size: 400% 400%;
    border-radius: 14px;
    z-index: -1;
    animation: gradientShift 3s ease infinite;
    opacity: 0.8;
}

@keyframes builderFloat {
    0%, 100% { transform: translateY(0px) scale(1); }
    25% { transform: translateY(-8px) scale(1.02); }
    50% { transform: translateY(-4px) scale(1.01); }
    75% { transform: translateY(-12px) scale(1.03); }
}

@keyframes builderGlow {
    0% { box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1), 0 0 30px rgba(99, 102, 241, 0.1); }
    100% { box-shadow: 0 35px 70px rgba(0, 0, 0, 0.2), 0 0 50px rgba(99, 102, 241, 0.3); }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #374151;
}

.preview-dots {
    display: flex;
    gap: 4px;
}

.preview-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6b7280;
    animation: dotPulse 2s ease-in-out infinite;
}

.preview-dots span:nth-child(1) {
    background: #ef4444;
    animation-delay: 0s;
}

.preview-dots span:nth-child(2) {
    background: #f59e0b;
    animation-delay: 0.3s;
}

.preview-dots span:nth-child(3) {
    background: #10b981;
    animation-delay: 0.6s;
}

@keyframes dotPulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 0.8;
    }
    50% { 
        transform: scale(1.2);
        opacity: 1;
    }
}

.preview-title {
    font-size: 14px;
    color: #d1d5db;
    font-weight: 500;
}

.preview-content {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 12px;
    min-height: 200px;
}

.preview-sidebar {
    background: #111827;
    border-radius: 6px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-item {
    background: #374151;
    border-radius: 4px;
    padding: 6px 8px;
    font-size: 11px;
    color: #d1d5db;
    text-align: center;
    animation: slideInLeft 0.6s ease-out forwards;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.2s ease;
    cursor: pointer;
}

.sidebar-item:nth-child(1) { 
    animation-delay: 0.3s;
}
.sidebar-item:nth-child(2) { 
    animation-delay: 0.5s;
}
.sidebar-item:nth-child(3) { 
    animation-delay: 0.7s;
}
.sidebar-item:nth-child(4) { 
    animation-delay: 0.9s;
}

.sidebar-item[data-type="text"] {
    animation: slideInLeft 0.6s ease-out forwards, textItemHighlight 15s infinite;
    animation-delay: 0.3s, 0s;
}

.sidebar-item[data-type="image"] {
    animation: slideInLeft 0.6s ease-out forwards, imageItemHighlight 15s infinite;
    animation-delay: 0.5s, 0s;
}

.sidebar-item[data-type="button"] {
    animation: slideInLeft 0.6s ease-out forwards, buttonItemHighlight 15s infinite;
    animation-delay: 0.7s, 0s;
}

.sidebar-item:hover {
    background: #4b5563;
    transform: translateX(2px) scale(1.05);
}

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes textItemHighlight {
    0%, 7% { 
        background: #374151;
        transform: scale(1);
    }
    8%, 14% { 
        background: #4b5563;
        transform: scale(1.05);
        box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
    }
    15%, 100% { 
        background: #374151;
        transform: scale(1);
    }
}

@keyframes imageItemHighlight {
    0%, 22% { 
        background: #374151;
        transform: scale(1);
    }
    23%, 29% { 
        background: #4b5563;
        transform: scale(1.05);
        box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
    }
    30%, 100% { 
        background: #374151;
        transform: scale(1);
    }
}

@keyframes buttonItemHighlight {
    0%, 37% { 
        background: #374151;
        transform: scale(1);
    }
    38%, 44% { 
        background: #4b5563;
        transform: scale(1.05);
        box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
    }
    45%, 100% { 
        background: #374151;
        transform: scale(1);
    }
}

.preview-canvas {
    background: #f9fafb;
    border-radius: 6px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.canvas-placeholder {
    background: transparent;
    border: 2px dashed #9ca3af;
    border-radius: 6px;
    padding: 20px;
    color: #9ca3af;
    font-size: 12px;
    text-align: center;
    animation: placeholderPulse 2s ease-in-out infinite;
}

@keyframes placeholderPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

.canvas-block {
    background: white;
    border-radius: 4px;
    padding: 12px;
    color: #1f2937;
    font-size: 12px;
    text-align: center;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    cursor: pointer;
    margin-bottom: 8px;
}

.canvas-block:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
    border-color: #6366f1;
}

/* Animated cursor */
.drag-cursor {
    position: absolute;
    color: #6366f1;
    font-size: 16px;
    pointer-events: none;
    z-index: 15;
    animation: dragSequence 15s infinite;
    opacity: 0;
    transition: none;
}

/* Draggable element clones */
.dragging-element {
    position: absolute;
    background: white;
    border-radius: 4px;
    padding: 8px 12px;
    color: #1f2937;
    font-size: 12px;
    text-align: center;
    border: 1px solid #6366f1;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    pointer-events: none;
    z-index: 12;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.9);
    min-width: 100px;
}

.dragging-text {
    animation: dragTextElement 15s infinite;
}

.dragging-image {
    height: 40px;
    background: #f3f4f6;
    animation: dragImageElement 15s infinite;
}

.dragging-button {
    background: #6366f1;
    color: white;
    animation: dragButtonElement 15s infinite;
}

/* Complex drag and drop animation sequence */
@keyframes dragSequence {
    /* Start hidden, wait a bit */
    0%, 10% { 
        opacity: 0;
        left: 45px;
        top: 72px;
        transform: scale(1);
    }
    
    /* Appear centered over text item */
    12% { 
        opacity: 1;
        left: 45px;
        top: 72px;
        transform: scale(1);
    }
    
    /* Move to center of text item and hover */
    15% { 
        left: 45px;
        top: 72px;
        transform: scale(1.2);
    }
    
    /* Start dragging text to canvas */
    16% { 
        left: 60px;
        top: 75px;
        transform: scale(1.2);
    }
    
    /* Continue drag path */
    18% { 
        left: 100px;
        top: 85px;
        transform: scale(1.2);
    }
    
    /* Reach canvas area */
    20% { 
        left: 150px;
        top: 100px;
        transform: scale(1.2);
    }
    
    /* Hold at canvas briefly */
    23% { 
        left: 150px;
        top: 100px;
        transform: scale(1.2);
    }
    
    /* Drop text */
    24% { 
        left: 150px;
        top: 100px;
        transform: scale(1);
    }
    
    /* Move to center of image item */
    28% { 
        left: 45px;
        top: 97px;
        transform: scale(1);
    }
    
    /* Hover over image center */
    30% { 
        left: 45px;
        top: 97px;
        transform: scale(1.2);
    }
    
    /* Start dragging image */
    31% { 
        left: 60px;
        top: 100px;
        transform: scale(1.2);
    }
    
    /* Continue drag path */
    33% { 
        left: 100px;
        top: 110px;
        transform: scale(1.2);
    }
    
    /* Reach canvas area */
    35% { 
        left: 150px;
        top: 130px;
        transform: scale(1.2);
    }
    
    /* Hold at canvas briefly */
    38% { 
        left: 150px;
        top: 130px;
        transform: scale(1.2);
    }
    
    /* Drop image */
    39% { 
        left: 150px;
        top: 130px;
        transform: scale(1);
    }
    
    /* Move to center of button item */
    43% { 
        left: 45px;
        top: 122px;
        transform: scale(1);
    }
    
    /* Hover over button center */
    45% { 
        left: 45px;
        top: 122px;
        transform: scale(1.2);
    }
    
    /* Start dragging button */
    46% { 
        left: 60px;
        top: 125px;
        transform: scale(1.2);
    }
    
    /* Continue drag path */
    48% { 
        left: 100px;
        top: 135px;
        transform: scale(1.2);
    }
    
    /* Reach canvas area */
    50% { 
        left: 150px;
        top: 160px;
        transform: scale(1.2);
    }
    
    /* Hold at canvas briefly */
    53% { 
        left: 150px;
        top: 160px;
        transform: scale(1.2);
    }
    
    /* Drop button */
    54% { 
        left: 150px;
        top: 160px;
        transform: scale(1);
    }
    
    /* Fade out and rest */
    60% { 
        opacity: 0;
        transform: scale(1);
    }
    
    /* Stay hidden for rest of cycle */
    100% { 
        opacity: 0;
        left: 45px;
        top: 72px;
        transform: scale(1);
    }
}

/* Dragging element animations */
@keyframes dragTextElement {
    0%, 14% { 
        opacity: 0;
        visibility: hidden;
        left: 35px;
        top: 68px;
        transform: scale(0.9);
    }
    15% { 
        opacity: 1;
        visibility: visible;
        left: 35px;
        top: 68px;
        transform: scale(1);
    }
    16% { 
        left: 50px;
        top: 71px;
        transform: scale(1);
    }
    18% { 
        left: 90px;
        top: 81px;
        transform: scale(1);
    }
    20% { 
        left: 130px;
        top: 96px;
        transform: scale(1);
    }
    23% { 
        left: 130px;
        top: 96px;
        transform: scale(1);
    }
    24% { 
        opacity: 0;
        visibility: hidden;
        left: 130px;
        top: 96px;
        transform: scale(0.8);
    }
    25%, 100% { 
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes dragImageElement {
    0%, 29% { 
        opacity: 0;
        visibility: hidden;
        left: 35px;
        top: 93px;
        transform: scale(0.9);
    }
    30% { 
        opacity: 1;
        visibility: visible;
        left: 35px;
        top: 93px;
        transform: scale(1);
    }
    31% { 
        left: 50px;
        top: 96px;
        transform: scale(1);
    }
    33% { 
        left: 90px;
        top: 106px;
        transform: scale(1);
    }
    35% { 
        left: 130px;
        top: 126px;
        transform: scale(1);
    }
    38% { 
        left: 130px;
        top: 126px;
        transform: scale(1);
    }
    39% { 
        opacity: 0;
        visibility: hidden;
        left: 130px;
        top: 126px;
        transform: scale(0.8);
    }
    40%, 100% { 
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes dragButtonElement {
    0%, 44% { 
        opacity: 0;
        visibility: hidden;
        left: 35px;
        top: 118px;
        transform: scale(0.9);
    }
    45% { 
        opacity: 1;
        visibility: visible;
        left: 35px;
        top: 118px;
        transform: scale(1);
    }
    46% { 
        left: 50px;
        top: 121px;
        transform: scale(1);
    }
    48% { 
        left: 90px;
        top: 131px;
        transform: scale(1);
    }
    50% { 
        left: 130px;
        top: 156px;
        transform: scale(1);
    }
    53% { 
        left: 130px;
        top: 156px;
        transform: scale(1);
    }
    54% { 
        opacity: 0;
        visibility: hidden;
        left: 130px;
        top: 156px;
        transform: scale(0.8);
    }
    55%, 100% { 
        opacity: 0;
        visibility: hidden;
    }
}

/* Canvas elements appear when dragged */
.preview-canvas {
    position: relative;
}

.builder-preview-card {
    animation: builderFloat 6s ease-in-out infinite, builderGlow 4s ease-in-out infinite alternate;
}

/* Canvas element animations */
.canvas-placeholder {
    animation: placeholderPulse 2s ease-in-out infinite, hidePlaceholder 15s infinite;
}

.canvas-text {
    opacity: 0;
    visibility: hidden;
    animation: showText 15s infinite;
}

.canvas-image {
    opacity: 0;
    visibility: hidden;
    animation: showImage 15s infinite;
}

.canvas-button {
    opacity: 0;
    visibility: hidden;
    animation: showButton 15s infinite;
}

@keyframes hidePlaceholder {
    0%, 20% { 
        opacity: 1;
        visibility: visible;
        transform: scale(1);
    }
    21% {
        opacity: 0;
        visibility: hidden;
        transform: scale(0.8);
    }
    22%, 100% { 
        opacity: 0;
        visibility: hidden;
        transform: scale(0.8);
    }
}

@keyframes showText {
    0%, 23% { 
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px) scale(0.8);
    }
    24% { 
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1.1);
    }
    27%, 100% { 
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
    }
}

@keyframes showImage {
    0%, 38% { 
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px) scale(0.8);
    }
    39% { 
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1.1);
    }
    42%, 100% { 
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
    }
}

@keyframes showButton {
    0%, 53% { 
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px) scale(0.8);
    }
    54% { 
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1.1);
    }
    57%, 100% { 
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
    }
}

.canvas-image {
    height: 60px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.canvas-image::after {
    content: "🖼️";
    font-size: 24px;
}

.canvas-button {
    background: #6366f1;
    color: white;
    font-weight: 500;
}

/* Features Section */
.features {
    padding: 120px 0;
    background: #f8fafc;
}

.features-header {
    text-align: center;
    margin-bottom: 80px;
}

.features-header h2 {
    font-size: 40px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 16px;
}

.features-header p {
    font-size: 20px;
    color: #64748b;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.feature-card {
    background: white;
    padding: 32px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

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

.feature-icon {
    width: 48px;
    height: 48px;
    background: #ede9fe;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    font-size: 24px;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 12px;
}

.feature-card p {
    color: #64748b;
    line-height: 1.6;
}

/* CTA Section */
.cta {
    padding: 120px 0;
    color: white;
    text-align: center;
}

.cta h2 {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 16px;
}

.cta p {
    font-size: 20px;
    opacity: 0.9;
    margin-bottom: 40px;
}

.cta-form {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-input {
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    min-width: 300px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(10px);
}

.cta-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.cta-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.2);
}

.cta-btn {
    background: white;
    color: #6366f1;
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Footer */
.footer {
    padding: 60px 0;
    background: #0f172a;
    color: white;
    text-align: center;
}

.footer p {
    color: #94a3b8;
    margin-bottom: 8px;
}

.footer a {
    color: #6366f1;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-grid,
    .io-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .io-panel.input-panel {
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }

    .feature-selection {
        padding: 20px;
    }

    .hero-content h1 {
        font-size: 40px;
    }

    .hero-content p {
        font-size: 18px;
    }

    .hero-cta {
        margin-bottom: 60px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .preview-header h2 {
        font-size: 32px;
    }

    .preview-header p {
        font-size: 18px;
    }

    .email-client-preview {
        padding: 20px;
    }

    .controls-row {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .preset-controls,
    .width-controls,
    .toggle-controls {
        justify-content: center;
    }

    .preview-panes.panes-2,
    .preview-panes.panes-3 {
        grid-template-columns: 1fr;
    }

    /* Newsletter Builder CTA Mobile */
    .builder-cta-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .builder-cta-text h2 {
        font-size: 32px;
    }

    .builder-cta-text p {
        font-size: 16px;
    }

    .builder-preview-card {
        max-width: 320px;
        margin: 0 auto;
    }

    .preview-content {
        grid-template-columns: 100px 1fr;
        gap: 8px;
        min-height: 160px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .nav-links {
        display: none;
    }

    .container {
        padding: 0 16px;
    }

    .section {
        padding: 40px 0;
    }

    .demo-container {
        padding: 24px;
    }

    .cta-form {
        flex-direction: column;
        align-items: center;
    }

    .cta-input {
        min-width: auto;
        width: 100%;
        max-width: 400px;
    }

    /* Responsive animation adjustments */
    .hero-card {
        padding: 20px;
    }

    .code-display {
        font-size: 10px;
        padding: 10px;
    }

    .demo-output {
        height: 80px;
    }

    .input-label, .processing-label, .output-label {
        font-size: 10px;
    }

    .feature-buttons-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .feature-button-card {
        padding: 12px;
    }

    .feature-btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .feature-subtext {
        font-size: 12px;
    }

    .export-toolbar {
        flex-direction: column;
        gap: 8px;
        padding: 16px;
    }

    .copy-btn, .download-btn {
        padding: 12px 16px;
        font-size: 14px;
    }

    .cleanup-report {
        padding: 12px;
    }

    .cleanup-report h4 {
        font-size: 13px;
    }

    .cleanup-report li {
        padding: 6px 10px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 32px;
    }

    .demo-header h2,
    .features-header h2,
    .cta h2 {
        font-size: 32px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .code-textarea {
        min-height: 600px;
        font-size: 14px;
    }
}

/* Authentication Modal Styles */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.auth-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.auth-modal-header h2 {
    color: #1a202c;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.auth-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #718096;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s;
}

.auth-modal-close:hover {
    color: #2d3748;
}

.auth-form {
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #2d3748;
    font-weight: 500;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s;
    background: #ffffff;
}

.form-group input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group small {
    display: block;
    margin-top: 4px;
    color: #718096;
    font-size: 12px;
}

.auth-btn {
    width: 100%;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-btn.primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #ffffff;
}

.auth-btn.primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}


.auth-toggle {
    text-align: center;
}

.auth-toggle-text {
    color: #718096;
    font-size: 14px;
    margin: 0;
}

.auth-toggle-text a {
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
}

.auth-toggle-text a:hover {
    text-decoration: underline;
}

.auth-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.auth-message.success {
    background: #f0fff4;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.auth-message.error {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #feb2b2;
}

/* Navigation User Menu */
.user-menu {
    position: relative;
    display: flex;
    align-items: center;
}

.username-btn {
    background: #ffffff;
    color: #2d3748;
    border: 2px solid #e2e8f0;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.username-btn:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 8px;
    margin-top: 8px;
    min-width: 140px;
    z-index: 10001;
}

.sign-out-btn {
    width: 100%;
    background: none;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    color: #718096;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.dropdown-btn {
    width: 100%;
    background: none;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    color: #718096;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.dropdown-btn:hover {
    background: #f7fafc;
    color: #2d3748;
}

/* Signup CTA Button */
.signup-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.free-text {
    background: #fbbf24;
    color: #92400e;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    text-transform: uppercase;
    margin-top: 2px;
}

/* Email-Safe Button States */
.unlimited-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff !important;
    font-weight: 600;
}

.signup-required {
    background: #fed7d7;
    color: #742a2a !important;
    font-weight: 600;
}

.feature-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.feature-btn:disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .auth-modal-content {
        padding: 24px 20px;
        margin: 16px;
        max-width: none;
    }
    
    .auth-modal-header h2 {
        font-size: 20px;
    }
    
    .oauth-buttons {
        gap: 8px;
    }
    
    .user-menu {
        flex-direction: column;
        gap: 8px;
    }
    
    .user-email {
        font-size: 12px;
    }
}

/* Dashboard Modal Styles */
.dashboard-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.dashboard-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.dashboard-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: modalSlideIn 0.3s ease-out;
}

.dashboard-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.dashboard-modal-header h2 {
    color: #1a202c;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.dashboard-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #718096;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s;
}

.dashboard-modal-close:hover {
    color: #2d3748;
}

.dashboard-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.dashboard-section {
    background: #f8fafc;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.dashboard-section h3 {
    color: #2d3748;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px 0;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-item label {
    color: #718096;
    font-size: 14px;
    font-weight: 500;
}

.info-item span {
    color: #2d3748;
    font-size: 16px;
    font-weight: 600;
    padding: 8px 12px;
    background: #ffffff;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.dashboard-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dashboard-btn {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.dashboard-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.dashboard-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}


.dashboard-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.dashboard-message.success {
    background: #f0fff4;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.dashboard-message.error {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #feb2b2;
}

/* Responsive dashboard */
@media (max-width: 640px) {
    .dashboard-modal-content {
        padding: 24px 20px;
        margin: 16px;
        max-width: none;
        max-height: 85vh;
    }
    
    .dashboard-modal-header h2 {
        font-size: 20px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .dashboard-section {
        padding: 20px 16px;
    }
    
    .dashboard-content {
        gap: 24px;
    }
}

/* Professional Icon Styling */
.fas, .fab {
    transition: all 0.2s ease;
    vertical-align: middle;
}

/* Enhanced Feature Icons */
.feature-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    font-size: 20px;
    color: #7c3aed;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.1);
    transition: all 0.3s ease;
}

.feature-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.2);
    background: linear-gradient(135deg, #ddd6fe 0%, #c4b5fd 100%);
}

/* Panel Icons */
.panel-icon {
    font-size: 18px;
    color: #ffffff;
    background: #6366f1;
    padding: 8px;
    border-radius: 8px;
    margin-right: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
}

/* Block Icons in Newsletter Builder */
.block-icon {
    font-size: 18px;
    color: #6366f1;
    margin-right: 12px;
    width: 24px;
    text-align: center;
}

/* Processing Animation */
.fas.fa-cog.fa-spin {
    animation: spin 1s linear infinite;
    color: #10b981;
}

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

/* Export Icons */
.export-icon {
    font-size: 16px;
    color: inherit;
    margin-right: 8px;
}

/* Copy and Download Button Icons */
.copy-btn .fas,
.download-btn .fas {
    margin-right: 8px;
}

/* Email Client Icons */
.fab.fa-google {
    color: #ea4335;
}

.fab.fa-microsoft {
    color: #00a1f1;
}

.fab.fa-apple {
    color: #000;
}

/* Sidebar Item Icons */
.sidebar-item .fas {
    margin-right: 8px;
    color: #6366f1;
    width: 16px;
    text-align: center;
}

/* Enhanced Button Hover Effects */
.feature-btn:hover .fas {
    transform: scale(1.1);
}

.btn-primary:hover .fas,
.btn-secondary:hover .fas,
.btn-outline:hover .fas {
    transform: scale(1.05);
}

/* Auth Gate Icon */
.auth-gate-content .fas.fa-lock {
    color: #6366f1;
    font-size: 24px;
    margin-right: 8px;
}

/* Empty State Icon */
.empty-state-icon {
    font-size: 48px;
    color: #10b981;
    margin-bottom: 16px;
    display: inline-block;
}

/* Professional gradient backgrounds */
.hero {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 40%, #cbd5e0 100%);
}

/* Newsletter builder CTA - black background override */
.newsletter-builder-cta {
    background: linear-gradient(135deg, #000000 0%, #1f2937 100%) !important;
    color: white !important;
}

/* Improved shadows and depth */
.hero-card,
.feature-card,
.builder-preview-card {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.hero-card:hover,
.feature-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* Enhanced typography */
.hero-content h1 {
    background: linear-gradient(135deg, #1e293b 0%, #374151 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

/* Better button styling */
.btn-primary,
.feature-btn {
    position: relative;
    overflow: hidden;
}

.btn-primary:before,
.feature-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover:before,
.feature-btn:hover:before {
    left: 100%;
}

/* Professional color palette adjustments */
:root {
    --primary-50: #f0f9ff;
    --primary-100: #e0f2fe;
    --primary-500: #6366f1;
    --primary-600: #4f46e5;
    --primary-700: #4338ca;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-900: #111827;
}