/* General Body & Layout */
body {
  margin: 0;
  padding: 0;
  background-color: #222;
  font-family: 'Press Start 2P', cursive;
  color: #fff;
}

.menu-screen {
  text-align: center;
  width: 100vw;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

/* Use !important to ensure hidden screens remain hidden */
.hidden {
  display: none !important;
}

/* Buttons */
button {
  background-color: #111;
  border: 4px solid #fff;
  padding: 10px 20px;
  font-family: 'Press Start 2P', cursive;
  font-size: 1em;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s;
  margin: 10px;
}

button:hover {
  background-color: #333;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Global Sound Controls (Fixed at top-right) */
#global-sound-controls {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
}

#global-sound-controls img {
  width: 30px;
  height: 30px;
}

input[type="range"] {
  width: 150px;
  -webkit-appearance: none;
  background: #444;
  height: 6px;
  border-radius: 5px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: #fff;
  border: 4px solid #111;
  cursor: pointer;
}

/* Character Box & Stats */
.character-box {
  border: 4px solid #fff;
  padding: 20px;
  margin: 20px auto;
  width: 80%;
  max-width: 600px;
  transition: transform 0.3s ease-in-out;
  box-sizing: border-box;
  overflow: hidden;
}

.character-box:hover {
  transform: scale(1.05);
}

.character-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.character-avatar {
  width: 150px;
  border: 4px solid #fff;
  image-rendering: pixelated;
  margin-right: 20px;
}

.character-details {
  text-align: left;
}

.character-details h2 {
  margin: 0 0 10px;
  font-size: 1.5em;
}

.character-details p {
  margin: 0;
  font-size: 1em;
}

.stats {
  margin-top: 20px;
  border-top: 4px solid #fff;
  padding-top: 20px;
  text-align: left;
}

.ability-description {
  color: #aaa;
  font-size: 0.9em;
  margin-top: 5px;
}

/* Fade Animations */
.fade-in {
  animation: fadeIn 0.5s forwards;
}

.fade-out {
  animation: fadeOut 0.5s forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* Flip Animation for Character Image */
.flip {
  animation: flipAnimation 0.5s ease-in-out;
}

@keyframes flipAnimation {
  0% { transform: rotateY(0deg); }
  50% { transform: rotateY(90deg); }
  100% { transform: rotateY(0deg); }
}

/* Level Select Screen Styles */
#level-select {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  height: 100vh;
}

#level-select h1 {
  margin-top: 10%;
  padding-bottom: 10px;
}

/* Player Info Button styling in Level Select */
#player-info-button {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: #111;
  border: 4px solid #fff;
  padding: 10px 20px;
  font-family: 'Press Start 2P', cursive;
  font-size: 1em;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-bottom: 20px;
}

#player-info-button:hover {
  background-color: #333;
}

.player-info-icon {
  width: 30px;
  height: 30px;
  image-rendering: pixelated;
}

/* Timeline Container */
.timeline-container {
  margin-top: 20%; /* Increased margin to separate timeline from the button */
}

.timeline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 18px;
  position: relative;
}

.timeline-item {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.level-label {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(0%) rotate(-30deg);
  transform-origin: left;
  font-size: 16px;
  white-space: nowrap;
  padding: 5px;
}

/* Dot Colors: All timeline items are light gray except Level 9 */
.timeline-item circle {
  fill: #aaa;
}

.timeline-item[data-level="level9"] circle {
  fill: purple;
}

/* Dashes Between Dots */
.timeline-gap {
  flex-shrink: 0;
  font-size: 18px;
  margin: 0;
  padding: 0;
}

/* Dedicated Arrow Container (for positioning) */
#timeline-arrow {
  position: absolute;
  bottom: -50px;
  transition: left 0.5s ease;
}

/* Inner Arrow Image with Pulsating Up/Down Animation */
.arrow-img {
  width: 48px;
  height: 48px;
  animation: pulsate 2s infinite ease;
}

@keyframes pulsate {
  0% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}

/* Level Content Styles (used for both level screens and player info) */
.level-content {
  padding: 20px;
}

.level-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  margin-bottom: 20px;
}

.level-header h1 {
  margin: 0;
  font-size: 1.5em;
}

.level-image {
  width: 130px;
}
#player-info .level-headerCharacter {
  /* Remove the fixed width: 130px; */
  width: 100% !important;
  display: flex;
  justify-content: center;
  margin-bottom: 20px;  /* add some spacing if you like */
}

/* If you still want the image to be 130px wide, set that on the image instead */
#player-info .level-headerCharacter img {
  width: 300px!important;
  image-rendering: pixelated;
}

/* Increase player info image size */
#player-info .player-info-big {
  width: 150px;
  image-rendering: pixelated;
justify-content: center;
}

/* Level Text Boxes (Static) */
.level-box {
  border: 4px solid #fff;
  padding: 20px;
  margin: 20px auto;
  width: 80%;
  max-width: 600px;
  box-sizing: border-box;
}
.level-box a {
  color: purple
}

/* Remove hover scaling for character boxes in the Player Info screen */
#player-info .character-box:hover {
  transform: none;
}
