@import url('https://fonts.googleapis.com/css2?family=Golos+Text&display=swap');

body, html, input {
  font-family: 'Golos Text', sans-serif;
  font-weight: 400;
  line-height: 1.25em;
  letter-spacing: 0.025em;
  color: #e0e0e0;
  background: #313940;
}

a {
  color: #9483ff;
}
a:visited {
  color: #9483ff;
}
a:hover {
  color: #9483ff;
}
a:active {
  color: #9483ff;
}

.center {
  position: absolute;
  top: 50%;
  left: calc(50% + 0rem);
  transform: translate(-50%, -50%);
}

.pic {
  width: 4rem;
  height: 4rem;
  background-size: cover;
  background-position: center;
  border-radius: 50%;
}

.contact {
  position: relative;
  margin-bottom: 1rem;
  padding-left: 5rem;
  height: 4.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.contact .pic {
  position: absolute;
  left: 0;
}
.contact .name {
  font-weight: 500;
  margin-bottom: 0.125rem;
}
.contact .message, .contact .seen {
  font-size: 0.9rem;
  color: #888;
}
.contact .badge {
  box-sizing: border-box;
  position: absolute;
  width: 1.5rem;
  height: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  padding-top: 0.125rem;
  border-radius: 1rem;
  top: 0;
  left: 2.5rem;
  background: #e0e0e0;
  color: #313940;
}

.contacts {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translate(-6rem, -50%);
  width: 24rem;
  height: 32rem;
  padding: 1rem 2rem 1rem 1rem;
  box-sizing: border-box;
  border-radius: 1rem 0 0 1rem;
  cursor: pointer;
  background: #424E5A;
  //box-shadow: 0 0 8rem 0 rgba(255, 255, 255, 0.1), 2rem 2rem 4rem -3rem rgba(255, 255, 255, 0.2);
  transition: transform 500ms;
  display: none;
}
.contacts h2 {
  margin: 0.5rem 0 1.5rem 5rem;
}
.contacts .fa-bars {
  position: absolute;
  left: 2.25rem;
  color: #888;
  transition: color 200ms;
}
.contacts .fa-bars:hover {
  color: #aaa;
}
.contacts .contact:last-child {
  margin: 0;
}
.contacts:hover {
  transform: translate(-23rem, -50%);
}


.chat {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 21rem;
  height: 30rem;
  box-sizing: border-box;
  border-radius: 1rem;
  background: #313941;
  //box-shadow: 0 0 8rem 0 rgba(255, 255, 255, 0.1), 0rem 2rem 4rem -3rem rgba(255, 255, 255, 0.2);
}
.chat .contact.bar {
  flex-basis: 3.5rem;
  flex-shrink: 0;
  margin: 0rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
  box-sizing: border-box;
  background: #272d33;
}
.chat .messages {
  //background: #272d33;
  flex-shrink: 2;
  overflow-y: auto;
  //box-shadow: inset 0 2rem 2rem -2rem rgba(255, 255, 255, 0.05), inset 0 -2rem 2rem -2rem rgba(255, 255, 255, 0.05);
}
.chat .messages .time {
  font-size: 0.8rem;
  background: #333;
  padding: 0.25rem 1rem;
  border-radius: 2rem;
  color: #888;
  width: -webkit-fit-content;
  width: -moz-fit-content;
  width: fit-content;
  margin: 0 auto;
  margin-top: 1rem;
}
.chat .messages .message {
  box-sizing: border-box;
  padding: 0.5rem 1rem;
  margin: 1rem;
  background: #44484e;
  border-radius: 1.125rem 1.125rem 1.125rem 0;
  min-height: 2.25rem;
  width: -webkit-fit-content;
  width: -moz-fit-content;
  width: fit-content;
  max-width: 80%;
  font-size: 0.8rem;
  //box-shadow: 0 0 2rem rgba(255, 255, 255, 0.075), 0rem 1rem 1rem -1rem rgba(255, 255, 255, 0.1);
  color: #e0e0e0;
}
.chat .messages .message.user {
  margin: 1rem 1rem 1rem auto;
  border-radius: 1.125rem 1.125rem 0 1.125rem;
  background: #44484e;
  color: #ffffff;
}
.chat .messages .message .typing {
  display: inline-block;
  width: 0.8rem;
  height: 0.8rem;
  margin-right: 0rem;
  box-sizing: border-box;
  background: #555;
  border-radius: 50%;
}
.chat .messages .message .typing.typing-1 {
  -webkit-animation: typing 3s infinite;
          animation: typing 3s infinite;
}
.chat .messages .message .typing.typing-2 {
  -webkit-animation: typing 3s 250ms infinite;
          animation: typing 3s 250ms infinite;
}
.chat .messages .message .typing.typing-3 {
  -webkit-animation: typing 3s 500ms infinite;
          animation: typing 3s 500ms infinite;
}
.chat .input {
  box-sizing: border-box;
  flex-basis: 4rem;
  flex-shrink: 0;
  font-size: 1.0rem;
  display: flex;
  align-items: center;
  padding: 0 0.5rem 0 1.5rem;
  background: #424E5A;
}
.chat .input i {
  font-size: 1.5rem;
  margin-right: 1rem;
  color: #888;
  cursor: pointer;
  transition: color 200ms;
}
.chat .input i:hover {
  color: #e0e0e0;
}
.chat .input input {
  border: none;
  background-image: none;
  background-color: #6c757d;
  padding: 0.5rem 1rem;
  margin-right: 1rem;
  border-radius: 1.125rem;
  flex-grow: 2;
  //box-shadow: 0 0 1rem rgba(255, 255, 255, 0.1), 0rem 1rem 1rem -1rem rgba(255, 255, 255, 0.2);
  font-family: Red hat Display, sans-serif;
  font-weight: 400;
  letter-spacing: 0.025em;
  color: #e0e0e0;
}
.chat .input input::placeholder {
  color: #888;
}

.icon-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.icon-container i {
  margin: 5px 0;
}

.message-image {
  box-sizing: border-box;
  padding: 0px;
  margin: 1rem;
  background: #6c757d;
  border-radius: 1.125rem 1.125rem 1.125rem 0;
  min-height: 2.25rem;
  width: -webkit-fit-content;
  width: -moz-fit-content;
  width: fit-content;
  max-width: 80%;
  font-size: 0.8rem;
  //box-shadow: 0 0 2rem rgba(255, 255, 255, 0.075), 0rem 1rem 1rem -1rem rgba(255, 255, 255, 0.1);
}

.message-image img {
    width: 13.75rem;
    padding: 0.625rem;
    filter: brightness(0.8) contrast(1.2);
}

@-webkit-keyframes typing {
  0%, 75%, 100% {
    transform: translate(0, 0.25rem) scale(0.9);
    opacity: 0.5;
  }
  25% {
    transform: translate(0, -0.25rem) scale(1);
    opacity: 1;
  }
}

@keyframes typing {
  0%, 75%, 100% {
    transform: translate(0, 0.25rem) scale(0.9);
    opacity: 0.5;
  }
  25% {
    transform: translate(0, -0.25rem) scale(1);
    opacity: 1;
  }
}

.pic.chatgpt {
  background-image: url("<a rel="noopener noreferrer" target="_blank" href="https://www.google.com/url?sa=i&url=https%3A%2F%2Fru.m.wikipedia.org%2Fwiki%2F%25D0%25A4%25D0%25B0%25D0%25B9%25D0%25BB%3AChatGPT_logo.svg&psig=AOvVaw1pouCNdqGLyLc5_1b_--7L&ust=1714052899145000&source=images&cd=vfe&opi=89978449&ved=0CBIQjRxqFwoTCODn2OL-2oUDFQAAAAAdAAAAABAE">Открыть</a>");
  background-size: contain;
  top: 0.25rem;
  left: 0.25rem;
}

.flip-warning {
    display: none;
    position: relative;
    z-index: 3;
    padding: 40px 20px;
    text-align: center;
    color: #e0e0e0;
    background-color: #424E5A;
}

.center {
    width: 100%;
    height: 100%;
}

.chat {
    width: 100%;
    height: 100%;
}

.chat .input {
  box-sizing: border-box;
  flex-basis: 4rem;
  flex-shrink: 0;
  font-size: 1.0rem;
  display: flex;
  align-items: center;
  padding: 0 0.5rem 0 1.0rem;
  background-color: #272d33;
}

.chat .input i {
  font-size: 1.5rem;
  margin-right: 1rem;
  color: #888;
  cursor: pointer;
  transition: color 200ms;
}

.chat .input i:hover {
  color: #e0e0e0;
}

.chat .input textarea {
  border: none;
  background-image: none;
  background-color: #44484e;
  padding: 0.5rem 1rem;
  margin-right: 1rem;
  border-radius: 1rem;
  flex-grow: 2;
  //box-shadow: 0 0 1rem rgba(255, 255, 255, 0.1), 0rem 1rem 1rem -1rem rgba(255, 255, 255, 0.2);
  font-family: 'Red Hat Display', sans-serif;
  font-weight: 400;
  letter-spacing: 0.025em;
  resize: none;
  height: calc(1.5em * 4);
  overflow-y: auto;
  color: #e0e0e0;
  margin-top: 1rem;
  margin-bottom: 1rem;
  outline: none;
}

.chat .input textarea::placeholder {
  color: #888;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    line-height: 1.5;
    color: #e0e0e0;
    background-color: #313940;
}

textarea {
    width: 100%;
    height: 200px;
    margin-bottom: 10px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    font-size: 14px;
    padding: 10px;
    border: 1px solid #444;
    border-radius: 3px;
    background-color: #424E5A;
    color: #e0e0e0;
}

#markdown-output {
    border: 1px solid #444;
    border-radius: 3px;
    padding: 20px;
    margin-top: 20px;
    background-color: #424E5A;
}

#markdown-output h1, #markdown-output h2, #markdown-output h3, #markdown-output h4, #markdown-output h5, #markdown-output h6 {
    margin-top: 24px;
    margin-bottom: 16px;
    font-weight: 600;
    line-height: 1.25;
    color: #ffffff;
}

