* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #f5f5f5;
}

.container {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 250px;
    background-color: #2c3e50;
    color: white;
    padding: 20px;
    overflow-y: auto;
}

.sidebar h2 {
    margin-bottom: 20px;
    text-align: center;
}

.assistants-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.assistant-item {
    padding: 10px;
    background-color: #34495e;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.assistant-item:hover {
    background-color: #3c5a76;
}

.assistant-item.active {
    background-color: #2980b9;
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: white;
}

.header {
    padding: 15px;
    background-color: #3498db;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 1.5rem;
}

.current-assistant {
    font-size: 0.9rem;
    color: #f0f0f0;
}

.clear-btn {
    padding: 8px 12px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.clear-btn:hover {
    background-color: #c0392b;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 70%;
    padding: 12px 15px;
    border-radius: 10px;
    position: relative;
    line-height: 1.5;
}

.user-message {
    align-self: flex-end;
    background-color: #3498db;
    color: white;
    border-bottom-right-radius: 0;
}

.assistant-message {
    align-self: flex-start;
    background-color: #f0f0f0;
    color: #333;
    border-bottom-left-radius: 0;
}

.input-area {
    padding: 15px;
    display: flex;
    gap: 10px;
    background-color: #f9f9f9;
    border-top: 1px solid #ddd;
}

#userInput {
    flex: 1;
    padding: 12px;
    border-radius: 5px;
    border: 1px solid #ddd;
    resize: none;
    min-height: 50px;
    max-height: 150px;
    overflow-y: auto;
}

.send-btn {
    padding: 0 20px;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.send-btn:hover {
    background-color: #27ae60;
}

.loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #3498db;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-indicator {
    align-self: flex-start;
    color: #777;
    font-style: italic;
    display: flex;
    align-items: center;
}

/* Añade estas reglas al archivo CSS */
.assistant-message strong,
.assistant-message b {
    font-weight: bold;
}

.assistant-message em,
.assistant-message i {
    font-style: italic;
}

.assistant-message code {
    background-color: #f0f0f0;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: monospace;
}

.assistant-message pre {
    background-color: #f5f5f5;
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 10px 0;
}

.assistant-message a {
    color: #3498db;
    text-decoration: underline;
}

.assistant-message ul,
.assistant-message ol {
    margin-left: 20px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.assistant-message blockquote {
    border-left: 4px solid #ccc;
    padding-left: 10px;
    margin-left: 0;
    color: #666;
}

.assistant-message h1,
.assistant-message h2,
.assistant-message h3,
.assistant-message h4 {
    margin-top: 15px;
    margin-bottom: 10px;
}

.assistant-message table {
    border-collapse: collapse;
    width: 100%;
    margin: 10px 0;
}

.assistant-message th,
.assistant-message td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.assistant-message th {
    background-color: #f2f2f2;
}

/* Estilos para el modal de login */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.login-container {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 350px;
    max-width: 90%;
}

.login-container h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #2c3e50;
    text-align: center;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.input-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-btn:hover {
    background-color: #2980b9;
}

.login-error {
    color: #e74c3c;
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
}

/* Estilos para la información del hilo */
.thread-info {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #3c5a76;
}

.thread-info h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #f0f0f0;
}

#threadIdDisplay {
    font-size: 12px;
    background-color: #34495e;
    padding: 8px;
    border-radius: 4px;
    word-break: break-all;
    color: #ccc;
}

/* Estilos para elementos deshabilitados */
.disabled {
    opacity: 0.6;
    cursor: not-allowed !important;
    pointer-events: none;
}

/* Estilos para el botón de cancelación */
.cancel-btn {
    margin-left: 10px;
    padding: 4px 8px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.cancel-btn:hover {
    background-color: #c0392b;
}

.loading-indicator {
    align-self: flex-start;
    color: #777;
    font-style: italic;
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background-color: #f8f8f8;
    border-radius: 8px;
    margin-bottom: 10px;
}

.assistant-category-title {
    font-weight: bold;
    margin: 10px 0 5px 0;
    color: #888;
    font-size: 11px;
    text-transform: uppercase;
}