
  @import url('https://fonts.googleapis.com/css2?family=Orbitron&display=swap');

/* ============= TOGGLE BUTTON ============= */
#chatToggle {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 70px;
  height: 70px;
  background: radial-gradient(circle, #ff1a1a, #cc0000);
  border: 3px solid #ff4d4d;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.7);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  z-index: 2001; /* above chat window so it can also close it */
}

#chatToggle:hover {
  transform: scale(1.2) rotate(15deg);
  box-shadow: 0 0 30px rgba(255, 0, 0, 0.9);
}

/* ============= CHAT BOX ============= */

.hidden { display: none; }

#chatWidget {
  position: fixed;
  bottom: 110px;
  right: 16px;
  left: auto;
  width: min(320px, calc(100vw - 32px));
  height: 450px;
  background: #fff;
  border: 3px solid #ff1a1a;
  border-radius: 15px;
  box-shadow: 0 0 25px rgba(255, 0, 0, 0.5);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.5s ease-in-out;
  z-index: 2000;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* HEADER */
#chatHeader {
  background: linear-gradient(90deg, #ff1a1a, #cc0000);
  color: #fff;
  padding: 12px;
  text-align: center;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  font-size: 1.1em;
  border-bottom: 2px solid #ff4d4d;
}

#closeButton {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 1.5em;
  color: #fff;
  transition: color 0.3s;
}
#closeButton:hover { color: #ff4d4d; }

/* BODY */
#chatMessages {
  flex-grow: 1;
  overflow-y: auto;
  padding: 15px;
  background: #fff;
  padding-bottom: 30px;
  box-sizing: border-box;
  text-align: left;
}

/* MESSAGE */
.message {
  margin-bottom: 15px;
  padding: 10px;
  background: #f8f8f8;
  border-left: 5px solid #ff1a1a;
  border-radius: 10px;
  animation: slideIn 0.3s ease-in-out;
}

@keyframes slideIn {
  from { transform: translateX(20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.user-info {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}

.user-photo {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ff4d4d;
  box-shadow: 0 0 5px rgba(255, 0, 0, 0.3);
}

.sender {
  font-weight: bold;
  color: #ff1a1a;
  text-shadow: 0 0 5px #ff4d4d;
}

.text {
  color: #333;
  margin: 0;
  padding-bottom: 5px;
}

.timestamp {
  font-size: 0.6em;
  color: #666;
  margin-top: 3px;
}

