* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
  color: #333;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Header */
.header {
  text-align: center;
  color: white;
  margin-bottom: 30px;
  animation: fadeInDown 0.6s ease;
}

.header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.header p {
  font-size: 1.2rem;
  opacity: 0.95;
}

/* Chat Container */
.chat-wrapper {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 20px;
  animation: fadeIn 0.8s ease;
}

@media (max-width: 768px) {
  .chat-wrapper {
    grid-template-columns: 1fr;
  }

  .sidebar {
    order: 2;
  }
}

/* Sidebar */
.sidebar {
  background: white;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  height: fit-content;
}

.sidebar h3 {
  color: #667eea;
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.sidebar-section {
  margin-bottom: 25px;
}

.categoria-btn {
  width: 100%;
  padding: 10px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.categoria-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.accion-btn {
  width: 100%;
  padding: 8px;
  margin-bottom: 6px;
  background: white;
  color: #667eea;
  border: 2px solid #667eea;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.accion-btn:hover {
  background: #667eea;
  color: white;
}

/* Chat Container */
.chat-container {
  background: white;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  height: 600px;
  overflow: hidden;
}

#chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #f8f9fa;
}

/* Messages */
.message {
  margin-bottom: 20px;
  animation: slideIn 0.3s ease;
}

.message-header {
  font-weight: bold;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.user-message {
  text-align: right;
}

.user-message .message-header {
  color: #2196f3;
}

.user-message .message-content {
  background: #e3f2fd;
  border-left: 4px solid #2196f3;
  padding: 12px 15px;
  border-radius: 10px;
  display: inline-block;
  max-width: 80%;
  text-align: left;
}

.bot-message .message-header {
  color: #9c27b0;
}

.bot-message .message-content {
  background: #f3e5f5;
  border-left: 4px solid #9c27b0;
  padding: 15px;
  border-radius: 10px;
  max-width: 90%;
}

/* Propuesta */
.propuesta {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.propuesta h3 {
  color: #667eea;
  margin-bottom: 10px;
}

.propuesta h4 {
  color: #333;
  margin-bottom: 15px;
  font-size: 1.3rem;
}

.beneficios {
  margin: 15px 0;
}

.beneficios ul {
  margin-left: 20px;
  margin-top: 10px;
}

.beneficios li {
  margin-bottom: 8px;
  line-height: 1.5;
}

.metricas {
  display: flex;
  gap: 15px;
  margin: 15px 0;
  flex-wrap: wrap;
}

.metrica {
  background: #667eea;
  color: white;
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

.cta {
  margin-top: 15px;
  padding: 15px;
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  border-radius: 5px;
  font-weight: 500;
}

/* Proyectos Grid */
.proyectos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  margin: 15px 0;
}

.proyecto-card {
  background: white;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.proyecto-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.proyecto-card h4 {
  color: #667eea;
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.proyecto-meta {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  font-size: 0.85rem;
  color: #666;
}

.proyecto-meta span {
  background: #f0f0f0;
  padding: 4px 8px;
  border-radius: 4px;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin: 20px 0;
}

.stat-item {
  text-align: center;
  padding: 15px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stat-number {
  display: block;
  font-size: 1.8rem;
  font-weight: bold;
  color: #667eea;
  margin-bottom: 5px;
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: #666;
}

/* Categorías Lista */
.categorias-lista {
  margin: 15px 0;
  display: grid;
  gap: 8px;
}

.categorias-lista div {
  background: white;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.highlight {
  background: #fff3cd;
  padding: 10px;
  border-radius: 5px;
  font-weight: 500;
  margin: 15px 0;
}

/* ROI Info */
.roi-info,
.ayuda-box,
.mensaje-bienvenida,
.resultados-industria,
.categoria-info {
  background: white;
  padding: 20px;
  border-radius: 10px;
}

.roi-info h4,
.ayuda-box h4 {
  color: #667eea;
  margin-bottom: 15px;
}

.ayuda-box ul {
  margin-left: 20px;
  margin-top: 10px;
}

.ayuda-box li {
  margin-bottom: 10px;
  line-height: 1.6;
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  gap: 5px;
  padding: 15px;
  margin-bottom: 20px;
}

.typing-indicator span {
  width: 10px;
  height: 10px;
  background: #9c27b0;
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

/* Input Area */
.input-area {
  padding: 20px;
  background: white;
  border-top: 2px solid #e0e0e0;
  display: flex;
  gap: 10px;
}

#user-input {
  flex: 1;
  padding: 12px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 25px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s;
}

#user-input:focus {
  border-color: #667eea;
}

.send-btn {
  padding: 12px 30px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.send-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.send-btn:active {
  transform: translateY(0);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Footer */
.footer {
  text-align: center;
  color: white;
  margin-top: 30px;
  opacity: 0.9;
  font-size: 0.9rem;
}

.footer a {
  color: white;
  text-decoration: underline;
}

/* Scrollbar */
#chat-messages::-webkit-scrollbar {
  width: 8px;
}

#chat-messages::-webkit-scrollbar-track {
  background: #f1f1f1;
}

#chat-messages::-webkit-scrollbar-thumb {
  background: #667eea;
  border-radius: 4px;
}

#chat-messages::-webkit-scrollbar-thumb:hover {
  background: #764ba2;
}
