/* Scrollbar futurista */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(0, 243, 255, 0.7), rgba(157, 0, 255, 0.8));
    border-radius: 999px;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.7);
}

/* Background com grid holográfico */
.bg-grid-pattern {
    background-image:
        linear-gradient(rgba(0, 243, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
}

body {
    background:
        radial-gradient(circle at top, rgba(45, 226, 230, 0.06), transparent 28%),
        linear-gradient(180deg, #050a14 0%, #030712 48%, #020408 100%);
}

/* Painel principal em vidro com neon */
.glass-panel {
    background: radial-gradient(circle at top left, rgba(45, 226, 230, 0.16), transparent 40%),
        radial-gradient(circle at bottom right, rgba(157, 0, 255, 0.18), transparent 45%),
        rgba(3, 8, 30, 0.9);
    backdrop-filter: blur(26px);
    -webkit-backdrop-filter: blur(26px);
    border-radius: 1.5rem;
    border: 1px solid rgba(0, 243, 255, 0.35);
    box-shadow:
        0 0 18px rgba(0, 243, 255, 0.35),
        0 0 40px rgba(157, 0, 255, 0.3),
        inset 0 0 0 1px rgba(15, 23, 42, 0.8);
}

.login-hero-shell::before {
    content: "";
    position: absolute;
    inset: 14px 8px 8px;
    border-radius: 2rem;
    pointer-events: none;
    background:
        radial-gradient(circle at top, rgba(0, 243, 255, 0.10), transparent 36%),
        radial-gradient(circle at bottom right, rgba(168, 85, 247, 0.10), transparent 34%);
    filter: blur(10px);
    opacity: 0.95;
}

.login-core-shell::after {
    content: "";
    position: absolute;
    inset: 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        inset 0 0 18px rgba(0, 243, 255, 0.15),
        0 0 24px rgba(0, 243, 255, 0.12);
}

.login-core-avatar {
    position: relative;
    z-index: 2;
    width: 78px;
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-core-avatar::before {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 999px;
    background:
        radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.28), transparent 20%),
        radial-gradient(circle at 50% 50%, rgba(34, 211, 238, 0.18), rgba(2, 6, 23, 0.15) 68%);
    box-shadow:
        inset 0 0 28px rgba(56, 189, 248, 0.16),
        0 0 28px rgba(56, 189, 248, 0.12);
}

.login-core-orbit {
    position: absolute;
    inset: 6px;
    border-radius: 999px;
    border: 1px dashed rgba(125, 211, 252, 0.36);
    animation: spin 16s linear infinite;
}

.login-core-heart {
    position: relative;
    width: 62px;
    height: 48px;
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(224, 242, 254, 0.95), rgba(186, 230, 253, 0.82)),
        linear-gradient(135deg, rgba(255, 255, 255, 0.35), rgba(125, 211, 252, 0.18));
    border: 1px solid rgba(224, 242, 254, 0.45);
    box-shadow:
        inset 0 -8px 14px rgba(59, 130, 246, 0.08),
        0 0 20px rgba(125, 211, 252, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-core-heart::before,
.login-core-heart::after {
    content: "";
    position: absolute;
    top: 18px;
    width: 7px;
    height: 14px;
    border-radius: 999px;
    background: rgba(125, 211, 252, 0.72);
    box-shadow: 0 0 10px rgba(125, 211, 252, 0.22);
}

.login-core-heart::before {
    left: -6px;
}

.login-core-heart::after {
    right: -6px;
}

.login-core-eye {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: radial-gradient(circle at 40% 35%, rgba(255, 255, 255, 0.95), rgba(34, 211, 238, 0.9));
    box-shadow:
        0 0 10px rgba(34, 211, 238, 0.6),
        0 0 18px rgba(56, 189, 248, 0.25);
}

.login-core-smile {
    position: absolute;
    bottom: 10px;
    width: 24px;
    height: 12px;
    border-bottom: 3px solid rgba(34, 211, 238, 0.9);
    border-radius: 0 0 18px 18px;
    box-shadow: 0 4px 10px rgba(34, 211, 238, 0.12);
}

.login-bottom-copy {
    max-width: 19rem;
}

.login-core-smile::before {
    content: "";
    position: relative;
    display: block;
}

.login-hud-chip {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.68);
    border: 1px solid rgba(0, 243, 255, 0.20);
    color: rgba(186, 230, 253, 0.90);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    box-shadow:
        0 0 18px rgba(0, 243, 255, 0.10),
        inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.chat-hero-panel {
    background:
        linear-gradient(145deg, rgba(6, 11, 31, 0.94), rgba(6, 16, 40, 0.82)),
        radial-gradient(circle at top left, rgba(45, 226, 230, 0.18), transparent 35%);
    border: 1px solid rgba(110, 231, 255, 0.16);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.03),
        0 30px 80px rgba(2, 6, 23, 0.45),
        0 0 36px rgba(0, 243, 255, 0.12);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.chat-hero-panel::before {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 24%),
        linear-gradient(90deg, rgba(0, 243, 255, 0.06), transparent 28%, rgba(168, 85, 247, 0.08));
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    padding: 1px;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.chat-hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid rgba(148, 163, 184, 0.16);
    color: rgba(226, 232, 240, 0.82);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.chat-orb {
    background:
        radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.12), transparent 22%),
        radial-gradient(circle at 50% 50%, rgba(0, 243, 255, 0.18), rgba(2, 6, 23, 0.92) 66%);
    border: 1px solid rgba(0, 243, 255, 0.18);
    box-shadow:
        inset 0 0 28px rgba(56, 189, 248, 0.22),
        0 0 36px rgba(0, 243, 255, 0.18),
        0 0 75px rgba(37, 99, 235, 0.12);
}

/* Balão de mensagem da IA */
.chat-bubble-ai {
    background: radial-gradient(circle at top left, rgba(0, 243, 255, 0.15), transparent 55%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.7));
    border-radius: 1.25rem;
    border: 1px solid rgba(0, 243, 255, 0.6);
    box-shadow:
        0 0 12px rgba(0, 243, 255, 0.4),
        0 0 30px rgba(37, 99, 235, 0.32);
}

