body{
  margin-left: 10%;
  margin-right: 10%;
  margin-top: 2rem;
  margin-bottom: 0;
  background-color: #121212;
  font-size: small;
  font-family: 'Noto Serif', serif;
  color: rgb(213, 217, 220);
}

.centralizzatore {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: justify;
  flex-wrap: wrap;
  gap: 1em;
}

a {
  color: rgb(213, 217, 220);
}

h1 {
  font-size: xx-large;
}

p {
  font-size: large;
}

img{
  max-width: 100%;
  max-height: 80vh;
  margin-bottom: 1rem;
}

.imgVert {
  max-height: 100vh;
  max-width: 100%;
}

.content {
  display: none;
}

.content.active {
  display: block;
}

.langButt {
  background-color: transparent;
  border: none;
  color: gray;
  margin: 0;
  padding: 0;
  cursor: pointer;
}

.language-switch {
  position: absolute;
  text-align: center;
  right: 2.5rem;
  top: 2.5rem;
}

button {
  margin: 0 5px;
  padding: 5px 10px;
  cursor: pointer;
}

/* --- Player (mockup) --- */

.player {
  max-width: 26rem;
  margin: 0 auto 2rem auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  border: 1px solid #444;
  border-radius: 0.8rem;
}

.player-note {
  font-size: small;
  font-style: italic;
  color: #666;
  text-align: center;
}

#player-status {
  min-height: 1.2em;
}

.player-header {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  text-align: center;
}

.player-title {
  font-size: large;
  font-weight: bold;
}

.player-ambisonic-badge {
  font-size: small;
  font-style: italic;
  color: #999;
  border: 1px solid #444;
  border-radius: 1rem;
  padding: 0.1rem 0.6rem;
}

.player-loading-info {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.player-loading-info[hidden] {
  display: none;
}

.progress-track {
  width: 100%;
  height: 0.4rem;
  background-color: #2a2a2a;
  border-radius: 0.3rem;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background-color: rgb(213, 217, 220);
  transition: width 0.2s ease;
}

.player-loading-text {
  font-size: small;
  font-style: italic;
  color: #999;
  margin: 0;
  text-align: center;
}

.static-version-prompt {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  font-size: small;
  font-style: italic;
  color: #999;
  text-align: center;
}

.static-version-arrow {
  color: #777;
}

.static-version-link {
  font-size: small;
  font-style: italic;
  text-decoration: underline;
  color: #999;
  cursor: pointer;
}

.static-version-link:hover {
  color: rgb(213, 217, 220);
}

.player-top-controls {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.player-transport {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.play-btn {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid rgb(213, 217, 220);
  background-color: transparent;
  color: rgb(213, 217, 220);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.playhead {
  flex-grow: 1;
  accent-color: rgb(213, 217, 220);
}

.time-display {
  flex-shrink: 0;
  font-size: small;
  font-variant-numeric: tabular-nums;
  color: #999;
}

.step-slider-wrap {
  width: 60%;
  margin: 0 auto;
}

.step-track {
  position: relative;
  display: flex;
  align-items: center;
}

.step-slider {
  width: 100%;
  margin: 0;
  position: relative;
  z-index: 2;
  accent-color: rgb(213, 217, 220);
}

.step-ticks {
  position: absolute;
  left: 0.15rem;
  right: 0.15rem;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 1;
}

.step-tick {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background-color: #666;
}

.step-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.3rem;
  font-style: italic;
  font-size: small;
  color: #999;
}

.heads-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  gap: clamp(0.5rem, 3vw, 2rem);
  padding: 1.5rem clamp(0.25rem, 2vw, 1.5rem) 2.2rem clamp(0.25rem, 2vw, 1.5rem);
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
  user-select: none;
}

.heads-wrap.dragging {
  cursor: grabbing;
}

.head-view {
  width: clamp(3rem, 16vw, 5.5rem);
  height: clamp(3rem, 16vw, 5.5rem);
  flex-shrink: 0;
  border: 1px solid #444;
  border-radius: 50%;
  background-color: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: grab;
  touch-action: none;
}

.head-view.dragging {
  cursor: grabbing;
}

.heads-wrap.tracking-active .head-view {
  cursor: default;
}

.camera-consent-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.75);
  padding: 1.5rem;
}

