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

html, body {
    width: 100vw;
    height: 100vh;
    background-color: #000000;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    user-select: none;
    -webkit-user-select: none;
    font-family: "Söhne", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #ececec;
}

/* ==========================================
 * 1. SIDEBAR LATERAL ULTRA-COMPACTA (PRETO PURO & BORDA 0.25PX)
 * Bem menor horizontalmente e 100% vazia (sem exibir histórico na tela)
 * ========================================== */
.sidebar {
    width: 52px;
    min-width: 52px;
    height: 100vh;
    background-color: #000000;
    border-right: 0.25px solid rgba(255, 255, 255, 0.24);
    z-index: 40;
    position: relative;
    pointer-events: none;
    overflow: hidden;
}

/* ==========================================
 * 2. VIEWPORT PRINCIPAL & TOPBAR ESTILO OPENAI / CHATGPT
 * ========================================== */
.main-viewport {
    flex: 1;
    height: 100vh;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-color: #000000;
}

#fx-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Topbar Minimalista OpenAI */
.openai-topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 25;
    pointer-events: none;
}

.openai-model-wrapper {
    position: relative;
    pointer-events: auto;
}

.openai-model-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 10px;
    background: transparent;
    border: none;
    outline: none;
    font-family: inherit;
    color: #ececec;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.openai-model-pill:hover,
.openai-model-pill.open {
    background: rgba(255, 255, 255, 0.07);
}

.openai-model-name {
    font-size: 15.5px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #f9fafb;
}

.openai-model-tag {
    font-size: 13.5px;
    font-weight: 450;
    letter-spacing: -0.01em;
    color: rgba(255, 255, 255, 0.54);
}

.openai-chevron {
    color: rgba(255, 255, 255, 0.45);
    margin-left: 1px;
    transition: transform 0.22s ease;
}

.openai-model-pill.open .openai-chevron {
    transform: rotate(180deg);
}

/* Menu Popover de Modelos estilo OpenAI */
.openai-model-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 295px;
    padding: 6px;
    border-radius: 14px;
    background: #1e1e1e;
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.82);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(0.98);
    transform-origin: top left;
    transition: opacity 0.18s ease, transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.18s ease;
    z-index: 50;
}

.openai-model-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.openai-dropdown-header {
    padding: 6px 10px 4px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.40);
}

.openai-dropdown-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 9px;
    background: transparent;
    border: none;
    outline: none;
    font-family: inherit;
    text-align: left;
    color: #ececec;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.openai-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.07);
}

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

.openai-item-title {
    font-size: 13.5px;
    font-weight: 500;
    color: #f9fafb;
}

.openai-item-desc {
    font-size: 11.5px;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.48);
}

.openai-check-icon {
    color: #ffffff;
    opacity: 0;
    flex-shrink: 0;
    transition: opacity 0.15s ease;
}

.openai-dropdown-item.selected .openai-check-icon {
    opacity: 1;
}

.openai-status-pill {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: border-color 0.25s ease, color 0.25s ease;
}

.openai-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10a37f;
    box-shadow: 0 0 8px rgba(16, 163, 127, 0.8);
}

/* ==========================================
 * 3. FLUXO DE TRANSCRIÇÃO FLUTUANTE (ESTÉTICA OPENAI VOICE)
 * Exibe apenas a fala atual palavra por palavra bem acima da esfera
 * ========================================== */
.speech-stream {
    position: absolute;
    bottom: calc(50% + 168px);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    pointer-events: none;
    width: 90%;
    max-width: 690px;
    text-align: center;
    z-index: 10;
    min-height: 110px;
    transition: bottom 0.72s cubic-bezier(0.16, 1, 0.3, 1);
}

.speech-stream.elevated {
    bottom: calc(50% + 190px);
}

.speech-line {
    font-size: 20.5px;
    font-weight: 440;
    line-height: 1.54;
    letter-spacing: -0.02em;
    margin: 4px 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: baseline;
    column-gap: 0.30em;
    row-gap: 2px;
    opacity: 0;
    transform: translateY(10px);
    filter: blur(4px);
    transition: opacity 0.42s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.42s cubic-bezier(0.16, 1, 0.3, 1), 
                filter 0.42s cubic-bezier(0.16, 1, 0.3, 1);
    word-break: break-word;
}

.speech-line.visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0px);
}

/* Palavra individual emergindo suavemente na frente da anterior */
.speech-word {
    display: inline-block;
    white-space: pre-wrap;
    opacity: 0;
    transform: translateY(6px) scale(0.96);
    filter: blur(5px);
    color: rgba(243, 244, 246, 0.92);
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.92);
    transition: opacity 0.34s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.34s cubic-bezier(0.16, 1, 0.3, 1), 
                filter 0.34s cubic-bezier(0.16, 1, 0.3, 1),
                color 0.32s ease,
                text-shadow 0.32s ease;
    will-change: opacity, transform, filter;
}

