body{ background: rgba(136, 179, 153, 1); } /* ===== PALETA DE COLORES MODERNA ===== */ .typing-indicator { background: var(--bot-color); padding: 15px; border-radius: 20px; display: inline-block; margin-bottom: 10px; animation: fadeIn 0.3s ease; } .dot { height: 10px; width: 10px; background: var(--primary-color); border-radius: 50%; display: inline-block; margin: 0 2px; animation: bounce 1.5s infinite ease-in-out; } .dot:nth-child(2) { animation-delay: 0.2s; } .dot:nth-child(3) { animation-delay: 0.4s; } @keyframes bounce { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-5px); } } :root { --primary-color: #9A9A9A; /* Azul vibrante */ --bot-color: #f8f9fa; /* Fondo mensajes bot */ --user-color: #FF0000; /* Fondo mensajes usuario */ --user-text: white; /* Texto mensajes usuario */ --bg-color: #f1f4ff; /* Fondo de la app */ --text-color: #0016FF; /* Color de texto principal */ --shadow: 0 4px 20px rgba(0, 0, 0, 0.08); } /* ===== ESTRUCTURA PRINCIPAL ===== */ .chatbot-container { width: 100%; max-width: 98%; /* Ancho máximo elegante */ height: 90vh; max-height: 800px; border-radius: 20px; /* Bordes más redondeados */ box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; border: 1px solid rgba(0, 0, 0, 0.05); } @media (min-width: 680px){ .chatbot-container{ max-width: 70% !important; margin: auto !important; } } /* ===== CABECERA ===== */ .chat-header { background: rgba(16, 0, 39, 1); color: white; padding: 18px 20px; font-size: 1.2rem; font-weight: 600; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); } /* ===== ÁREA DE CHAT ===== */ .chatbox { flex: 1; padding: 20px; overflow-y: auto; background: rgba(66, 26, 96, 1); background-image: linear-gradient(to bottom, transparent 95%, rgba(37, 165, 0, 1) 100%); scrollbar-width: thin; scrollbar-color: var(--primary-color) transparent; } /* Personalizar scrollbar (opcional) */ .chatbox::-webkit-scrollbar { width: 6px; } .chatbox::-webkit-scrollbar-thumb { background-color: var(--primary-color); border-radius: 3px; } /* ===== MENSAJES ===== */ .message { margin-bottom: 15px; max-width: 85%; padding: 12px 16px; border-radius: 18px; animation: fadeIn 0.3s ease; line-height: 1.4; font-size: 0.95rem; position: relative; } .bot-message { background: rgba(0, 255, 63, 1); border: 3px solid#8F2600; align-self: flex-start; border-bottom-left-radius: 4px; color: var(--text-color); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); } .user-message { background: rgba(255, 81, 0, 1); color: var(--user-text); margin-left: auto; border-bottom-right-radius: 4px; box-shadow: 0 2px 4px rgba(67, 97, 238, 0.2); } /* ===== INPUT ===== */ .input-container { display: flex; padding: 12px 15px; background: #9EAE036E; border-top: 1px solid #93FF00; gap: 8px; } #userInput { flex: 1; padding: 12px 16px; border: 2px solid #002A54; border-radius: 25px; outline: none; font-size: 0.95rem; background: #B2B2B2; transition: all 0.3s; } #userInput:focus { border-color: var(--primary-color); background: #B7FF00; box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1); } /* ===== BOTONES ===== */ #sendButton, #voiceButton, #clearButton { width: 44px; height: 44px; border: none; border-radius: 50%; background: #180047; color: white; cursor: pointer; display: flex; justify-content: center; align-items: center; transition: all 0.3s; font-size: 1rem; } #sendButton:hover, #voiceButton:hover, #clearButton:hover { background: #084000; transform: scale(1.05); } /* ===== PREGUNTAS SUGERIDAS ===== */ .suggested-questions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; } .suggested-question { background: rgba(67, 238, 157, 0.52); color: rgba(255, 255, 255, 0.66); padding: 8px 14px; border-radius: 20px; cursor: pointer; font-size: 0.85rem; transition: all 0.2s; border: 2px solidrgba(0, 0, 0, 1); font-weight: 500; } .suggested-question:hover { background: rgba(67, 97, 238, 0.2); transform: translateY(-1px); } /* ===== TIMESTAMP ===== */ .timestamp { font-size: 0.7rem; color: rgba(255, 255, 255, 1); margin-top: 4px; text-align: right; } /* ===== ANIMACIONES ===== */ @keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } } /* ===== RESPONSIVE ===== */ @media (max-width: 480px) { .chatbot-container { height: 100vh; max-height: none; border-radius: 0; } } /* ===== VARIABLES Y MODO OSCURO ===== */ :root { /* Modo claro (default) */ --primary-color: #4361ee; --bot-color: #f8f9fa; --user-color: #4361ee; --user-text: white; --bg-color: #f1f4ff; --text-color: #2b2d42; --input-bg: #f8f9fa; --chat-bg: white; --shadow: 0 4px 20px rgba(0, 0, 0, 0.08); --border-color: #e9ecef; } [data-theme="dark"] { /* Modo oscuro */ --primary-color: #7b94ff; --bot-color: #2d3748; --user-color: #7b94ff; --user-text: white; --bg-color: #1a202c; --text-color: #e2e8f0; --input-bg: #2d3748; --chat-bg: #1a202c; --shadow: 0 4px 20px rgba(0, 0, 0, 0.3); --border-color: #4a5568; } /* ===== SPINNER DE CARGA ===== */ .spinner { width: 24px; height: 24px; border: 3px solid rgba(255, 255, 255, 0.3); border-radius: 50%; border-top-color: white; animation: spin 1s ease-in-out infinite; margin: 0 auto; } @keyframes spin { to { transform: rotate(360deg); } } .bot-message .spinner { border-top-color: var(--primary-color); } /* ===== EFECTOS AVANZADOS ===== */ .message { transition: transform 0.2s, opacity 0.3s; will-change: transform, opacity; } .message:hover { transform: translateY(-2px); } /* Efecto de máquina de escribir */ @keyframes typing { from { width: 0 } to { width: 100% } } .typing-effect { overflow: hidden; white-space: nowrap; animation: typing 1.5s steps(40, end); } /* ===== BOTÓN DE TEMA ===== */ .theme-toggle { background: none; border: none; color: inherit; cursor: pointer; font-size: 1.2rem; padding: 5px; margin-left: 10px; } /* ===== PERSONALIZACIÓN ===== */ .customization-panel { position: absolute; right: 20px; top: 60px; background: var(--chat-bg); border-radius: 10px; box-shadow: var(--shadow); padding: 15px; z-index: 100; display: none; width: 200px; } .color-option { width: 25px; height: 25px; border-radius: 50%; display: inline-block; margin: 5px; cursor: pointer; border: 2px solidrgba(255, 0, 0, 1); } /* ===== ANIMACIÓN DE NUEVO MENSAJE ===== */ @keyframes messagePop { 0% { transform: scale(0.9); opacity: 0; } 50% { transform: scale(1.05); } 100% { transform: scale(1); opacity: 1; } } .new-message { animation: messagePop 0.3s ease-out; } .message h4 { color: var(--primary-color); margin: 10px 0 8px 0; font-size: 1.1em; } .message li { list-style-type: none; position: relative; padding-left: 15px; margin: 5px 0; } .message li:before { content: "•"; color: var(--primary-color); position: absolute; left: 0; }