#chat-container {
    display: flex;
    flex-direction: column;
    height: 600px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#chat-log {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#chat-form {
    display: flex;
    gap: 10px;
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    border-radius: 0 0 10px 10px;
}

#chat-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

#chat-input:focus {
    border-color: #0084ff;
}

#chat-form button {
    padding: 10px 20px;
    background: #0084ff;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

#chat-form button:hover {
    background: #0073e6;
}

#chat-form button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 15px;
    margin-bottom: 10px;
    position: relative;
}

.message.user {
    align-self: flex-end;
    background: #0084ff;
    color: white;
    border-bottom-right-radius: 5px;
}

.message.assistant {
    align-self: flex-start;
    background: #f0f2f5;
    color: #1c1e21;
    border-bottom-left-radius: 5px;
}

.message strong {
    display: block;
    font-size: 12px;
    margin-bottom: 5px;
    opacity: 0.8;
}

.message-content {
    line-height: 1.4;
}

.message-content a {
    color: inherit;
    text-decoration: underline;
}

.message-content pre {
    background: rgba(0, 0, 0, 0.1);
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 5px 0;
}

.message-content code {
    font-family: monospace;
}

.message-content blockquote {
    border-left: 3px solid rgba(0, 0, 0, 0.1);
    margin: 5px 0;
    padding-left: 10px;
}

.message-content ul {
    margin: 5px 0;
    padding-left: 20px;
}

.message.user .message-content a {
    color: #fff;
    text-decoration: underline;
}

.message.assistant .message-content a {
    color: #0084ff;
    text-decoration: underline;
}

/* Indicador de escribiendo */
.typing-indicator {
    background: #f7f8fa;
    color: #34495E;
    border-radius: 14px;
    padding: 10px 16px;
    margin-bottom: 10px;
    width: fit-content;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: #0084ff;
    border-radius: 50%;
    animation: typingAnimation 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) { animation-delay: 0s; }
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingAnimation {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-4px); }
}

.message pre {
    background: #f1f3f6;
    padding: 10px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 8px 0;
    font-family: 'Consolas', monospace;
    font-size: 0.95em;
}

.message.user pre {
    background: #eaf3ff;
}

.message a {
    color: #0084ff;
    text-decoration: underline;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.message a:hover {
    border-bottom-color: #0084ff;
}

.message.user a {
    color: #1a2942;
    border-bottom-color: #b0b8c1;
}

.message.user a:hover {
    border-bottom-color: #1a2942;
}

.message ul, .message ol {
    margin: 8px 0;
    padding-left: 20px;
}

.message li {
    margin: 4px 0;
}

.message blockquote {
    border-left: 3px solid #0084ff;
    margin: 8px 0;
    padding: 8px 12px;
    background: #f1f3f6;
    border-radius: 0 8px 8px 0;
}

.message.user blockquote {
    border-left-color: #eaf3ff;
    background: #eaf3ff;
} 