*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  font-size: 16px;
  --text-primary: #c7c7c7;
  --text-secondary: #c7b1c7;
  --bg-primary: #2b272b;
  --bg-secondary: #595159;
  --bg-trimary: #0d0c0d;
  --red: #d46c6c;
  --transition-speed: 600ms;
  color: var(--text-primary);
  background-color: var(--bg-primary);
}



.sniglet-regular {
  font-family: "Sniglet", system-ui;
  font-weight: 400;
  font-style: normal;
}

.sniglet-extrabold {
  font-family: "Sniglet", system-ui;
  font-weight: 800;
  font-style: normal;
}


.chat-app {
  margin-top: 2rem;
  margin-left: 2rem;
  margin-right: 2rem;
}

.chat-header {
  font-size: 3rem;
  font-family: "Odibee Sans";
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;
  padding-bottom: 20px;
}

.chat-messages {
  display: flex;
  flex-direction: column; /* corrects message stacking */
  overflow-y: auto;
  height: 400px;
  padding: 10px;
  background: var(--text-primary);
  border-radius: 5px;
  border: 1px solid #ddd;
  background-image: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/blue-line.svg),
    url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/red-line.svg);
  background-size: 100vw 1.5em, 32px 32px;
  background-repeat: repeat, repeat-y;
  background-position: 0 0, 64px 0;
  padding-top: 1.2rem;
  padding-left: 6.5rem;
  color: var(--bg-trimary);
  position: relative;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

.chat-messages::-webkit-scrollbar {
  width: 8px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: var(--bg-secondary);
  border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-track {
  background: var(--bg-primary);
}





@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message {
  animation: fadeIn 0.2s ease-in-out;
  margin-bottom: 5px;
  padding: 5px;
  border-radius: 4px;
  transition: background-color 0.3s ease-in-out;
}

.message:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

.message-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 5px;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  font-size: 0.8rem;
}

.message:hover .message-meta {
  opacity: 1;
}

/* Make timestamp look cleaner */
.timestamp {
  color: var(--bg-trimary);
  font-size: 0.8rem;
  font-family: "Sniglet";
}


.report-btn {
  background: var(--red); 
  color: white;
  border: none;
  padding: 3px 6px;
  font-size: 0.7rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease-in-out;
}

.report-btn:hover {
  background: #c83e3e; 
}
.report-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.report-form {
  background: var(--bg-secondary);
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  width: 350px;
  color: var(--text-primary);
}

.report-form h2 {
  margin-bottom: 10px;
}

.report-form textarea {
  width: 100%;
  height: 80px;
  border-radius: 5px;
  border: 1px solid var(--text-primary);
  padding: 5px;
  background: var(--bg-primary);
  color: var(--text-primary);
}

.report-buttons {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
}

.report-buttons button {
  padding: 5px 10px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  background: var(--bg-trimary);
  color: var(--text-primary);
  transition: background 0.2s;
}

.report-buttons button:hover {
  background: #3a353a;
}






.timestamp {
  font-size: 0.8rem;
  margin-left: 10px;
  opacity: 0;
  transition: opacity 0.3s;
  padding-right: 1rem;
}

.message:hover .timestamp {
  opacity: 1;
}






.chat-input {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 5px;
  position: relative;
}

.textholder {
  flex-grow: 1;
  font-size: 1rem;
  padding: 5px;
  border-radius: 5px;
  color: var(--text-primary);
  border: 1px solid var(--text-primary);
  background-color: var(--bg-secondary);
}

.chat-input button {
  margin-left: 5px;
  margin-right: 5px;
  padding: 7px;
  background: var(--bg-trimary);
  border: none;
  border-radius: 5px;
  color: var(--text-primary);
  cursor: pointer;
}

.chat-input button:first-child {
  font-size: 15px;
  white-space: nowrap;
}

.context-menu {
  position: absolute;
  background: #222222;
  color: white;
  padding: 10px;
  border-radius: 5px;
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.5);
  z-index: 1000;
}
.context-menu button {
  display: block;
  background: none;
  color: white;
  border: none;
  padding: 5px;
  width: 100%;
  cursor: pointer;
}
.context-menu button:hover {
  background: #444444;
}


.emoji-picker {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--bg-secondary);
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 2px;
  border: 1px solid var(--text-primary);
  border-radius: 1rem;
  box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  width: 90%;
  max-width: 32rem;
}

.emoji-picker button {
  font-size: 1.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  transition: transform 0.2s;
}

.fontToggleBtn button {
  font-size: 1.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  transition: transform 0.2s;
}

.fontToggleBtn button:hover {
  transform: scale(1.1);
}

.emoji-picker button:hover {
  transform: scale(1.1);
}

#login {
  position: fixed;
  top: 10rem;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30rem;
  display: flex;
  align-items: center;
  background-color: var(--bg-secondary);
  border-radius: 8px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  justify-content: center;
  text-align: center;
}

#login h1 {
  margin-bottom: 1rem;
  white-space: nowrap;
  font-family: "Odibee Sans";
  font-size: 2.5rem;
}

#login input {
  padding: 3px;
  width: 22rem;
  margin-bottom: 1rem;
  border: none;
  border-radius: 5px;
  background: var(--text-primary);
  color: black;
  font-size: 1rem;
  text-align: center;
}

#login button {
  padding: 10px;
  width: 13rem;
  background: var(--bg-trimary);
  border: none;
  border-radius: 5px;
  color: var(--text-primary);
  font-size: 1rem;
  cursor: pointer;
}

#login button:hover {
  background: #3a353a;
}

.chatapp-popup {
  background: var(--bg-primary);
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  pointer-events: auto;
  background-color: var(--bg-secondary);
}


