* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #2b2938;
}

.welcome-container {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.welcome-text {
  color: white;
  font-family: "Wix Madefor Display";
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 8px;
}

.brand-name {
  color: white;
  font-family: "Wix Madefor Display", sans-serif;
  font-size: 6rem;
  font-weight: 600;
}

.fade-out {
  animation: fadeOut 1s ease forwards;
}

.fade-in {
  animation: fadeIn 1s ease forwards;
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.menu-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 100;
}

.menu-btn img {
  width: 50px;
  height: 50px;
}

.sidebar {
  position: fixed;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100vh;
  background-color: #1e1b2e;
  padding: 30px 30px 30px 30px;
  transition: right 0.4s ease;
  z-index: 99;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 20px;
}

.sidebar p {
  color: white;
  font-family: "Wix Madefor Display", sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  padding: 14px 0;
  width: 100%;
  border-radius: 10px;
  transition: background 0.2s ease;
}

.sidebar p:hover {
  background: rgba(255, 255, 255, 0.08);
}

.sidebar.open {
  right: -20px;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 55px;
  margin-bottom: 60px;
  width: 100%;
}

.close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.close-btn:hover {
  opacity: 1;
}

.close-btn svg {
  width: 1em;
  height: 1em;
}

.sidebar-title {
  color: white;
  font-family: "Wix Madefor Display", sans-serif;
  font-size: 1.8rem;
}

.main-container {
  width: 100vw;
  height: 100vh;
  background-color: #2b2938;
  display: none;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.muscle-hotspot {
  background: white;
  border: 2px solid rgba(255, 255, 255, 0.6);
  width: 14px;
  height: 14px;
  cursor: pointer;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.muscle-hotspot:hover {
  background: white;
  transform: scale(1.4);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5);
  }

  70% {
    box-shadow: 0 0 0 8px rgba(255, 255, 255, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

.sidebar-footer {
  margin-top: auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-name {
  color: rgba(255, 255, 255, 0.7);
  font-family: "Wix Madefor Display", sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
  pointer-events: none;
}

.sidebar-name:hover {
  background: none;
}

.social-icons {
  display: flex;
  align-items: center;
  gap: 20px;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, opacity 0.2s ease;
  opacity: 0.85;
}

.social-icons a:hover {
  transform: scale(1.2);
  opacity: 1;
}

.social-icons a img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.sources-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #1e1b2e;
  border-radius: 20px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow: hidden;
}

.sources-panel.open {
  transform: translateX(0);
}

.sources-back {
  background: none;
  border: none;
  color: white;
  font-family: "Wix Madefor Display", sans-serif;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  margin-bottom: 20px;
  opacity: 0.7;
}

.sources-back svg {
  width: 1em;
  height: 1em;
}

.sources-back:hover {
  opacity: 1;
}

.sources-title {
  color: white;
  font-family: "Wix Madefor Display", sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.sources-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  flex: 1;
}

.sources-list a {
  color: rgba(255, 255, 255, 0.75);
  font-family: "Wix Madefor Display", sans-serif;
  font-size: 0.85rem;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  transition: background 0.2s ease, color 0.2s ease;
}

.sources-list a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

model-viewer {
  transition: transform 0.5s ease, width 0.5s ease;
}

.model-shifted model-viewer {
  transform: translateX(-30%);
}

.muscle-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 62%;
  height: 100%;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  opacity: 0;
  pointer-events: none;
  transform: translateX(40px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  z-index: 50;
  padding: 40px 30px 40px 20px;
  gap: 20px;
}

.muscle-panel.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.muscle-panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.muscle-panel-close {
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}

.muscle-panel-close:hover {
  opacity: 1;
}

.muscle-panel-close svg {
  width: 1em;
  height: 1em;
}

.muscle-panel-content {
  width: 55%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
  min-height: 0;
}

.muscle-panel-name {
  color: white;
  font-family: "Wix Madefor Display", sans-serif;
  font-size: 2rem;
  font-weight: 700;
}

.muscle-panel-section {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.muscle-panel-section-title {
  color: white;
  font-family: "Wix Madefor Display", sans-serif;
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 10px;
}

.muscle-panel-box {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px 20px;
  color: rgba(255, 255, 255, 0.85);
  font-family: "Wix Madefor Display", sans-serif;
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.7;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  white-space: pre-wrap;
}

.muscle-panel-box ul {
  list-style-position: inside;
  margin-top: 8px;
}

.muscle-panel-box ul ul {
  list-style-type: circle;
  margin-left: 20px;
  margin-top: 4px;
}

.muscle-panel-box li {
  margin-bottom: 4px;
}

.muscle-panel-image-wrap {
  width: 45%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.muscle-panel-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 768px) {

  .muscle-hotspot {
    width: 12px;
    height: 12px;
  }

  .muscle-panel::before {
    content: '';
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin: 0 auto 8px auto;
    flex-shrink: 0;
  }

  .muscle-panel {
    width: 100%;
    height: 85%;
    top: auto;
    bottom: 0;
    right: 0;
    flex-direction: column;
    transform: translateY(100%);
    opacity: 1;
    padding: 24px 20px 20px 20px;
    border-radius: 20px 20px 0 0;
    background-color: #2b2938;
    gap: 16px;
    overflow-y: auto;
  }

  .muscle-panel.open {
    transform: translateY(0);
    opacity: 1;
  }

  .model-shifted model-viewer {
    transform: none;
  }

  .muscle-panel-content {
    width: 100%;
    flex: none;
  }

  .muscle-panel-image-wrap {
    width: 100%;
    height: 220px;
    flex-shrink: 0;
  }

  .muscle-panel-name {
    font-size: 1.5rem;
  }

  .sidebar {
    width: 85%;
    right: -85%;
    border-radius: 20px;
  }

  .sidebar.open {
    right: -10px;
  }

}