.speech-word.visible,
.speech-word.revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0px);
}

.speech-stream.user-speaking .speech-word,
.speech-line.user-speech .speech-word {
    color: rgba(255, 255, 255, 0.90);
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.95);
}

.speech-stream.ai-speaking .speech-word,
.speech-line.ai-speech .speech-word {
    color: rgba(236, 246, 255, 0.96);
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.95), 0 0 14px rgba(45, 145, 255, 0.35);
}

.speech-stream.ai-speaking .speech-word:last-child,
.speech-line.ai-speech .speech-word:last-child {
    color: #ffffff;
    text-shadow: 0 2px 22px rgba(0, 0, 0, 0.98), 0 0 18px rgba(85, 195, 255, 0.72);
}

/* Destaque sutil e orgânico para expressões onomatopeicas vocais (Humm..., Hamm..., Aham!, Uhum, Ham?) */
.speech-word.expressive-vocal {
    color: #9cd6ff !important;
    font-style: italic;
    letter-spacing: -0.005em;
    text-shadow: 0 2px 22px rgba(0, 0, 0, 0.98), 0 0 20px rgba(80, 180, 255, 0.75) !important;
}

.speech-line.fading-out,
.speech-line.fade-out {
    opacity: 0 !important;
    transform: translateY(-16px) scale(0.96) !important;
    filter: blur(7px) !important;
    transition: opacity 0.44s cubic-bezier(0.4, 0, 1, 1), 
                transform 0.44s cubic-bezier(0.4, 0, 1, 1), 
                filter 0.44s cubic-bezier(0.4, 0, 1, 1) !important;
}

/* ==========================================
 * 4. PALCO CENTRAL & ORBE DE ARTE ABSTRATA GERADA (ESTILO OPENAI ADVANCED VOICE)
 * Silhueta circular limpa com ondas borradas gigantes em ambos os estados
 * ========================================== */
.stage {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

.stage-ambient-glow {
    position: absolute;
    width: 440px;
    height: 440px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(35, 125, 255, 0.11) 0%, rgba(25, 95, 235, 0.03) 48%, transparent 72%);
    pointer-events: none;
    opacity: 0;
    transform: scale(0.75);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.stage-ambient-glow.active {
    opacity: 1;
    transform: scale(1.08);
}

.ball {
    position: relative;
    width: 302px;
    height: 302px;
    border-radius: 50%;
    cursor: pointer;
    overflow: hidden;
    outline: none;
    background-color: #216cf4;
    -webkit-tap-highlight-color: transparent;
    transform: translate3d(0, 0, 0) scale(0.36);
    will-change: transform;
    /* Física de mola 100% controlada em 120 FPS via RAF para zero conflito ou salto */
    transition: none !important;
    /* Recorte circular perfeito como na tela de voz da OpenAI */
    -webkit-mask-image: -webkit-radial-gradient(white, black);
}

/* Canvas da Onda Abstrata Borrada da IA (Azul Celeste & Nuvem Branca/Periwinkle) */
#fluid-canvas {
    position: absolute;
    top: -48px;
    left: -48px;
    width: calc(100% + 96px);
    height: calc(100% + 96px);
    pointer-events: none;
    filter: blur(28px) saturate(1.14);
    transform: translateZ(0);
    will-change: transform;
}

/* Canvas da Onda Abstrata Borrada do Usuário (Branco Puro & Nuvens Cinza/Prata Suaves) */
.ball-white-cover {
    position: absolute;
    top: -48px;
    left: -48px;
    width: calc(100% + 96px);
    height: calc(100% + 96px);
    pointer-events: none;
    opacity: 1;
    z-index: 3;
    filter: blur(26px);
    transform: translateZ(0);
    will-change: opacity, transform;
}

/* Acabamento limpo sem escurecimento nas bordas (fiel à estética minimalista da OpenAI) */
.ball-rim-gloss {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 4;
    background: transparent;
}

/* ==========================================
 * 5. DOCK INFERIOR ESTILO OPENAI ADVANCED VOICE MODE
 * Botões circulares táteis foscos (#1f1f1f) + Cápsula central DeAPI
 * ========================================== */
.voice-hud {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 14px;
    z-index: 20;
}

/* Botões Circulares Táteis Estilo OpenAI (Microfone à esquerda, X à direita) */
.openai-circle-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #1f1f1f;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ececec;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    outline: none;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.65);
    transition: border-radius 0.34s cubic-bezier(0.22, 1, 0.36, 1),
                background 0.26s ease,
                background-color 0.26s ease,
                transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.26s ease,
                color 0.22s ease,
                box-shadow 0.28s ease;
}

.openai-circle-btn:hover {
    background: #2b2b2b;
    border-color: rgba(255, 255, 255, 0.16);
    transform: scale(1.04);
}

