/* Подключение локального шрифта Montserrat */
@font-face {
  font-family: "Montserrat";
  src: url("./Montserrat.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Во весь экран, строго по центру */
html,
body {
  height: 100dvh;
  margin: 0;
  background-color: rgb(0, 0, 0);
  cursor: none !important;
  font-family: "Montserrat", sans-serif;
  overflow: hidden;
}

* {
  font-family: "Montserrat", sans-serif;
}

.cur-non {
  cursor: none;
}
#modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}
#modal-overlay[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}
#modal-dialog {
  width: 40vw;
  height: 90vh;
  background: #070707;
  border-radius: 12px;
  box-shadow: 0 0px 10px rgba(255, 255, 255, 0.6);
  border: 1px solid white;
  position: relative;
  overflow: auto;
  transform: scale(0.92);
  opacity: 0;
  transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1), opacity 200ms ease;
  will-change: transform, opacity;
  overflow-y: scroll;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
@media (max-width: 900px) {
  #modal-dialog {
    width: 90vw;
  }
}
#modal-dialog::-webkit-scrollbar {
  display: none;
}
#modal-overlay[aria-hidden="false"] #modal-dialog {
  transform: scale(1);
  opacity: 1;
}
#modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 28px;
  line-height: 1;
}
#modal-content {
  color: #eaeaea;
  height: 100%;
}
#parallax-root {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 300px;
  pointer-events: none;
  z-index: 1;
}

#parallax-root a {
  display: inline-block;
  pointer-events: auto;
  transform-style: preserve-3d;
  will-change: transform;
  pointer-events: auto;
}

#parallax-root img {
  display: block;
  max-width: min(90vw, 920px);
  height: auto;
  backface-visibility: hidden;
}
.footer {
  display: flex;
  justify-content: center;
  width: 100%;
  flex-direction: row;
  gap: 10px;
  position: fixed;
  bottom: 3vh;
  z-index: 10;
}

.img-hover {
  width: 3vw;
  min-width: 40px;
  height: auto;
  transition: transform 0.3s ease, filter 0.3s ease;
  will-change: transform, filter;
}
.img-hover:hover {
  transform: scale(1.2);
  filter: drop-shadow(0 0 1px #ffffff) drop-shadow(0 0 1px #ffffff)
    drop-shadow(0 0 10px #ffffff);
}
.wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.header {
  padding: 14px 16px;
  background: #13131a;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid #222222;
}
.title {
  margin: 0;
  font-weight: 600;
}

.chat {
  flex: 1;
  overflow: auto;
  padding: 16px 12px;
  padding-top: 40px;
  scroll-behavior: smooth;
  overflow-y: scroll;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.chat::-webkit-scrollbar {
  display: none;
}

.row {
  display: flex;
  margin: 8px 0;
}
.row.user {
  justify-content: flex-end;
}

.bubble {
  max-width: clamp(240px, 80%, 860px);
  padding: 10px 12px;
  border-radius: 14px;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.bubble.assistant {
  background: #ffffff;
  border-top-left-radius: 6px;
  color: black;
}
.bubble.user {
  background: #ffffff;
  border-top-right-radius: 6px;
  color: black;
}

.meta {
  font-size: 12px;
  color: #9aa0a6;
  margin-top: 4px;
  user-select: none;
}

.composer {
  position: sticky;
  bottom: 0;
  margin-top: auto;
  width: auto;
  width: 100%;
}
.composer-inner {
  display: flex;
  gap: 10px;
  background: #000000;
  border: 1px solid #ffffff;
  border-radius: 12px;
  padding: 10px;
}
textarea {
  flex: 1;
  resize: none;
  min-height: 44px;
  max-height: 160px;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font: inherit;
}
.btn {
  background: #ffffff;
  color: #000000;
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 600;
}
.btn:disabled {
  opacity: 0.6;
}
.toolbar {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.btn.secondary {
  background: #2a2f3a;
}

.empty {
  opacity: 0.6;
  text-align: center;
  margin-top: 24px;
}
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
  user-select: none;
  z-index: 9999;

  font-family: monospace;
  font-weight: 800;
  font-size: 28px;
  letter-spacing: 0.02em;

  color: #a7a7a7;
  text-shadow: 0 0 4px #a7a7a7, 0 0 10px #a7a7a7, 0 0 18px #a7a7a7;
}
.lottie-bg {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden; /* обрезаем всё лишнее */
}

/* общий контейнер слоёв */
.lottie-wrapper {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* LOTTIE — самый нижний слой */
#lottie-container {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none; /* не перехватывает клики */
}
#lottie-container svg {
  width: 100%;
  height: 100%;
  display: block; /* убираем возможные зазоры */
  object-fit: cover; /* подстраховка для некоторых движков */
}

/* GIF — средний слой (поверх Lottie) */
.back-gif {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: url("./media/back2.gif");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(70px);
  opacity: 0.05;
  will-change: transform;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.back-gif2 {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: url("./media/Loop.gif");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.2;
  will-change: transform;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* Контент — верхний слой */
.content {
  position: relative;
}
