.video-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.video-modal-container {
  background-color: rgba(14, 15, 20, 1);
  border-radius: 5px;
  width: 90%;
  max-width: 800px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  color: #c5a064;
}

.mobile-btn {
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: black;
  color: #c8a45c;
  padding: 8px 12px;
  margin-bottom: 8px;
  font-size: 12px;
  width: 100%;
  text-align: center;
  transition: all 0.3s ease;
}

.mobile-btn svg {
  margin-right: 6px;
  width: 16px;
  height: 16px;
}

.btn-text {
  display: inline;
}

/* Стили для контейнеров кнопок */
.buttons-container {
  position: absolute;
  left: 10px;
  width: calc(100% - 20px);
  max-width: 300px;
  z-index: 10;
}

.top-buttons {
  top: 10px;
}

.bottom-buttons {
  bottom: 10px;
}

.right-buttons {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 8px;
}

.right-buttons button {
  padding: 6px 10px;
  font-size: 12px;
}

/* Адаптивные стили */
@media (max-width: 480px) {
  .modal {
    max-width: 100%;
  }

  .mobile-view .mobile-btn {
    display: inline-block;
    margin-right: 10px;
    font-size: 11px;
    padding: 10px;
    width: auto;
  }

  #tutorialBox {
    top: 10% !important;
    left: 10px !important;
  }

  .mobile-view .mobile-btn svg {
    width: 20px;
    height: 20px;
    margin-right: 0;
  }

  .mobile-view .right-buttons button {
    padding: 8px;
    font-size: 11px;
  }

  .mobile-view .btn-text {
    display: none;
  }

  .mobile-view .buttons-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 100%;
  }
}

/* Стили для планшетов и десктопов */
@media (min-width: 768px) {
  .modal-content {
    height: 624px;
    max-height: calc(100% - 60px - 60px);
  }

  .buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 100%;
  }

  .mobile-btn {
    width: auto;
    margin-bottom: 0;
  }
}
.video-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #e1e1e1;
}

.video-modal-header h3 {
  margin: 0;
  font-size: 18px;
}

.video-modal-close {
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #555;
}

.video-modal-body {
  padding: 0;
}

.video-modal-body video {
  width: 100%;
  display: block;
}

.video-modal-footer {
  padding: 15px 20px;
  text-align: right;
  border-top: 1px solid #e1e1e1;
}

.video-modal-btn {
  padding: 8px 16px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.video-modal-btn:hover {
  background-color: #5a6268;
}
.goldColor {
  color: #c5a064;
}
* {
  font-family: "Montserrat", sans-serif;
}
*,
::after,
::before {
  box-sizing: border-box;
  border-style: solid;
  border-color: #e5e7eb;
}
.bg-card {
  background-color: hsl(0 0% 100%);
}
.viewer-panel {
  flex: 1;
  position: relative;
}
.control-panel {
  flex: 1;
  min-width: 300px;
  background-color: #f9f9f9;
  padding: 15px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.viewer-container {
  width: 100%;
  height: 380px;
  overflow: hidden;
  background-color: #eee;
  position: relative;
}
.background-image {
  position: absolute;
  width: 100%;
  z-index: 1;
}
model-viewer {
  width: 100%;
  height: 100%;
  z-index: 2;
  background-color: transparent;
  --poster-color: transparent;
}
.modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  max-width: 487px;

  bottom: 0;
}
.modal-content {
  background-color: rgba(14, 15, 20, 1);
  top: 60px !important;
  left: 10px !important;
  padding: 25px;
  width: 95%;
  max-width: 487px;
  position: relative;

  height: 540px;
  max-height: calc(100% - 64px - 64px);
  display: flex;
  flex-direction: column;
}
.bg-item {
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
  width: 100%;
  margin-bottom: 30px;
}
.bg-item:hover {
  border-color: #c5a064;
}
.bg-item.active {
  border-color: #c5a064;
}
.close {
  color: #c5a064;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}
.close:hover {
  color: #61471e;
  text-decoration: none;
}
#chooseBgBtn {
  margin-left: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 0.375rem;
  padding-left: 1rem;
  padding-right: 1rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  background-color: #4f46e5;
  color: white;
}
#chooseBgBtn:hover {
  background-color: #c5a064;
  cursor: pointer;
}
#chooseBtns1 {
  z-index: 99;
  font-size: 12px;
}
#chooseBtns2 {
  z-index: 99;
  font-size: 12px;
}
#chooseBtns3 {
  z-index: 99;
  font-size: 12px;
}
button {
  cursor: pointer;
}
#noBackgroundBtn:hover,
#closeBgModal:hover {
  cursor: pointer;
}
.loading-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: rgba(14, 15, 20);
  z-index: 100;
  transition: opacity 0.5s ease;
}
.loading-text {
  margin-top: 16px;
  font-size: 20px;
  font-weight: 500;
  color: #ffffff;
}
.loading-progress {
  width: 200px;
  height: 9px;
  margin-top: 15px;
  background-color: rgba(79, 70, 229, 0.2);
  overflow: hidden;
}
.loading-progress-bar {
  height: 100%;
  width: 0%;
  background-color: #c5a064;
  transition: width 0.3s ease;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.texture-item.active {
  border-color: #4f46e5;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.3);
}
#textureGrid div {
  width: 80px;
  text-align: center;
  color: #ffffff;
}
#textureGrid {
  justify-content: center;
}
#textureGrid div:hover {
  cursor: pointer;
}
::-webkit-scrollbar {
  width: 15px; /* Ширина скроллбара */
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1); /* Цвет фона скроллбара */
}

::-webkit-scrollbar-thumb {
  background: #c5a064; /* Цвет ползунка скроллбара */
  border: 2px solid rgba(255, 255, 255, 0.1); /* Создаем границу вокруг ползунка */
}

::-webkit-scrollbar-thumb:hover {
  background: #c5a064; /* Цвет ползунка при наведении */
}

/* Стили для скроллбара - Firefox */
* {
  scrollbar-width: auto; /* "auto", "thin", or "none" */
  scrollbar-color: rgba(255, 255, 255, 0.8) rgba(255, 255, 255, 0.1); /* thumb and track color */
}

#textureModal {
  z-index: 1001; /* Убедимся, что оно над другими модальными окнами */
}

/* From Tailwind */
.hidden {
  display: none;
}
