/* Основные стили */
body {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  background: #ffffff;
  color: #fff;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.container-viewer-wrapper {
  background: linear-gradient(
    90deg,
    rgba(1, 67, 101, 0.9) 0%,
    rgba(80, 30, 100, 0.9) 50%,
    rgba(200, 20, 100, 0.9) 100%
  );
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  padding: 10px;
  box-sizing: border-box;
  overflow: hidden;
}
@media (max-width: 650px) {
  .container-viewer-wrapper {
    padding: 5px;
  }
}

.container-viewer {
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
}

#viewer {
  /* position: relative; */
  max-height: 90vh;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 2px solid #444;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}

@media (max-width: 650px) {
  #viewer {
    aspect-ratio: 2 / 3;
  }
}

/* Кнопки под панорамой */
.buttons-viewer {
  position: absolute;
  bottom: 10px;
  margin-top: 15px;
  text-align: center;
  overflow: hidden;
}

@media (max-width: 650px) {
  .buttons-viewer {
    bottom: 5px;
    margin-top: 10px;
    left: 3px;
  }
}

.button-viewer {
  font-size: 13.3px;
  text-decoration: none;
  padding: 10px 20px;
  margin: 0 10px;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;

  background: linear-gradient(
    90deg,
    rgba(1, 67, 101, 0.9),
    rgba(80, 30, 100, 0.9),
    rgba(200, 20, 100, 0.9)
  );
  background-size: 150% 150%;
  background-position: left center;

  transition: background-position 1s ease-in-out;
}

.button-viewer:hover {
  background-position: right center;
}

.button-viewer.active {
  background: linear-gradient(
    90deg,
    rgba(255, 100, 100, 0.9),
    rgba(255, 50, 50, 0.9),
    rgba(200, 20, 20, 0.9)
  );
  box-shadow: 0 0 10px rgba(255, 50, 50, 0.8);
}

@media (max-width: 650px) {
  .button-viewer {
    padding: 5px 10px;
    margin: 0 2px;
    font-size: 10px;
  }
}

.portal-button {
  width: 60px;
  height: 60px;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(192, 192, 192, 0.4) 70%,
    transparent 100%
  );
  border: 0px solid #ffffff;
  border-radius: 50%;
  color: #333;
  font-size: 14px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.5),
    inset 0 0 10px rgba(192, 192, 192, 0.5);
  animation: pulse 2s infinite ease-in-out;
}

.portal-button:hover {
  transform: scale(1.1);
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.8),
    inset 0 0 15px rgba(192, 192, 192, 0.8);
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 1) 0%,
    rgba(192, 192, 192, 0.6) 70%,
    transparent 100%
  );
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.7);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
  }
}

.spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60px;
  height: 60px;
  margin: -30px 0 0 -30px;
  border: 6px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 999;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.hidden {
  display: none;
}

.side-menu {
  position: absolute;
  top: 0;
  left: -250px;
  width: 250px;
  height: 100%;
  background: rgba(10, 10, 30, 0.95);
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
  transition: left 0.4s ease;
  z-index: 10;
  padding: 20px;
  box-sizing: border-box;
  color: #fff;
  overflow-y: auto;
  border-radius: 8px 0 0 8px;
}

.side-menu.open {
  left: 0;
}
.side-menu-buttons {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
}

.side-menu-content h3 {
  margin-top: 0;
  text-align: center;
  margin-bottom: 15px;
  font-size: 20px;
}

.close-button {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  position: absolute;
  top: 10px;
  right: 15px;
  cursor: pointer;
}