/* Balão de mensagem do usuário */
.chat-bubble-user {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.6));
    border-radius: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.5);
    box-shadow:
        0 0 8px rgba(148, 163, 184, 0.35),
        0 0 18px rgba(15, 23, 42, 0.9);
}

.chat-bubble-ai,
.chat-bubble-user {
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

/* Barras de onda do avatar */
.waveform-bar {
    background: linear-gradient(to top, #0ea5e9, #22c55e);
    box-shadow:
        0 0 12px rgba(34, 197, 94, 0.75),
        0 0 22px rgba(56, 189, 248, 0.85);
    border-radius: 9999px;
    width: 5px;
}

.chat-input-shell::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.18), rgba(255, 255, 255, 0.04), rgba(168, 85, 247, 0.12));
    opacity: 0.7;
    z-index: 0;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    padding: 1px;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.chat-mic-shell::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 999px;
    pointer-events: none;
    background: radial-gradient(circle, rgba(0, 243, 255, 0.2), transparent 68%);
    opacity: 0.85;
    filter: blur(10px);
}

/* Ícones da navegação inferior */
.nav-icon {
    background: radial-gradient(circle at top left, #0b1020, #020617);
    box-shadow:
        0 0 12px rgba(15, 23, 42, 0.9),
        inset 0 0 0 1px rgba(30, 64, 175, 0.6);
    border-radius: 1rem;
}

.nav-active .nav-icon {
    background: radial-gradient(circle at top left, rgba(0, 243, 255, 0.25), rgba(15, 23, 42, 1));
    box-shadow:
        0 0 20px rgba(0, 243, 255, 0.9),
        0 0 35px rgba(37, 99, 235, 0.7);
    border: 1px solid rgba(0, 243, 255, 0.8);
}

.nav-active span {
    color: #00f3ff;
}

.nav-active .material-icons-outlined {
    color: #00f3ff;
}

/* Remover scrollbars em containers específicos */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Efeito de fade no final da lista de mensagens */
.mask-image-b {
    mask-image: linear-gradient(to bottom, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 90%, transparent 100%);
}

/* Ajustes responsivos principais */
@media (max-width: 640px) {
    .glass-panel {
        margin-inline: 0.5rem;
        padding-inline: 1rem;
        border-radius: 1.25rem;
    }

    .chat-hero-panel {
        padding: 1.2rem 1rem 1.35rem;
        border-radius: 1.7rem;
    }
}

@media (min-width: 1024px) {
    #login-screen .glass-panel {
        max-width: 480px;
        margin-inline: auto;
    }
}

