/* General Reset */
body, html {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
    background-color: #121212; /* Darker background for better contrast */
    color: #ccc;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 9px;
    background: #222; /* Match background */
}

::-webkit-scrollbar-thumb {
    background: #555; /* Subtle thumb color */
    border-radius: 8px;
    transition: background 0.3s ease; /* Smooth transition */
}

::-webkit-scrollbar-thumb:hover {
    background: #aaa; /* Brighten on hover */
}

.chat-container {
    width: 1000px; /* Reduced width */
    max-width: 90%; /* Flexible for smaller screens */
    margin: 20px auto; /* Add vertical spacing */
    font-family: Arial, sans-serif;
    padding: 15px;
    border-radius: 10px;
    background-color: #1e1e1e; /* Slightly lighter container background */
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3); /* Add subtle shadow */
    box-sizing: border-box;
}

.ai-assistant {
    border: 1px solid #333;
    border-radius: 10px;
    overflow: hidden;
}

.assistant-header {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 10px; /* Reduced padding */
    font-weight: bold;
    letter-spacing: 1px; /* Add some spacing for a modern look */
}

.chat-area {
    max-height: 400px; /* Reduced height */
    overflow-y: auto;
    padding: 10px; /* Reduced padding */
    background-color: #181818;
    border-radius: 10px; /* Match with overall design */
}

.message {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px; /* Reduced spacing */
}

.profile-picture {
    width: 35px; /* Reduced size */
    height: 35px; /* Reduced size */
    border-radius: 5px;
    margin-right: 10px; /* Reduced margin */
    background-size: cover;
    background-position: center;
    border: 2px solid #444; /* Subtle border */
}

.ai-pic {
    background: url("/Image/no_photo.jpg");
    background-size: cover;
}

.user-pic {
    background-color: #fff;
    position: relative;
    left: -0.5rem;
}

.message-content {
    max-width: 75%; /* Reduced width */
    background-color: #333;
    border-radius: 5px; /* Slightly less rounded */
    padding: 8px; /* Reduced padding */
    color: #fff;
    word-wrap: break-word;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2); /* Add slight shadow */
    transition: transform 0.2s ease, background-color 0.3s ease; /* Smooth transitions */
}

.message-content:hover {
    transform: scale(1.02); /* Slight zoom effect */
    background-color: #444; /* Highlighted state */
}

.user-message {
    flex-direction: row-reverse;
}

.user-message .message-content {
    background-color: #27292b;
    color: #ddd;
}

.user-message .profile-picture {
    margin-left: 10px; /* Reduced margin */
    margin-right: 0;
}

.input-area {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px; /* Reduced padding */
    border-top: 1px solid #333;
    background-color: #202020; /* Match footer to container */
    border-radius: 0 0 10px 10px; /* Round corners at the bottom */
}

.input-area input {
    flex: 1;
    padding: 8px; /* Reduced padding */
    border: 1px solid #444;
    border-radius: 5px;
    font-size: 14px;
    background-color: #1e1e1e;
    color: #ccc;
    transition: border-color 0.3s ease;
}

.input-area input:focus {
    border-color: #888;
    outline: none;
}

.input-area button {
    background-color: #555;
    color: white;
    border: none;
    padding: 8px 16px; /* Reduced padding */
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.input-area button:hover {
    background-color: #777;
}

/* Responsive Design */
@media (max-width: 768px) {
    .message-content {
        max-width: 100%;
    }

    .chat-container {
        padding: 10px;
    }

    .input-area input {
        font-size: 12px;
    }

    .input-area button {
        font-size: 12px;
        padding: 6px 12px;
    }
}