.openai-circle-btn:active {
    transform: scale(0.95);
}

.mic-circle-btn.active-listening {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.24);
    color: #ffffff;
}

.mic-circle-btn.active-speaking {
    background: rgba(33, 108, 244, 0.22);
    border-color: rgba(75, 155, 255, 0.42);
    color: #8cc8ff;
    box-shadow: 0 0 24px rgba(33, 108, 244, 0.28);
}

/* Traços dinâmicos do ícone de Microfone (Traço sob o microfone + corte de mute) */
.mic-svg-icon {
    overflow: visible;
    transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

.mic-svg-icon .mic-under-slash {
    opacity: 0.32;
    transform-origin: 12px 22.2px;
    transform: scaleX(0.45);
    transition: opacity 0.28s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), stroke-width 0.25s ease;
}

.mic-svg-icon .mic-mute-slash {
    stroke-dasharray: 26;
    stroke-dashoffset: 26;
    opacity: 0;
    transition: stroke-dashoffset 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease;
}

/* Estado Mutado: Botão mais quadrado com bordas suavemente arredondadas (squircle 15px) e vermelho */
.mic-circle-btn.muted {
    border-radius: 15px !important;
    background: linear-gradient(145deg, #ef4444 0%, #dc2626 100%) !important;
    border-color: rgba(255, 180, 180, 0.46) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 26px rgba(239, 68, 68, 0.44), inset 0 1px 1px rgba(255, 255, 255, 0.28) !important;
}

.mic-circle-btn.muted:hover {
    background: linear-gradient(145deg, #f87171 0%, #ef4444 100%) !important;
    border-color: rgba(255, 205, 205, 0.62) !important;
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.56), inset 0 1px 1px rgba(255, 255, 255, 0.35) !important;
    transform: scale(1.05);
}

.mic-circle-btn.muted:active {
    transform: scale(0.94);
}

.mic-circle-btn.muted .mic-svg-icon {
    transform: translateY(-0.5px);
}

.mic-circle-btn.muted .mic-svg-icon .mic-under-slash {
    opacity: 1;
    transform: scaleX(1.08);
    stroke-width: 2.35;
}

.mic-circle-btn.muted .mic-svg-icon .mic-mute-slash {
    stroke-dashoffset: 0;
    opacity: 1;
    stroke-width: 2.25;
}

.stop-circle-btn:hover {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.38);
    color: #fca5a5;
}

/* Cápsula Central Fosca Estilo OpenAI */
.openai-center-pill {
    position: relative;
    z-index: 25;
    height: 52px;
    padding: 0 18px;
    border-radius: 999px;
    background: #171717;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    gap: 14px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: border-color 0.25s ease, background-color 0.25s ease;
}

.openai-center-pill:hover {
    background: #1c1c1c;
    border-color: rgba(255, 255, 255, 0.14);
}

.openai-live-indicator {
    display: flex;
    align-items: center;
    gap: 9px;
}

.hud-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.45);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.hud-dot.listening {
    background-color: #ffffff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
}

.hud-dot.thinking {
    background-color: #3b82f6;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.9);
}

.hud-dot.speaking {
    background-color: #38bdf8;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.95);
}

.hud-dot.muted {
    background-color: #ef4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.92);
}

.openai-center-pill.muted {
    border-color: rgba(239, 68, 68, 0.24);
}

.hud-mini-bars.muted span {
    background: rgba(239, 68, 68, 0.45);
    height: 3px !important;
}

.hud-mini-bars {
    display: flex;
    align-items: center;
    gap: 2.5px;
    height: 14px;
}

.hud-mini-bars span {
    display: block;
    width: 2px;
    height: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.62);
    transition: height 0.06s ease-out, background 0.25s ease;
}

.hud-status-text {
    font-size: 13px;
    font-weight: 450;
    letter-spacing: -0.01em;
    color: rgba(255, 255, 255, 0.84);
    white-space: nowrap;
}

.hud-divider {
    width: 1px;
    height: 18px;
    background: rgba(255, 255, 255, 0.10);
}

.hud-voice-picker {
    display: flex;
    align-items: center;
    gap: 7px;
    color: rgba(255, 255, 255, 0.65);
}

.voice-wave-icon {
    color: rgba(255, 255, 255, 0.52);
    flex-shrink: 0;
}

.deapi-voice-select {
    background: transparent;
    border: none;
    outline: none;
    color: rgba(255, 255, 255, 0.78);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 450;
    letter-spacing: -0.01em;
    cursor: pointer;
    padding: 4px 2px;
    transition: color 0.2s ease;
}

.deapi-voice-select:hover {
    color: #ffffff;
}

.deapi-voice-select option {
    background-color: #141414;
    color: #f3f4f6;
    padding: 8px;
}


