body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f5f5f5;
  height: 100vh;
  position: fixed;
  width: 100%;
}

/* Estilos para autenticação */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translate(-50%, -40%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

#auth-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(145deg, #ffffff, #f8f9fa);
  padding: 40px;
  border-radius: 24px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12),
              0 8px 20px rgba(0, 0, 0, 0.08);
  width: 90%;
  max-width: 400px;
  text-align: center;
  z-index: 1001;
  animation: slideUp 0.5s ease-out;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.auth-logo {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  animation: logoScale 0.6s ease-out;
}

@keyframes logoScale {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

#auth-container h2 {
  margin-bottom: 30px;
  color: #1a1a1a;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.5px;
}

#code-form {
  display: none;
  animation: fadeIn 0.3s ease-out;
}

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

#phone-form, #code-form {
  margin-bottom: 30px;
}

.input-group {
  position: relative;
  margin-bottom: 20px;
}

.input-group i {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #9e9e9e;
  font-size: 18px;
  transition: color 0.3s ease;
}

#phone-number, #verification-code {
  width: 100%;
  padding: 16px 16px 16px 48px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  font-size: 16px;
  box-sizing: border-box;
  transition: all 0.3s ease;
  background-color: #ffffff;
  color: #1a1a1a;
}

#phone-number:focus, #verification-code:focus {
  border-color: #000000;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.1);
  outline: none;
}

#phone-number:focus + i, #verification-code:focus + i {
  color: #000000;
}

#phone-number::placeholder, #verification-code::placeholder {
  color: #9e9e9e;
}

#phone-number {
  padding-left: 80px !important;
}

.btn {
  background: linear-gradient(135deg, #000000, #1a1a1a);
  color: white;
  padding: 16px 28px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn i {
  font-size: 18px;
  transition: transform 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #1a1a1a, #333333);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn:hover i {
  transform: translateX(3px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  background: #cccccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

#auth-error {
  color: #dc3545;
  margin-top: 15px;
  font-size: 14px;
  padding: 10px;
  border-radius: 8px;
  background-color: rgba(220, 53, 69, 0.1);
  animation: shake 0.4s ease-in-out;
  display: none;
}

#auth-error.visible {
  display: block;
}

@media (max-width: 768px) {
  #auth-container {
    width: 85%;
    padding: 30px 20px;
  }

  .auth-logo {
    width: 60px;
    height: 60px;
  }

  #auth-container h2 {
    font-size: 20px;
  }

  .btn {
    padding: 14px 24px;
    font-size: 15px;
  }
}

#chat-widget {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #f5f5f5;
  display: none;
  z-index: 1000;
  overflow: hidden;
  opacity: 0;
  animation: fadeIn 0.3s ease forwards;
}

.content-container {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  padding: 20px;
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

#chat-header {
  background-color: #000000;
  color: white;
  padding: 10px 20px;
  font-size: 18px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: auto;
  min-height: 50px;
  border-radius: 10px 10px 0 0;
  flex-wrap: wrap;
  gap: 10px;
}

#chat-icon-header {
  width: 32px;
  height: 32px;
  margin-right: 10px;
}

#header-left {
  display: flex;
  align-items: center;
  min-width: 200px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background-color 0.3s ease;
}

#header-left:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

#header-left::after {
  content: '▼';
  margin-left: 8px;
  font-size: 12px;
  transition: transform 0.3s ease;
}

#header-left.open::after {
  transform: rotate(180deg);
}

#profile-info {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  padding: 0;
  flex: 1;
  justify-content: center;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease-in-out;
  opacity: 0;
}

#profile-info.open {
  padding: 15px 0;
  max-height: 500px;
  opacity: 1;
}

.profile-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.profile-item:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.profile-item i {
  font-size: 12px;
  opacity: 0.8;
}

#chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  border-radius: 0 0 10px 10px;
  overflow: hidden;
  z-index: 10;
}

#chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background-color: #f8f9fa;
  -webkit-overflow-scrolling: touch;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.message {
  margin-bottom: 16px;
  padding: 16px 20px;
  border-radius: 16px;
  max-width: 80%;
  font-size: 16px;
  line-height: 1.5;
  opacity: 0;
  animation: scaleIn 0.3s ease forwards;
  transform-origin: center;
  will-change: transform, opacity;
  position: relative;
  letter-spacing: 0.2px;
}

.admin-message {
  background: linear-gradient(135deg, #7FB685, #4A7856);
  color: white;
  align-self: flex-end;
  margin-left: auto;
  animation: slideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  box-shadow: 0 8px 24px rgba(74, 120, 86, 0.15),
              0 4px 12px rgba(74, 120, 86, 0.1),
              inset 0 2px 4px rgba(255, 255, 255, 0.1);
  border-bottom-right-radius: 4px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.admin-message:hover {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 12px 28px rgba(74, 120, 86, 0.2),
              0 6px 16px rgba(74, 120, 86, 0.15),
              inset 0 2px 4px rgba(255, 255, 255, 0.15);
  background: linear-gradient(135deg, #8FC497, #558B63);
}

.assistant-message {
  background: linear-gradient(145deg, #ffffff, #f0f4ff);
  color: #2c3e50;
  align-self: flex-start;
  animation: slideInLeft 0.4s cubic-bezier(0.23, 1, 0.32, 1) forwards;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  border-bottom-left-radius: 4px;
  transition: all 0.3s ease;
  border: 1px solid rgba(148, 163, 184, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.assistant-message:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  background: linear-gradient(145deg, #ffffff, #e8efff);
}

.user-message {
  background: linear-gradient(145deg, #e8b5b5, #e8bcbc);
  color: #2c3e50;
  align-self: flex-start;
  animation: slideInLeft 0.4s cubic-bezier(0.23, 1, 0.32, 1) forwards;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  border-bottom-left-radius: 4px;
  transition: all 0.3s ease;
  border: 1px solid rgba(148, 163, 184, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.user-message:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  background: linear-gradient(145deg, #e37e7e, #de8282);
}

#user-input-container {
  display: flex;
  padding: 16px 20px;
  background-color: #fff;
  border-top: 1px solid #e0e0e0;
  align-items: center;
  min-height: 70px;
  cursor: text;
  position: relative;
  z-index: 2;
}

#user-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #ccc;
  border-radius: 20px;
  font-size: 16px;
  margin-right: 12px;
  min-height: 20px;
  line-height: 20px;
  appearance: none;
  -webkit-appearance: none;
}

#send-btn {
  width: 54px;
  height: 54px;
  min-width: 54px;
  border: none;
  background-color: #000000;
  color: white;
  font-size: 18px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  margin-left: 8px;
}

#send-btn:hover {
  background-color: #e21414;
  transform: scale(1.05);
}

#send-btn svg {
  width: 24px;
  height: 24px;
  fill: white;
}

@media (max-width: 768px) {
  .content-container {
    margin: 0;
    padding: 0;
  }

  #chat-header {
    border-radius: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    height: auto;
  }

  #header-left, #header-right {
    min-width: 100%;
  }

  #profile-info {
    order: 3;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 10px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    white-space: nowrap;
  }

  #profile-info::-webkit-scrollbar {
    display: none;
  }

  .profile-item {
    white-space: nowrap;
  }

  #chat-container {
    border-radius: 0;
  }

  #chat-messages {
    padding: 16px;
  }

  #user-input-container {
    padding: 12px 16px;
  }

  .message {
    font-size: 16px;
    max-width: 85%;
  }

  #auth-container {
    width: 85%;
    padding: 20px;
  }
}
