/* Landing page container */
#landing {
  text-align: center;
  margin-top: 80px;
}

/* Title */
#landing h1 {
  font-size: 2rem;
  color: #4e0244; /*  original purple */
  margin-bottom: 40px;
}

/* Buttons */
#landing button {
  display: block;
  width: 220px;
  margin: 12px auto;
  padding: 12px 18px;

  background: #04b4c4;   /* original button colour */
  color: white;
  font-size: 1rem;
  font-weight: bold;

  border: none;
  border-radius: 10px;
  cursor: pointer;

  transition: background 0.2s ease;
}

#landing button:hover {
  background: #0284c7;   
}

/* Make it responsive */
@media (max-width: 480px) {
  #landing h1 {
    font-size: 1.6rem;
  }

  #landing button {
    width: 90%;
  }
}

/* Page layout */
body {
  font-family: sans-serif;
  background: #fffefe;
  margin: 0;
  padding: 20px;

  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding-top: 100px;
}

/* Chat card */
#chat-app {
  width: 100%;
  max-width: 600px;
  background: rgb(238, 218, 233);
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.05);
}

/* Title */
h1 {
  text-align: center;
  margin: 0 0 20px 0;
  color: #4e0244;
}

/* Message list */
#messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 60vh;
  overflow-y: auto;
}

/* Message bubble */
.message {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 12px;
  word-wrap: break-word;
  font-size: 1rem;
}

/* OTHER USERS (left) */
.message.left {
  align-self: flex-start;
  background: #f8f8d5;      
  color: #4a0033;           
  border-bottom-left-radius: 0;
}

/* Me */
.message.right {
  align-self: flex-end;
  background: #d4f8d4;      /* soft green */
  color: #0a3d0a;           /* dark green text */
  border-bottom-right-radius: 0;
}


/* Username colours */
.message .username {
  color: #4e0244;
  font-weight: bold;
}

.message .text {
  color: #2d002f;
}

/* Form */
form {
  display: flex;
  gap: 8px;
  margin-top: 15px;
}

form input[type="text"] {
  flex: 1;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

/* Buttons */
button {
  padding: 8px 14px;
  cursor: pointer;
  background: #04b4c4;
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: bolder;
}

button:hover {
  background: #0284c7;
}

/* Reactions  */
.reactions {
  margin-top: 6px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.reactions button {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 18px;
  padding: 0;
  line-height: 1;
  transition: transform 0.1s ease;
}

.reactions button:active {
  transform: scale(0.85);
}

.reactions span {
  font-size: 14px;
  color: rgb(1, 81, 26);
}

/* Mobile */
@media (max-width: 480px) {
  #chat-app {
    padding: 15px;
    max-width: 95%;
  }

  .message {
    max-width: 90%;
    font-size: 0.95rem;
  }

  form {
    flex-direction: column;
  }

  form input[type="text"],
  button {
    width: 100%;
  }
}