.camera-consent-modal[hidden] {
  display: none;
}

.camera-consent-box {
  max-width: 26rem;
  background-color: #1a1a1a;
  border: 1px solid #444;
  border-radius: 0.6rem;
  padding: 1.5rem;
  color: rgb(213, 217, 220);
  font-size: small;
  line-height: 1.5;
}

.camera-consent-actions {
  display: flex;
  gap: 0.8rem;
  justify-content: flex-end;
  margin-top: 1.2rem;
}

.camera-consent-btn {
  background: none;
  border: 1px solid rgb(213, 217, 220);
  color: rgb(213, 217, 220);
  font-style: italic;
  font-size: small;
  padding: 0.4rem 0.9rem;
  border-radius: 0.4rem;
  cursor: pointer;
}

.camera-consent-btn:hover {
  background-color: rgba(213, 217, 220, 0.1);
}

.head-top-shape,
.head-side-shape,
.head-front-shape {
  width: clamp(1.6rem, 9vw, 3rem);
  height: clamp(1.6rem, 9vw, 3rem);
  position: relative;
}

.head-top-shape::before {
  /* head seen from above */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgb(213, 217, 220);
}

.head-top-shape::after {
  /* nose, indicates yaw direction */
  content: "";
  position: absolute;
  top: -0.35rem;
  left: 50%;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 0.35rem solid transparent;
  border-right: 0.35rem solid transparent;
  border-bottom: 0.55rem solid rgb(213, 217, 220);
}

.head-side-shape {
  border-radius: 50% 50% 45% 45%;
  border: 2px solid rgb(213, 217, 220);
}

.head-side-shape::after {
  /* nose bump, indicates pitch direction */
  content: "";
  position: absolute;
  right: -0.3rem;
  top: 42%;
  width: 0.55rem;
  height: 0.55rem;
  background-color: rgb(213, 217, 220);
  border-radius: 30% 70% 70% 30%;
}

.head-front-shape {
  border-radius: 50%;
  border: 2px solid rgb(213, 217, 220);
}

.head-front-shape::after {
  /* tick mark at the top, indicates roll direction */
  content: "";
  position: absolute;
  top: -0.35rem;
  left: 50%;
  width: 0.15rem;
  height: 0.6rem;
  transform: translateX(-50%);
  background-color: rgb(213, 217, 220);
  border-radius: 0.1rem;
}

.head-label {
  position: absolute;
  bottom: -1.4rem;
  left: 0;
  right: 0;
  text-align: center;
  font-size: small;
  color: #777;
  font-style: italic;
}

.tracking-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 1rem;
  background-color: rgba(18, 18, 18, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  border-radius: 0.5rem;
}

.tracking-overlay.visible {
  opacity: 1;
}

.tracking-activate-btn {
  pointer-events: auto;
  background: none;
  border: 1px solid rgb(213, 217, 220);
  color: rgb(213, 217, 220);
  font-style: italic;
  font-size: small;
  padding: 0.3rem 0.6rem;
  border-radius: 0.4rem;
  cursor: pointer;
}

.tracking-activate-btn:hover:not(:disabled) {
  background-color: rgba(213, 217, 220, 0.1);
}

.tracking-activate-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.tracking-deactivate-btn {
  display: block;
  background: none;
  border: none;
  color: #777;
  font-style: italic;
  font-size: small;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  margin: -0.5rem 0 0.8rem 1.5rem;
}

.tracking-deactivate-btn[hidden] {
  display: none;
}
