/* ============ RESET E BASE ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ============ SISTEMA DE FONT-SIZE PROPORCIONAL ============ */
html {
    /* Font-size base proporcional para 1920x1080 */
    font-size: clamp(0.8vw, 1vw, 1.2vw); /* Base: 16px em 1920px = 0.833vw */
    
    /* Fallback para navegadores que não suportam clamp */
    font-size: 1vw;
    
    /* Garante altura mínima */
    min-height: 100vh;
    min-height: -webkit-fill-available;
}

/* ============ SISTEMA DE RESPONSIVIDADE PROPORCIONAL COMPLETO ============ */
/* 
   OBJETIVO: Layout idêntico em todas as telas, baseado em 1920x1080
   ESTRATÉGIA: Unidades proporcionais (vw/vh/rem) + CSS Custom Properties
   RESULTADO: Elimina necessidade de zoom manual e garante consistência visual
   
   CONVERSÕES BASE:
   - 1px horizontal = 0.0520833333vw (1920px base)
   - 1px vertical = 0.0925925926vh (1080px base)
   - Font-size: HTML base (clamp 0.8vw-1.2vw) + CSS Custom Properties
   - Limites: max() para evitar crescimento excessivo em 4K+
*/

/* ============ VARIÁVEIS PROPORCIONAIS BASEADAS EM 1920x1080 ============ */
:root {
    /* Sistema proporcional: 1px = 0.0520833333vw (1920px) e 0.0925925926vh (1080px) */
    --base-unit-vw: 0.0520833333vw; /* 1px horizontal */
    --base-unit-vh: 0.0925925926vh; /* 1px vertical */
    
    /* Font-sizes padronizados em rem (escalam com html) */
    --font-xs: 0.7rem;    /* ~11px */
    --font-sm: 0.875rem;  /* ~14px */
    --font-base: 1rem;    /* ~16px */
    --font-lg: 1.125rem;  /* ~18px */
    --font-xl: 1.25rem;   /* ~20px */
    --font-2xl: 1.5rem;   /* ~24px */
    --font-3xl: 1.875rem; /* ~30px */
    --font-4xl: 2.25rem;  /* ~36px */
    --font-5xl: 3rem;     /* ~48px */
    --font-6xl: 3.75rem;  /* ~60px */
    
    /* Fallbacks de compatibilidade */
    --vh: 1vh;
    --vw: 1vw;

    /* Limites proporcionais para displays 4K+ (evita crescimento excessivo) */
    --max-container-width: min(41.67vw, 800px);   /* Não cresce além do tamanho original */
    --max-container-height: min(55.55vh, 600px);  /* Mantém proporcionalidade */
    --max-notebook-width: min(20.83vw, 400px);    /* Notebook proporcional com limite */
}

body {
    overflow: hidden;
    font-family: Arial, sans-serif;
    background: #0a0a1a;
    /* Fix para iOS Safari viewport height */
    min-height: 100vh;
    min-height: -webkit-fill-available;
}

/* ============ CONTROLE DE SCROLL QUANDO MODAL ABERTO ============ */
body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* ============ ANIMAÇÃO FADE-IN INICIAL SUAVE ============ */
.fade-in-start {
    opacity: 0;
    transform: translateY(1.85vh); /* 20px → 1.85vh */
    animation: fadeInPush 0.6s ease-out forwards;
}