#markdown-output h1 { font-size: 2em; }
#markdown-output h2 { font-size: 1.5em; }
#markdown-output h3 { font-size: 1.25em; }

#markdown-output p, #markdown-output ul, #markdown-output ol {
    margin-bottom: 16px;
}

#markdown-output code {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    font-size: 85%;
    padding: 0.2em 0.4em;
    color: #e0e0e0;
}

#markdown-output pre {
    background-color: #333;
    border-radius: 3px;
    font-size: 85%;
    line-height: 1.45;
    overflow: auto;
    padding: 16px;
    position: relative;
    color: #e0e0e0;
}

#markdown-output blockquote {
    border-left: 4px solid #444;
    color: #aaa;
    margin: 0;
    padding-left: 20px;
}

#markdown-output table {
    border-collapse: collapse;
    margin-bottom: 16px;
}

#markdown-output th, #markdown-output td {
    border: 1px solid #444;
    padding: 6px 13px;
}

#markdown-output th {
    background-color: #333;
    font-weight: 600;
}

.copy-btn {
    background-color: #444;
    border: none;
    padding: 5px 5px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 5px 5px;
    cursor: pointer;
    border-radius: 20px;
    transition: background-color 0.3s ease;
    float: right;
    color: #e0e0e0;
}

.copy-btn:hover {
    background-color: #555;
}

.copy-btn i {
    margin-right: 5px;
}


.inline {
    display: flex;
    gap: 5px;
    margin: 5px 10px;
    flex-wrap: wrap;
    justify-content: left;
}

.inline button {
    padding: 8px 16px;
    border: 1px solid #fff;
    border-radius: 20px;
    background: #272d33;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    //box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    opacity: 0.6;
}

.inline button:hover {
    background: #3a3a3a;
    transform: translateY(-2px);
    //box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.inline button:active {
    transform: translateY(0);
    //box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}