@font-face {
  font-family: "Arame Regular";
  src: url("../assets/fonts/Arame.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Arame Bold";
  src: url("../assets/fonts/Arame-Bold.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

.hidden {
  display: none;
}
@media (max-width: 768px) {
  .upload__title {
    font-size: 20px;
  }

  .upload__text {
    font-size: 14px;
  }

  .btn {
    font-size: 14px;
    padding: 8px 16px;
  }

  #canvas {
    width: 100% !important;
    height: auto !important;
  }
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Arame Regular";
}

.map-legend {
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.map-legend h3 {
  margin-bottom: 10px;
  color: #333;
  font-size: 18px;
}

.map-legend ul {
  list-style-type: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.map-legend li {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  padding: 5px 15px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.map-legend li:hover {
  background-color: #e9ecef;
}

.map-legend li.active {
  background-color: #007bff;
  color: #ffffff;
}

.legend-icon {
  margin-right: 5px;
  font-size: 18px;
}

.map-container {
  margin: 20px 0;
  padding: 20px;
  background-color: #f0f0f0;
  border-radius: 10px;
}

.map-container h2 {
  margin-bottom: 15px;
  color: #333;
}

@keyframes fillBorder {
  0% {
    border-color: transparent;
  }
  100% {
    border-color: currentColor;
  }
}

.input-correct {
  color: #28a745;
  border-color: #28a745;
  animation: fillBorder 0.5s ease-out forwards;
}

.input-incorrect {
  color: #dc3545;
  border-color: #dc3545;
  animation: fillBorder 0.5s ease-out forwards;
}

.game-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  background-color: #f8f9fa;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.chat-box {
  height: 300px;
  overflow-y: auto;
  border: 1px solid #ced4da;
  border-radius: 5px;
  padding: 10px;
  background-color: #fff;
  margin-bottom: 20px;
}

.game-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

@media (max-width: 768px) {
  .game-controls {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}

/* Стили для сообщений в чате */
.message {
  margin-bottom: 10px;
  padding: 8px 12px;
  border-radius: 20px;
  max-width: 80%;
}

.user-message {
  background-color: #007bff;
  color: white;
  align-self: flex-end;
  margin-left: auto;
}

.bot-message {
  background-color: #e9ecef;
  color: #333;
  align-self: flex-start;
}

.bot-message .rules-container {
  background-color: #f0f8ff;
  border-left: 4px solid #4caf50;
  padding: 15px;
  margin-bottom: 10px;
  border-radius: 5px;
}

.bot-message .rules-container h3 {
  color: #4caf50;
  margin-top: 0;
  margin-bottom: 10px;
}

.bot-message .rules-container ol {
  padding-left: 20px;
}

.bot-message .rules-container li {
  margin-bottom: 8px;
  line-height: 1.4;
}

.bot-message .rules-container .game-start {
  font-weight: bold;
  color: #2196f3;
  margin-top: 15px;
}

.bot-message .rules-container .game-instruction {
  font-style: italic;
  color: #757575;
  margin-top: 5px;
}

.content {
  min-height: 100vh;
}

.button {
  margin-top: 20px;
  border-radius: 15px;
  border: none;
  font-family: "Arame Bold";
  font-size: 16px;
  background-color: #1a2526;
  color: white;
  padding: 10px 24px;
  width: 100%;
  max-width: 350px;

  @media (max-width: 835px) {
    max-width: 300px;
  }

  @media (max-width: 575px) {
    max-width: 100%;
  }
}

.button_mini {
  border-radius: 10px;
  border: none;
  font-family: "Arame Bold";
  font-size: 14px;
  background-color: #1a2526;
  color: white;
  padding: 8px 12px;
  width: 100%;
  max-width: 200px;

  @media (max-width: 835px) {
    max-width: 120px;
  }

  @media (max-width: 575px) {
    max-width: 100%;
  }
}

.story-card {
  border: 2px solid #1a2526;
  border-radius: 10px;
  padding: 8px 12px;
  max-width: 350px;
  width: 100%;
  height: auto;
}

#img {
  max-width: 486px;
  width: 100%;
  max-height: 486px;
  margin-bottom: 15px;
  border-radius: 5px;
}

#wrap {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  row-gap: 16px;
  margin-bottom: 80px;
}

#message {
  font-family: "Arame Bold";
  font-size: 16px;
}

.result {
  margin-top: 30px;
}

p {
  margin-bottom: 0;
}

.garbage-picture {
  max-width: 500px;
  width: 100%;
  height: 250px;
  border-radius: 5px;
}

.navbar {
  background-color: #1a2526 !important;
  padding: 15px 35px;
}

.navbar-brand {
  text-decoration: none;
  color: white;
  font-size: 24px;
}

.logo {
  margin-right: 20px;
  border-radius: 100%;
}

.navbar-brand:hover {
  text-decoration: none;
  color: white;
}

.footer {
  background-color: #1a2526 !important;
  padding: 15px 35px;
  color: white;
}

.footer__text {
  text-align: center;
  vertical-align: middle;
}

.container {
  margin: 0 auto;
  padding: 0 60px;
  max-width: 1440px;

  @media (max-width: 1024px) {
    max-width: 960px;
  }

  @media (max-width: 768px) {
    max-width: 540px;
  }

  @media (max-width: 575px) {
    max-width: 100%;
    padding: 0 15px;
  }
}

.content {
  background: #c8c2b5;
}

#preview img {
  width: 100%;
  max-width: 585px;
  max-height: 350px;

  @media (max-width: 768px) {
    max-width: 100%;
    max-height: auto;
  }
}

.about {
  padding: 100px 0px;
  padding-bottom: 50px;
  display: flex;
  justify-content: center;
  column-gap: 30px;

  @media (max-width: 768px) {
    flex-direction: column;
    row-gap: 30px;
  }
}
.microphone-indicator {
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.8em;
  margin-bottom: 15px;
  text-align: center;
  margin-top: 20px;
  transition: all 0.3s ease;
}

.microphone-indicator.active {
  background-color: #28a745;
  color: white;
}

.microphone-indicator:not(.active) {
  background-color: #dc3545;
  color: white;
}

.game-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.game-button {
  padding: 10px 20px;
  font-size: 16px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: #1a2526;
  color: white;
  font-family: "Arame Bold";
}

.game-button:hover {
  background-color: #2c3e50;
  transform: translateY(-2px);
}

.game-button:active {
  transform: translateY(0);
}

.game-button.primary {
  background-color: #3498db;
}

.game-button.primary:hover {
  background-color: #2980b9;
}

.game-button.secondary {
  background-color: #2ecc71;
}

.game-button.secondary:hover {
  background-color: #27ae60;
}

.game-button.danger {
  background-color: #e74c3c;
}

.game-button.danger:hover {
  background-color: #c0392b;
}

@media (max-width: 768px) {
  .game-controls {
    flex-direction: column;
    align-items: center;
  }

  .game-button {
    width: 100%;
    max-width: 250px;
  }
}

.progress {
  height: 10px;
  margin-bottom: 20px;
}

.progress-bar {
  transition: width 0.5s ease;
}

.feedback-text {
  transition: opacity 0.3s ease-in-out;
}

.feedback-text.correct {
  color: #28a745;
}

.feedback-text.incorrect {
  color: #dc3545;
}

.riddle-text {
  transition: opacity 0.5s ease-in-out;
}

.about__picture {
  width: 100%;
  height: 550px;
  border-radius: 15px;
}

.about__image-wrapper {
  max-width: 30%;
  width: 100%;
  @media (max-width: 768px) {
    max-width: 100%;
  }
}

.riddles-game {
  background-color: #f8f9fa;
  border-radius: 10px;
  max-width: 800px;
  margin: 0px auto;
  padding: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.riddle-container {
  background-color: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 5px;
  padding: 20px;
  margin-bottom: 20px;
}

.rules {
  background-color: #f0f8ff;
  border-left: 4px solid #4caf50;
  padding: 15px;
  margin-bottom: 10px;
  border-radius: 5px;
}

.riddle-text {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 15px;
}

.riddle-image-container {
  text-align: center;
  margin-bottom: 15px;
}

.riddle-image {
  max-width: 100%;
  height: auto;
  border-radius: 5px;
}

.answer-container {
  margin-bottom: 15px;
}

.feedback-text {
  font-weight: bold;
  text-align: center;
}

.controls {
  display: flex;
  justify-content: space-between;
}

.d-none {
  display: none;
}

@media (max-width: 768px) {
  .controls {
    flex-direction: column;
  }

  .controls button {
    margin-bottom: 10px;
  }
}

.about__text {
  width: 70%;
  height: auto; /* Добавлено это свойство */
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  @media (max-width: 768px) {
    width: 100%;
  }
}

.about__text p {
  font-size: 16px;
  font-weight: 400;
  color: #333;
  line-height: 1.8;
  margin-bottom: 20px;
  text-align: justify;
  text-indent: 30px;
}

.about__text p:last-child {
  margin-bottom: 0;
}
.about__description {
  height: auto; /* Добавляем это свойство */
  overflow: hidden;
}

.about__title {
  font-size: 36px;
  font-weight: 700;
  color: #1a2526;
  margin-bottom: 25px;
  font-family: "Arame Bold", sans-serif;
  border-bottom: 2px solid #1a2526;
  padding-bottom: 15px;
  text-align: center;
}

.about__text p:last-child {
  margin-bottom: 0;
}

.about__text p::first-letter {
  font-size: 24px;
  font-weight: 700;
  color: #1a2526;
}

@media (max-width: 1024px) {
  .about__text {
    padding: 30px;
  }

  .about__text p {
    font-size: 16px;
  }

  .about__title {
    font-size: 32px;
  }
}

@media (max-width: 768px) {
  .about__text {
    padding: 25px;
  }

  .about__title {
    font-size: 28px;
  }
}

@media (max-width: 575px) {
  .about__text p {
    font-size: 14px;
    line-height: 1.6;
  }

  .about__title {
    font-size: 24px;
  }
  .about__text p::first-letter {
    font-size: 20px;
  }
}

.start {
  cursor: pointer;
  margin-left: 12px;
}

.team {
  padding-top: 100px;
  padding-bottom: 100px;
}

.team__title {
  font-size: 48px;
  font-weight: 500;
  color: black;
  margin-bottom: 40px;
  font-family: "Arame Bold";

  @media (max-width: 1024px) {
    font-size: 42px;
  }

  @media (max-width: 768px) {
    font-size: 36px;
    text-align: center;
  }

  @media (max-width: 575px) {
    font-size: 32px;
  }
}

.team__wrapper {
  display: flex;
  justify-content: center;
  column-gap: 50px;

  @media (max-width: 768px) {
    flex-direction: column;
    row-gap: 30px;
  }
}

.team__item img {
  border-radius: 5px;
  width: 100%;
  max-width: 665px;
  max-height: 376px;
}

.team__item_info {
  padding: 12px 24px;
  margin-top: 15px;
  border-radius: 10px;
  background-color: #1a2526;
  color: white;
}

.team__item_info_name {
  font-size: 20px;
  font-weight: 500;
  font-family: "Arame Bold";
}

.team__item_info_who {
  font-size: 14px;
  font-weight: 400;
}

.upload__title {
  font-size: 48px;
  font-weight: 500;
  color: black;
  margin-bottom: 40px;
  font-family: "Arame Bold";

  @media (max-width: 1024px) {
    font-size: 42px;
  }

  @media (max-width: 768px) {
    text-align: center;
    font-size: 36px;
  }

  @media (max-width: 575px) {
    font-size: 32px;
  }
}

.upload .card {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: 0.3s;
  border-radius: 15px;
}

.upload .card:hover {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.upload .btn {
  transition: 0.3s;
}

.upload .btn:hover {
  transform: translateY(-2px);
}

#img {
  max-height: 300px;
  object-fit: contain;
}

#message {
  min-height: 24px;
}

.upload__input {
  width: 100%;
  max-width: 480px;
  color: black;
}

.upload__wrapper {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;

  @media (max-width: 768px) {
    flex-direction: column-reverse;

    row-gap: 30px;
  }
}

.upload__text {
  font-size: 16px;
  margin-bottom: 25px;
  max-width: 480px;

  @media (max-width: 768px) {
    max-width: 100%;
  }
}

.map {
  padding-bottom: 100px;
}

.map__title {
  font-size: 48px;
  font-weight: 500;
  color: black;
  margin-bottom: 40px;
  font-family: "Arame Bold";

  @media (max-width: 1024px) {
    font-size: 42px;
  }

  @media (max-width: 768px) {
    font-size: 36px;
    text-align: center;
  }

  @media (max-width: 575px) {
    font-size: 32px;
  }
}

.map__wrapper {
  position: relative;
}

.map__map {
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 98;
  width: 100%;
}

.map__btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 99;
  border: none;
  background-color: #1a2526;
  color: white;
  font-size: 18px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  cursor: pointer;
}

.map__btn:hover {
  color: #ffff;
}
