@charset "UTF-8";


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


* {
  box-sizing: border-box;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-size: var(--font-size);
}

:focus-visible {
  outline: none;
}
/* iOS zoom fix */
input, textarea, select {
  font-size: var(--font-size) !important; /* Важно для iOS */
  transform: scale(1);
  max-height: 100%;
}

/* Предотвращение масштабирования на элементах формы */
input:focus, textarea:focus, select:focus {
  transform: scale(1);
  font-size: var(--font-size) !important;
}


:root {
  --font: "Source Code Pro", "Arial", monospace;
  --font-size: 16px;
  --bg-color: black;
  --font-color: #d7d7d7;
  --font-color-muted: rgba(255, 255, 255, 0.3);
  --link-color: orangered;
  --link-hover: white;
  --border-width: 1px;
  --border-color: orangered;
  --padding: 5px;
  --safe-area-inset-top: env(safe-area-inset-top, 0px);
  --safe-area-inset-right: env(safe-area-inset-right, 0px);
  --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
  --safe-area-inset-left: env(safe-area-inset-left, 0px);
}

::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

:hover::placeholder {
  color: lightgray;
  opacity: .8;
  transition-duration: 0.2s;
}

::selection {
  background: var(--link-color);
  color: white;
}

a:hover {
  cursor: pointer;
}
html {
  height: 100vh;
  height: -webkit-fill-available;
}

body {
  padding: 0;
  margin: 0;
  font-family: var(--font);
  font-size: var(--font-size);
  color: var(--font-color);
  line-height: 1.2em;
  display: flex;
  flex-direction: row;
  background-color: var(--bg-color);
  background-image: radial-gradient(circle, rgba(0, 0, 0, 1) 0%, rgba(7, 2, 0, 1) 100%);
  border: var(--border-width) solid var(--border-color);

  /* Исправленные свойства высоты */
  height: 100vh;
  height: -webkit-fill-available;
  overflow: hidden;
  box-sizing: border-box;
}

::-webkit-scrollbar {
  width: 12px; /* ширина scrollbar */
}

::-webkit-scrollbar-track {
  background: transparent; /* цвет дорожки */
}

::-webkit-scrollbar-thumb {
  background-color: rgba(26, 26, 26, 0.95); /* цвет плашки */
  border-radius: 0; /* закругления плашки */
}

nav.navigation {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  padding: 0.5em 0.7em 0.5em 0.5em;
  border-right: var(--border-width) solid var(--border-color);
}


main {
  padding: .3em;
  overflow-y: auto;
  width: 100%;
  min-height: 100%;
  max-height: calc(100vh - var(--border-width) * 2);
}

a {
  color: var(--link-color);
  text-decoration: none;
}

a:hover {
  color: var(--link-hover);
  text-decoration: none;
  transition-duration: 0.05s;
}

main a {
  text-decoration: underline;
}

p {
  margin: 0 0 0.5em 0;
  font-size: var(--font-size);
}

ul li + li {
  margin-top: 0.5em;
}

ul {
  padding-left: 1em;
  margin-top: 0;
}

article {
  display: flex;
  flex-direction: column;
}

.photolist {
  display: flex;
  gap: 0.5em;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  margin-bottom: 0.5em;
}

.photolist img,
.chat img {
  max-width: 100%;
  width: auto;
  border-radius: 10px;
}

.photolist:has(img:only-child) img {
  max-height: 80vh;
  height: auto;
}


.photolist img {
  max-height: 250px;
  filter: grayscale(1);
  opacity: .9;
}

.photolist img:hover {
  filter: grayscale(0);
  transition: .1s;
  opacity: 1;
}


/* chat */
.chat {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: flex-end;
  padding: 0;
}

.chat .wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  overflow-y: auto;
  padding: 0.5em;
}

.chat article {
  position: relative;
}

.chat section {
  padding-right: 3em;
}

.chat article[data-sender="me"] {
  color: orangered;
}

.chat article::after {
  content: attr(data-time);
  position: absolute;
  right: 0;
  top: 0;
  font-size: calc(var(--font-size) * 0.8);
  opacity: 0.2;
  transition-duration: 0.5s;
  color: orangered;
}

.chat article:hover::after {
  transition-duration: 0s;
  opacity: 0.8;
}


.chat .chatinput-form {
  display: flex;
  flex-direction: row;
  align-items: center;
  background-color: rgba(26, 26, 26, 0.95);
  padding: 0 0.8em 0 0;
}

.chat .chatinput-form input {
  width: 100%;
  background: transparent;
  border: 0;
  color: #d8d8d8;
  font-size: var(--font-size);
  font-family: var(--font);
  padding: 0.8em 0.5em;
}

.send {
  text-decoration: none;
  font-size: calc(var(--font-size) * 1.25);
}

.send:hover,
.send:focus {
  cursor: pointer;
}

.chat .wrapper {
  scroll-behavior: smooth;
}

.chat a.action {
  display: inline-block;
  background-color: #191919;
  padding: 0.2em 0.5em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid #3d3d3d;
  transition-duration: 0.2s;
  color: #6f6f6f;
}

.chat a.action:hover {
  cursor: pointer;
  border: 1px solid var(--link-color);
  color: var(--link-hover);
}

.chat .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2em;
}

article:last-child a.action {
  color: var(--link-color);
}

article:not(:last-child) .actions {
  margin-bottom: 0.6em;
}

/* canvas */
canvas#s {
  z-index: -1;
  position: absolute;
  left: 0;
  top: 0;
  max-width: 100vw;
  max-height: 100vh;
}

/* menu */
.links {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

#burger {
  display: none;
}

@media (max-width: 600px) {
  body {
    flex-direction: column;
  }

  .navigation {
    border: var(--border-width) solid var(--border-color);
    position: absolute;
    z-index: 99;
    background-color: var(--bg-color);
    width: 100%;
    left: 0;
    top: 0;
    text-align: center;
  }

  #burger {
    display: block;
    font-size: calc(var(--font-size) * 1.25);
  }

  #burger:hover {
    color: var(--link-color);
    cursor: pointer;
  }

  .navigation.opened .links {
    display: flex;
    gap: 0.1em;
  }

  .navigation.opened .separator {
    display: none;
  }

  .navigation.opened .links .nav-link {
    padding: 0.5em 0;
  }

  .navigation.opened #burger {
    padding: 0.1em 0 0.5em 0;
  }

  .navigation.closed .links {
    display: none;
  }


  .chat {
    padding-top: calc(2.3em + var(--border-width)) !important;
  }

  .chat .wrapper {
    max-height: calc(100vh - 2.7em + var(--border-width));
  }
}

  /* typing animation */
.send[disabled]{
  color: #6f6f6f;
  pointer-events: none;
}

.action[disabled]{
  color: #6f6f6f;
  pointer-events: none;
}
  div#typing {
    display: flex;
    gap: 5px;
    margin-top: 0.2em;
    margin-bottom: 0.4em;
  }
  div#typing .dot {
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: white;
    animation: wave 0.8s linear infinite;
  }
  div#typing .dot:nth-child(2) {
    animation-delay: 0.1s;
  }
  div#typing .dot:nth-child(3) {
    animation-delay: 0.2s;
  }

  @keyframes wave {
    0%, 60%, 100% {
      transform: initial;
    }
    30% {
      transform: translateY(-5px);
    }
  }
