* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  min-height: 100vh;
  color: #334155;
}

.container {
  max-width: 1024px;
  margin: 0 auto;
  padding: 1rem;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  text-align: center;
  padding: 2rem 0;
}

.title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #2a9d8f;
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 1.125rem;
  color: #64748b;
}

.progress-container {
  margin-bottom: 1.5rem;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 0.5rem;
}

.progress-bar {
  width: 100%;
  height: 12px;
  background-color: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #2a9d8f 0%, #1d3557 100%);
  border-radius: 6px;
  transition: width 0.5s ease;
  width: 0%;
}

.chat-container {
  flex: 1;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.messages {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 1rem;
  scroll-behavior: smooth;
}

.message-group {
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bot-message {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.user-message {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.75rem;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bot-avatar {
  background-color: #2a9d8f;
  color: white;
}

.message-bubble {
  background: white;
  border: 1px solid #e2e8f0;
  padding: 1rem;
  border-radius: 16px;
  max-width: 400px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.user-bubble {
  background: #2a9d8f;
  color: white;
  padding: 1rem;
  border-radius: 16px;
  max-width: 400px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.message-title {
  font-weight: 600;
  color: #2a9d8f;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.message-text {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.5;
}

.user-text {
  font-size: 0.875rem;
  font-weight: 500;
}

.typing-indicator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.typing-dots {
  display: flex;
  gap: 0.25rem;
  padding: 1rem;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
}

.dot {
  width: 8px;
  height: 8px;
  background-color: #64748b;
  border-radius: 50%;
  animation: pulse 1.4s infinite ease-in-out;
}

.dot:nth-child(2) {
  animation-delay: 0.2s;
}

.dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes pulse {
  0%,
  80%,
  100% {
    opacity: 0.3;
  }
  40% {
    opacity: 1;
  }
}

.input-area {
  border-top: 1px solid #e2e8f0;
  padding-top: 1.5rem;
}

.text-input-container {
  display: flex;
  gap: 0.75rem;
}

.text-input {
  flex: 1;
  height: 48px;
  padding: 0 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  font-family: "Inter", sans-serif;
  transition: border-color 0.2s ease;
}

.text-input:focus {
  outline: none;
  border-color: #2a9d8f;
}

.send-button {
  height: 48px;
  width: 48px;
  background: #2a9d8f;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.send-button:hover {
  background: #238a7a;
}

.send-button:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

.multiple-choice-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.choice-button {
  padding: 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  text-align: left;
  font-size: 1rem;
  font-family: "Inter", sans-serif;
  transition: all 0.2s ease;
}

.choice-button:hover {
  background: #2a9d8f;
  color: white;
  border-color: #2a9d8f;
}

.packages-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.package-button {
  padding: 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  text-align: left;
  font-family: "Inter", sans-serif;
  transition: all 0.2s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.package-button:hover {
  background: #2a9d8f;
  color: white;
  border-color: #2a9d8f;
}

.package-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.package-name {
  font-weight: 600;
  font-size: 1rem;
}

.package-description {
  font-size: 0.875rem;
  opacity: 0.9;
}

.package-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.restriction-message {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.2);
  padding: 1rem;
  border-radius: 16px;
}

.restriction-title {
  font-weight: 600;
  color: #d97706;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.completion-message {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  padding: 1rem;
  border-radius: 16px;
}

.completion-title {
  font-weight: 600;
  color: #16a34a;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.whatsapp-button {
  background: #16a34a;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem auto 0;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.whatsapp-button:hover {
  background: #15803d;
  box-shadow: 0 6px 16px rgba(22, 163, 74, 0.4);
  transform: translateY(-1px);
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
}

.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-icon {
  color: #ef4444;
  margin-bottom: 1rem;
}

.modal-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #1f2937;
}

.modal-content p {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.modal-button {
  background: #2a9d8f;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: background-color 0.2s ease;
}

.modal-button:hover {
  background: #238a7a;
}

.age-restriction-message {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  padding: 1rem;
  border-radius: 16px;
}

.age-restriction-title {
  font-weight: 600;
  color: #dc2626;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.warning-message {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.2);
  padding: 1rem;
  border-radius: 16px;
}

.warning-title {
  font-weight: 600;
  color: #d97706;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

@media (max-width: 768px) {
  .container {
    padding: 0.5rem;
    height: 100vh;
  }

  .header {
    padding: 1rem 0;
  }

  .title {
    font-size: 1.75rem;
  }

  .subtitle {
    font-size: 0.875rem;
    padding: 0 0.5rem;
  }

  .chat-container {
    padding: 1rem;
  }

  .message-bubble,
  .user-bubble {
    max-width: calc(100vw - 120px);
  }

  .packages-container {
    gap: 0.5rem;
  }

  .package-button {
    padding: 0.75rem;
    font-size: 0.875rem;
  }

  .package-name {
    font-size: 0.875rem;
  }

  .package-description {
    font-size: 0.75rem;
  }

  .choice-button {
    padding: 0.75rem;
    font-size: 0.875rem;
  }

  .text-input {
    font-size: 16px; /* Prevents zoom on iOS */
  }

  .modal-content {
    margin: 1rem;
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0.25rem;
  }

  .chat-container {
    padding: 0.75rem;
    border-radius: 8px;
  }

  .message-bubble,
  .user-bubble {
    max-width: calc(100vw - 100px);
    padding: 0.75rem;
  }

  .title {
    font-size: 1.5rem;
  }

  .subtitle {
    font-size: 0.75rem;
  }
}
