/* S'il vous plaît ne copiez pas ce code sans mon autorisation, je passe beaucoup de temps sur mes projets, ne me les volez pas, merci. | Miaoumap24 */

:root { 
    --accent-color: #06b6d4; 
}

.glass { backdrop-filter: blur(12px); }

body, aside, header, footer, div, button, input, textarea { 
    transition: all 0.3s ease; 
}

.theme-dark { 
    --bg-main: #020617; 
    --bg-side: #0f172a; 
    --text: #f1f5f9; 
    --border: #1e293b; 
}

.theme-light { 
    --bg-main: #f8fafc; 
    --bg-side: #ffffff; 
    --text: #0f172a; 
    --border: #e2e8f0; 
}

body { 
    background-color: var(--bg-main); 
    color: var(--text); 
}

.sidebar { 
    background-color: var(--bg-side); 
    border-color: var(--border); 
}

.border-theme { border-color: var(--border); }
.accent-text { color: var(--accent-color); }
.accent-bg { background-color: var(--accent-color); }
.accent-border { border-color: var(--accent-color); }

#sidebar { 
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    z-index: 50; 
}
.sidebar-closed { transform: translateX(-100%); }
.sidebar-open { transform: translateX(0); }

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 100;
}

.dropdown-menu.active {
    display: block;
}

.color-dot { 
    width: 24px; height: 24px; 
    border-radius: 8px; 
    cursor: pointer; 
    border: 2px solid transparent; 
}
.color-dot:hover { transform: scale(1.1); }

#user-input {
    min-height: 56px;
    max-height: 150px;
    line-height: 1.5;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) transparent;
}

#user-input::-webkit-scrollbar, .custom-scrollbar::-webkit-scrollbar { width: 4px; }
#user-input::-webkit-scrollbar-thumb, .custom-scrollbar::-webkit-scrollbar-thumb { 
    background: var(--accent-color); 
    border-radius: 10px; 
}

.switch-label { position: relative; display: inline-block; width: 34px; height: 18px; }
.switch-input { opacity: 0; width: 0; height: 0; }
.switch-slider { 
    position: absolute; cursor: pointer; inset: 0; 
    background-color: #ccc; border-radius: 34px; 
}
.switch-slider:before { 
    position: absolute; content: ""; height: 12px; width: 12px; 
    left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; 
}
.switch-input:checked + .switch-slider { background-color: var(--accent-color); }
.switch-input:checked + .switch-slider:before { transform: translateX(16px); }

.typing-dot { 
    width: 6px; height: 6px; 
    background-color: var(--accent-color); 
    border-radius: 50%; 
    animation: typing 1.4s infinite ease-in-out; 
}
@keyframes typing { 
    0%, 80%, 100% { transform: scale(0); opacity: 0.3; } 
    40% { transform: scale(1); opacity: 1; } 
}

@keyframes fadeInScale { 
    from { opacity: 0; transform: scale(0.95); } 
    to { opacity: 1; transform: scale(1); } 
}

#suggestions-track div {
    height: 32px; line-height: 32px;
    font-size: 10px; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.05em;
    opacity: 0.5; cursor: pointer;
}
#suggestions-track div:hover { opacity: 1; color: var(--accent-color); }

#empty-state { 
    animation: fadeInScale 0.8s ease-out; 
    padding: 0 20px;
}

#empty-state h2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    padding: 20px 0;
    overflow: visible; 
}

.welcome-name {
    font-size: clamp(2.2rem, 8vw, 4rem); 
    font-weight: 900;
    background: linear-gradient(45deg, #00d2ff, #928dab, #ff00cc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    padding: 10px 0; 
    margin: 0 auto;
    display: block;
    line-height: 1.1; 
}

.welcome-subtext {
    font-size: clamp(0.8rem, 2vw, 1.1rem);
    font-weight: 700;
    opacity: 0.5;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.2;
}

.markdown-content p { margin-bottom: 0.75rem; line-height: 1.6; }
.markdown-content p:last-child { margin-bottom: 0; }

.tts-btn { transition: all 0.2s ease; }
.tts-btn:hover svg { fill: var(--accent-color); transform: scale(1.1); }

.markdown-content pre { 
    background: #0f172a; 
    color: #38bdf8; 
    padding: 1.25rem; 
    border-radius: 1rem; 
    margin: 1rem 0; 
    overflow-x: auto; 
    border: 1px solid var(--border);
    font-family: monospace;
    font-size: 0.85rem;
}

#user-avatar {
    object-fit: cover;
    border: 2px solid var(--accent-color);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}
#user-avatar:hover { transform: scale(1.15) rotate(7deg); box-shadow: 0 0 20px var(--accent-color); }

@keyframes popIn {
    from { transform: scale(0) rotate(-45deg); opacity: 0; }
    to { transform: scale(1) rotate(0); opacity: 1; }
}
#user-avatar:not(.hidden) { animation: popIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55); }

#personal-promo { animation: slideUp 0.6s ease-out; }
@keyframes slideUp { 
    from { opacity: 0; transform: translateY(20px); } 
    to { opacity: 1; transform: translateY(0); } 
}

.fill-red-500 {
    fill: #ef4444 !important;
    filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.6));
}

@keyframes pulse-red {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.animate-pulse {
    animation: pulse-red 1.2s infinite ease-in-out !important;
}

@media (max-width: 640px) {
    .welcome-name {
        font-size: 2.2rem;
        line-height: 1.2;
    }
    
    #chat-form { 
        gap: 0.5rem; 
        padding: 0.75rem; 
        background: var(--bg-main);
        border-top: 1px solid var(--border);
    }
    
    #user-input { 
        padding: 0.75rem 1rem; 
        font-size: 16px; 
        border-radius: 24px;
    }

    #sidebar { width: 85%; }

    #suggestions-track {
        display: flex !important;
        flex-direction: row !important;
        transform: none !important;
        overflow-x: auto;
        gap: 10px;
        padding-bottom: 10px;
    }
    
    #suggestions-track div {
        white-space: nowrap;
        background: var(--bg-side);
        border: 1px solid var(--border);
        padding: 0 15px;
        border-radius: 20px;
        height: 36px;
        line-height: 36px;
        flex-shrink: 0;
    }
} 

button:active {
    transform: scale(0.96);
}
