.chat-section {
    padding: 4rem 10%;
    background: #F8FAFC;
    min-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.chat-container {
    width: 100%;
    max-width: 800px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    height: 700px;
    overflow: hidden;
    border: 1px solid #E2E8F0;
}

.chat-header {
    padding: 1.5rem;
    border-bottom: 1px solid #F1F5F9;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar-container {
    position: relative;
}

.avatar {
    width: 48px;
    height: 48px;
    background: #F1F5F9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    color: #64748B;
}

.status-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: #22C55E;
    border: 2px solid white;
    border-radius: 50%;
}

.chat-info h2 {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
    color: #0F172A;
}

.chat-info p {
    font-size: 0.875rem;
    color: #64748B;
    margin: 0;
}

.chat-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: #ffffff;
}

.message {
    display: flex;
    gap: 1rem;
    max-width: 85%;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.sophia {
    align-self: flex-start;
}

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    background: #F1F5F9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    flex-shrink: 0;
}

.message-content {
    padding: 1rem 1.25rem;
    border-radius: 18px;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.sophia .message-content {
    background: #F1F5F9;
    color: #1E293B;
    border-bottom-left-radius: 4px;
}

.user .message-content {
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-input-area {
    padding: 1.5rem;
    border-top: 1px solid #F1F5F9;
    display: flex;
    gap: 0.75rem;
}

.chat-input {
    flex: 1;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    outline: none;
    transition: border-color 0.2s;
}

.chat-input:focus {
    border-color: var(--primary);
}

.btn-send {
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-send:hover {
    background: var(--primary-dark);
}

.btn-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 4px 8px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #94A3B8;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}