/* ═══════════════════════════════════════
   MyragenAI Studio — Single Layout
   Chat LEFT | Preview RIGHT
   ═══════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── TOKENS ──────────────────────────── */

#mab-studio-root {
    --mab-bg:        #050b1a;
    --mab-bg2:       #0a1122;
    --mab-surface:   rgba(30, 41, 59, 0.6);
    --mab-surface2:  rgba(15, 23, 42, 0.95);
    --mab-border:    rgba(255, 255, 255, 0.06);
    --mab-border2:   rgba(26, 22, 22, 0.1);
    --mab-primary:   #3b82f6;
    --mab-primary-d: #2563eb;
    --mab-accent:    #10b981;
    --mab-accent-d:  #059669;
    --mab-text:      #EEEEEE;
    --mab-text2:     #e2e8f0;
    --mab-muted:     #94a3b8;
    --mab-muted2:    #64748b;
    --mab-danger:    #ef4444;
    --mab-purple:    #8b5cf6;
    --mab-orange:    #f97316;
    --mab-radius:    10px;
    --mab-radius-sm: 6px;

    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    background: var(--mab-bg) !important;
    color: var(--mab-text) !important;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 13px;
    line-height: 1.4;
}

#mab-studio-root *,
#mab-studio-root h1,
#mab-studio-root h2,
#mab-studio-root h3,
#mab-studio-root p,
#mab-studio-root button,
#mab-studio-root input,
#mab-studio-root textarea {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    letter-spacing: normal !important;
    font-style: normal !important;
    box-sizing: border-box;
}

/* ── SCROLLBAR ───────────────────────── */

#mab-studio-root ::-webkit-scrollbar { width: 5px; height: 5px; }
#mab-studio-root ::-webkit-scrollbar-track { background: transparent; }
#mab-studio-root ::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
    border-radius: 5px;
}
#mab-studio-root ::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }
#mab-studio-root * { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.08) transparent; }


/* ═══════════════════════════════════════
   LAYOUT PRINCIPAL — 35% chat + 65% preview
   ═══════════════════════════════════════ */

#mab-app-builder {
    display: flex;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background: var(--mab-bg);
}


/* ═══════════════════════════════════════
   CHAT PANEL (esquerda)
   ═══════════════════════════════════════ */

#mab-chat-panel {
    flex: 0 0 35%;
    max-width: 480px;
    min-width: 340px;
    display: flex;
    flex-direction: column;
    background: var(--mab-bg2);
    border-right: 1px solid var(--mab-border);
    position: relative;
    z-index: 2;
}

/* ── Header ──────────────────────────── */

.mab-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    height: 52px;
    min-height: 52px;
    border-bottom: 1px solid var(--mab-border);
    background: var(--mab-surface2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.mab-chat-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.mab-chat-app-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--mab-primary), var(--mab-purple));
    border-radius: 8px;
    color: #fff;
    flex-shrink: 0;
}

#mab-chat-app-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--mab-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#mab-chat-status {
    font-size: 11px;
    color: var(--mab-muted2);
    font-weight: 500;
    white-space: nowrap;
}

#mab-stop-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(239,68,68,0.12);
    color: #fca5a5;
    border: 1px solid rgba(239,68,68,0.25);
    border-radius: 7px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-left: 8px;
    animation: mab-fadeIn 0.2s ease;
}

#mab-stop-btn:hover {
    background: rgba(239,68,68,0.22);
    border-color: rgba(239,68,68,0.45);
    color: #fff;
}

/* ── Messages area ───────────────────── */

#mab-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
}

/* ── Welcome (inside chat) ───────────── */

.mab-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 16px 24px;
    gap: 16px;
    flex: 1;
}

.mab-welcome-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--mab-primary), var(--mab-purple));
    border-radius: 16px;
    color: #fff;
    box-shadow: 0 4px 24px rgba(59,130,246,0.25);
}

.mab-welcome h2 {
    font-size: 20px !important;
    font-weight: 800 !important;
    margin: 0 !important;
    color: var(--mab-text) !important;
    line-height: 1.2 !important;
}

.mab-welcome p {
    color: var(--mab-muted) !important;
    font-size: 13px !important;
    margin: 0 !important;
    line-height: 1.5 !important;
    max-width: 280px;
}

.mab-suggestions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    max-width: 300px;
    margin-top: 8px;
}

.mab-suggestion {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--mab-border2);
    border-radius: 10px;
    padding: 10px 14px;
    color: var(--mab-muted);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
    width: 100%;
}

.mab-suggestion:hover {
    background: rgba(59,130,246,0.06);
    border-color: rgba(59,130,246,0.25);
    color: var(--mab-text2);
}