/* ==========================================
 * 6. BOTÃO DE CHAT SLIDE-OUT & SIDEBAR DE CHAT ESTILO CHATGPT
 * ========================================== */

/* Botão de Chat no Dock Inferior: Surge de trás do painel da esquerda para a direita */
.chat-circle-btn {
    position: relative;
    z-index: 10;
    transition: transform 0.58s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.35s ease,
                background-color 0.22s ease,
                border-color 0.22s ease,
                box-shadow 0.22s ease;
}

.chat-circle-btn.chat-btn-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-56px) scale(0.45);
    visibility: hidden;
}

.chat-circle-btn.chat-btn-revealed {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0) scale(1);
    visibility: visible;
}

.chat-circle-btn.active {
    background: rgba(33, 108, 244, 0.26);
    border-color: rgba(75, 155, 255, 0.50);
    color: #8cc8ff;
    box-shadow: 0 0 24px rgba(33, 108, 244, 0.35);
}

/* Divisão Dinâmica de Tela: Layout principal com Sidebar do Chat */
body#app-body {
    display: flex;
    flex-direction: row;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-color: #000000;
}

.main-viewport {
    flex: 1 1 auto;
    min-width: 0;
    height: 100vh;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-color: #000000;
    transition: flex 0.42s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Sidebar do Chat à Direita estilo ChatGPT */
.chat-sidebar {
    width: 0;
    min-width: 0;
    max-width: 440px;
    flex-shrink: 0;
    height: 100vh;
    background: #171717;
    border-left: 1px solid transparent;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    z-index: 45;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(30px);
    transition: width 0.42s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.35s ease,
                transform 0.42s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.28s ease,
                visibility 0.42s;
}

body.chat-open .chat-sidebar {
    width: 420px;
    min-width: 420px;
    max-width: 420px;
    box-sizing: border-box;
    overflow-x: hidden;
    border-left-color: rgba(255, 255, 255, 0.08);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
}

/* Header da Sidebar do Chat */
.chat-sidebar-header {
    height: 56px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: #171717;
    flex-shrink: 0;
}

.chat-header-title-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-header-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10a37f;
    box-shadow: 0 0 10px rgba(16, 163, 127, 0.85);
}

.chat-header-title {
    font-size: 14.5px;
    font-weight: 500;
    color: #ececec;
    letter-spacing: -0.01em;
}

.chat-header-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s, color 0.18s;
}

.chat-header-close-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

/* Container de Mensagens do Chat */
.chat-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.chat-messages-container::-webkit-scrollbar {
    width: 5px;
}

.chat-messages-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.16);
    border-radius: 4px;
}

.chat-empty-state {
    margin: auto;
    text-align: center;
    padding: 24px;
    color: rgba(255, 255, 255, 0.42);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.chat-empty-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #10a37f;
}

.chat-empty-text {
    font-size: 13px;
    line-height: 1.5;
    max-width: 240px;
}

/* Linha de Mensagem (User vs Model) */
.chat-message-row {
    display: flex;
    flex-direction: column;
    width: 100%;
    animation: chatMessageFadeIn 0.28s ease-out;
}

@keyframes chatMessageFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-message-row.user {
    align-items: flex-end;
}

.chat-message-row.model {
    align-items: flex-start;
}

.chat-message-bubble {
    max-width: 90%;
    padding: 10px 14px;
    font-size: 13.5px;
    line-height: 1.54;
    letter-spacing: -0.01em;
    word-break: break-word;
}

.chat-message-row.user .chat-message-bubble {
    background: #2f2f2f;
    color: #ececec;
    border-radius: 18px 18px 4px 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.chat-message-row.model .chat-message-bubble {
    background: transparent;
    color: #ececec;
    padding-left: 2px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Badge de Áudio de Chamada (🔊 Ouvir Novamente) */
.chat-voice-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(33, 108, 244, 0.16);
    border: 1px solid rgba(75, 155, 255, 0.32);
    color: #8cc8ff;
    font-size: 11.5px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: background 0.18s, transform 0.15s, border-color 0.18s;
}

.chat-voice-badge:hover {
    background: rgba(33, 108, 244, 0.28);
    border-color: rgba(75, 155, 255, 0.52);
    color: #bae0ff;
    transform: scale(1.03);
}

.chat-voice-badge.playing {
    background: rgba(16, 163, 127, 0.22);
    border-color: rgba(16, 163, 127, 0.50);
    color: #6ee7b7;
}

/* Caixa Escura de Código com Botões Copiar e Editar */
.chat-code-block {
    margin: 10px 0;
    background: #0d1117;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    overflow: hidden;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Courier New', monospace;
    width: 100%;
}

.chat-code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 12px;
    background: #161b22;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 11.5px;
    color: #8b949e;
}

.chat-code-lang {
    font-weight: 600;
    text-transform: lowercase;
    color: #58a6ff;
}