@keyframes fadeInPush {
    0% {
        opacity: 0;
        transform: translateY(1.85vh); /* 20px → 1.85vh */
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============ ANIMAÇÃO LEGADA PRESERVADA ============ */
@keyframes fadeInSuave {
    0% {
        opacity: 0;
        transform: translateY(3.7vh) scale(0.9); /* 40px → 3.7vh */
        filter: blur(0.104vw); /* 2px → 0.104vw */
    }
    60% {
        opacity: 0.8;
        transform: translateY(0.926vh) scale(0.98); /* 10px → 0.926vh */
        filter: blur(0.026vw); /* 0.5px → 0.026vw */
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

/* ============ CENÁRIO PRINCIPAL ============ */
.cenario {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: linear-gradient(135deg, #0a0a1a 0%, #1a0a2e 50%, #16213e 100%);
}

/* ============ ELEMENTOS BASE DO CENÁRIO ============ */
.cenario img {
    position: absolute;
    object-fit: contain;
    image-rendering: auto;
    opacity: 0;
    transform: translateY(1.85vh); /* 20px → 1.85vh */
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.2s ease;
    will-change: transform;
}

/* ============ FUNDOS E BACKGROUNDS ============ */
.vanta-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.9;
}

.fundo {
    top: -41.67vh; /* -450px → -41.67vh */
    left: 0;
    width: 200vw;
    height: 138.89vh; /* 1500px → 138.89vh */
    z-index: 1;
    object-fit: cover;
    opacity: 0.3;
    filter: blur(0.052vw); /* 1px → 0.052vw */
}

/* ============ ELEMENTOS DO CENÁRIO ============ */
.robo {
    /* RESPONSIVO: Adapta a qualquer tela */
    top: clamp(1.04vw, 3vh, 2.604vw); /* 20px, 3vh, 50px → vw/vh */
    right: clamp(-7.81vw, -10vw, -0.521vw); /* -150px, -10vw, -10px → vw */
    height: auto;
    max-height: clamp(20.83vw, 86vh, 52.08vw); /* 400px, 86vh, 1000px → vw/vh */
    z-index: 3;
    /* Otimizado: Blur balanceado - visual preservado + performance */
    filter: drop-shadow(0 0 0.625vw rgba(138, 43, 226, 0.3)); /* 12px → 0.625vw */
    /* Otimizado: Aumentamos duração para reduzir frequência de repaint */
    animation: fadeInPush 0.6s ease-out forwards, robotBreathingOptimized 4s ease-in-out infinite 0.6s;
    /* Fade MUITO mais pronunciado - inicia mais cedo e é mais intenso */
    mask-image: linear-gradient(
        to bottom, 
        rgba(0,0,0,1) 0%, 
        rgba(0,0,0,1) 45%, 
        rgba(0,0,0,0.9) 55%, 
        rgba(0,0,0,0.7) 65%, 
        rgba(0,0,0,0.4) 75%, 
        rgba(0,0,0,0.2) 85%, 
        rgba(0,0,0,0.05) 95%, 
        rgba(0,0,0,0) 100%
    );
    -webkit-mask-image: linear-gradient(
        to bottom, 
        rgba(0,0,0,1) 0%, 
        rgba(0,0,0,1) 45%, 
        rgba(0,0,0,0.9) 55%, 
        rgba(0,0,0,0.7) 65%, 
        rgba(0,0,0,0.4) 75%, 
        rgba(0,0,0,0.2) 85%, 
        rgba(0,0,0,0.05) 95%, 
        rgba(0,0,0,0) 100%
    );
}

/* Fade suave entre robô e mesa - elimina corte visual seco */
.robo::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%; /* Aumentado para 60% - fade MUITO mais pronunciado */
    background: linear-gradient(
        to bottom, 
        transparent 0%, 
        rgba(10, 10, 15, 0.1) 10%,
        rgba(10, 10, 15, 0.3) 25%,
        rgba(10, 10, 15, 0.5) 40%,
        rgba(10, 10, 15, 0.7) 55%,
        rgba(10, 10, 15, 0.85) 70%,
        rgba(10, 10, 15, 0.95) 85%,
        rgba(10, 10, 15, 1) 100%
    );
    pointer-events: none; /* Não interfere na interação */
    z-index: 4; /* Acima do robô para aplicar o fade */
}

.mesa {
    position: absolute;
    bottom: -77vh;                  /* posição vertical da referência */
    left: -6%;                      /* centraliza horizontalmente */
    transform: translateX(-50%);    /* garante alinhamento no centro */
    
    display: block;
    width: 120vw;                   /* largura proporcional à tela */
    max-width: 2400px;              /* trava tamanho máximo */
    height: auto;
    object-fit: contain;

    z-index: 1;
    filter: drop-shadow(0 0 0.625vw rgba(0, 150, 255, 0.2));
    animation: fadeInPush 0.6s ease-out forwards;
    transition: width 0.2s ease-out, transform 0.2s ease-out;
}

.notebook {
    position: absolute;
    bottom: -45vh;
    left: -37vw;

    display: block;
    width: 94vw !important;    /* aumentei de 28vw para 34vw */
    max-width: 1950px !important; /* aumentei limite máximo */
    height: auto;
    aspect-ratio: 16/10;
    object-fit: contain;

    z-index: 2;
    filter: drop-shadow(0 0 0.521vw rgba(0, 150, 255, 0.3));
    animation: fadeInPush 0.6s ease-out forwards, subtleGlowOptimized 5s ease-in-out infinite 0.6s;
    transition: width 0.2s ease-out, transform 0.2s ease-out;
}

.teclado {
    position: absolute;
    bottom: -30vh;              /* distância do chão — ajuste fino aqui */
    left: 29vw;                /* distância da lateral esquerda */
    
    display: block;
    width: 45vw;               /* proporcional à tela */
    max-width: 800px;          /* limite para telas grandes */
    height: auto;
    object-fit: contain;

    z-index: 2;
    filter: drop-shadow(0 0 0.417vw rgba(0, 150, 255, 0.25));
    animation: fadeInPush 0.6s ease-out forwards, subtleGlowOptimized 4s ease-in-out infinite 0.6s;

    transform-origin: center;
    transition: transform 0.2s ease-out, width 0.2s ease-out;
}

/* Garantir estado inicial */
.notebook, .teclado, .mesa, .robo, .caixas {
    opacity: 0;
    transform: translateY(1.85vh);
}

/* ============ ANIMAÇÃO DE ENTRADA PARA DESKTOP ============ */
@media (min-width: 768px) {
    .notebook, .teclado {
        animation-delay: 0.8s;
        animation-fill-mode: forwards;
    }
}

.caixas {
    bottom: clamp(1%, 3vh, 5%);
    left: clamp(-10%, -7vw, -4%);
    height: auto;
    max-height: clamp(80vh, 115vh, 140vh);
    z-index: 2;
    filter: drop-shadow(0 0 0.781vw rgba(138, 43, 226, 0.4)); /* 15px → 0.781vw */
    animation: fadeInPush 0.6s ease-out forwards, subtleGlowOptimized 3.5s ease-in-out infinite 0.6s;
}

/* ============ OVERLAY DE PARTÍCULAS ============ */
.particles-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 4;
    pointer-events: none;
    background: radial-gradient(circle at 50% 50%, rgba(138, 43, 226, 0.08) 0%, transparent 70%);
    animation: fadeInPush 0.6s ease-out forwards, particleFloatOptimized 10s ease-in-out infinite 0.6s;
    will-change: transform;
}

/* ============ EFEITOS HOVER DO CENÁRIO ============ */
.robo:hover {
    transform: scale(1.03) rotate(1deg);
}

.notebook:hover {
    transform: scale(1.06) translateY(-0.463vh); /* -5px → -0.463vh */
}

.teclado:hover {
    transform: scale(1.05) translateY(-0.278vh); /* -3px → -0.278vh */
}

.mesa:hover {
    opacity: 0.9;
}

.caixas:hover {
    transform: scale(1.04) translateY(-0.741vh); /* -8px → -0.741vh */
}

/* ============ ANIMAÇÕES DO CENÁRIO ============ */
@keyframes fundoEntrance {
    0% {
        opacity: 0;
        transform: translateY(2.78vh); /* 30px → 2.78vh */
    }
    100% {
        opacity: 0.3;
        transform: translateY(0);
    }
}

@keyframes robotEntranceAndBreathing {
    0% {
        opacity: 0;
        transform: translateY(3.70vh) scale(0.95); /* 40px → 3.70vh */
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes notebookEntranceAndGlow {
    0% {
        opacity: 0;
        transform: translateY(3.24vh) scale(0.9); /* 35px → 3.24vh */
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* OTIMIZADO: Apenas transform e opacity */
@keyframes robotBreathingOptimized {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.01);
        opacity: 0.95;
    }
}

/* OTIMIZADO: Apenas transform */
@keyframes subtleGlowOptimized {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.005);
        opacity: 0.92;
    }
}

@keyframes particleFloatOptimized {
    0%, 100% {
        opacity: 0.3;
        transform: translateY(0);
    }
    50% {
        opacity: 0.6;
        transform: translateY(-0.926vh); /* -10px → -0.926vh */
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(4.63vh) scale(0.9); /* 50px → 4.63vh */
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ============ ANIMAÇÕES DE CARREGAMENTO ============ */
.fallback-animation .cenario img {
    animation: fadeInUp 0.6s ease-out forwards;
    will-change: transform, opacity;
}

.fallback-animation .fundo { animation-delay: 0s; }
.fallback-animation .mesa { animation-delay: 0.05s; }
.fallback-animation .caixas { animation-delay: 0.1s; }
.fallback-animation .notebook { animation-delay: 0.15s; }
.fallback-animation .teclado { animation-delay: 0.2s; }
.fallback-animation .robo { animation-delay: 0.25s; }

/* ============ CHATBOT - CONTAINER PRINCIPAL ============ */
.chatbot-container {
    position: fixed;
    top: 3.7vh;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;

    width: var(--max-container-width);
    max-width: 800px;

    height: 75vh;              /* altura inicial */
    max-height: 70vh;          /* ❗ impede crescimento além disso */
    min-height: 450px;

    background: linear-gradient(145deg, 
        rgba(10, 15, 35, 0.95), 
        rgba(15, 25, 55, 0.95), 
        rgba(20, 10, 45, 0.95)
    );
    border: 0.104vw solid rgba(0, 150, 255, 0.3);
    border-radius: 1.25vw;
    box-shadow: 0 0 3.125vw rgba(0, 150, 255, 0.3);
    overflow: hidden;
    opacity: 0;
    will-change: transform, opacity;
    transition: transform 0.3s ease, height 0.3s ease; /* animação suave */
}

/* ============ CHATBOT - ESTADO WELCOME ============ */
.chatbot-welcome-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 5.56vh 2.6vw 3.7vh; /* 60px 50px 40px → vh/vw */
    opacity: 1;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.chatbot-robot-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 5.09vh; /* 55px → 5.09vh */
}

.chatbot-main-robot {
    position: relative;
    top: 1.85vh; /* 20px → 1.85vh */
    width: 13.02vw; /* 250px → 13.02vw */
    height: 16.67vh; /* 180px → 16.67vh */
    object-fit: contain;
    filter: 
        drop-shadow(0 0 0.9375vw rgba(0, 150, 255, 0.6)) /* 18px → 0.9375vw */
        drop-shadow(0 0 1.8229vw rgba(138, 43, 226, 0.4)); /* 35px → 1.8229vw */
    animation: chatbotMainRobotFloatOptimized 1.6s ease-in-out infinite;
    will-change: transform;
}

/* ============ CHATBOT - BRANDING ============ */
.chatbot-branding {
    text-align: center;
    margin: 0px 0;
}

.chatbot-main-title {
    position: relative;
    font-family: 'Orbitron', monospace;
    font-size: var(--font-6xl); /* 3.5rem → proporcional */
    font-weight: 900;
    background: linear-gradient(45deg, 
        #00bfff, 
        #0099ff, 
        #6699ff, 
        #6633cc, 
        #8b1a7e
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 300% 300%;
    margin-bottom: 0.185vh; /* 2px → 0.185vh */
    text-shadow: 0 0 2.083vw rgba(0, 150, 255, 0.5); /* 40px → 2.083vw */
    animation: chatbotTitleGradientOptimized 1.2s ease-in-out infinite alternate;
    letter-spacing: 0.104vw; /* 2px → 0.104vw */
    will-change: background-position;
}

.chatbot-main-subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: var(--font-xl); /* 1.4rem → proporcional */
    color: rgba(255, 255, 255, 0.8);
    font-weight: 300;
    margin: 0;
    text-shadow: 0 0 1.042vw rgba(0, 150, 255, 0.3); /* 20px → 1.042vw */
}

/* ============ CHATBOT - INPUT SECTION CORRIGIDO ============ */
.chatbot-input-section {
    width: 100%;
    margin-top: auto;
}

.chatbot-input-field {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.625vw; /* 12px → 0.625vw */
    background: linear-gradient(135deg, 
        rgba(0, 150, 255, 0.1), 
        rgba(138, 43, 226, 0.1)
    );
    border: 0.104vw solid rgba(0, 150, 255, 0.3); /* 2px → 0.104vw */
    border-radius: 2.604vw; /* 50px → 2.604vw */
    padding: 0.055vh 0.625vw 0.055vh 0.055vh; /* 0.6px 12px 0.6px 0.6px → vh/vw */
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.chatbot-input-field:focus-within {
    border-color: rgba(0, 150, 255, 0.6);
    box-shadow: 0 0 1.302vw rgba(0, 150, 255, 0.4); /* 25px → 1.302vw */
    background: linear-gradient(135deg, 
        rgba(0, 150, 255, 0.15), 
        rgba(138, 43, 226, 0.15)
    );
}

/* Botão + sempre à esquerda */
.chatbot-add-btn {
    order: -2;
    flex-shrink: 0;
}

/* Input sempre no meio */
.chatbot-main-input {
    flex: 1;
    padding: 1.296vh 1.25vw; /* 14px 24px → vh/vw */
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Poppins', sans-serif;
    font-size: var(--font-lg); /* 1.15rem → proporcional */
    outline: none;
    transition: color 0.15s ease;
    order: 0;
}

/* Microfone sempre à direita do input, antes do botão de envio */
.chatbot-mic-icon {
    order: 1;
    margin-left: 0.417vw; /* 8px → 0.417vw */
    margin-right: 0.417vw; /* 8px → 0.417vw */
    font-size: var(--font-xl); /* 1.3rem → proporcional */
    color: rgba(0, 150, 255, 0.7);
    transition: color 0.15s ease, transform 0.15s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.chatbot-mic-icon:hover {
    color: rgba(0, 150, 255, 1);
    transform: scale(1.1);
}

/* Botão de envio sempre no final */
.chatbot-send-button {
    order: 2;
    flex-shrink: 0;
}

.chatbot-main-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
    font-size: var(--font-sm); /* 0.95rem → proporcional */
}

/* ============ CHATBOT - BOTÕES ============ */
.chatbot-send-button, .chatbot-active-send-btn {
    border: none;
    background: #2563eb;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.chatbot-send-button {
    width: 2.1875vw; /* 42px → 2.1875vw */
    height: 3.889vh; /* 42px → 3.889vh */
    font-size: var(--font-base); /* 1rem → proporcional */
    box-shadow: 0 0.185vh 0.556vh rgba(37, 99, 235, 0.3); /* 2px 6px → vh */
}

.chatbot-active-send-btn {
    width: 1.979vw; /* 38px → 1.979vw */
    height: 3.519vh; /* 38px → 3.519vh */
    font-size: var(--font-sm); /* 0.9rem → proporcional */
    box-shadow: 0 0.185vh 0.370vh rgba(37, 99, 235, 0.3); /* 2px 4px → vh */
}

.chatbot-send-button:hover, .chatbot-active-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0.370vh 1.111vh rgba(37, 99, 235, 0.4); /* 4px 12px → vh */
    background: #1d4ed8;
}

.chatbot-send-button:active, .chatbot-active-send-btn:active {
    transform: scale(0.95);
}

/* Botão de envio sempre no final no mobile */
.chatbot-send-button svg, .chatbot-active-send-btn svg {
    transition: transform 0.2s ease;
}

.chatbot-send-button:hover svg, .chatbot-active-send-btn:hover svg {
    transform: translateX(0.104vw); /* 2px → 0.104vw */
}

.chatbot-send-button:active svg, .chatbot-active-send-btn:active svg {
    transform: scale(0.9);
}

/* ============ CHATBOT - ESTADO ATIVO ============ */
.chatbot-active-state {
    display: none;
    flex-direction: column;
    height: 100%;
    opacity: 0;
}

.chatbot-active-state.active {
    display: flex;
    opacity: 1;
}

.chatbot-header-bar {
    padding: 2.315vh 1.5625vw; /* 25px 30px → vh/vw */
    background: linear-gradient(135deg, 
        rgba(0, 150, 255, 0.15), 
        rgba(138, 43, 226, 0.15)
    );
    border-bottom: 0.052vw solid rgba(0, 150, 255, 0.3); /* 1px → 0.052vw */
    display: flex;
    justify-content: center;
    align-items: center;
}

.chatbot-header-centered {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.chatbot-header-text {
    display: flex;
    flex-direction: column;
    text-align: center;
}

.chatbot-header-name {
    font-family: 'Orbitron', monospace;
    font-size: var(--font-2xl); /* 1.6rem → proporcional */
    font-weight: 700;
    background: linear-gradient(45deg, #00bfff, #8a2be2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.chatbot-header-desc {
    font-family: 'Poppins', sans-serif;
    font-size: var(--font-base); /* 1rem → proporcional */
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.278vh; /* 3px → 0.278vh */
}

/* ============ CHATBOT - ÁREA DE CONVERSA ============ */
.chatbot-conversation-area {
    flex: 1;
    padding: 2.778vh; /* 30px → 2.778vh */
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 150, 255, 0.5) transparent;
}

.chatbot-conversation-area::-webkit-scrollbar {
    width: 0.3125vw; /* 6px → 0.3125vw */
}

.chatbot-conversation-area::-webkit-scrollbar-track {
    background: transparent;
}

.chatbot-conversation-area::-webkit-scrollbar-thumb {
    background: rgba(0, 150, 255, 0.5);
    border-radius: 0.156vw; /* 3px → 0.156vw */
}

/* ============ CHATBOT - MENSAGENS ============ */
.chatbot-message {
    display: flex;
    gap: 0;
    margin-bottom: 2.315vh; /* 25px → 2.315vh */
    animation: chatbotMessageAppearOptimized 0.25s ease-out;
}

.chatbot-message-user {
    flex-direction: row-reverse;
}

.chatbot-message-avatar {
    display: none !important;
}

.chatbot-message-assistant .chatbot-message-avatar {
    display: none !important;
}

.chatbot-message-user .chatbot-message-avatar {
    display: none !important;
}

.chatbot-message-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.741vh; /* 8px → 0.741vh */
    width: 100%;
    max-width: 100%;
}

.chatbot-message-bubble {
    padding: 1.2vh 0.8vw; /* leve redução no padding */
    border-radius: 1.042vw;
    font-family: 'Poppins', sans-serif;
    font-size: clamp(0.7rem, 0.8vw, 1rem);
    line-height: 1.4;
    max-width: 100%;
    word-wrap: break-word;
    position: relative;
}

.chatbot-message-assistant .chatbot-message-bubble {
    background: linear-gradient(135deg, 
        rgba(0, 150, 255, 0.15), 
        rgba(138, 43, 226, 0.1)
    );
    color: rgba(255, 255, 255, 0.9);
    border: 0.052vw solid rgba(0, 150, 255, 0.3); /* 1px → 0.052vw */
    border-radius: 1.042vw 1.042vw 1.042vw 0.260vw; /* 20px 20px 20px 5px → vw */
}

.chatbot-message-user .chatbot-message-bubble {
    background: linear-gradient(135deg, 
        rgba(138, 43, 226, 0.15), 
        rgba(0, 150, 255, 0.1)
    );
    color: rgba(255, 255, 255, 0.9);
    border: 0.052vw solid rgba(138, 43, 226, 0.3); /* 1px → 0.052vw */
    border-radius: 1.042vw 1.042vw 0.260vw 1.042vw; /* 20px 20px 5px 20px → vw */
    margin-left: auto;
}

.chatbot-message-timestamp {
    font-size: var(--font-xs); /* 0.8rem → proporcional */
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Poppins', sans-serif;
}

.chatbot-message-user .chatbot-message-timestamp {
    text-align: right;
}

/* ============ MENSAGENS SEM AVATAR - LARGURA MÁXIMA ============ */
.chatbot-message-bubble {
    max-width: 100%;
    width: 100%;
}

.chatbot-message-user .chatbot-message-content {
    align-items: flex-end;
    width: 100%;
}

.chatbot-message-assistant .chatbot-message-content {
    align-items: flex-start;
    width: 100%;
}

/* ============ CHATBOT - INPUT ATIVO CORRIGIDO ============ */
.chatbot-input-area {
    padding: 1.389vh 1.5625vw; /* 15px 30px → vh/vw */
    border-top: 0.052vw solid rgba(0, 150, 255, 0.3); /* 1px → 0.052vw */
    background: linear-gradient(135deg, 
        rgba(10, 15, 35, 0.8), 
        rgba(20, 10, 45, 0.8)
    );
}

.chatbot-active-input-field {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.625vw; /* 12px → 0.625vw */
    background: linear-gradient(135deg, 
        rgba(0, 150, 255, 0.1), 
        rgba(138, 43, 226, 0.1)
    );
    border: 0.104vw solid rgba(0, 150, 255, 0.3); /* 2px → 0.104vw */
    border-radius: 2.604vw; /* 50px → 2.604vw */
    padding: 0.055vh 0.625vw 0.055vh 0.055vh; /* 0.6px 12px 0.6px 0.6px → vh/vw */
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.chatbot-active-input-field:focus-within {
    border-color: rgba(0, 150, 255, 0.6);
    box-shadow: 0 0 1.302vw rgba(0, 150, 255, 0.4); /* 25px → 1.302vw */
    background: linear-gradient(135deg, 
        rgba(0, 150, 255, 0.15), 
        rgba(138, 43, 226, 0.15)
    );
}

/* Botão + sempre à esquerda no estado ativo */
.chatbot-active-input-field .chatbot-add-btn {
    order: -2;
    flex-shrink: 0;
}

/* Input sempre no meio no estado ativo */
.chatbot-active-input {
    flex: 1;
    padding: 1.296vh 1.25vw; /* 14px 24px → vh/vw */
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Poppins', sans-serif;
    font-size: var(--font-lg); /* 1.05rem → proporcional */
    outline: none;
    transition: color 0.15s ease;
    order: 0;
}

/* Microfone sempre à direita do input no estado ativo */
.chatbot-active-input-field .chatbot-mic-icon {
    order: 1;
    width: 1.25vw !important; /* 24px → 1.25vw */
    height: 2.222vh !important; /* 24px → 2.222vh */
    margin-left: 0.417vw !important; /* 8px → 0.417vw */
    margin-right: 0.417vw !important; /* 8px → 0.417vw */
    font-size: var(--font-xl) !important; /* 1.3rem → proporcional */
    color: rgba(0, 150, 255, 0.7) !important;
    transition: color 0.15s ease, transform 0.15s ease !important;
    cursor: pointer !important;
    flex-shrink: 0;
}

.chatbot-active-input-field .chatbot-mic-icon:hover {
    color: rgba(0, 150, 255, 1);
    transform: scale(1.1);
}

/* Botão de envio sempre no final no estado ativo */
.chatbot-active-send-btn {
    order: 2;
    flex-shrink: 0;
}

.chatbot-active-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
    font-size: var(--font-sm); /* 0.95rem → proporcional */
}

/* ============ CHATBOT - INDICADOR DE DIGITAÇÃO ============ */
.chatbot-typing-indicator {
    display: none !important; /* Removido da área do input */
}

/* Novo indicador de digitação na área de conversação */
.chatbot-conversation-typing {
    display: none;
    align-items: center;
    justify-content: flex-start;
    margin: 1.389vh 1.302vw; /* 15px 25px → vh/vw */
    padding: 1.389vh 1.042vw; /* 15px 20px → vh/vw */
    background: linear-gradient(135deg, 
        rgba(0, 150, 255, 0.08), 
        rgba(138, 43, 226, 0.08)
    );
    border-radius: 1.042vw 1.042vw 1.042vw 0.417vw; /* 20px 20px 20px 8px → vw */
    border-left: 0.156vw solid rgba(0, 150, 255, 0.3); /* 3px → 0.156vw */
    max-width: 80%;
}

.chatbot-conversation-typing.active {
    display: flex;
    animation: fadeInUp 0.3s ease;
}

.chatbot-conversation-typing .typing-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: var(--font-sm); /* 0.9rem → proporcional */
    margin-right: 0.521vw; /* 10px → 0.521vw */
}

.chatbot-conversation-typing .typing-dots {
    display: flex;
    gap: 0.208vw; /* 4px → 0.208vw */
}

.chatbot-conversation-typing .typing-dots span {
    width: 0.3125vw; /* 6px → 0.3125vw */
    height: 0.556vh; /* 6px → 0.556vh */
    background: rgba(0, 150, 255, 0.7);
    border-radius: 50%;
    animation: chatbotTypingAnimationOptimized 1s ease-in-out infinite;
}

.chatbot-conversation-typing .typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.chatbot-conversation-typing .typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

.chatbot-typing-indicator span:nth-child(2) {
    animation-delay: 0.15s;
}

.chatbot-typing-indicator span:nth-child(3) {
    animation-delay: 0.3s;
}

/* ============ BOTÕES DE AÇÃO DO CHATBOT ============ */
.chatbot-action-buttons {
    position: fixed;
    /* POSICIONAMENTO PROPORCIONAL: Sempre à direita do chatbot */
    bottom: 1.85vh; /* 20px → 1.85vh */
    right: 6.77vw; /* 130px → 6.77vw */
    display: flex;
    flex-direction: column;
    gap: 1.111vh; /* 12px → 1.111vh */
    z-index: 999;
    transform: rotate(-0deg);
    opacity: 0;
    animation: chatbotButtonsAppearOptimized 1s ease-out 1.2s forwards;
}

.chatbot-action-btn {
    background: rgba(0, 150, 255, 0.08);
    border: 0.052vw solid rgba(0, 150, 255, 0.4); /* 1px → 0.052vw */
    border-radius: 1.302vw; /* 25px → 1.302vw */
    padding: 0.741vh 1.042vw; /* 8px 20px → vh/vw */
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Poppins', sans-serif;
    font-size: var(--font-xs); /* 0.85rem → proporcional */
    font-weight: 400;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(0.781vw); /* 15px → 0.781vw */
    min-width: 8.33vw; /* 160px → 8.33vw */
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0.370vh 1.389vh rgba(0, 0, 0, 0.3); /* 4px 15px → vh */
    opacity: 0;
}

.chatbot-action-btn:nth-child(1) {
    animation: chatbotButtonSlideInOptimized 0.5s ease-out 1.4s forwards;
}

.chatbot-action-btn:nth-child(2) {
    animation: chatbotButtonSlideInOptimized 0.5s ease-out 1.6s forwards;
}

.chatbot-action-btn:nth-child(3) {
    animation: chatbotButtonSlideInOptimized 0.5s ease-out 1.8s forwards;
}

.chatbot-action-btn:nth-child(4) {
    animation: chatbotButtonSlideInOptimized 0.5s ease-out 2.0s forwards;
}

/* Botão Analisar Música - Destaque Especial */
.chatbot-action-btn.btn-analyze-highlight {
    background: linear-gradient(135deg, rgba(188, 19, 254, 0.25) 0%, rgba(0, 150, 255, 0.15) 100%);
    border: 1px solid rgba(188, 19, 254, 0.6);
    box-shadow: 
        0 0 15px rgba(188, 19, 254, 0.3),
        0 4px 20px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    color: #fff;
    font-weight: 500;
    text-shadow: 0 0 8px rgba(188, 19, 254, 0.5);
    position: relative;
    overflow: hidden;
}

.chatbot-action-btn.btn-analyze-highlight::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.chatbot-action-btn.btn-analyze-highlight:hover {
    background: linear-gradient(135deg, rgba(188, 19, 254, 0.4) 0%, rgba(0, 150, 255, 0.25) 100%);
    border-color: rgba(188, 19, 254, 0.8);
    box-shadow: 
        0 0 25px rgba(188, 19, 254, 0.5),
        0 6px 25px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.chatbot-action-btn:hover {
    transform: scale(1.02);
    background: rgba(0, 150, 255, 0.12);
    border-color: rgba(0, 150, 255, 0.5);
}

/* ============ TRANSIÇÕES E ANIMAÇÕES DO CHATBOT ============ */
.chatbot-welcome-state.fade-out {
    opacity: 0;
    transform: translateY(-2.78vh); /* -30px → -2.78vh */
    transition: opacity 0.3s ease, transform 0.3s ease;
}

@keyframes chatbotMainRobotFloatOptimized {
    0%, 100% { 
        transform: translateY(0) scale(1);
    }
    50% { 
        transform: translateY(-0.463vh) scale(1.02); /* -5px → -0.463vh */
    }
}

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

@keyframes chatbotMessageAppearOptimized {
    0% {
        opacity: 0;
        transform: translateY(2.315vh); /* 25px → 2.315vh */
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes chatbotTypingAnimationOptimized {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-0.741vh); /* -8px → -0.741vh */
        opacity: 1;
    }
}

@keyframes chatbotButtonsAppearOptimized {
    0% {
        opacity: 0;
        transform: rotate(-0deg) translateY(2.78vh) scale(0.9); /* 30px → 2.78vh */
    }
    100% {
        opacity: 1;
        transform: rotate(-0deg) translateY(0) scale(1);
    }
}

@keyframes chatbotButtonSlideInOptimized {
    0% {
        opacity: 0;
        transform: translateX(2.604vw) scale(0.8); /* 50px → 2.604vw */
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* ============ TEXTO INFORMATIVO DA ANÁLISE COMPLETA ============ */
.analysis-info-text {
    margin-top: 0.875rem; /* 14px → rem */
    margin-bottom: 0.625rem; /* 10px → rem */
    padding: 0.625rem 1.25rem; /* 10px 20px → rem */
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #d6c8ff;
    opacity: 0.85;
    font-weight: 400;
    font-family: "Inter", "Montserrat", "Noto Sans", sans-serif;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.5rem; /* 8px → rem */
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(6px);
    box-shadow: 0 0 8px rgba(144, 63, 255, 0.15);
    animation: fadeInInfo 0.8s ease forwards;
}

@keyframes fadeInInfo {
    from { 
        opacity: 0; 
        transform: translateY(0.556vh); /* 6px → 0.556vh */
    }
    to { 
        opacity: 0.85; 
        transform: translateY(0); 
    }
}

/* ===================== MOBILE - ÚNICO BLOCO RESPONSIVO ===================== */
/* 
   ✅ CORRIGIDO: Bloco unificado para mobile (iOS/Android)
   - Remove conflitos de duplicação
   - Usa apenas unidades rem e px fixos (não vw/vh)
   - Layout idêntico à imagem de referência
   - Espaçamento consistente entre elementos
   - Botões de ação com tamanho igual
*/

@media (max-width: 767px) and (pointer: coarse) {
    
    /* ✅ CORREÇÃO #1: Base de fonte fixa para mobile */
    html { 
        font-size: 16px !important; 
    }
    
    /* ✅ CORREÇÃO #2: Permite scroll vertical */
    body { 
        overflow: auto; 
        overflow-x: hidden; 
    }
    
    /* ✅ CORREÇÃO #3: Esconde elementos do cenário no mobile */
    .robo, .mesa, .caixas, .fundo, .notebook, .teclado { 
        display: none !important; 
    }
    
    /* ✅ CORREÇÃO #4: Container centralizado perfeitamente */
    .chatbot-container {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        
        /* Dimensões fixas para consistência */
        width: 92vw !important;
        max-width: 380px !important;
        height: 78vh !important;
        max-height: 620px !important;
        min-height: 520px !important;
        
        /* Espaçamento interno */
        padding: 16px 14px 12px !important;
        border-radius: 24px !important;
        
        margin: 0 !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }
    
    /* ✅ CORREÇÃO #5: Estado welcome otimizado */
    .chatbot-welcome-state { 
        padding: 20px 16px 12px !important; 
        overflow: hidden;
    }
    
    /* ✅ CORREÇÃO #6: Robô perfeitamente posicionado (logo acima do título) */
    .chatbot-robot-wrapper {
    position: relative !important; /* vira o “container” do robô */
    width: 100% !important;
    height: 140px !important; /* altura reservada pro robô */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.chatbot-main-robot { 
    position: absolute !important;
    top: 120px !important;  /* ⬅️ ajuste aqui para descer só a imagem */
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 140px !important; 
    height: 100px !important;
    margin: 0 !important;
}
    
    /* ✅ CORREÇÃO #7: Branding com espaçamento correto (logo abaixo do robô) */
    .chatbot-branding {
        margin: 110px !important;
        margin-top: 5px !important;
    }
    
    .chatbot-main-title { 
        font-size: 32px !important; 
        margin: 6px 0 2px !important;
        line-height: 1.1 !important;
    }
    
    .chatbot-main-subtitle { 
        font-size: 14px !important;
        margin-top: 4px !important;
    }
    
    /* ✅ CORREÇÃO #8: Input section consistente */
    .chatbot-input-section {
        margin-top: 10px !important;
        width: 100% !important;
        padding: 0 10px !important;
        box-sizing: border-box !important;
    }
    
    /* ✅ CORREÇÃO #9: Input field (welcome e ativo) IDÊNTICOS */
    .chatbot-input-field,
    .chatbot-active-input-field {
        gap: 8px !important;
        padding: 6px 10px !important;
        border-radius: 24px !important;
        display: flex !important;
        align-items: center !important;
    }
    
    /* ✅ CORREÇÃO #10: Botão + sempre à esquerda */
    .chatbot-input-field .chatbot-add-btn,
    .chatbot-active-input-field .chatbot-add-btn {
        order: -2 !important;
        flex-shrink: 0 !important;
        width: 40px !important;
        height: 40px !important;
        margin: 0 !important;
    }
    
    /* ✅ CORREÇÃO #11: Input sempre no meio - TAMANHOS IGUAIS */
    .chatbot-main-input,
    .chatbot-active-input,
    #chatbotActiveInput.chatbot-active-input.chat-text-input {
        order: 0 !important;
        flex: 1 !important;
        min-width: 0 !important;
        
        /* Tamanhos idênticos */
        font-size: 14px !important;
        line-height: 1.2 !important;
        padding: 10px 12px !important;
        height: auto !important;
        
        border-radius: 22px !important;
        box-sizing: border-box !important;
    }
    
    /* Placeholder igual nos dois estados */
    .chatbot-main-input::placeholder,
    .chatbot-active-input::placeholder,
    #chatbotActiveInput.chatbot-active-input.chat-text-input::placeholder {
        font-size: 14px !important;
        opacity: 0.6 !important;
    }
    
    /* ✅ CORREÇÃO #12: Microfone sempre à direita do input */
    .chatbot-mic-icon,
    .chatbot-active-input-field .chatbot-mic-icon {
        order: 1 !important;
        margin: 0 8px !important;
        font-size: 18px !important;
        flex-shrink: 0 !important;
        width: auto !important;
        height: auto !important;
    }
    
    /* ✅ CORREÇÃO #13: Botões de envio IGUAIS */
    .chatbot-send-button,
    .chatbot-active-send-btn {
        order: 2 !important;
        flex-shrink: 0 !important;
        
        /* Tamanhos idênticos */
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        max-width: 40px !important;
        font-size: 14px !important;
    }
    
    /* ✅ CORREÇÃO #14: Hover suave no mobile */
    .chatbot-send-button:hover,
    .chatbot-active-send-btn:hover {
        transform: scale(1.02) !important;
    }
    
    /* ✅ CORREÇÃO #15: Header do estado ativo */
    .chatbot-header-bar {
        padding: 10px 15px !important;
    }
    
    .chatbot-header-name {
        font-size: 20px !important;
    }
    
    .chatbot-header-desc {
        font-size: 12px !important;
    }
    
    /* ✅ CORREÇÃO #16: Área de conversação otimizada */
    .chatbot-conversation-area {
        padding: 15px 20px !important;
        flex: 1 !important;
        min-height: 320px !important;
        max-height: 75vh !important;
        overflow: hidden auto !important;
    }
    
    /* ✅ CORREÇÃO #17: Mensagens com espaçamento correto */
    .chatbot-message {
        margin-bottom: 20px !important;
        gap: 0 !important;
    }
    
    .chatbot-message-avatar {
        display: none !important;
    }
    
    .chatbot-message-bubble {
        padding: 12px 16px !important;
        font-size: 14px !important;
        line-height: 1.4 !important;
        border-radius: 16px !important;
    }
    
    .chatbot-message-assistant .chatbot-message-bubble {
        border-radius: 16px 16px 16px 4px !important;
    }
    
    .chatbot-message-user .chatbot-message-bubble {
        border-radius: 16px 16px 4px 16px !important;
    }
    
    /* ✅ CORREÇÃO #18: Input ativo com padding consistente */
    .chatbot-input-area {
        padding: 8px 15px !important;
        overflow: hidden !important;
    }
    
    /* ✅ CORREÇÃO #19: Botões de ação IGUAIS e centralizados */
    .chatbot-action-buttons {
        position: fixed !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        right: auto !important;
        
        /* Posição com safe-area para notch */
        bottom: calc(env(safe-area-inset-bottom) + 12px) !important;
        
        /* Layout horizontal */
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 10px !important;
        
        /* Largura consistente */
        width: 92vw !important;
        max-width: 380px !important;
        
        /* Visibilidade */
        opacity: 1 !important;
        animation: none !important;
        z-index: 1001 !important;
    }
    
    /* ✅ CORREÇÃO #20: Botões de ação com flex igual (CRÍTICO) */
    .chatbot-action-btn {
        /* Flex igual para todos os botões */
        flex: 1 1 0 !important;
        min-width: 0 !important;
        max-width: none !important;
        
        /* Tamanhos consistentes */
        padding: 10px 14px !important;
        font-size: 13px !important;
        border-radius: 16px !important;
        
        /* Visual */
        text-align: center !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        
        /* Remove animações */
        opacity: 1 !important;
        animation: none !important;
        margin: 0 !important;
        
        backdrop-filter: blur(10px) !important;
    }
    
    /* ✅ CORREÇÃO #21: Hover suave nos botões de ação */
    .chatbot-action-btn:hover {
        transform: scale(1.02) !important;
    }
    
    /* ✅ CORREÇÃO #22: Indicador de digitação no mobile */
    .chatbot-conversation-typing {
        padding: 12px 16px !important;
        margin: 15px 0 !important;
        border-radius: 16px 16px 16px 8px !important;
    }
    
    .chatbot-typing-indicator {
        padding-left: 15px !important;
        margin-bottom: 15px !important;
    }
    
    /* ✅ CORREÇÃO #23: Scrollbar customizada no mobile */
    .chatbot-conversation-area::-webkit-scrollbar {
        width: 4px !important;
    }
    
    .chatbot-conversation-area::-webkit-scrollbar-thumb {
        background: rgba(0, 150, 255, 0.5) !important;
        border-radius: 2px !important;
    }
}

/* ════════════════════════════════════════════════════════════
   🎴 SISTEMA DE CARDS EDUCACIONAIS - GLASS EFFECT
   ════════════════════════════════════════════════════════════ */

/* Container principal de cards */
.ai-cards-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

/* Card principal - Glass effect transparente */
.ai-card {
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
                0 2px 8px rgba(0, 150, 255, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    color: #ffffff;
}

.ai-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        rgba(0, 150, 255, 0.6) 0%, 
        rgba(138, 43, 226, 0.6) 100%
    );
    opacity: 0.8;
}

.ai-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4),
                0 4px 12px rgba(0, 150, 255, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border-color: rgba(0, 150, 255, 0.3);
}

/* Título do card */
.ai-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Corpo do card */
.ai-card-body {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    font-size: 0.95rem;
}

.ai-card-body p {
    margin: 12px 0;
}

.ai-card-body strong {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
}

.ai-card-body code {
    background: rgba(0, 150, 255, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: rgba(0, 200, 255, 0.95);
    border: 1px solid rgba(0, 150, 255, 0.3);
}

.ai-card-body ul, .ai-card-body ol {
    list-style: none;
    padding: 0;
    margin: 12px 0;
}

.ai-card-body li {
    padding: 8px 0 8px 24px;
    position: relative;
    line-height: 1.6;
}

.ai-card-body li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: rgba(0, 150, 255, 0.8);
    font-weight: bold;
}

/* Container de subcards */
.ai-subcards-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}

/* Subcard - Mais sutil que o card principal */
.ai-subcard {
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.02) 100%
    );
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    position: relative;
}

