:root {
  --primary-color: #000000;
  --secondary-color: #ffd700;
  --text-color: #ffffff;
  --bg-color: #1a1a1a;
  /* Force light color scheme to prevent system dark mode overrides */
  color-scheme: light only;
}

.chat-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  font-family: Arial, sans-serif;
}

.chat-button {
  width: 60px;
  height: 60px;
  background-color: var(--secondary-color) !important;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  animation: vibrate 2s infinite;
}

.chat-button i {
  font-size: 24px;
  color: var(--primary-color) !important;
}

.chat-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 215, 0, 0.4);
}

.chat-window {
  width: 350px;
  height: 500px;
  background-color: var(--bg-color);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 2px solid var(--secondary-color);
  position: absolute;
  bottom: 70px;
  right: 0;
  resize: both;
  min-width: 300px;
  min-height: 400px;
  max-width: 90vw;
  max-height: 80vh;
}

.chat-window.fullscreen {
  width: 100vw !important;
  height: 100vh !important;
  /* max-width: 100%;
  max-height: 100%; */
  bottom: 0;
  right: 0;
  border-radius: 0;
  resize: none;
}

.chat-header {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
}

.chat-actions button {
  background: none;
  border: none;
  color: var(--secondary-color);
  cursor: pointer;
  margin-left: 10px;
  font-size: 16px;
}

.chat-messages {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-messages p {
  margin-top: 10px;
}

.message {
  max-width: 80%;
  padding: 10px 15px;
  border-radius: 18px;
  word-wrap: break-word;
}

.user-message {
  align-self: flex-end;
  background-color: var(--secondary-color);
  color: var(--primary-color);
  border-bottom-right-radius: 5px;
}

.bot-message {
  align-self: flex-start;
  background-color: #333333;
  color: var(--text-color);
  border-bottom-left-radius: 5px;
}

.typing-indicator {
  display: inline-block;
}

.typing-indicator span {
  height: 10px;
  width: 10px;
  background-color: var(--text-color);
  border-radius: 50%;
  display: inline-block;
  margin: 0 2px;
  opacity: 0.4;
}

.typing-indicator span:nth-child(1) {
  animation: bounce 1s infinite;
}

.typing-indicator span:nth-child(2) {
  animation: bounce 1s infinite 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation: bounce 1s infinite 0.4s;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  50% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

@keyframes vibrate {
  0% { transform: translate(0, 0); }
  10% { transform: translate(-1px, -1px); }
  20% { transform: translate(1px, -1px); }
  30% { transform: translate(-1px, 1px); }
  40% { transform: translate(1px, 1px); }
  50% { transform: translate(-1px, -1px); }
  60% { transform: translate(1px, -1px); }
  70% { transform: translate(-1px, 1px); }
  80% { transform: translate(1px, 1px); }
  90% { transform: translate(-1px, -1px); }
  100% { transform: translate(0, 0); }
}

.chat-input {
  display: flex;
  padding: 10px;
  background-color: var(--primary-color);
  border-top: 1px solid #333;
}

.chat-input input {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 20px;
  outline: none;
  background-color: #333;
  color: var(--text-color);
}

.chat-input button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background-color: var(--secondary-color);
  color: var(--primary-color);
  margin-left: 10px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.chat-input button:hover {
  background-color: #ffc000;
}

/* ... (предыдущие стили остаются без изменений) ... */

@media (max-width: 768px) {
  .chat-container {
    bottom: 10px;
    right: 10px;
  }

  .chat-window p {
    text-align: left !important; /* Принудительно выравниваем по левому краю */
  }

  /* Для сообщений бота и пользователя */
  .bot-message,
  .user-message {
    text-align: left !important;
  }

  .chat-window {
    width: 100% !important;
    height: 100% !important;
    bottom: 0 !important;
    right: 0 !important;
    border-radius: 0 !important;
    resize: none !important;
  }

  .chat-window .fullscreen {
    width: 98vw !important;
    height: 98vh !important;
  }

  .chat-button {
    width: 50px;
    height: 50px;
    bottom: 15px;
    right: 15px;
  }

  .resize-button {
    display: none !important;
  }
}

/* Для Chrome, Safari, Edge */
::-webkit-scrollbar {
  display: none;
}

/* Для Firefox */
html {
  scrollbar-width: none;
  -ms-overflow-style: none; /* IE и Edge */
}
