/************************** CONTROLS *************************/

#controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  height: 100vh;
  padding: 3% 2% 3% 0;
}

/************* SCORE *************/

#score {
  margin-bottom: 1em;
  margin-top: 1em;
}

#score-title {
  color: #ffffff;
  text-align: center;
  font-size: 2vw;
  letter-spacing: 0.03em;
  line-height: 1em;
}

#score-title > span:first-child {
  font-size: 2.2em;
  margin-bottom: 0.2em;
  display: inline-block;
}

#score-title > span span {
  font-size: 0.7em;
  vertical-align: -0.2em;
}

#score-value {
  font-size: 3.5vw;
  font-weight: normal;
  color: #fff;
  text-align: center;
  margin-top: 0.6vw;
}

/************* FOOD *************/
#food {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  background-image: url(../img/plate.png);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  padding: 11%;
  position: relative;
}

#plate {
  position: relative;
  width: 80%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
}

#circle {
  position: absolute;
  top: 12%;
  left: 12%;
  width: 76%;
  height: 76%;
  border-radius: 50%;
  --color: rgba(255, 98, 59, 0.75);
  /* Initiale Farbe Rot */
  background: conic-gradient(
    var(--color) 0deg,
    var(--color) calc(var(--percentage) * 1deg),
    transparent calc(var(--percentage) * 1deg)
  );
}

#circle::before {
  content: "";
  position: absolute;
  top: 20%;
  left: 20%;
  width: 60%;
  height: 60%;
  border-radius: 50%;
}

#inner-circle {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url(../img/plate-inner.png);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* Pulsation Animation für kritische Food-Anzeige */
@keyframes food-pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* Klasse für kritische Food-Anzeige */
#food.critical {
  animation: food-pulse 1s ease-in-out infinite;
}

/* Sanftere Pulsation für den inneren Kreis 
#food.critical #circle {
  animation: food-pulse 2s ease-in-out infinite;
}*/

/************* CO2 *************/

#co2-scale {
  flex-grow: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  flex-direction: column;
}

#scale-container {
  position: relative;
  width: 50%;
  background-color: white;
  border-radius: 1.5vw;
  padding: 0.6vw;
  box-sizing: border-box;
  flex-grow: 1;
}

/* Innerer Skalen-Container */
#scale-inner {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: #d0dcca;
  /* Hintergrund der Skala */
  border-radius: 1.2vw;
  /* Leicht kleinerer Radius für den inneren Container */
  overflow: hidden;
  /* Verhindert, dass der Balken überläuft */
}

/* Skalen-Balken */
#scale-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--percentage, 0%);
  background-color: var(--color, rgb(255, 99, 59));
  /* Startfarbe Rot */
  border-radius: 1.2vw 1.2vw 0 0;
  /* Abgerundete obere Ecken */
}

/************************* TIMER **********************************/

div#info {
  position: absolute;
  top: 0;
  margin-top: 3%;
  left: 3%;
  z-index: 100;
  display: flex;
  padding-bottom: 5vw; /* Erweitert den Cursor-Bereich nach unten */
  cursor: auto; /* Stellt sicher, dass der Standard-Cursor angezeigt wird */
}

#timer {
  cursor: pointer;
  margin-top: 0.3vw;
  width: 10vw;
  height: 10vw;
  background-image: url(../img/watch.png);
  background-size: contain;
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
  transition: box-shadow 0.2s, transform 0.12s cubic-bezier(0.4, 0, 0.2, 1);
}

#timer.timer-tick {
  animation: timer-tick-scale-soft 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

#timer.timer-tick-urgent {
  animation: timer-tick-scale-urgent 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

#timer-title {
  color: #fff;
  text-align: center;
  letter-spacing: 0.05em;
  font-size: 30px;
}

#timer-container {
  width: 100%;
  height: 100%;
  position: relative;
}

#timer-circle {
  position: absolute;
  top: 20.4%;
  left: 14.8%;
  width: 70%;
  height: 70%;
  border-radius: 50%;
  --color: var(--game-color-dark);
  background: conic-gradient(
    transparent calc(var(--percentage) * 1deg),
    var(--color) calc(var(--percentage) * 1deg) 360deg
  );

  /* Start bei 12 Uhr */
  transition: background 0.3s, box-shadow 0.2s,
    transform 0.12s cubic-bezier(0.4, 0, 0.2, 1);
}

#timer-circle.timer-tick {
  animation: timer-tick-scale 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes timer-tick-scale-soft {
  0% {
    transform: scale(1);
  }
  20% {
    transform: scale(1.025);
  }
  40% {
    transform: scale(1);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes timer-tick-scale-urgent {
  0% {
    transform: scale(1);
  }
  30% {
    transform: scale(1.13);
  }
  60% {
    transform: scale(0.97);
  }
  100% {
    transform: scale(1);
  }
}

#timer-center {
  background-image: url(../img/watch-center.png);
  background-size: contain;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.player-img-container {
  position: relative;
  background-color: var(--base-color);
  width: 10vw;
  height: 10vw;
  border-radius: 1.2vw;
  background-color: #fff;
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
  z-index: 100;
}
.player-img-bg {
  position: absolute;
  top: 5%;
  left: 5%;
  width: 90%;
  height: 90%;
  border-radius: 1vw;
  background-color: var(--game-color);
}

.player-img {
  position: absolute;
  width: 100%;
  height: 120%;
  bottom: 5%;
  left: 0;
  background-image: url("../img/avatar/fox.png");
  background-size: 100%;
  background-repeat: no-repeat;
  background-position: center;
}

/******************** SKILLS-INFO **************************/

#skills-info {
  /*display: flex;*/
  display: none;
}

#info .skill-img {
  height: 2vw;
  filter: brightness(1.2) grayscale(0.5);
}

#skills-info .skill {
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 0.6vw;
  margin-right: 0.5vw;
  margin-top: 0.5vw;
  padding: 0.3vw 0.7vw;
}

#skills-info .star {
  width: 18px;
  height: 18px;
}

#info #displays {
  flex-grow: 1;
  margin-left: 3%;
}
