/* Основные стили чата */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    color: #333;
}

.chat-container {
    max-width: 800px;
    margin: 20px auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.chat-container h1 {
    background: #2c3e50;
    color: #fff;
    margin: 0;
    padding: 15px 20px;
    font-size: 1.5em;
}

.chat-history {
    height: 500px;
    overflow-y: auto;
    padding: 20px;
    background: #f9f9f9;
}

.message {
    margin-bottom: 15px;
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 70%;
    word-wrap: break-word;
}

.message.user {
    background: #e3f2fd;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.message.assistant {
    background: #f1f1f1;
    margin-right: auto;
    border-bottom-left-radius: 5px;
}

.message p {
    margin: 0;
}

.chat-input {
    padding: 15px;
    background: #fff;
    border-top: 1px solid #eee;
}

.chat-input form {
    display: flex;
    gap: 10px;
}

.chat-input textarea {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: none;
    min-height: 60px;
    font-family: inherit;
}

.chat-input button {
    padding: 10px 20px;
    background: #2c3e50;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.chat-input button:hover {
    background: #1a252f;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message {
    animation: fadeIn 0.3s ease-out;
}

/* Адаптивность */
@media (max-width: 768px) {
    .chat-container {
        margin: 0;
        border-radius: 0;
        height: 100vh;
    }
    
    .chat-history {
        height: calc(100vh - 150px);
    }
    
    .message {
        max-width: 85%;
    }
}