
.animated-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.1;
    overflow: hidden;
}

.particle {
    position: absolute;
    background-color: var(--primary-color);
    border-radius: 50%;
    animation: float 15s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(100vh) translateX(-50%) rotate(0deg);
    }
    100% {
        transform: translateY(-100px) translateX(50%) rotate(360deg);
    }
}

.sidebar {
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    padding: 20px;
    overflow-y: auto;
    z-index: 1;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.sidebar-header {
    color: white;
    font-size: 24px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.sidebar-header i {
    margin-right: 10px;
    font-size: 28px;
    animation: pulse 2s infinite;
}

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

.chat-list {
    list-style-type: none;
}

.chat-item {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-item:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.chat-item h3 {
    color: white;
    font-size: 16px;
    margin-bottom: 5px;
}

.chat-item p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.chat-container {
    flex-grow: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: rgba(255, 255, 255, 0.8);
    overflow: hidden;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1;
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.chat-header {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
}

.chat-header h2 {
    margin-left: 15px;
    flex-grow: 1;
}

.chat-header .avatar {
    width: 40px;
    height: 40px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary-color);
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.chat-messages {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
}

.message {
    max-width: 70%;
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 20px;
    position: relative;
    line-height: 1.5;
    animation: messageIn 0.3s ease-out;
}

@keyframes messageIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.user {
    background-color: var(--user-message-color);
    align-self: flex-end;
    margin-left: auto;
    border-bottom-right-radius: 0;
}

.ai {
    background-color: var(--ai-message-color);
    align-self: flex-start;
    border-bottom-left-radius: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.chat-input {
    display: flex;
    padding: 20px;
    background-color: white;
    border-top: 1px solid #EAEAEA;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.chat-input input {
    flex-grow: 1;
    padding: 15px;
    border: none;
    border-radius: 30px;
    background-color: var(--background-color);
    font-size: 16px;
    margin-right: 15px;
    transition: box-shadow 0.3s;
}

.chat-input input:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--primary-color);
}

.chat-input button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    font-size: 20px;
    transition: background-color 0.3s, transform 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-input button:hover {
    background-color: var(--secondary-color);
    transform: scale(1.05);
}

.speech-to-text {
    background-color: var(--secondary-color);
    margin-right: 10px;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: ripple 0.6s linear;
    background-color: rgba(255, 255, 255, 0.7);
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: 30vh;
    }
    
    .chat-container {
        border-radius: 20px 20px 0 0;
    }
}
.typing-indicator {
    background-color: var(--ai-message-color);
    padding: 15px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    margin-bottom: 20px;
    animation: messageIn 0.3s ease-out;
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
    opacity: 0.4;
}

.typing-indicator span:nth-child(1) {
    animation: blink 1s infinite 0.3s;
}

.typing-indicator span:nth-child(2) {
    animation: blink 1s infinite 0.5s;
}

.typing-indicator span:nth-child(3) {
    animation: blink 1s infinite 0.7s;
}

@keyframes blink {
    0% { opacity: 0.4; }
    20% { opacity: 1; }
    100% { opacity: 0.4; }
}
.sticky-image {
    left: 5%;
}