.scanlines {
  position: relative;
  overflow: hidden;
}

.scanlines:before,
.scanlines:after {
  display: block;
  pointer-events: none;
  content: "";
  position: absolute;
}

.scanlines:before {
  width: 100%;
  height: 2px;
  z-index: 2147483649;
  background: rgba(0, 0, 0, 0.15);
  opacity: 0.75;
  -webkit-animation: scanline 6s linear infinite;
  animation: scanline 6s linear infinite;
}

.scanlines:after {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2147483648;
  background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.15) 51%);
  background-size: 100% 4px;
  -webkit-animation: scanlines 1s steps(60) infinite;
  animation: scanlines 1s steps(60) infinite;
}

/* ANIMATE UNIQUE SCANLINE */
@-webkit-keyframes scanline {
  0% {
    transform: translate3d(0, 200000%, 0);
  }
}

@keyframes scanline {
  0% {
    transform: translate3d(0, 200000%, 0);
  }
}

@-webkit-keyframes scanlines {
  0% {
    background-position: 0 50%;
  }
}

@keyframes scanlines {
  0% {
    background-position: 0 50%;
  }
}

html {
  box-sizing: border-box;
}

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

body {
  font-family: "VT323", serif;
  font-size: 30px;
  background: #000;
  color: #fff;
}

.chat-wrap {
  height: 100%;
}

.wrap {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  height: 100dvh;
  padding: 20px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.ctr {
  display: flex;
  flex-direction: column;
  border: 5px solid #fff;
  width: 100%;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}

.ctr-title {
  background-color: #000;
  color: #fff;
  position: absolute;
  top: 5px;
  z-index: 5;
  background-color: #000;
  padding: 0 5px;
}

.chat {
  display: flex;
  flex-direction: column-reverse;
  height: 100%;
  overflow-y: auto;
  gap: 20px;
  padding: 20px;
}

.chat b {
  font-weight: bold;
}

.chat i {
  font-style: italic;
}

code {
  background: #fff;
  color: #000;
}

.status-list {
  border: 5px solid #fff;
  border-right-width: 0;
  height: 100%;
  min-width: 200px;
  overflow-y: auto;
}

.status-item {
  padding: 10px;
  border-bottom: 5px solid #fff;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-list > div {
  width: 100%;
}

.bubble {
  border: 6px solid #fff;
  margin-bottom: 5px;
  gap: 5px;
  max-width: 75%;
  padding: 15px;
  position: relative;
  display: inline-block;
  word-wrap: break-word;
  align-self: flex-start;
}

.bubble.pending {
  border-color: darkred;
}

.bubble.own {
  align-self: flex-end;
  text-align: right;
}

.bubble.system {
  border-color: #47a72a;
  align-self: center;
}

.bubble.system .username {
  text-align: center;
  padding-left: 0;
}

.bubble.system .username-text {
  color: #47a72a;
}

.bubble.system .text {
  color: #47a72a;
}

.bubble .username {
  position: absolute;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  top: -20px;
  left: 0;
  padding-left: 10px;
  white-space: nowrap;
  display: inline;
  margin: 0 0 30px;
}

.bubble .username-text {
  padding: 5px 5px;
  background-color: #000;
  color: #fff;
}

.bubble .text {
  word-wrap: break-word;
}

.hidden {
  display: none;
}

.invisible {
  opacity: 0;
  position: absolute;
  top: -1000px;
  left: -1000px;
  z-index: -1;
}

.alert {
  background-color: #57120e;
  color: white;
  width: 100%;
}

.alert-text {
  width: 100%;
  padding: 10px;
  display: block;
}

button.loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #000;
  z-index: 100;
  padding: 20px;
  font-family: "VT323", serif;
  font-size: 30px;
  color: #fff;
  border: 0;
  cursor: pointer;
}

.loading .loading-content {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  max-width: 100%;
  height: 100%;
  gap: 10px;
}

.loading .loading-content .text {
  width: 100%;
  text-align: center;
}

.loading .loading-content pre {
  color: #fff;
  font-size: 14px;
}

@media (max-width: 768px) {
  body {
    font-size: 24px;
  }

  .wrap {
    padding: 10px;
  }

  .bubble{
    border-width: 4px;
  }

  .wrap {
    flex-direction: column;
  }

  .status-list {
    display: flex;
    flex-direction: row;
    min-width: 0;
    width: 100%;
    flex-basis: fit-content;
    border-bottom: 0;
    border-right: 5px solid #fff;
  }

  .status-item {
    flex-basis: fit-content;
    border-bottom-width: 0;
    overflow: unset;
    text-overflow: unset;
  }

  .ctr-title {
    top: 0;
  }

  .bubble .username {
    top: -15px;
  }

  .loading .loading-content pre {
    font-size: 12px;
  }
}