.chat-code-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-code-btn {
    height: 24px;
    padding: 0 8px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: #c9d1d9;
    font-size: 11px;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.chat-code-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.chat-code-btn.copied {
    background: rgba(16, 163, 127, 0.25);
    border-color: rgba(16, 163, 127, 0.45);
    color: #34d399;
}

.chat-code-body {
    padding: 12px 14px;
    overflow-x: auto;
    font-size: 12px;
    line-height: 1.55;
    color: #e6edf3;
    white-space: pre;
    background: #0d1117;
}

.chat-code-body[contenteditable="true"] {
    outline: 1px dashed rgba(88, 166, 255, 0.5);
    background: #111722;
}

/* Footer com Input de Texto e Anexo estilo ChatGPT */
.chat-footer {
    padding: 12px 14px 18px;
    background: #171717;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.chat-attachment-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11.5px;
    color: #e5e7eb;
    margin-bottom: 8px;
}

.chat-attachment-pill button {
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 11px;
    padding: 0;
}

.chat-attachment-pill button:hover {
    color: #ef4444;
}

.chat-input-box {
    background: #212121;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 24px;
    padding: 6px 10px;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.chat-input-box:focus-within {
    border-color: rgba(255, 255, 255, 0.24);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.04);
}

.chat-attach-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.18s, background 0.18s;
    flex-shrink: 0;
}

.chat-attach-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.chat-text-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #ececec;
    font-size: 13.5px;
    font-family: inherit;
    resize: none;
    max-height: 120px;
    line-height: 1.45;
    padding: 6px 2px;
    margin: 0;
}

.chat-send-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ffffff;
    color: #000000;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.18s, transform 0.15s, opacity 0.15s;
}

.chat-send-btn:disabled,
.chat-send-btn.disabled {
    background: #2e2e2e;
    color: #6b7280;
    cursor: default;
    transform: none !important;
}

.chat-send-btn:not(:disabled):hover {
    background: #f0f0f0;
    transform: scale(1.05);
}

.chat-send-btn:not(:disabled):active {
    transform: scale(0.95);
}

/* ==========================================
 * 8. NAVEGADOR VIRTUAL INTEGRADO AO CHAT (GOOGLE ENGINE 1280x720)
 * TOTALMENTE COMPACTO NO CHAT & JANELA EM PRIMEIRO PLANO (SEM TELA CHEIA)
 * ========================================== */

/* Card Totalmente Compacto no Chat (Nunca expande o chat horizontalmente) */
.virtual-browser-card {
    width: 100% !important;
    max-width: 100% !important;
    margin: 8px 0 !important;
    border-radius: 10px;
    background: #0d1117;
    border: 1px solid rgba(59, 130, 246, 0.28);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    position: relative;
    box-sizing: border-box !important;
    animation: chatMessageFadeIn 0.3s ease-out;
}

.virtual-browser-card .vb-window-box {
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Barra Superior Compacta da Preview Inline */
.vb-compact-header {
    height: 32px;
    padding: 0 10px;
    background: #161b22;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    user-select: none;
    flex-shrink: 0;
}

.vb-compact-title {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #93c5fd;
    font-weight: 600;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vb-compact-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.vb-fg-btn {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.45);
    color: #93c5fd;
    font-size: 10.5px;
    font-weight: 500;
    padding: 2px 7px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.16s ease;
    user-select: none;
}

.vb-fg-btn:hover {
    background: rgba(59, 130, 246, 0.38);
    color: #ffffff;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

.vb-grid-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
}

.vb-grid-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.vb-grid-btn.active {
    background: rgba(59, 130, 246, 0.25);
    border-color: rgba(96, 165, 250, 0.4);
    color: #93c5fd;
}

/* Viewport Container 16:9 Estrito e Compacto */
.vb-viewport-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
}

.vb-viewport-container:hover .vb-hover-hint {
    opacity: 1;
}

.vb-hover-hint {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 12px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 60;
}

/* Stage Wrapper em 1280x720 Fixo com Escala Dinâmica Calculada */
.vb-stage-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 1280px;
    height: 720px;
    transform: scale(var(--vb-scale, 0.28));
    transform-origin: top left;
    background: #ffffff;
    overflow: hidden;
    pointer-events: auto;
}

/* Canvas do Plano Cartesiano (Overlay 1280x720) */
.vb-cartesian-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 1280px;
    height: 720px;
    pointer-events: none;
    z-index: 25;
    opacity: 0.90;
    transition: opacity 0.25s ease;
}

.vb-cartesian-canvas.hidden {
    opacity: 0;
}

/* ==========================================
 * NAVEGADOR VIRTUAL EM TELA TODA (FULLSCREEN MODAL GLOBAL)
 * ABERTO NA TELA TODA DO DISPOSITIVO E NUNCA PRESO AO CHAT
 * ========================================== */

