* {
    font-family: 'Inter', sans-serif;
}

h1,
h2,
h3,
.logo-text {
    font-family: 'Poppins', sans-serif;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 3px;
}

.screen {
    display: none !important;
    opacity: 0;
    transition: opacity 0.4s ease;
    height: 100dvh;
    height: -webkit-fill-available;
    width: 100%;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
}

.screen.active {
    display: flex !important;
    opacity: 1;
}

.safe-bottom {
    padding-bottom: calc(env(safe-area-inset-bottom) + 20px) !important;
}

.gradient-text {
    background: linear-gradient(135deg, #f43f5e, #ec4899, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-main {
    background: linear-gradient(135deg, #0f0a1a 0%, #1a0a2e 50%, #0f172a 100%);
}

@keyframes float-heart {
    0% {
        transform: translateY(100vh) rotate(0deg) scale(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
        transform: translateY(90vh) rotate(20deg) scale(1);
    }

    90% {
        opacity: 0.6;
    }

    100% {
        transform: translateY(-10vh) rotate(360deg) scale(0.5);
        opacity: 0;
    }
}

.floating-heart {
    position: fixed;
    z-index: 0;
    pointer-events: none;
    font-size: 1.2rem;
    animation: float-heart linear infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(244, 63, 94, 0.4);
    }

    50% {
        box-shadow: 0 0 20px rgba(244, 63, 94, 0.8);
    }
}

.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes typing-dot {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.4;
    }

    30% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

.typing-dot:nth-child(1) {
    animation: typing-dot 1.4s ease-in-out infinite 0s;
}

.typing-dot:nth-child(2) {
    animation: typing-dot 1.4s ease-in-out infinite 0.2s;
}

.typing-dot:nth-child(3) {
    animation: typing-dot 1.4s ease-in-out infinite 0.4s;
}

@keyframes slide-up {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.msg-appear {
    animation: slide-up 0.3s ease-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0)
    }

    25% {
        transform: translateX(-5px)
    }

    75% {
        transform: translateX(5px)
    }
}

.shake {
    animation: shake 0.3s ease-in-out;
}

@keyframes pop {
    0% {
        transform: scale(0)
    }

    50% {
        transform: scale(1.2)
    }

    100% {
        transform: scale(1)
    }
}

.pop-in {
    animation: pop 0.3s ease-out;
}

.avatar-gradient-1 {
    background: linear-gradient(135deg, #f472b6, #e11d48);
}

.avatar-gradient-2 {
    background: linear-gradient(135deg, #a78bfa, #6366f1);
}

.avatar-gradient-3 {
    background: linear-gradient(135deg, #fb923c, #ec4899);
}

.avatar-gradient-4 {
    background: linear-gradient(135deg, #2dd4bf, #059669);
}

.avatar-gradient-5 {
    background: linear-gradient(135deg, #22d3ee, #3b82f6);
}

.avatar-gradient-6 {
    background: linear-gradient(135deg, #60a5fa, #6366f1);
}

.avatar-gradient-7 {
    background: linear-gradient(135deg, #ef4444, #e11d48);
}

.avatar-gradient-8 {
    background: linear-gradient(135deg, #4ade80, #14b8a6);
}

.avatar-gradient-9 {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.avatar-gradient-10 {
    background: linear-gradient(135deg, #f59e0b, #f97316);
}

.avatar-gradient-11 {
    background: linear-gradient(135deg, #e879f9, #a21caf);
}

.avatar-gradient-12 {
    background: linear-gradient(135deg, #0ea5e9, #0369a1);
}

.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(244, 63, 94, 0.15);
}

.online-dot {
    width: 10px;
    height: 10px;
    background: #22c55e;
    border-radius: 50%;
    border: 2px solid #1e293b;
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Premium Avatar Cards */
.avatar-card-premium {
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.avatar-card-premium:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(244, 63, 94, 0.1);
}

.avatar-card-premium .card-overlay {
    background: linear-gradient(to top,
            rgba(15, 10, 26, 0.95) 0%,
            rgba(15, 10, 26, 0.6) 40%,
            transparent 100%);
}

.avatar-card-premium .btn-chat-premium {
    display: block;
    width: 100%;
    padding: 10px;
    border-radius: 12px;
    font-weight: 700;
    text-align: center;
    color: white;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    box-shadow: 0 4px 15px rgba(225, 29, 72, 0.3);
    border: none;
    cursor: pointer;
}

.avatar-card-premium:hover .btn-chat-premium {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(225, 29, 72, 0.5);
}

.avatar-card-premium .trait-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
}

.modal-overlay {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.chat-bubble-user {
    background: linear-gradient(135deg, #e11d48, #be185d);
    border-radius: 18px 18px 4px 18px;
    box-shadow: 0 4px 15px rgba(225, 29, 72, 0.2);
}

.chat-bubble-ai {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(51, 65, 85, 0.8);
    border-radius: 18px 18px 18px 4px;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
}

.toast {
    animation: slide-up 0.3s ease-out;
    transition: opacity 0.3s ease;
}

.reaction-picker {
    animation: pop 0.2s ease-out;
}

.relationship-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 9999px;
    font-weight: 600;
}

.rel-conhecidos {
    background: #64748b30;
    color: #94a3b8;
}

.rel-amigos {
    background: #3b82f630;
    color: #60a5fa;
}

.rel-flerte {
    background: #f43f5e30;
    color: #fb7185;
}

.rel-namorando {
    background: #ec489930;
    color: #f472b6;
}

/* Modal Premium Glass Styles (Eleanor 2.0) */
.glass-panel {
    background: rgba(15, 23, 42, 0.35);
    /* Mais transparente para destacar o blur */
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}

/* Container Unificado de Vidro */
.modal-container-glass {
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    border-radius: 3rem;
}

#avatar-modal {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

#avatar-modal .glass-panel {
    background: rgba(255, 255, 255, 0.03);
    /* Painéis internos quase invisíveis, focados na borda */
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: none;
    animation: slide-up 0.6s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

#avatar-modal-icon {
    box-shadow: 0 0 0 10px rgba(15, 23, 42, 0.2), 0 20px 40px rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.trait-badge-premium {
    background: rgba(244, 63, 94, 0.15);
    color: #fb7185;
    border: 1px solid rgba(244, 63, 94, 0.2);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Barra de Progresso de Relacionamento */
.glass-progress-container {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: 6px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(4px);
}

.glass-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f43f5e, #ec4899, #d946ef);
    width: 0%;
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 15px rgba(244, 63, 94, 0.5);
    position: relative;
}

.glass-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 2px;
    background: white;
    box-shadow: 0 0 10px white;
    opacity: 0.8;
}

.rel-level-badge {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* Rodapé Estilo Premium 4U.IA.BR */
.footer-clean { position: relative; padding: 2rem 0; color: #4b5563; }
.footer-link-group { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 0.5rem; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 500; }
.footer-dot { width: 3px; height: 3px; border-radius: 50%; background: rgba(16, 185, 129, 0.2); }
.footer-a { transition: all 0.2s; text-decoration: none; color: inherit; }
.footer-a:hover { color: #10b981; opacity: 1; }