.mab-sug-icon { font-size: 16px; flex-shrink: 0; }

/* ── Meus Apps (inside chat, below welcome) ── */

.mab-my-apps-section {
    width: 100%;
    margin-top: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--mab-border);
}

.mab-my-apps-section h4 {
    color: var(--mab-muted2) !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    margin: 0 0 8px !important;
}

.mab-my-apps-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mab-app-mini {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: default;
    transition: background 0.15s ease;
}

.mab-app-mini:hover {
    background: rgba(255,255,255,0.03);
}

.mab-app-mini-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.mab-app-mini-dot.published { background: var(--mab-accent); }
.mab-app-mini-dot.draft { background: var(--mab-muted2); }

.mab-app-mini-name {
    flex: 1;
    font-size: 12px;
    color: var(--mab-text2);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mab-app-mini-meta {
    font-size: 10px;
    color: var(--mab-muted2);
}

.mab-app-mini-open {
    font-size: 10px;
    background: rgba(59,130,246,0.12);
    color: var(--mab-primary);
    border: 1px solid rgba(59,130,246,0.25);
    border-radius: 4px;
    padding: 2px 7px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.15s ease;
    margin-right: 3px;
}
.mab-app-mini-open:hover {
    background: rgba(59,130,246,0.22);
    border-color: rgba(59,130,246,0.45);
}

.mab-app-mini-link {
    font-size: 10px;
    color: var(--mab-primary);
    text-decoration: none;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(59,130,246,0.2);
    transition: all 0.15s ease;
}

.mab-app-mini-link:hover {
    background: rgba(59,130,246,0.1);
    border-color: rgba(59,130,246,0.35);
}

.mab-no-apps {
    color: var(--mab-muted2);
    font-size: 11px;
    padding: 8px 0;
}

/* ── Message bubbles ─────────────────── */

.mab-msg {
    max-width: 90%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.55;
    animation: mab-fadeIn 0.2s ease;
    word-break: break-word;
}

.mab-msg.system {
    align-self: flex-start;
    background: var(--mab-surface);
    color: var(--mab-text2);
    border: 1px solid var(--mab-border);
    border-bottom-left-radius: 4px;
}

.mab-msg.user {
    align-self: flex-end;
    background: var(--mab-primary);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.mab-msg.success {
    align-self: flex-start;
    background: rgba(16,185,129,0.1);
    color: var(--mab-accent);
    border: 1px solid rgba(16,185,129,0.15);
    border-bottom-left-radius: 4px;
}

.mab-msg.error {
    align-self: flex-start;
    background: rgba(239,68,68,0.1);
    color: #fca5a5;
    border: 1px solid rgba(239,68,68,0.15);
    border-bottom-left-radius: 4px;
}

.mab-msg.token {
    align-self: flex-start;
    background: rgba(139,92,246,0.06);
    color: var(--mab-purple);
    border: 1px solid rgba(139,92,246,0.12);
    border-bottom-left-radius: 4px;
    font-size: 11px;
    padding: 6px 12px;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace !important;
}

.mab-msg a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ── Typing indicator ────────────────── */

.mab-typing {
    align-self: flex-start;
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: var(--mab-surface);
    border: 1px solid var(--mab-border);
    border-radius: 14px;
    border-bottom-left-radius: 4px;
}

.mab-typing-dot {
    width: 6px;
    height: 6px;
    background: var(--mab-muted2);
    border-radius: 50%;
    animation: mab-typingBounce 1.4s ease-in-out infinite;
}
.mab-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.mab-typing-dot:nth-child(3) { animation-delay: 0.4s; }

/* ── Screen items in chat ────────────── */

.mab-chat-screen-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
    margin: 2px 0;
}

.mab-chat-screen-item:hover { background: rgba(255,255,255,0.05); }

.mab-chat-screen-item .mab-screen-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--mab-muted2);
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.mab-chat-screen-item.done .mab-screen-dot {
    background: var(--mab-accent);
    box-shadow: 0 0 6px rgba(16,185,129,0.5);
}

.mab-chat-screen-item.generating .mab-screen-dot {
    background: var(--mab-orange);
    animation: mab-pulseOrange 2s ease-in-out infinite;
}

.mab-chat-screen-item.error .mab-screen-dot { background: var(--mab-danger); }

.mab-chat-screen-item .mab-screen-label {
    font-size: 12px; color: var(--mab-text2); flex: 1; font-weight: 500;
}

.mab-chat-screen-item .mab-screen-type {
    font-size: 10px; color: var(--mab-muted2);
    background: rgba(255,255,255,0.05); padding: 2px 6px;
    border-radius: 4px; font-weight: 500;
}

/* ── Chat input ──────────────────────── */

