* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: system-ui, sans-serif; background: #f0f2f5; padding: 1rem; }
.container { max-width: 800px; margin: auto; }
.chat-list .chat-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem; border-bottom: 1px solid #eee; text-decoration: none;
    color: #333; background: white; margin-bottom: 0.5rem; border-radius: 8px;
}
.chat-container {
    max-width: 900px; margin: auto; background: white; border-radius: 12px;
    overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.chat-header {
    padding: 1rem; background: #4361ee; color: white;
    display: flex; justify-content: space-between; align-items: center;
}
.chat-header a { color: white; text-decoration: underline; }
.messages {
    height: 60vh; overflow-y: auto; padding: 1rem;
}
.message { margin-bottom: 1rem; display: flex; }
.message.user { justify-content: flex-end; }
.message.assistant { justify-content: flex-start; }
.message.user .content { background: #e3f2fd; }
.message.assistant .content { background: #f1f1f1; }
.content {
    padding: 0.8rem; border-radius: 12px; max-width: 80%;
    white-space: pre-wrap;
}
.file-attachment { margin-top: 0.5rem; font-size: 0.9em; }
form { padding: 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
textarea {
    height: 100px; padding: 0.8rem; border: 1px solid #ccc; border-radius: 8px;
    font-family: inherit;
}
input[type="file"] {
    padding: 0.5rem; border: 1px dashed #aaa; border-radius: 6px;
}
button {
    background: #4361ee; color: white; padding: 0.8rem; border: none;
    border-radius: 8px; cursor: pointer; font-size: 1rem;
}
@media (max-width: 600px) {
    .chat-header { flex-direction: column; gap: 0.5rem; }
    .content { max-width: 95%; }
}