#wpds-chatbox {
    max-width: 1200px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    background: #ffffff;
    overflow: hidden;
    border: 1px solid #e1e5e9;
}

.chat-input-container {
    display: flex;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-top: 1px solid #e1e5e9;
    gap: 12px;
    position: relative;
}

#wpds-question {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 16px;
    line-height: 1.6;
    resize: none;
    min-height: 56px;
    max-height: 150px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

#wpds-question:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    transform: translateY(-1px);
}

#wpds-send {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    border-radius: 12px;
    width: 56px;
    height: 56px;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

#wpds-send:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

#wpds-send:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#wpds-response {
    padding: 0;
    max-height: 600px;
    overflow-y: auto;
    overflow-x: none;
    background: #fafbfc;
    position: relative;
}

.chat-message {
    display: flex;
    padding: 24px;
    border-bottom: 1px solid #f0f2f5;
    animation: slideInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

@keyframes slideInUp {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.chat-message.user {
    background: #ffffff;
    border-left: 4px solid #007bff;
}

.chat-message.assistant {
    background: #f8f9fa;
    border-left: 4px solid #28a745;
}

.chat-message.assistant.error {
    background: #fff5f5;
    border-left: 4px solid #dc3545;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 16px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.message-avatar:hover {
    transform: scale(1.1);
}

.message-avatar.user {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
}

.message-avatar.assistant {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: white;
}

.message-content {
    flex: 1;
    max-width: calc(100% - 56px);
    line-height: 1.6;
}

.user-question {
    background: #e3f2fd;
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid #bbdefb;
    color: #1565c0;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.assistant-response {
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e1e5e9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    line-height: 1.7;
}

.thinking {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.thinking-message {
    background: #ffffff;
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid #e1e5e9;
    color: #6c757d;
    font-weight: 500;
    margin-bottom: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 8px 0;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #007bff;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.error-message {
    background: #fff5f5;
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid #fed7d7;
    color: #c53030;
}

.error-details {
    font-size: 0.9em;
    color: #e53e3e;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #fed7d7;
}

.proyecto {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    margin: 16px 0;
    border: 1px solid #e1e5e9;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.proyecto::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007bff, #28a745, #ffc107, #dc3545);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.proyecto:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.proyecto:hover::before {
    opacity: 1;
}

.proyecto h2 {
    color: #1a202c;
    margin: 0 0 20px 0;
    font-size: 1.6em;
    font-weight: 700;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
    position: relative;
}

.proyecto h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #007bff, #28a745);
}

.info-proyecto {
    display: grid;
    gap: 16px;
}

.info-proyecto p {
    margin: 0;
    line-height: 1.7;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.info-proyecto p:hover {
    background: #e9ecef;
}

.info-proyecto strong {
    color: #2d3748;
    min-width: 150px;
    font-weight: 600;
    padding: 6px 12px;
    background: #ffffff;
    border-radius: 6px;
    font-size: 0.95em;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.info-proyecto span {
    color: #4a5568;
    font-weight: 500;
    flex: 1;
}

.tiempo-respuesta {
    text-align: right;
    color: #718096;
    font-size: 0.85em;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
    font-style: italic;
}

/* Scrollbar personalizado */
#wpds-response::-webkit-scrollbar {
    width: 8px;
}

#wpds-response::-webkit-scrollbar-track {
    background: #f1f3f4;
    border-radius: 4px;
}

#wpds-response::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #007bff, #0056b3);
    border-radius: 4px;
    transition: background 0.3s ease;
}

#wpds-response::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #0056b3, #004085);
}

/* Responsive */
@media (max-width: 768px) {
    #wpds-chatbox {
        margin: 10px;
        border-radius: 12px;
    }
    
    .chat-input-container {
        padding: 16px;
        gap: 8px;
    }
    
    #wpds-question {
        padding: 12px 16px;
        font-size: 16px;
    }
    
    #wpds-send {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
    
    .chat-message {
        padding: 16px;
    }
    
    .message-avatar {
        width: 36px;
        height: 36px;
        font-size: 16px;
        margin-right: 12px;
    }
    
    .message-content {
        max-width: calc(100% - 48px);
    }
    
    .user-question,
    .assistant-response,
    .thinking-message {
        padding: 12px 16px;
        border-radius: 8px;
    }
    
    .info-proyecto p {
        flex-direction: column;
        gap: 8px;
        padding: 10px 12px;
    }
    
    .info-proyecto strong {
        min-width: auto;
        width: 100%;
        text-align: center;
    }
    
    .proyecto {
        padding: 16px;
        margin: 12px 0;
    }
    
    .proyecto h2 {
        font-size: 1.4em;
        margin-bottom: 16px;
    }
}

/* Animaciones adicionales */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.chat-message {
    animation: fadeInScale 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Efecto de brillo en hover */
.proyecto::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.proyecto:hover::after {
    left: 100%;
}

/* Estilos para memoria de conversación */
.memory-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 10px 0;
    font-size: 0.85em;
    color: #6c757d;
    border: 1px solid #e9ecef;
}

.clear-memory-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.8em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-memory-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.chat-message.info {
    background: #e7f3ff;
    border-left: 4px solid #007bff;
}

.chat-message.info .message-avatar {
    background: #007bff;
}

.info-message {
    color: #0056b3;
    font-weight: 500;
}

/* Indicador de memoria activa */
.memory-active {
    position: relative;
}

.memory-active::before {
    content: '💾';
    position: absolute;
    top: -5px;
    right: -5px;
    background: #28a745;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.scroll-to-bottom-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

.scroll-to-bottom-btn:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.scroll-to-bottom-btn.show {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
    animation: bounceIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
} 