.mab-chat-input-area {
    padding: 12px 14px 14px;
    border-top: 1px solid var(--mab-border);
    background: var(--mab-surface2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.mab-chat-input-wrap {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    background: var(--mab-surface);
    border: 1px solid var(--mab-border2);
    border-radius: 14px;
    padding: 8px 10px 8px 14px;
    transition: all 0.15s ease;
}

.mab-chat-input-wrap:focus-within {
    border-color: rgba(59,130,246,0.4);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.06);
}

#mab-chat-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--mab-text);
    font-size: 13px;
    resize: none;
    outline: none;
    max-height: 120px;
    line-height: 1.5;
    padding: 4px 0;
}

#mab-chat-input::placeholder { color: var(--mab-muted2); }

#mab-chat-send {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mab-primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}

#mab-chat-send:hover { background: var(--mab-primary-d); }
#mab-chat-send:active { transform: scale(0.92); }
#mab-chat-send:disabled { opacity: 0.4; cursor: not-allowed; }

.mab-chat-input-hint {
    padding: 5px 4px 0;
    font-size: 10px;
    color: var(--mab-muted2);
}


/* ═══════════════════════════════════════
   PREVIEW PANEL (direita)
   ═══════════════════════════════════════ */

#mab-preview-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--mab-bg);
    overflow: hidden;
    min-width: 0;
}

/* ── Toolbar ─────────────────────────── */

.mab-preview-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    height: 52px;
    min-height: 52px;
    background: var(--mab-surface2);
    border-bottom: 1px solid var(--mab-border);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    gap: 12px;
}

.mab-toolbar-left { flex: 1; min-width: 0; }

.mab-url-bar {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--mab-border);
    border-radius: 8px;
    padding: 5px 12px;
    max-width: 280px;
}

.mab-url-icon { font-size: 11px; flex-shrink: 0; }

#mab-url-text {
    font-size: 12px;
    color: var(--mab-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mab-toolbar-center { flex-shrink: 0; }

.mab-responsive-btns {
    display: flex;
    gap: 2px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--mab-border);
    border-radius: 8px;
    padding: 3px;
}

.mab-resp-btn {
    width: 32px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    background: transparent;
    color: var(--mab-muted2);
    border: none; border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.mab-resp-btn:hover { color: var(--mab-text2); background: rgba(255,255,255,0.05); }
.mab-resp-btn.active { color: var(--mab-primary); background: rgba(59,130,246,0.1); }

.mab-toolbar-right {
    display: flex; align-items: center; gap: 4px; flex-shrink: 0;
}

.mab-toolbar-btn {
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    background: transparent;
    color: var(--mab-muted2);
    border: 1px solid var(--mab-border);
    border-radius: 6px;
    cursor: pointer; font-size: 14px;
    transition: all 0.15s ease;
}

.mab-toolbar-btn:hover {
    color: var(--mab-text2); background: rgba(255,255,255,0.05); border-color: var(--mab-border2);
}

#mab-screen-indicator {
    font-size: 11px; color: var(--mab-muted2); font-weight: 500;
    padding: 0 6px; min-width: 30px; text-align: center;
}

/* ── Preview container ───────────────── */

#mab-preview-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 0;
    position: relative;
    background: #0d1117;
}

/* Empty state */
#mab-preview-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: var(--mab-muted2);
    animation: mab-fadeIn 0.5s ease;
}

.mab-empty-icon {
    opacity: 0.3;
}

#mab-preview-empty p {
    font-size: 14px !important;
    color: var(--mab-muted2) !important;
    margin: 0 !important;
    max-width: 260px;
    text-align: center;
    line-height: 1.5 !important;
}

/* Iframe */
#mab-preview-frame {
    border: 0;
    background: #fff;
    transition: width 0.3s ease;
}

#mab-preview-frame.view-desktop { width: 100%; height: 100%; }

#mab-preview-frame.view-tablet {
    width: 768px; max-width: 100%; height: 100%;
    border-left: 1px solid var(--mab-border); border-right: 1px solid var(--mab-border);
    border-radius: 8px; box-shadow: 0 0 40px rgba(0,0,0,0.3);
}

#mab-preview-frame.view-mobile {
    width: 375px; max-width: 100%; height: 100%;
    border-left: 1px solid var(--mab-border); border-right: 1px solid var(--mab-border);
    border-radius: 12px; box-shadow: 0 0 40px rgba(0,0,0,0.3);
}

/* Skeleton */
#mab-preview-skeleton {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 32px;
    background: #0d1117;
    z-index: 2;
}

.mab-skel-bar {
    height: 14px;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
    animation: mab-shimmer 1.5s ease-in-out infinite;
}
.mab-skel-bar.wide { width: 80%; }
.mab-skel-bar.medium { width: 55%; }
.mab-skel-bar.narrow { width: 35%; }

