/* ============================================================
   AETHERIS — Demo interativa · v4 (Raycast + Dark Fantasy)
   ============================================================ */

.beta-chat-wrapper {
    max-width: 720px;
    margin: 0 auto;
    background: linear-gradient(180deg, rgba(22, 16, 36, 0.92), rgba(10, 7, 18, 0.96));
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(24px);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.6),
        0 50px 110px -30px rgba(124, 58, 237, 0.55),
        0 0 80px rgba(212, 175, 55, 0.07),
        inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

/* Header */
.beta-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.beta-chat-bot { display: flex; align-items: center; gap: 12px; }

.beta-chat-avatar {
    width: 40px; height: 40px;
    border-radius: 12px;
    display: grid; place-items: center;
    background: linear-gradient(145deg, rgba(212, 175, 55, 0.22), rgba(212, 175, 55, 0.05));
    border: 1px solid rgba(212, 175, 55, 0.35);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 18px rgba(212, 175, 55, 0.25);
    overflow: hidden;
}
.beta-chat-avatar img { width: 26px; height: 26px; object-fit: contain; filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.6)); }

.beta-chat-bot strong { display: block; color: #f4ede2; font-size: 0.94rem; font-weight: 650; letter-spacing: -0.1px; }
.beta-chat-bot small { color: #6f677c; font-size: 0.76rem; }

.beta-chat-reset {
    width: 34px; height: 34px;
    display: grid; place-items: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #a79fb3;
    cursor: pointer;
    transition: all 0.25s;
}
.beta-chat-reset:hover { background: rgba(212, 175, 55, 0.12); border-color: rgba(212, 175, 55, 0.45); color: #ffd76a; transform: rotate(-180deg); }

/* Tabs */
.beta-chat-tabs {
    display: flex;
    gap: 6px;
    padding: 10px 18px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    overflow-x: auto;
    scrollbar-width: none;
}
.beta-chat-tabs::-webkit-scrollbar { display: none; }

.beta-tab {
    flex-shrink: 0;
    padding: 7px 13px;
    background: transparent;
    border: 1px solid transparent;
    color: #a79fb3;
    border-radius: 9px;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.beta-tab:hover { color: #f4ede2; background: rgba(255, 255, 255, 0.05); }
.beta-tab.active {
    color: #ffd76a;
    background: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.35);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Mensagens */
.beta-chat-mensagens {
    padding: 22px 18px;
    height: 380px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}
.beta-chat-mensagens::-webkit-scrollbar { width: 6px; }
.beta-chat-mensagens::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 3px; }

.beta-msg { display: flex; animation: betaMsgIn 0.3s ease; }
@keyframes betaMsgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.beta-msg-user { justify-content: flex-end; }
.beta-msg-bot { justify-content: flex-start; }

.beta-msg-bubble {
    max-width: 86%;
    padding: 11px 15px;
    border-radius: 14px;
    font-size: 0.9rem;
    line-height: 1.55;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.beta-msg-user .beta-msg-bubble {
    background: linear-gradient(180deg, #8b4df0, #6d28d9);
    color: #fff;
    border-bottom-right-radius: 4px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 6px 18px -6px rgba(124, 58, 237, 0.6);
}

.beta-msg-bot .beta-msg-bubble {
    background: rgba(255, 255, 255, 0.05);
    color: #f4ede2;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-bottom-left-radius: 4px;
}

.beta-msg-bubble code {
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.25);
    padding: 1px 6px;
    border-radius: 5px;
    font-family: ui-monospace, 'SF Mono', Menlo, monospace;
    font-size: 0.85em;
    color: #ffd76a;
}
.beta-msg-bubble strong { color: #ffd76a; font-weight: 650; }

/* Digitando */
.beta-typing { display: inline-flex; gap: 4px; padding: 14px 18px; }
.beta-typing span {
    width: 7px; height: 7px;
    background: #a79fb3; border-radius: 50%;
    animation: betaTyping 1.4s infinite;
}
.beta-typing span:nth-child(2) { animation-delay: 0.2s; }
.beta-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes betaTyping {
    0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-4px); }
}

/* Atalhos */
.beta-chat-atalhos {
    display: flex;
    gap: 6px;
    padding: 10px 18px;
    overflow-x: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    scrollbar-width: none;
}
.beta-chat-atalhos::-webkit-scrollbar { display: none; }

.beta-atalho {
    flex-shrink: 0;
    padding: 6px 11px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom-width: 2px;
    color: #d6cfe0;
    font-size: 0.76rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}
.beta-atalho:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.45);
    color: #ffd76a;
    transform: translateY(-1px);
}
.beta-atalho:active { transform: translateY(1px); border-bottom-width: 1px; }

/* Input */
.beta-chat-input {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.25);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.beta-prefix {
    width: 30px; height: 30px;
    display: grid; place-items: center;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 9px;
    color: #ffd76a;
    font-weight: 700;
    font-family: ui-monospace, 'SF Mono', Menlo, monospace;
    flex-shrink: 0;
}

#betaInput {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #f4ede2;
    font-size: 0.92rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: all 0.2s;
}
#betaInput::placeholder { color: #6f677c; }
#betaInput:focus { border-color: rgba(212, 175, 55, 0.6); background: rgba(255, 255, 255, 0.07); box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.14); }

.beta-send {
    width: 40px; height: 40px;
    display: grid; place-items: center;
    background: linear-gradient(180deg, #f1cf5e, #d4af37 55%, #b8941f);
    border: none;
    border-radius: 10px;
    color: #1a1204;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 6px 18px -6px rgba(212, 175, 55, 0.6);
    flex-shrink: 0;
}
.beta-send:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 10px 24px -6px rgba(212, 175, 55, 0.8); }
.beta-send:active { transform: translateY(0); }

/* Aviso */
.beta-aviso {
    text-align: center;
    color: #6f677c;
    font-size: 0.85rem;
    margin: 22px auto 0;
    max-width: 600px;
    line-height: 1.6;
}
.beta-aviso strong { color: #ffd76a; font-weight: 600; }

/* Mobile */
@media (max-width: 600px) {
    .beta-chat-wrapper { border-radius: 16px; }
    .beta-chat-mensagens { height: 330px; padding: 16px 14px; }
    .beta-msg-bubble { font-size: 0.86rem; padding: 10px 13px; max-width: 90%; }
    .beta-chat-header, .beta-chat-tabs, .beta-chat-atalhos { padding-left: 14px; padding-right: 14px; }
    .beta-chat-input { padding: 10px 12px; }
}