.chat-container {
    max-width: 100%;
    margin: 0 auto;
    border: 1px solid #ddd;
    border-radius: 10px;
    background-color: #f9f9f9;
    display: flex;
    flex-direction: column;
    min-height: 70vh;
    max-height: 80vh;
    }
    
    #chat-messages {
        flex-grow: 1;
        overflow-y: auto;
        padding: 20px;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }
    
    .message {
        margin-bottom: 20px;
        padding: 15px;
        border-radius: 8px;
        white-space: pre-wrap;
        word-wrap: break-word;
        max-width: 85%;
        position: relative;
        box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    }
    
    .message-content {
        white-space: pre-wrap;
        word-break: break-word;
        line-height: 1.5;
    }
    
    .user-message {
        background-color: #e3f2fd;
        text-align: left;
        border-left: 4px solid #2196F3;
        align-self: flex-end;
        margin-right: 10px;
    }
    
    .ai-message {
        background-color: #f1f8e9;
        text-align: left;
        border-left: 4px solid #4CAF50;
        align-self: flex-start;
        margin-left: 10px;
    }
    
    .keywords-container {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 5px;
    }
    
    .keyword-badge {
        background-color: #e3f2fd;
        color: #1976d2;
        padding: 3px 8px;
        border-radius: 12px;
        font-size: 0.8em;
        white-space: nowrap;
    }
    
    .references-container {
        background: #f8f9fa;
        border-left: 3px solid #6c757d;
        padding: 12px 15px;
        margin-top: 15px;
        border-radius: 0 4px 4px 0;
    }
    
    .loading-message {
        text-align: center;
        padding: 15px;
        color: #666;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }
    
    .loading-message .spinner-border {
        width: 1.2rem;
        height: 1.2rem;
    }
    
    .alert-danger {
        margin: 10px;
    }
   
   
   
    
    .feedback-buttons {
        margin-top: 10px;
        display: flex;
        gap: 8px;
    }
    
    
    /* ... (mantén todo el CSS anterior sin cambios) ... */

/* Botones de feedback - Versión corregida */
.feedback-btn {
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    background: none;
    padding: 0;
    opacity: 0.7;
}

.feedback-btn i {
    color: #666;
    transition: all 0.3s;
    font-size: 1.2em;
}

/* Estados activos */
.feedback-btn.active.like i {
    color: #28a745;
    filter: drop-shadow(0 0 4px rgba(40, 167, 69, 0.3));
}

.feedback-btn.active.neutral i {
    color: #800080;
    filter: drop-shadow(0 0 4px rgba(128, 0, 128, 0.3));
}

.feedback-btn.active.dislike i {
    color: #dc3545;
    filter: drop-shadow(0 0 4px rgba(220, 53, 69, 0.3));
}

/* Deshabilitar otros botones cuando hay selección */
.feedback-buttons.has-feedback .feedback-btn:not(.active) {
    opacity: 0.4;
    pointer-events: none;
    transform: scale(0.95);
}

.feedback-btn.active {
    opacity: 1;
    transform: scale(1.2);
}
    

    @keyframes pulse-green {
        0% { filter: drop-shadow(0 0 2px rgba(40, 167, 69, 0)); }
        50% { filter: drop-shadow(0 0 8px rgba(40, 167, 69, 0.4)); }
        100% { filter: drop-shadow(0 0 2px rgba(40, 167, 69, 0)); }
    }
    
    .message-content h3 {
        font-size: 1.2em;
        margin: 10px 0;
        color: #2c3e50;
        border-bottom: 2px solid #3498db;
        padding-bottom: 5px;
    }
    
    .message-content strong {
        color: #34495e;
        font-weight: 600;
    }
    
    .message-content em {
        color: #27ae60;
        font-style: italic;
    }
    
    .message-content code {
        background: #f0f0f0;
        padding: 2px 5px;
        border-radius: 3px;
        font-family: 'Courier New', Courier, monospace;
        color: #c0392b;
    }
    
    @media (max-width: 768px) {
        .chat-container {
            min-height: 80vh;
            max-height: 85vh;
            border-radius: 0;
            border: none;
        }
        
        .message {
            max-width: 90%;
            padding: 12px;
        }
    }