:root {
    --canvas-bg: #F8FAFC;
    --canvas-surface: #FFFFFF;
    --canvas-surface-alt: #F1F5F9;
    --canvas-primary: #7c3aed;
    --canvas-accent: #6d28d9;
    --canvas-text: #0F172A;
    --canvas-muted: #64748B;
    --canvas-border: #E2E8F0;
}

.marketing-canvas-section {
    position: relative;
    padding: 80px 20px;
    background-color: var(--canvas-bg);
    overflow: hidden;
    min-height: 850px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

/* Ambient Background */
.ambient-glow {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: floatBlob 10s infinite alternate ease-in-out;
}

.orb-1 {
    width: 500px; height: 500px;
    background: rgba(124, 58, 237, 0.2);
    top: -100px; left: 15%;
}

.orb-2 {
    width: 400px; height: 400px;
    background: rgba(59, 130, 246, 0.2);
    bottom: -50px; right: 10%;
    animation-delay: -5s;
}

/* Header */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--canvas-text);
}

.gradient-text-canvas {
    background: linear-gradient(135deg, #111827 0%, var(--canvas-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle.canvas-subtitle {
    font-size: 1.1rem;
    color: var(--canvas-muted);
    max-width: 700px;
    margin: 0 auto;
}

/* Chips / Tabs */
.floating-templates-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}

.template-chip {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--canvas-border);
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--canvas-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(5px);
}