body.vb-fullscreen-active {
    overflow: hidden !important;
}

.virtual-browser-card.fullscreen-mode {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    margin: 0 !important;
    border-radius: 0 !important;
    z-index: 9999999 !important;
    background: rgba(3, 7, 18, 0.88) !important;
    backdrop-filter: blur(18px) !important;
    -webkit-backdrop-filter: blur(18px) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 16px 20px 24px !important;
    box-sizing: border-box !important;
    border: none !important;
    box-shadow: none !important;
    overflow-y: auto !important;
    cursor: pointer;
    animation: fullFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.virtual-browser-card.fullscreen-mode .vb-window-box {
    max-height: 94vh;
    background: #0d1117;
    border: 1px solid rgba(59, 130, 246, 0.5);
    border-radius: 14px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.95), 0 0 50px rgba(59, 130, 246, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    cursor: default;
    margin: auto 0;
}

.virtual-browser-card.fullscreen-mode .vb-compact-header {
    height: 46px;
    padding: 0 16px;
    background: #161b22;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.virtual-browser-card.fullscreen-mode .vb-compact-title {
    font-size: 13.5px;
    font-weight: 600;
}

.virtual-browser-card.fullscreen-mode .vb-hover-hint {
    display: none;
}

.virtual-browser-card.fullscreen-mode .vb-viewport-container {
    cursor: default;
    background: #050505;
}

/* Placeholder no Chat quando o card é teleportado para Tela Toda */
.vb-inline-placeholder {
    width: 100% !important;
    max-width: 100% !important;
    margin: 8px 0;
    box-sizing: border-box;
}

.vb-inline-placeholder-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(13, 17, 23, 0.85);
    border: 1px dashed rgba(59, 130, 246, 0.45);
    border-radius: 10px;
    color: #cbd5e1;
    animation: chatMessageFadeIn 0.25s ease-out;
}

.vb-placeholder-icon {
    font-size: 22px;
    color: #60a5fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vb-placeholder-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.vb-placeholder-info strong {
    font-size: 12.5px;
    color: #f1f5f9;
    font-weight: 600;
}

.vb-placeholder-info span {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}

.vb-restore-chat-btn {
    padding: 6px 12px;
    font-size: 11.5px;
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.vb-restore-chat-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

/* Gaveta de Telemetria e Status em Tempo Real da IA */
.vb-telemetry-drawer {
    background: #0d1117;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    font-size: 11.5px;
    color: #cbd5e1;
    user-select: none;
}

.vb-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #141820;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.15s ease;
}

.vb-drawer-header:hover {
    background: #181d26;
}

.vb-drawer-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vb-drawer-title {
    font-weight: 600;
    color: #e2e8f0;
    font-size: 11px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
}

.vb-live-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.16);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.vb-live-status-pill.busy {
    background: rgba(59, 130, 246, 0.20);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.45);
}

.vb-live-status-pill.overthink {
    background: rgba(168, 85, 247, 0.25);
    color: #c084fc;
    border-color: rgba(168, 85, 247, 0.55);
    animation: pulsePurple 1.5s infinite;
}

@keyframes pulsePurple {
    0%, 100% { box-shadow: 0 0 6px rgba(168, 85, 247, 0.4); }
    50% { box-shadow: 0 0 16px rgba(168, 85, 247, 0.85); }
}

.vb-coords-pill {
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 10px;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.14);
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 2px 7px;
    border-radius: 4px;
}

.vb-drawer-chevron {
    color: #94a3b8;
    transition: transform 0.2s ease;
    font-size: 12px;
}

.vb-drawer-body {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #0a0d13;
    max-height: 280px;
    overflow-y: auto;
}

.vb-drawer-body.collapsed {
    display: none;
}

