:root {
  --primary-color-chatbox: #dd3b1e;
  --primary-dark-chatbox: #b8301a;
  --primary-light-chatbox: #ff6b47;
  --secondary-color-chatbox: #2c3e50;
  --accent-color-chatbox: #3498db;
  --success-color-chatbox: #27ae60;
  --warning-color-chatbox: #f39c12;
  --text-dark-chatbox: #2c3e50;
  --text-light-chatbox: #7f8c8d;
  --bg-light-chatbox: #f8f9fa;
  --bg-white-chatbox: #ffffff;
  --shadow-light-chatbox: 0 2px 10px rgba(0, 0, 0, 0.1);
  --shadow-medium-chatbox: 0 8px 30px rgba(0, 0, 0, 0.12);
  --shadow-heavy-chatbox: 0 20px 60px rgba(0, 0, 0, 0.15);
  --border-radius-chatbox: 12px;
  --transition-chatbox: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}


/* Chat Components */
.chat-container {
  position: fixed;
  bottom: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.buttonChat {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary-color-chatbox), var(--primary-light-chatbox));
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow-medium-chatbox);
  transition: var(--transition-chatbox);
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.buttonChat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.2));
  transform: translateX(-100%);
  transition: var(--transition-chatbox);
}

.buttonChat:hover::before {
  transform: translateX(100%);
}

.buttonChat:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: var(--shadow-heavy-chatbox);
}

.buttonChat:active {
  transform: translateY(-1px) scale(0.98);
}

.buttonChat i {
  font-size: 1.5rem;
  z-index: 2;
  transition: var(--transition-chatbox);
}

.chat-pulse {
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 50%;
  background: var(--primary-color-chatbox);
  animation: pulse-ring 2s infinite;
  z-index: -1;
}

.frame-chat {
  position: fixed;
  bottom: 100px;
  right: 20px;
  width: 400px;
  height: 800px;
  border: none;
  border-radius: var(--border-radius-chatbox);
  box-shadow: var(--shadow-heavy-chatbox);
  background: var(--bg-white-chatbox);
  visibility: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  overflow: hidden;
   box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

.frame-chat.show {
  visibility: visible;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.messageHelp {
  position: fixed;
  bottom: 100px;
  right: 100px;
  visibility: hidden;
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 999;
  animation: slideInBounce 0.6s ease-out 1s both;
}

.messageHelp.show {
  visibility: visible;
  opacity: 1;
  transform: translateX(0);
}

.bubble-chat {
  background: linear-gradient(135deg, var(--bg-white-chatbox), #f8f9fa);
  border-radius: 20px 20px 4px 20px;
  box-shadow: var(--shadow-light-chatbox);
  padding: 0;
  max-width: 320px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.bubble-chat::before {
  content: '';
  position: absolute;
  bottom: -8px;
  right: 20px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid var(--bg-white-chatbox);
}

.bubble-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
}

.avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent-color-chatbox), #5dade2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  flex-shrink: 0;
  animation: bounce 2s infinite;
}

.message-text {
  color: var(--text-dark-chatbox);
  font-size: 0.95rem;
  line-height: 1.5;
  font-weight: 500;
}

.right {
  margin-left: 30px;
  place-self: end;
}

/* Loading Animation */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  visibility: visible;
  transition: all 0.5s ease-out;
}

.loading-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-spinner {
  text-align: center;
}

.spinner-ring {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(221, 59, 30, 0.1);
  border-top: 4px solid var(--primary-color-chatbox);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

.loading-text {
  color: var(--text-dark-chatbox);
  font-weight: 500;
  font-size: 1.1rem;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

@keyframes slideInBounce {
  0% {
    opacity: 0;
    transform: translateX(30px);
  }
  60% {
    opacity: 1;
    transform: translateX(-5px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-3px);
  }
  60% {
    transform: translateY(-2px);
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-features {
    flex-direction: column;
    align-items: center;
  }
  
  .frame-chat {
    width: calc(100vw - 20px);
    right: 10px;
    left: 10px;
    height: 70vh;
  }
  
  .messageHelp {
    right: 20px;
    bottom: 120px;
  }
  
  .bubble-chat {
    max-width: calc(100vw - 60px);
  }
}

@media (max-width: 480px) {
  .hero-content {
    padding: 1rem;
  }
  
  .buttonChat {
    width: 56px;
    height: 56px;
    bottom: 15px;
    right: 15px;
  }
  
  .buttonChat i {
    font-size: 1.3rem;
  }
}