.template-chip:hover, .template-chip.active {
    background: var(--canvas-primary);
    color: #fff;
    border-color: var(--canvas-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
}

/* Application UI */
.app-window {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    height: 750px;
    display: flex;
    overflow: hidden;
}

.app-sidebar {
    width: 70px;
    background: #fff;
    border-right: 1px solid var(--canvas-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
    flex-shrink: 0;
}

.app-logo { font-size: 1.5rem; color: var(--canvas-primary); margin-bottom: 30px; }
.sidebar-nav { display: flex; flex-direction: column; gap: 20px; align-items: center; width: 100%; }

.nav-item {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    color: var(--canvas-muted);
    border-radius: 10px;
    font-size: 1.1rem;
    transition: 0.2s;
    text-decoration: none;
}

.nav-item:hover, .nav-item.active {
    background: var(--canvas-surface-alt);
    color: var(--canvas-primary);
}

.user-avatar-sm img {
    width: 36px; height: 36px; border-radius: 50%;
    border: 2px solid #fff;
}

.app-content-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.panel-editor {
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--canvas-border);
    background: rgba(255, 255, 255, 0.6);
}

.panel-header {
    padding: 20px 30px;
    border-bottom: 1px solid var(--canvas-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
}

.panel-title { font-weight: 700; color: var(--canvas-text); font-size: 1rem; }
.badge-ai { background: #f3e8ff; color: #6b21a8; font-size: 0.75rem; padding: 5px 10px; border-radius: 6px; font-weight: 700; }

/* Chat Stream */
.chat-stream {
    flex: 1; padding: 30px; overflow-y: auto; display: flex; flex-direction: column; gap: 24px;
}

.message-group { display: flex; gap: 16px; align-items: flex-start; }
.avatar-bubble { width: 36px; height: 36px; border-radius: 10px; overflow: hidden; flex-shrink: 0; }
.avatar-bubble img { width: 100%; height: 100%; object-fit: cover; }
.ai-bubble { background: var(--canvas-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }

.message-content {
    background: #fff; padding: 16px 20px; border-radius: 0 16px 16px 16px;
    border: 1px solid var(--canvas-border); font-size: 0.95rem; line-height: 1.6;
    color: var(--canvas-text); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05); max-width: 90%;
}
.user-message .message-content {
    background: var(--canvas-surface-alt); border: none; box-shadow: none; border-radius: 16px 16px 0 16px;
}

.ai-status { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 0.8rem; font-weight: 600; color: var(--canvas-muted); }
.typing-indicator span { display: inline-block; width: 5px; height: 5px; background: var(--canvas-muted); border-radius: 50%; margin-right: 3px; animation: bounce 1s infinite; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

.typewriter-output { white-space: pre-wrap; word-wrap: break-word; }
.typewriter-output code { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-family: monospace; color: #0f172a; }
.cursor-blink { display: inline-block; margin-left: 2px; color: var(--canvas-primary); animation: blink 1s infinite; }

.editor-input-area { padding: 20px; border-top: 1px solid var(--canvas-border); background: #fff; }
.input-wrapper { background: var(--canvas-surface-alt); border-radius: 12px; padding: 8px 12px; display: flex; align-items: center; }
.input-wrapper input { flex: 1; background: transparent; border: none; outline: none; padding: 10px; color: var(--canvas-text); }
.btn-attach, .btn-send { background: none; border: none; color: var(--canvas-muted); cursor: pointer; padding: 8px; font-size: 1.1rem; }

/* Phone Mockup */
.panel-preview { background: #F8FAFC; display: flex; flex-direction: column; position: relative; }
.preview-controls { display: flex; gap: 10px; }
.btn-sm-live { padding: 6px 14px; border: 1px solid var(--canvas-primary); background: var(--canvas-primary); border-radius: 6px; cursor: pointer; font-weight: 600; color: #fff; font-size: 0.85rem; display: flex; align-items: center; gap: 6px; }

.device-mockup-container { flex: 1; display: flex; align-items: center; justify-content: center; padding: 20px; overflow: hidden; }
.phone-frame {
    width: 320px; height: 620px; background: #fff; border: 12px solid #1E293B;
    border-radius: 40px; position: relative; box-shadow: 0 30px 60px rgba(0,0,0,0.25); overflow: hidden;
}
.notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 140px; height: 28px; background: #1E293B; border-bottom-left-radius: 18px; border-bottom-right-radius: 18px; z-index: 20; }
.status-bar { padding: 12px 24px 8px 24px; display: flex; justify-content: space-between; font-size: 0.75rem; font-weight: 700; color: #1E293B; }
.app-screen { height: 100%; overflow-y: hidden; position: relative; background: #fff; }

/* Email UI Design inside Mockup */
.canvas-layout { display: none; height: 100%; }
.canvas-layout.active { display: block; }
.canvas-img-full { width: 100%; height: 100%; object-fit: cover; }

.email-mockup-ui { background: #ffffff; height: 100%; display: flex; flex-direction: column; width: 100%; text-align: left; }
.em-header { display: flex; align-items: center; gap: 12px; padding: 15px; border-bottom: 1px solid #f1f5f9; }
.em-avatar { width: 36px; height: 36px; border-radius: 50%; background: #e2e8f0; display: flex; align-items: center; justify-content: center; color: #64748b; font-weight: bold; }
.em-sender-info { display: flex; flex-direction: column; }
.em-name { font-size: 13px; font-weight: 700; color: #0f172a; }
.em-email { font-size: 11px; color: #64748b; }
.em-subject { padding: 15px 15px 5px 15px; font-size: 16px; font-weight: 800; color: #0f172a; }
.em-body { padding: 10px 15px; font-size: 13px; color: #334155; line-height: 1.6; flex: 1; }
.em-skeleton-line { height: 8px; background: #f1f5f9; border-radius: 4px; margin-bottom: 8px; }
.em-skeleton-line.short { width: 60%; }
.em-tag { display: inline-block; background: #e0e7ff; color: #4f46e5; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 4px; margin-bottom: 10px; }
.em-tag-warning { background: #fef3c7; color: #15803d; }
.em-tag-info { background: #e0f2fe; color: #0369a1; }

/* Animations */
@keyframes floatBlob {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 30px) scale(1.05); }
}
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@media (max-width: 992px) {
    .app-content-grid { grid-template-columns: 1fr; }
    .panel-preview { display: none; }
}
@media (max-width: 768px) {
    .app-sidebar { display: none; }
    .app-window { height: auto; min-height: 600px; }
}