@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;700&display=swap");

body {
  margin: 0;
  padding-bottom: 3rem;
  font-family: "Noto Sans KR", sans-serif;
}

#form {
  background: rgba(0, 0, 0, 0.15);
  padding: 0.25rem;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  height: auto;
  min-height: 3rem;
  box-sizing: border-box;
  backdrop-filter: blur(10px);
}

#input {
  border: none;
  padding: 0.5rem 1rem;
  flex-grow: 1;
  border-radius: 2rem;
  margin: 0.25rem;
  background: #f1f1f1;
  outline: none;
  font-size: 1rem;
  max-height: 100px;
  overflow-y: auto;
}

#form > button {
  background: #333;
  border: none;
  padding: 0 1rem;
  margin: 0.25rem;
  border-radius: 3px;
  outline: none;
  color: #fff;
  cursor: pointer;
}

#messages {
  list-style-type: none;
  margin: 0;
  padding: 1rem;
  overflow-y: auto;
  padding-bottom: 5rem;
}

#messages > li {
  padding: 0.5rem 1rem;
  margin-bottom: 0.5rem;
  border-radius: 1rem;
  max-width: 70%;
  word-wrap: break-word;
}

#messages > li.my-message {
  background: #dcf8c6;
  align-self: flex-end;
  margin-left: auto;
}

#messages > li.other-message {
  background: #e5e5ea;
  align-self: flex-start;
}

#messages > li strong {
  display: block;
  font-weight: bold;
  margin-bottom: 0.25rem;
  color: #333;
}

#messages > li span {
  display: block;
}

#messages > li img {
  max-width: 300px;
  height: auto;
  border-radius: 1rem;
}

#hamburgerBtn {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 1000;
  font-size: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
}

#participantsPanel {
  position: fixed;
  top: 0;
  right: -250px;
  width: 250px;
  height: 100%;
  background: #333;
  color: white;
  overflow-y: auto;
  padding: 1rem;
  box-sizing: border-box;
  transition: right 0.3s ease;
  z-index: 999;
}
#participantsList {
  list-style: none;
  padding: 0;
}

#imageInput {
  display: none;
}

.timestamp {
  font-size: 0.7rem;
  color: #888;
  margin-top: 5px;
}

.scroll-to-bottom-btn {
  position: fixed;
  bottom: 4.5rem; /* Adjust this value to position it above the form */
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 998; /* Below hamburger button, above form */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: opacity 0.3s ease;
  opacity: 0; /* Initially hidden, controlled by JS */
}

.scroll-to-bottom-btn.show {
  opacity: 1;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgb(0, 0, 0);
  background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
}

.close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
}

.close:hover,
.close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

#messages img {
  max-width: 200px;
  max-height: 200px;
  cursor: pointer;
}
