body { 
  font-family: Arial, sans-serif; 
  padding: 5px; 
  background: linear-gradient(
    180deg,
    #f7f9fb 0%,
    #eef2f7 100%
  );
  min-height: calc(100vh - 40px);
}

.infoWrapper {
  position: relative;
  display: inline-block;
  margin-left: 6px;
}

.infoIcon {
  display: inline-block;
  margin-left: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ccc;
  color: #000;
  font-size: 12px;
  text-align: center;
  cursor: help;
}

.tooltipText {
  display: none;
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background: #111;
  color: white;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 10;
}

.infoWrapper:hover .tooltipText {
  display: block;
}

.player {
  margin: 10px 0;
  width: 100%;
  max-width: 320px;
  max-height: 180px;
  aspect-ratio: 16 / 9;
}

.descriptionText{
  text-align: left;

}

.ValenceContainer,
.ArousalContainer,
.LikeContainer,
.FamiliarityContainer,
.sliderContainer{
  position: relative;
  width: 90%;
  height: 15px;
  margin: 20px auto;
  background: #ddd; 
  border-radius: 10px;
}

.playerSection{
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}

.progressBar{
  position: absolute;
  width: 6px;
  height: 18px;
  background: rgba(31, 31, 31, 0.932);
  border-radius: 3px;
  top: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 5;
}

.slider{
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  margin: 0;
  touch-action: none;
}

.startHandle, .endHandle {
  z-index: 3;
  position: absolute;
  touch-action: none;
}

.selectedWindow {
  position: absolute;
  height: 100%;
  background: #858585ed;
  cursor: pointer;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  touch-action: none;
}

.handle {
  position: absolute;
  width: 12px;
  height: 18px;
  background: #858585ed;
  border-radius: 3px;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  touch-action: none;
}

.emotionHandle{
  position: absolute;
  width: 12px;
  height: 18px;
  background: #000000ed;;
  border-radius: 3px;
  top: -2px;
  cursor: pointer;
  pointer-events: none;
  transform: translateX(-50%);
}

form { 
  margin-top: 20px; 
}

.selectBtn{
  text-align: left;
}

.timeRating,
.knowledgeRating,
.emotionalRating,
.emotionalRating input,
.timeRating input {
  width: 100%;
  text-align: center;
}

.rangeDisplay {
  text-align: center;
  margin-top: 10px;
}

.scaleLabels {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin: 10px 0 0 0;
  width: 90%;
  justify-self: center;
}

.scaleLabels span:first-child {
  justify-self: start;
}

.scaleLabels span:nth-child(2) {
  justify-self: center;
}

.scaleLabels span:last-child {
  justify-self: end;
}

.memory{
  display: flex;
  justify-content: space-around;
}

input[type="radio"] {
  accent-color: #111;
}

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

.EmotionTitle{
  display: flex;
  justify-content: center;
}

.scaleLabels span {
  text-align: center;
}

.scaleLabels span:nth-child(2) {
  opacity: 0.7;
}

.valueDisplay {
  font-size: 14px;
  margin-top: 5px;
  margin-left: 8px;
  margin-right: 8px;
}

.radioSelect {
  margin-top: 10px;
  margin-bottom: 10px;
}

.emotionSlider {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  margin: 0;
}

.emotionSlider::-webkit-slider-runnable-track {
  height: 0;
  background: transparent;
}

.emotionSlider::-moz-range-track {
  height: 0;
  background: transparent;
}

.emotionSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: black;
  cursor: pointer;
  margin-top: -7px;
}

.emotionSlider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: black;
  cursor: pointer;
}
.selectBtn{
  display: block;
  margin: 10px 0 0 0;
}

.changeBtn{
  margin: 10px;
  left: calc(50% + 170px);
}

.songTrouble {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.nextBtn{
  display: block;
  margin-left: auto;
  margin-right: 0;
}

.task{
  text-align: left;
}

button {
  display: block;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 500;
  border: none;
  border-radius: 8px;
  background: #111;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

button:hover {
  background: #333;
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
  background: #000;
}


button:disabled {
  background: #5e5e5e;
  color: #bdbdbd;
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

.loading.nextBtn:disabled,
.loading:disabled {
  background: #5e5e5e;
  color: #bdbdbd;
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

button:disabled:hover,
button:disabled:active {
  background: #5e5e5e;
  transform: none;
}

.center-block {
  width: 80%;
  margin: 20px auto;
  padding: 25px;
  background: #f1f3f5;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

#instructions, #song {
  transition: opacity 0.3s ease;
}

html {
  scroll-behavior: smooth;
}

.section {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

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

#startBtn,
#restartBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin:  20px auto
}

.spinner {
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top: 3px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  visibility: hidden;
}

.radioRating {
    display: flex;
    gap: 20px;
    margin: 8px;
    justify-content: space-evenly;
}

#startBtn.loading .spinner,
.nextBtn.loading .spinner {
  visibility: visible;
}

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

.btn-wrapper {
  text-align: center;
  margin: 20px 0;
}

input[type="range"] {
  position: relative;
  z-index: 2;
  width: 100%;
}

.valence,
.arousal {
  margin-top: 20px;
}

.values{
  display: flex;
  justify-content: center;
}

.lang-menu.hidden {
  display: none;
}

.lang-switcher {
  position: relative;
  display: inline-block;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.lang-btn span:last-child {
  transition: transform 0.2s ease;
}

.lang-btn.open span:last-child {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  top: 110%;
  left: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  padding: 6px;
  z-index: 100;
  opacity: 0;
  transform: translateY(-5px);
  pointer-events: none;
  transition: all 0.15s ease;
  backdrop-filter: blur(6px);
  width: 100%;
  box-sizing: border-box;
}

.lang-menu:not(.hidden) {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.lang-menu button {
  width: 100%;
  background: transparent;
  color: #111;
  border-radius: 6px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  transition: background 0.15s ease;
}

.lang-menu button:hover {
  background: #f3f3f3;
}

.lang-menu button.active {
  background: #111;
  color: white;
  cursor: default;
}

.lang-menu button:not(:last-child) {
  border-bottom: 1px solid #eee;
}

.flag {
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(231, 76, 60, 0.95);
  color: white;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-family: sans-serif;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 9999;
  transform: translateX(-50%) translateY(10px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}


.helper-text {
  font-size: 0.9em;
  color: #4b4b4b;
}