:root {
  --primary-color: #1f1f2e;
  --secondary-color: #ff4dff; /* розово-фиолетовый */
  --accent-color: #00ffff; /* неоново-синий */
  --text-color: #ffffff;
  --bg-color: #0d0d15;
  color-scheme: dark only;
}

/* Базовая обёртка */
.chat-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  font-family: 'Segoe UI', sans-serif;
}

/* Кнопка чата */
.chat-button {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 0 15px var(--accent-color);
  transition: all 0.3s ease;
  animation: pulse 2s infinite;
}

.chat-button i {
  font-size: 26px;
  color: #fff;
}

.chat-button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px var(--accent-color);
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 10px var(--accent-color);
  }
  50% {
    box-shadow: 0 0 25px var(--accent-color);
  }
}

/* Окно чата */
.chat-window {
  width: 360px;
  height: 520px;
  background-color: var(--bg-color);
  border-radius: 16px;
  box-shadow: 0 0 25px rgba(0, 255, 255, 0.1);
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 2px solid var(--accent-color);
  position: absolute;
  bottom: 80px;
  right: 0;
  resize: both;
  min-width: 300px;
  min-height: 400px;
  max-width: 95vw;
  max-height: 85vh;
}

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

/* Заголовок */
.chat-header {
  background: var(--primary-color);
  color: var(--accent-color);
  padding: 14px 18px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Кнопки */
.chat-actions button {
  background: none;
  border: none;
  color: var(--accent-color);
  cursor: pointer;
  font-size: 16px;
  margin-left: 8px;
}

/* Сообщения */
.chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Отдельное сообщение */
.message {
  max-width: 80%;
  padding: 10px 16px;
  border-radius: 16px;
  word-break: break-word;
  line-height: 1.5;
  font-size: 14px;
}

.user-message {
  align-self: flex-end;
  background: var(--accent-color);
  color: #000;
  border-bottom-right-radius: 4px;
}

.bot-message {
  align-self: flex-start;
  background: #1e1e30;
  color: var(--text-color);
  border-bottom-left-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Инпут */
.chat-input {
  display: flex;
  padding: 12px;
  background-color: var(--primary-color);
  border-top: 1px solid #222;
}

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

.chat-input button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
  color: #000;
  margin-left: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.chat-input button:hover {
  transform: scale(1.05);
}

/* Индикатор печати */
.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(-6px);
    opacity: 1;
  }
}

/* Mobile адаптация */
@media (max-width: 768px) {
  .chat-container {
    bottom: 10px;
    right: 10px;
  }
  
  .chat-window {
    width: 100vw !important;
    height: 100vh !important;
    border-radius: 0 !important;
    bottom: 0 !important;
    right: 0 !important;
    resize: none !important;
  }
  
  .resize-button {
    display: none !important;
  }
}

/* Отключение скроллбаров */
::-webkit-scrollbar {
  display: none;
}
html {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
