/* =========================================================
   ROBOT ASISTENTE - ESTILO OSCURO
   ========================================================= */

.robot-assistant {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 10000;
  cursor: grab;
  user-select: none;
}

.robot-avatar {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #00ff88, #00cc66);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 15px rgba(0,255,136,0.3);
}

.robot-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0,255,136,0.4);
}

.robot-face {
  width: 40px;
  height: 40px;
  position: relative;
}

.robot-eye {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #000;
  border-radius: 50%;
  top: 12px;
  transition: all 0.1s;
}

.robot-eye.left {
  left: 8px;
}

.robot-eye.right {
  right: 8px;
}

.robot-eye.blink {
  height: 2px;
  top: 15px;
}

.robot-mouth {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 4px;
  background: #000;
  border-radius: 2px;
  transition: all 0.1s;
}

.robot-mouth.talking {
  width: 24px;
  height: 8px;
  border-radius: 4px;
  animation: talk 0.3s infinite;
}

@keyframes talk {
  0%, 100% { height: 4px; }
  50% { height: 10px; }
}

.robot-bubble {
  position: absolute;
  bottom: 70px;
  right: 10px;
  background: #1a1a22;
  color: #00ff88;
  padding: 8px 12px;
  border-radius: 16px;
  font-size: 12px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  border: 1px solid #00ff88;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.robot-assistant:hover .robot-bubble {
  opacity: 1;
}

/* Modal del robot */
.robot-modal {
  position: fixed;
  width: 350px;
  height: 450px;
  background: #111118;
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 10001;
  border: 1px solid #00ff88;
}

.robot-modal.open {
  display: flex;
}

.robot-modal-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: #0a0a0f;
  border-bottom: 1px solid #00ff88;
  color: #00ff88;
  font-weight: bold;
}

.robot-modal-header button {
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  font-size: 16px;
  margin-left: 8px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}

.robot-modal-header button:hover {
  background: #1a1a22;
  color: #00ff88;
}

.robot-modal-chat {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.robot-message {
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 13px;
  word-wrap: break-word;
}

.robot-message.user {
  background: #00ff88;
  color: #000;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.robot-message.bot {
  background: #1a1a22;
  color: #e0e0e0;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  border: 1px solid #333;
}

.robot-modal-input {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: #0a0a0f;
  border-top: 1px solid #222;
}

.robot-modal-input input {
  flex: 1;
  padding: 10px;
  background: #1a1a22;
  border: 1px solid #333;
  border-radius: 20px;
  color: #fff;
  outline: none;
}

.robot-modal-input input:focus {
  border-color: #00ff88;
}

.robot-modal-input button {
  background: #00ff88;
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.2s;
}

.robot-modal-input button:hover {
  background: #00cc66;
  transform: scale(1.02);
}

.robot-voice-btn {
  background: #1a1a22 !important;
  color: #00ff88;
  font-size: 18px;
  padding: 6px 12px !important;
}

.robot-voice-btn:hover {
  background: #00ff88 !important;
  color: #000 !important;
}

/* Mejoras visuales del robot */
.robot-avatar {
  background: linear-gradient(135deg, #00ff88, #00cc66);
  box-shadow: 0 0 15px rgba(0,255,136,0.5);
  transition: all 0.3s ease;
}

.robot-avatar:hover {
  transform: scale(1.1);
  box-shadow: 0 0 25px rgba(0,255,136,0.7);
}

.robot-eye {
  background: #000;
  box-shadow: 0 0 3px rgba(0,0,0,0.5);
  transition: all 0.1s ease;
}

.robot-mouth {
  background: #000;
  transition: all 0.1s ease;
}

.robot-mouth.talking {
  background: #ff4444;
  box-shadow: 0 0 5px #ff4444;
}

.robot-bubble {
  background: #00ff88;
  color: #000;
  font-weight: bold;
  border: none;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  animation: bubblePulse 1s infinite;
}

@keyframes bubblePulse {
  0%, 100% { opacity: 0.9; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

.robot-modal {
  background: #0a0a0f;
  border: 2px solid #00ff88;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.robot-modal-header {
  background: linear-gradient(90deg, #0a0a0f, #1a1a22);
  border-bottom: 2px solid #00ff88;
}

.robot-modal-header span {
  text-shadow: 0 0 5px #00ff88;
}

.robot-message.user {
  background: linear-gradient(135deg, #00ff88, #00cc66);
  font-weight: bold;
}

.robot-message.bot {
  background: #1a1a22;
  border-left: 3px solid #00ff88;
}

.robot-modal-input input {
  background: #1a1a22;
  border: 1px solid #00ff88;
  color: #00ff88;
}

.robot-modal-input input:focus {
  box-shadow: 0 0 8px #00ff88;
}

.robot-modal-input button {
  background: #00ff88;
  color: #000;
  font-weight: bold;
}

.robot-voice-btn {
  background: #1a1a22 !important;
  color: #00ff88 !important;
  border: 1px solid #00ff88 !important;
}

.robot-voice-btn:hover {
  background: #00ff88 !important;
  color: #000 !important;
}