.voice-mode-btn[data-active="true"] {
    color: #00f3ff;
    border-color: rgba(0, 243, 255, 0.55);
    background: rgba(0, 243, 255, 0.12);
    box-shadow: 0 0 12px rgba(0, 243, 255, 0.2);
}

.memory-rocket {
    position: fixed;
    bottom: 20px;
    z-index: 80;
    color: var(--rocket-color, #94a3b8);
    text-shadow: 0 0 12px var(--rocket-glow, rgba(148, 163, 184, 0.35));
    animation: rocket-rise 2.2s ease-out forwards;
    pointer-events: none;
}

.memory-rocket .material-icons {
    font-size: 34px;
}

@keyframes rocket-rise {
    0% {
        transform: translateY(0) scale(0.85);
        opacity: 0;
    }
    12% {
        opacity: 1;
    }
    100% {
        transform: translateY(-70vh) scale(1.15);
        opacity: 0;
    }
}

body {
    --scene-aura: rgba(148, 163, 184, 0.15);
    --scene-aura-soft: rgba(71, 85, 105, 0.16);
    --scene-panel-glow: rgba(148, 163, 184, 0.12);
    --scene-panel-glow-soft: rgba(71, 85, 105, 0.1);
    --scene-border-glow: rgba(148, 163, 184, 0.2);
    --scene-third-glow: rgba(148, 163, 184, 0.12);
    --scene-header-top: rgba(2, 6, 23, 0.55);
    --scene-inset: rgba(15, 23, 42, 0.18);
}

body[data-chat-theme="boy"] {
    --scene-aura: rgba(56, 189, 248, 0.26);
    --scene-aura-soft: rgba(14, 116, 144, 0.24);
    --scene-panel-glow: rgba(56, 189, 248, 0.16);
    --scene-panel-glow-soft: rgba(2, 132, 199, 0.12);
    --scene-border-glow: rgba(56, 189, 248, 0.28);
}

body[data-chat-theme="girl"] {
    --scene-aura: rgba(244, 114, 182, 0.26);
    --scene-aura-soft: rgba(157, 23, 77, 0.24);
    --scene-panel-glow: rgba(244, 114, 182, 0.16);
    --scene-panel-glow-soft: rgba(190, 24, 93, 0.12);
    --scene-border-glow: rgba(244, 114, 182, 0.28);
}

body[data-chat-theme="adult"] {
    --scene-aura: rgba(251, 191, 36, 0.30);
    --scene-aura-soft: rgba(180, 83, 9, 0.28);
    --scene-panel-glow: rgba(251, 191, 36, 0.18);
    --scene-panel-glow-soft: rgba(180, 83, 9, 0.16);
    --scene-border-glow: rgba(251, 191, 36, 0.34);
}

body::before,
body::after {
    content: "";
    position: fixed;
    pointer-events: none;
    z-index: 0;
    border-radius: 9999px;
    filter: blur(80px);
    transition: background 0.5s ease;
}

body::before {
    width: 320px;
    height: 320px;
    top: 14%;
    right: -100px;
    background: var(--scene-aura);
}

body::after {
    width: 360px;
    height: 360px;
    bottom: 10%;
    left: -120px;
    background: var(--scene-aura-soft);
}

#app-container,
header,
#app-content,
.glass-panel {
    transition:
        background 0.45s ease,
        box-shadow 0.45s ease,
        border-color 0.45s ease,
        filter 0.45s ease;
}

#app-container::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(circle at 18% 20%, var(--scene-panel-glow), transparent 32%),
        radial-gradient(circle at 82% 18%, var(--scene-panel-glow-soft), transparent 28%),
        radial-gradient(circle at 50% 78%, var(--scene-panel-glow), transparent 30%);
    opacity: 1;
}

header {
    background:
        linear-gradient(180deg, rgba(2, 6, 23, 0.55), rgba(2, 6, 23, 0.04));
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
    box-shadow: inset 0 -1px 0 rgba(148, 163, 184, 0.08);
}

#app-content {
    isolation: isolate;
}

#app-content::before {
    content: "";
    position: absolute;
    inset: 0.5rem 0.2rem 0.5rem 0.2rem;
    border-radius: 1.8rem;
    pointer-events: none;
    z-index: -1;
    background:
        radial-gradient(circle at top, var(--scene-panel-glow), transparent 52%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0));
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.03),
        0 0 0 1px rgba(15, 23, 42, 0.2);
}