.mab-skel-row { display: flex; gap: 12px; margin-top: 8px; }

.mab-skel-block {
    flex: 1; height: 100px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    animation: mab-shimmer 1.5s ease-in-out infinite;
}
.mab-skel-block:nth-child(2) { animation-delay: 0.2s; }
.mab-skel-block:nth-child(3) { animation-delay: 0.4s; }


/* ── Publish bar ─────────────────────── */

.mab-publish-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--mab-surface2);
    border-top: 1px solid var(--mab-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    min-height: 52px;
}

.mab-publish-left { flex: 0 0 auto; min-width: 170px; }

#mab-subdomain {
    width: 100%;
    background: var(--mab-surface);
    border: 1px solid var(--mab-border2);
    border-radius: 8px;
    color: var(--mab-text);
    font-size: 12px;
    padding: 8px 10px;
    outline: none;
    transition: all 0.15s ease;
}

#mab-subdomain:focus {
    border-color: rgba(59,130,246,0.4);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.06);
}

#mab-subdomain::placeholder { color: #666; }

.mab-publish-center { flex: 0 0 auto; }

#mab-publish-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--mab-accent), #34d399);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 22px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 2px 12px rgba(16,185,129,0.25);
}

#mab-publish-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(16,185,129,0.35);
}

#mab-publish-btn:active:not(:disabled) { transform: scale(0.97); }
#mab-publish-btn:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; }

#mab-publish-btn.publishing {
    background: linear-gradient(135deg, var(--mab-orange), #fb923c) !important;
    animation: mab-pulseOrange 2s ease-in-out infinite;
}

#mab-publish-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.mab-publish-right { flex: 1; text-align: right; }

#mab-token-total {
    font-size: 11px;
    color: var(--mab-purple);
    font-weight: 600;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace !important;
}


/* ═══════════════════════════════════════
   CELEBRATION OVERLAY
   ═══════════════════════════════════════ */

#mab-celebration {
    position: fixed;
    inset: 0;
    background: rgba(5,11,26,0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: mab-fadeIn 0.3s ease;
}

.mab-celebration-content {
    text-align: center;
    animation: mab-celebrationPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mab-celebration-icon {
    font-size: 64px;
    margin-bottom: 16px;
    animation: mab-rocketLaunch 1s ease-out;
}

.mab-celebration-content h2 {
    font-size: 28px !important;
    font-weight: 800 !important;
    margin: 0 0 8px !important;
    background: linear-gradient(135deg, #fff, var(--mab-accent)) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

#mab-celebration-url {
    color: var(--mab-muted) !important;
    font-size: 14px !important;
    margin: 0 0 20px !important;
}

.mab-celebration-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--mab-accent);
    color: #fff !important;
    text-decoration: none !important;
    padding: 12px 28px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.2s ease;
    box-shadow: 0 4px 20px rgba(16,185,129,0.3);
}

.mab-celebration-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(16,185,129,0.4);
    color: #fff !important;
}


/* ═══════════════════════════════════════
   KEYFRAMES
   ═══════════════════════════════════════ */

@keyframes mab-spin {
    to { transform: rotate(360deg); }
}

@keyframes mab-fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes mab-fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes mab-pulseOrange {
    0%, 100% { box-shadow: 0 0 0 0 rgba(249,115,22,0.6); }
    50%      { box-shadow: 0 0 0 6px rgba(249,115,22,0); }
}

@keyframes mab-shimmer {
    0%   { opacity: 0.4; }
    50%  { opacity: 0.8; }
    100% { opacity: 0.4; }
}

@keyframes mab-typingBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30%           { transform: translateY(-4px); }
}

@keyframes mab-celebrationPop {
    from { opacity: 0; transform: scale(0.5); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes mab-rocketLaunch {
    0%   { transform: translateY(20px) scale(0.8); opacity: 0; }
    50%  { transform: translateY(-10px) scale(1.1); }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes mab-pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.5; transform: scale(0.8); }
}


/* ═══════════════════════════════════════
   RESPONSIVO
   ═══════════════════════════════════════ */

@media (max-width: 900px) {
    #mab-app-builder {
        flex-direction: column;
    }

    #mab-chat-panel {
        flex: 0 0 auto;
        max-width: 100%;
        min-width: 100%;
        max-height: 45vh;
        border-right: none;
        border-bottom: 1px solid var(--mab-border);
    }

    #mab-preview-panel {
        flex: 1;
    }

    .mab-publish-bar { flex-wrap: wrap; gap: 8px; }
    .mab-publish-left { min-width: 120px; flex: 1; }

    .mab-url-bar { display: none; }
}
