body {
  font-family: sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
  background-color: black;
}

input[type="text"] {
  padding: 10px;
  font-size: 1.2em;
  border: 1px solid #ccc;
  border-radius: 5px;
  width: 300px;
  margin-bottom: 20px;
}

input[type="file"] {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 10px;
  margin-left: 163px;
}

p {
  font-size: 1.1em;
  color: #333;
}

#combo {
  background: linear-gradient(
    to right,
    red,
    orange,
    yellow,
    green,
    skyblue,
    violet
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  opacity: 0;
  font-size: 3em;
}

#diffButton,
#startButton,
#instructButton {
  width: 20vw; /* 20% of window width */
  height: 8vh; /* 8% of window height */
  font-size: 2.5vh; /* text scales with window height */
  border-radius: 10px;
  border: none;
  cursor: pointer;
  margin: 10px;
  color: white;
  font-weight: bold;
  transition: transform 0.3s ease; /* 0.3 seconds for the animation */
}

#diffButton:hover,
#startButton:hover,
#instructButton:hover {
  transform: scale(1.05);
}

#diffButton {
  background-color: green; /* default "Easy" */
}

#startButton,
#instructButton {
  background-color: #007bff; /* blue */
}

#description-box {
  margin-top: 30px;
  padding: 15px 20px;
  border: 2px solid #333;
  border-radius: 10px;
  background: #f9f9f9;
  min-width: 300px;
  text-align: center;
  font-size: 29px;
  font-weight: bold;
  visibility: hidden;
  white-space: pre-line;
}

#info {
  font-family: sans-serif;
  position: fixed;
  top: 0px;
  right: 25px;
  color: white;
  font-size: 1.5em;
  white-space: pre-wrap;
}

#myOutput {
  font-weight: bold;
  color: #007bff;
  white-space: pre-wrap;
  text-align: center;
  font-size: 2.5em;
}

#score {
  font-family: sans-serif;
  color: white;
  font-size: 1.5em;
  white-space: pre-wrap;
  position: fixed;
  top: 0px;
  left: 25px;
}

#timer {
  color: white;
}

.correct {
  color: #39ff14;
}

.crossed-out {
  text-decoration: line-through;
  color: red;
}

.fadeInOut {
  animation-name: fadeInOut;
  animation-duration: 0.75s;
  animation-timing-function: ease-in-out;
  animation-fill-mode: forwards;
}

.image-container {
  margin-top: -125px;
  display: flex;
  flex-direction: row; /* makes them appear in one line */
  gap: 16px; /* spacing between items */
  flex-wrap: nowrap; /* prevents wrapping to a new line */
  overflow-x: auto; /* lets you scroll horizontally if too many images */
}

.image-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.image-media {
  position: relative;
  aspect-ratio: 74 / 45;
  overflow: hidden;
  border-radius: 8px;
}

.image-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.image-media img:hover {
  transform: scale(1.05);
}

/* Simple viewport/container-based scaling (works everywhere) */
.image-text {
  margin-top: 8px;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: white;
  text-align: center;
  white-space: pre-wrap;

  /* Scales with window: min 0.9rem, preferred ~1vw+0.4rem, max 1.25rem */
  font-size: clamp(0.9rem, 1vw + 0.4rem, 1.25rem);
}

.name-banner img {
  max-width: 100%;
  height: auto;
  display: flex;
  flex-direction: column;
  margin-top: 25px;
}

.leftover {
  color: #007bff;
}

.shake-infinite {
  animation-name: shake;
  animation-duration: 1s;
  animation-iteration-count: infinite;
}

.shake {
  animation-name: shake;
  animation-duration: 1s;
}

@keyframes shake {
  0%,
  100% {
    transform: translateY(0px);
  }
  20%,
  60% {
    transform: translateY(-3px);
  }
  40%,
  80% {
    transform: translateY(3px);
  }
}

@keyframes fadeInOut {
  0% {
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.results-container {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  max-width: 700px;
  width: 100%;
}

h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #333;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead tr {
  background: #007bff;
  color: white;
  text-align: left;
}

th,
td {
  padding: 12px 15px;
  border-bottom: 1px solid #ddd;
  font-family: sans-serif;
  font-size: 1em;
  text-align: center;
}

#resultsTable tbody {
  font-family: sans-serif;
  font-size: 1.2em;
  text-align: center;
}

.continue-text {
  text-align: center;
  font-weight: bold;
  color: #333;
}