.ai-subcard::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg,
        rgba(138, 43, 226, 0.6) 0%,
        rgba(0, 150, 255, 0.6) 100%
    );
    border-radius: 12px 0 0 12px;
}

.ai-subcard:hover {
    transform: translateX(4px);
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0.04) 100%
    );
    border-color: rgba(138, 43, 226, 0.3);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Título do subcard */
.ai-subcard-title {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Corpo do subcard */
.ai-subcard-body {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    font-size: 0.9rem;
}

.ai-subcard-body p {
    margin: 10px 0;
}

.ai-subcard-body strong {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
}

.ai-subcard-body code {
    background: rgba(138, 43, 226, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
    color: rgba(200, 100, 255, 0.95);
    border: 1px solid rgba(138, 43, 226, 0.3);
}

.ai-subcard-body ul, .ai-subcard-body ol {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.ai-subcard-body li {
    padding: 6px 0 6px 20px;
    position: relative;
    line-height: 1.5;
}

.ai-subcard-body li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: rgba(138, 43, 226, 0.8);
    font-weight: bold;
    font-size: 1.2em;
}

/* Checkboxes em listas */
.ai-card-body li input[type="checkbox"],
.ai-subcard-body li input[type="checkbox"] {
    margin-right: 8px;
    cursor: not-allowed;
    accent-color: rgba(0, 150, 255, 0.8);
}

/* Responsividade mobile para cards */
@media (max-width: 767px) {
    .ai-card {
        padding: 16px;
        border-radius: 12px;
        /* 🎯 Ajuste de transparência para mobile: fundo escuro translúcido */
        background: rgba(20, 20, 20, 0.35);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        color: #ffffff;
    }
    
    .ai-card-title {
        font-size: 1rem;
        margin-bottom: 12px;
    }
    
    .ai-card-body {
        font-size: 0.9rem;
    }
    
    .ai-subcard {
        padding: 12px;
        border-radius: 10px;
    }
    
    .ai-subcard-title {
        font-size: 0.95rem;
    }
    
    .ai-subcard-body {
        font-size: 0.85rem;
    }
    
    .ai-subcards-container {
        gap: 12px;
        margin-top: 16px;
    }
}

/* ════════════════════════════════════════════════════════════
   FIM DO SISTEMA DE CARDS
   ════════════════════════════════════════════════════════════ */

/* ============ FIM DA RESPONSIVIDADE MOBILE ============ */

/* ════════════════════════════════════════════════════════════
   MENU HAMBÚRGUER E PAINEL LATERAL
   ════════════════════════════════════════════════════════════ */

/* Botão Hambúrguer */
.hamburger-menu-btn {
    position: fixed;
    top: 2vh;
    left: 2vw;
    z-index: 10000;
    width: 44px;
    height: 44px;
    background: rgba(10, 10, 30, 0.85);
    border: 1px solid rgba(0, 150, 255, 0.3);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px;
    backdrop-filter: blur(15px);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.4),
        0 0 15px rgba(0, 150, 255, 0.1);
    transition: all 0.3s ease;
    opacity: 0;
    animation: hamburgerAppear 0.5s ease-out 1.5s forwards;
}

@keyframes hamburgerAppear {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hamburger-menu-btn:hover {
    background: rgba(0, 150, 255, 0.15);
    border-color: rgba(0, 150, 255, 0.5);
    box-shadow: 
        0 6px 25px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(0, 150, 255, 0.2);
    transform: scale(1.05);
}

.hamburger-menu-btn.active {
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden;
    transform: scale(0.8);
}

.hamburger-bar {
    width: 22px;
    height: 2px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 0 5px rgba(0, 150, 255, 0.3);
}

.hamburger-menu-btn:hover .hamburger-bar {
    background: #00f3ff;
    box-shadow: 0 0 8px rgba(0, 243, 255, 0.5);
}

/* Overlay do Painel */
.side-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.side-panel-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Painel Lateral */
.side-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    background: linear-gradient(180deg, rgba(10, 10, 30, 0.98) 0%, rgba(5, 5, 20, 0.98) 100%);
    border-right: 1px solid rgba(0, 150, 255, 0.2);
    z-index: 9999;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.5);
}

