html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  font-family: Arial, sans-serif;
  background-color: #18191a;
  color: #e4e6eb;
}

#container {
  display: flex;
  flex-direction: row;
  height: 100%;
  width: 100%;
}

#player-container {
  flex: 1;
  position: relative;
}

#player, #fallback-image {
  width: 100%;
  height: 100%;
}

#viewer-count {
  position: absolute;
  top: 12px;
  left: 12px;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 999;
}

#viewer-icon {
  font-size: 16px;
}

#viewer-number {
  font-weight: bold;
  font-size: 14px;
}

#viewer-count, #viewer-icon, #viewer-number {
  cursor: pointer;
  user-select: none;
}

#viewer-dropdown {
  position: absolute;
  top: 42px;
  left: 12px;
  background-color: #2a2a2a;
  color: white;
  border: 1px solid #444;
  border-radius: 8px;
  padding: 8px 12px;
  z-index: 999;
  font-size: 14px;
  max-height: 200px;
  overflow-y: auto;
}

#viewer-list.hidden {
  display: none;
}

.ban-button{
  background: none;
  border: none;
  height: 30px;
  width: 30px;
  font-size: 20px;
}

#countdown-global{
  display: flex;
  flex-direction: row;
}

#countdown {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(14px, 2vw, 48px);
  color: white;
  font-weight: bold;
  text-align: center;
  text-shadow: 1px 1px 6px rgba(0,0,0,0.7);
  max-width: 90%;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

#chatbot-icon {
  position: absolute;
  top: 20px;
  left: 50%;
  width: 30px;
  height: 30px;
  vertical-align: middle;
  margin: 0 2px;
}

#chat-container {
  width: 300px;
  display: flex;
  flex-direction: column;
  border-left: 1px solid #3a3b3c;
  background-color: #242526;
}

#clock{
  order: -1;
  display: flex;
  justify-content: center;
  justify-content: space-between;
  align-items: center;
}

#btnl{
  font-weight: bold;
  text-decoration: none;
  color: black;
  border-radius: 10%;
}

#time{
  display: flex;
  justify-content: center;
  align-items: center;
}
#time iframe {
  pointer-events: none;
  user-select: none;
}

#clock img{
  width: 24px;
  height: 24px;
}

#chat {
  flex: 1;
  display: flex;
  flex-direction: column-reverse;
  overflow-y: auto;
  padding-inline: 5px;
  scrollbar-width: none;
}

#goLiveBtn {
  position: absolute;
  bottom: 15px;
  right: 15px;
  background: red;
  color: white;
  border: none;
  padding: 6px 12px;
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
  z-index: 9999;
}

.avatar {
  height: 25px;
  width: 25px;
}

#chat::-webkit-scrollbar {
  width: 6px;
}

#chat::-webkit-scrollbar-track {
  background: transparent;
}

#chat::-webkit-scrollbar-thumb {
  background-color: #555;
  border-radius: 3px;
}

#chat-button-row{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

#admin-buttons {
  display: none;
}

#admin-buttons button {
  padding: 6px 3px;
  font-size: 14px;
  background-color: #333;
  color: white;
  border: 1px solid #888;
  border-radius: 6px;
  cursor: pointer;
}

#admin-buttons button:hover {
  background-color: #555;
}

#message-input {
  flex: 1;
  padding: 10px 14px;
  font-size: 1rem;
  border-radius: 30px;
  border: none;
  outline: none;
  background-color: #3a3b3c;
  color: #e4e6eb;
  min-height: 15px;
  overflow: hidden;
  word-break: break-word;
  white-space: pre-wrap;
  display: flex;
  align-items: center; 
  flex-wrap: wrap;     
}

#message-input:empty::before {
  content: attr(data-placeholder);
  color: #888;
  pointer-events: none;
}
#message-input:not(:empty)::before {
  content: none;
}

#emote-toggle {
  padding: 0px 5px;
  cursor: pointer;
  align-self: end;
}

#emote-toggle img{
  width: 25px;
  height: 25px;
}

#emote-panel {
  display: none;
  flex-wrap: wrap;
  overflow-y: auto;
  background-color: #1e1e1e;
  padding: 10px;
  border-radius: 10px;
  margin: 0 2px 0px 2px;
  justify-content: center;
  scrollbar-width: none;
}

#emote-panel img {
  width: 30px;
  height: 30px;
  margin: 5px;
  cursor: pointer;
}

.text a {
  color: #4da6ff;
  text-decoration: underline;
  word-break: break-word;
}

.emote {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
}

.emote-sold {
  width: 48px;
  height: 48px;
  display: inline-block;
  vertical-align: middle;
}

.message.chatbot {
  background-color: #2a1c00;
  border-left: 4px solid orange;
  border-top: 2px solid orange;
}
.message.admin {
  border-left: 4px solid orangered;
  border-top: 2px solid orangered;
}
.message.moderateur {
  border-left: 4px solid green;
  border-top: 2px solid green;
}
.message.spectateur {
  border-left: 4px solid blue;
  border-top: 2px solid blue;
}

.message.chatbot .sender {
  color: orange;
}

.message.chatbot img.avatar {
  border: 2px solid orange;
}

.message.chatbot .text {
  color: white;
}

.message {  
  background-color: #363636;
  padding: 5px 20px;
  border-radius: 25px;
  margin-bottom: 4px;
  max-width: 90%;
  word-wrap: break-word;
  font-size: 14px;
  color: #e4e6eb;
  opacity: 1;
  transform: translateX(0);
  transition: transform 0.4s ease-out, opacity 0.4s ease-out;
}

.message.entering {
  opacity: 0;
  transform: translateX(100%);
}


.timestamp {
  font-size: 12px;
  color: #b0b3b8;
}

.sender {
  font-size: 13px;
  color: #e4e6eb;
  font-weight: bold;
  margin-top: 2px;
}

.text {
  font-size: 14px;
  color: #ffffff;
  font-weight: bold;
}

#message-form {
  display: flex;
  flex-shrink: 0;
  border-radius: 30px;
  background-color: #3a3b3c;
}

#send-button {
  appearance: none;
  -webkit-appearance: none;
  background-color: #5c5f63;
  color: #e4e6eb;
  padding: 10px 20px;
  font-size: 14px;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  color-scheme: light;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  transition: background-color 0.2s ease;
  margin: 4px;
}

#send-button:hover {
  filter: brightness(1.1);
}

#send-button:focus {
  outline: 2px solid #6b6b6b;
}   

#send-button:disabled {
  background-color: red;
  cursor: not-allowed;
}

.delete-button {
  display: none;
  position: absolute;
  top: 5px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 18px;
  height: 30%;
  width: 10%;
  cursor: pointer;
}

.message:hover .delete-button {
  display: block;
}


@media all and (display-mode: fullscreen){
  .content{
    padding: 0px;
  }
}