body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.container {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 800px;
    padding: 30px;
    box-sizing: border-box;
}

h1, h2 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 20px;
}

p {
    text-align: center;
    margin-bottom: 30px;
    color: #555;
}

.chat-window {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    height: 350px;
    overflow-y: auto;
    padding: 15px;
    margin-bottom: 20px;
    background-color: #fdfdfd;
    display: flex;
    flex-direction: column;
}

.message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 18px;
    margin-bottom: 10px;
    line-height: 1.5;
    word-wrap: break-word;
}

.user-message {
    background-color: #e6f7ff;
    color: #2196f3;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.ai-message {
    background-color: #e0ffe0;
    color: #4caf50;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.message strong {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9em;
    color: #333;
}

.message .timestamp {
    display: block;
    font-size: 0.7em;
    color: #777;
    margin-top: 5px;
    text-align: right;
}

#chatForm {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

#userInput {
    flex-grow: 1;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 25px;
    font-size: 1em;
    outline: none;
    transition: border-color 0.3s ease;
}

#userInput:focus {
    border-color: #2196f3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);
}

#chatForm button {
    padding: 12px 25px;
    background-color: #2196f3;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

#chatForm button:hover {
    background-color: #1976d2;
    transform: translateY(-2px);
}

.history-log {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    background-color: #fdfdfd;
    max-height: 400px;
    overflow-y: auto;
    font-size: 0.9em;
}

.history-entry {
    border-bottom: 1px dashed #eee;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.history-entry:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.history-entry p {
    text-align: left;
    margin: 5px 0;
    color: #444;
}

.history-entry .timestamp {
    font-size: 0.75em;
    color: #888;
    text-align: right;
    display: block;
}

.history-entry strong {
    color: #2c3e50;
}