.side-panel.active {
    transform: translateX(0);
}

/* Header do Painel */
.side-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid rgba(0, 150, 255, 0.15);
    background: rgba(0, 150, 255, 0.05);
}

.side-panel-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(0, 150, 255, 0.3);
}

.side-panel-close {
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
    padding: 0;
}

.side-panel-close:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* Menu do Painel */
.side-panel-menu {
    list-style: none;
    padding: 15px 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
}

.side-panel-menu li {
    padding: 0 12px;
    margin-bottom: 4px;
}

.side-panel-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.85);
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: left;
}

.side-panel-item svg {
    flex-shrink: 0;
    opacity: 0.7;
    transition: all 0.25s ease;
}

.side-panel-item:hover {
    background: rgba(0, 150, 255, 0.1);
    border-color: rgba(0, 150, 255, 0.2);
    color: #fff;
}

.side-panel-item:hover svg {
    opacity: 1;
    stroke: #00f3ff;
}

/* Item Destacado - Analisar Áudio */
.side-panel-item.side-panel-item-highlight {
    background: linear-gradient(135deg, rgba(188, 19, 254, 0.2) 0%, rgba(0, 150, 255, 0.1) 100%);
    border: 1px solid rgba(188, 19, 254, 0.4);
    color: #fff;
    font-weight: 500;
    box-shadow: 
        0 0 15px rgba(188, 19, 254, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.side-panel-item.side-panel-item-highlight svg {
    opacity: 1;
    stroke: #bc13fe;
}

.side-panel-item.side-panel-item-highlight:hover {
    background: linear-gradient(135deg, rgba(188, 19, 254, 0.3) 0%, rgba(0, 150, 255, 0.15) 100%);
    border-color: rgba(188, 19, 254, 0.6);
    box-shadow: 
        0 0 25px rgba(188, 19, 254, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Item Sair */
.side-panel-item.side-panel-item-logout:hover {
    background: rgba(255, 50, 100, 0.1);
    border-color: rgba(255, 50, 100, 0.3);
    color: #ff6b8a;
}

.side-panel-item.side-panel-item-logout:hover svg {
    stroke: #ff6b8a;
}

/* Footer do Painel */
.side-panel-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(0, 150, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.side-panel-version {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 1px;
}

/* Responsividade Mobile */
@media (max-width: 768px) {
    .hamburger-menu-btn {
        top: 10px;
        left: 10px;
        width: 40px;
        height: 40px;
    }
    
    .side-panel {
        width: 85%;
        max-width: 300px;
    }
}