  body {
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
      background: #f5f7fa;
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh;
      margin: 0;
    }

    .hidden{
  display: none;
}
#chat-close {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 18px;
  color: #999;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  text-align: center;}

#chat-close:hover {
color: #2575fc99;
box-shadow: 0 0 5px rgba(5, 42, 105, 0);
}
#chat-icon {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  color: white;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
  animation: pulse 2.5s infinite;
 
}
#chat-icon:hover {
  transform: scale(1.1);  
  box-shadow: 0 12px 30px rgba(0,0,0,0.3);
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37,117,252, 0.6);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(37,117,252, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37,117,252, 0);
  }
}



    #chat-container {
      position: relative;
      width: 100%;
      max-width: 400px; /* maksymalna szerokość */
      height: 600px;    /* wysokość całego chatboxa */
      background: #fff;
      border-radius: 15px;
      box-shadow: 0 4px 20px rgba(0,0,0,0.1);
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }

    #messages {
      flex: 1;
      padding: 15px;
      overflow-y: auto; /* scroll wewnątrz kontenera */
      display: flex;
      flex-direction: column;
      gap: 10px;
      background: #f0f2f5;
    }

    .message {
      padding: 10px 15px;
      border-radius: 20px;
      max-width: 80%;
      word-wrap: break-word;
    }

    .user {
      align-self: flex-end;
      background-color: #4a90e2;
      color: #fff;
      border-bottom-right-radius: 0;
    }

    .ai {
      align-self: flex-start;
      background-color: #e2e2e2;
      color: #333;
      border-bottom-left-radius: 0;
    }

    #input-container {
      display: flex;
      border-top: 1px solid #ddd;
      padding: 10px;
      background: #fff;
    }

    #input {
      flex: 1;
      padding: 10px 15px;
      border: 1px solid #ccc;
      border-radius: 25px;
      outline: none;
      font-size: 14px;
    }

    #btn {
      margin-left: 10px;
      padding: 0 20px;
      border: none;
      background-color: #4a90e2;
      color: white;
      font-weight: bold;
      border-radius: 25px;
      cursor: pointer;
      transition: background 0.2s;
    }

    #btn:hover {
      background-color: #357ab8;
    }

    .typing {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 5px 0;
}

.typing-dot {
  width: 8px;
  height: 8px;
  background-color: #555;
  border-radius: 50%;
  animation: blink 1.4s infinite both;
}

.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
  0%, 80%, 100% { opacity: 0; }
  40% { opacity: 1; }
}