#app-content::after {
    content: "";
    position: absolute;
    inset: 1rem 0.65rem 0.35rem 0.65rem;
    pointer-events: none;
    border-radius: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 0 30px rgba(148, 163, 184, 0.04);
}

body[data-chat-theme="adult"] .glass-panel,
body[data-chat-theme="adult"] header,
body[data-chat-theme="adult"] #app-content::before {
    border-color: var(--scene-border-glow);
    box-shadow:
        0 0 26px var(--scene-panel-glow),
        0 0 60px var(--scene-panel-glow-soft),
        inset 0 0 0 1px rgba(120, 53, 15, 0.18);
}

body[data-chat-theme="boy"] .glass-panel,
body[data-chat-theme="boy"] header,
body[data-chat-theme="boy"] #app-content::before {
    border-color: var(--scene-border-glow);
    box-shadow:
        0 0 24px var(--scene-panel-glow),
        0 0 56px var(--scene-panel-glow-soft),
        inset 0 0 0 1px rgba(8, 47, 73, 0.18);
}

body[data-chat-theme="boy"] header {
    background:
        linear-gradient(180deg, rgba(8, 47, 73, 0.42), rgba(2, 6, 23, 0.10));
}

body[data-chat-theme="girl"] .glass-panel,
body[data-chat-theme="girl"] header,
body[data-chat-theme="girl"] #app-content::before {
    border-color: var(--scene-border-glow);
    box-shadow:
        0 0 24px var(--scene-panel-glow),
        0 0 56px var(--scene-panel-glow-soft),
        inset 0 0 0 1px rgba(131, 24, 67, 0.18);
}

body[data-chat-theme="girl"] header {
    background:
        linear-gradient(180deg, rgba(131, 24, 67, 0.38), rgba(2, 6, 23, 0.10));
}

body[data-chat-theme="adult"] header {
    background:
        linear-gradient(180deg, rgba(120, 53, 15, 0.42), rgba(2, 6, 23, 0.10));
}

body[data-chat-theme="boy"] #app-container::before {
    background:
        radial-gradient(circle at 18% 20%, rgba(56, 189, 248, 0.26), transparent 30%),
        radial-gradient(circle at 82% 18%, rgba(14, 116, 144, 0.24), transparent 28%),
        radial-gradient(circle at 50% 78%, rgba(34, 211, 238, 0.18), transparent 26%);
}

body[data-chat-theme="girl"] #app-container::before {
    background:
        radial-gradient(circle at 18% 20%, rgba(244, 114, 182, 0.26), transparent 30%),
        radial-gradient(circle at 82% 18%, rgba(190, 24, 93, 0.22), transparent 28%),
        radial-gradient(circle at 50% 78%, rgba(251, 113, 133, 0.18), transparent 26%);
}

body[data-chat-theme="adult"] #app-container::before {
    background:
        radial-gradient(circle at 18% 20%, rgba(251, 191, 36, 0.24), transparent 30%),
        radial-gradient(circle at 82% 18%, rgba(180, 83, 9, 0.22), transparent 28%),
        radial-gradient(circle at 50% 78%, rgba(245, 158, 11, 0.16), transparent 26%);
}

.glass-panel,
header,
#app-content::before {
    border-color: var(--scene-border-glow);
}

.glass-panel {
    box-shadow:
        0 0 24px var(--scene-panel-glow),
        0 0 56px var(--scene-panel-glow-soft),
        inset 0 0 0 1px var(--scene-inset);
}

header {
    background:
        linear-gradient(180deg, var(--scene-header-top), rgba(2, 6, 23, 0.10));
    box-shadow:
        0 0 24px var(--scene-panel-glow-soft),
        inset 0 -1px 0 rgba(255, 255, 255, 0.04);
}

#app-content::before {
    box-shadow:
        0 0 24px var(--scene-panel-glow),
        0 0 56px var(--scene-panel-glow-soft),
        inset 0 0 0 1px var(--scene-inset);
}

#app-container::before {
    background:
        radial-gradient(circle at 18% 20%, var(--scene-panel-glow), transparent 30%),
        radial-gradient(circle at 82% 18%, var(--scene-panel-glow-soft), transparent 28%),
        radial-gradient(circle at 50% 78%, var(--scene-third-glow), transparent 26%);
}