/* Sequência das 2 Imagens da IA (Frame Limpo e Frame Cartesiano) */
.vb-frames-strip {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.vb-frame-thumb-box {
    flex: 1;
    background: #11141c;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vb-frame-thumb-box:hover {
    border-color: rgba(59, 130, 246, 0.5);
    background: #151924;
}

.vb-frame-thumb-box.active {
    border-color: #38bdf8;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

.vb-frame-thumb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10px;
    color: #94a3b8;
    font-weight: 500;
}

.vb-frame-thumb-preview {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vb-frame-thumb-canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Painel de Overthink / Remodelagem Cognitiva da IA */
.vb-overthink-panel {
    background: rgba(30, 27, 75, 0.45);
    border: 1px solid rgba(168, 85, 247, 0.4);
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    animation: chatMessageFadeIn 0.3s ease;
}

.vb-overthink-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #d8b4fe;
}

.vb-overthink-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.vb-overthink-step {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 10.5px;
    transition: border-color 0.2s;
}

.vb-overthink-step.active {
    border-color: #a855f7;
    background: rgba(168, 85, 247, 0.15);
}

.vb-overthink-step-title {
    color: #a78bfa;
    font-weight: 600;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.vb-overthink-step-text {
    color: #e2e8f0;
    line-height: 1.35;
    font-size: 10px;
}

/* Histórico de Ações e Cliques em Tempo Real */
.vb-action-history {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 10px;
    color: #94a3b8;
    background: #07090e;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 6px 8px;
    max-height: 90px;
    overflow-y: auto;
}

.vb-action-log-entry {
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.3;
}

.vb-action-time {
    color: #64748b;
}

.vb-action-tag {
    color: #38bdf8;
    font-weight: 600;
}

.vb-action-desc {
    color: #cbd5e1;
}

/* Cursor de Streaming em Tempo Real (IDE) */
.chat-stream-cursor {
    display: inline-block;
    width: 7px;
    height: 14px;
    background: #38bdf8;
    vertical-align: middle;
    margin-left: 2px;
    animation: streamBlink 0.75s infinite;
}

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

/* Bloco de Pensamento estilo IDE / ChatGPT */
.chat-thought-block {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    margin: 6px 0 10px;
    overflow: hidden;
}

.chat-thought-summary {
    padding: 6px 10px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
    user-select: none;
    background: rgba(255, 255, 255, 0.03);
}

.chat-thought-summary:hover {
    color: #e2e8f0;
}

.chat-thought-content {
    padding: 8px 12px;
    font-size: 11.5px;
    line-height: 1.45;
    color: #cbd5e1;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Página Web Renderizada (Simulação Autêntica do Google) */
.vb-web-page {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    background: #ffffff;
    color: #202124;
    font-family: Arial, sans-serif;
    position: relative;
    z-index: 10;
}

/* Header do Google Search */
.google-search-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #ebebeb;
    background: #ffffff;
    gap: 12px;
}

.google-mini-logo {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    user-select: none;
    cursor: pointer;
}

.google-mini-logo span:nth-child(1) { color: #4285f4; }
.google-mini-logo span:nth-child(2) { color: #ea4335; }
.google-mini-logo span:nth-child(3) { color: #fbbc05; }
.google-mini-logo span:nth-child(4) { color: #4285f4; }
.google-mini-logo span:nth-child(5) { color: #34a853; }
.google-mini-logo span:nth-child(6) { color: #ea4335; }

.google-search-form {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.google-search-input {
    width: 100%;
    height: 36px;
    border-radius: 20px;
    border: 1px solid #dfe1e5;
    padding: 0 42px 0 16px;
    font-size: 13.5px;
    outline: none;
    background: #ffffff;
    color: #202124;
    box-shadow: 0 1px 6px rgba(32, 33, 36, 0.12);
    transition: box-shadow 0.2s;
}

.google-search-input:focus {
    box-shadow: 0 1px 8px rgba(32, 33, 36, 0.22);
}

.google-search-btn-icon {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: #4285f4;
    display: flex;
    align-items: center;
}

/* Lista de Resultados do Google */
.google-results-container {
    padding: 14px 18px 24px;
}

.google-results-stats {
    font-size: 11.5px;
    color: #70757a;
    margin-bottom: 14px;
}

.google-result-item {
    margin-bottom: 18px;
    animation: chatMessageFadeIn 0.25s ease-out;
}

.google-result-url {
    font-size: 11.5px;
    color: #202124;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 3px;
    text-decoration: none;
}

.google-result-url span {
    color: #5f6368;
    font-size: 11px;
}

.google-result-title {
    font-size: 15px;
    color: #1a0dab;
    text-decoration: none;
    font-weight: 500;
    line-height: 1.35;
    display: inline-block;
    cursor: pointer;
}

.google-result-title:hover {
    text-decoration: underline;
}

.google-result-snippet {
    font-size: 12.5px;
    line-height: 1.5;
    color: #4d5156;
    margin-top: 4px;
}

/* Cursor Minimalista Brilhante Azul e Branco da IA */
.vb-ai-cursor {
    position: absolute;
    width: 24px;
    height: 24px;
    top: 50%;
    left: 50%;
    transform: translate(-2px, -2px);
    pointer-events: none;
    z-index: 50;
    transition: left 0.65s cubic-bezier(0.25, 1, 0.5, 1),
                top 0.65s cubic-bezier(0.25, 1, 0.5, 1),
                transform 0.15s ease;
    filter: drop-shadow(0 0 10px rgba(96, 165, 250, 0.95)) drop-shadow(0 0 20px rgba(59, 130, 246, 0.7));
}

.vb-ai-cursor.hovering {
    transform: translate(-2px, -2px) scale(1.15);
}

.vb-cursor-coord {
    position: absolute;
    top: -22px;
    left: 18px;
    background: rgba(15, 23, 42, 0.88);
    color: #93c5fd;
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    border: 1px solid rgba(147, 197, 253, 0.35);
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Ondas de Clique (Left & Right Click Ripple) */
.vb-click-ripple {
    position: absolute;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.2);
    animation: vbRippleAnim 0.55s ease-out forwards;
    z-index: 45;
}

.vb-click-ripple.left {
    border: 2px solid #38bdf8;
    background: rgba(56, 189, 248, 0.28);
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.85);
}

.vb-click-ripple.right {
    border: 2px solid #a855f7;
    background: rgba(168, 85, 247, 0.28);
    box-shadow: 0 0 14px rgba(168, 85, 247, 0.85);
}

@keyframes vbRippleAnim {
    0% { transform: translate(-50%, -50%) scale(0.2); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(2.8); opacity: 0; }
}

/* Menu Contextual do Botão Direito */
.vb-context-menu {
    position: absolute;
    background: #1f1f1f;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
    padding: 5px 0;
    z-index: 55;
    min-width: 170px;
    animation: chatMessageFadeIn 0.18s ease-out;
}

.vb-context-item {
    padding: 7px 14px;
    font-size: 11.5px;
    color: #e5e7eb;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.15s;
}

.vb-context-item:hover {
    background: #2563eb;
    color: #ffffff;
}

/* Modal de Bloqueio Durante Ação da IA */
.vb-busy-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(2.5px);
    -webkit-backdrop-filter: blur(2.5px);
    z-index: 70;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: chatMessageFadeIn 0.22s ease-out;
}

.vb-busy-card {
    background: #181818;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.85);
}

.vb-busy-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(56, 189, 248, 0.25);
    border-top-color: #38bdf8;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.vb-busy-text {
    font-size: 12.5px;
    color: #f3f4f6;
    font-weight: 450;
}

.vb-busy-abort-btn {
    background: rgba(239, 68, 68, 0.18);
    border: 1px solid rgba(239, 68, 68, 0.45);
    color: #fca5a5;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.18s, color 0.18s, transform 0.15s;
}

.vb-busy-abort-btn:hover {
    background: rgba(239, 68, 68, 0.35);
    color: #ffffff;
    transform: scale(1.03);
}

/* Toast de Memória Gravada */
.memory-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.memory-toast {
    background: #1a1a1a;
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 10px;
    padding: 10px 14px;
    color: #e2e8f0;
    font-size: 12.5px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
    animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
    max-width: 320px;
}

.memory-toast-icon {
    font-size: 16px;
    flex-shrink: 0;
}

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

/* ==========================================
 * 9. RESPONSIVIDADE PARA SMARTPHONES E TELAS MENORES
 * ========================================== */

@media (max-width: 900px) {
    body.chat-open .chat-sidebar {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100vw;
        min-width: 100vw;
        max-width: 100vw;
        height: 100dvh;
        z-index: 100;
        border-left: none;
    }
}

@media (max-width: 768px) {
    body#app-body {
        height: 100dvh;
        min-height: 100dvh;
    }

    .main-viewport {
        height: 100dvh;
        min-height: 100dvh;
    }

    /* Esfera adaptada para mobile */
    .stage {
        transform: scale(0.72) !important;
        transform-origin: center center;
    }

    .openai-topbar {
        padding: 10px 14px;
    }

    .openai-model-pill {
        padding: 5px 12px;
        font-size: 12.5px;
    }

    /* Dock de Microfone no Mobile */
    .voice-hud {
        bottom: 16px;
        gap: 8px;
        max-width: 96vw;
        width: auto;
    }

    .openai-circle-btn {
        width: 46px;
        height: 46px;
    }

    .openai-center-pill {
        height: 46px;
        padding: 0 12px;
        gap: 8px;
    }

    .hud-status-text {
        font-size: 12px;
        max-width: 110px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .hud-divider,
    .voice-wave-icon {
        display: none;
    }

    .deapi-voice-select {
        font-size: 11px;
        max-width: 100px;
    }

    /* Chat adaptado para mobile */
    .chat-messages-container {
        padding: 14px 12px;
    }

    .chat-message-bubble {
        max-width: 96%;
        font-size: 13px;
    }

    .chat-footer {
        padding: 10px 12px max(14px, env(safe-area-inset-bottom));
    }

    .vb-viewport-container {
        aspect-ratio: 16 / 9;
        height: auto;
    }
}

@media (max-width: 480px) {
    .stage {
        transform: scale(0.64) !important;
    }

    .voice-hud {
        gap: 6px;
    }

    .openai-circle-btn {
        width: 42px;
        height: 42px;
    }

    .openai-center-pill {
        height: 42px;
        padding: 0 10px;
        gap: 6px;
    }

    .hud-status-text {
        font-size: 11px;
        max-width: 95px;
    }

    .deapi-voice-select {
        display: none;
    }
}
