/* tournament.css */
#tournamentView {
  max-width: 1000px;
  margin: 20px auto;
  padding: 20px;
  background-color: rgba(20, 20, 30, 0.8);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
  color: #eee;
  /* Ensure it's above the main container's shimmer if needed */
  position: relative; 
  z-index: 5; 
}

#tournamentView h2 {
  color: #fff;
  margin-bottom: 15px;
  font-size: 2em;
  background: linear-gradient(45deg, #ff00ff, #00ffff, #ff00ff);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rainbow-text 4s linear infinite; /* Reuse existing animation */
}

#tournamentStatus {
  font-size: 1.1em;
  margin-bottom: 20px;
  min-height: 1.5em; /* Prevent layout shifts */
  color: #ddd;
  font-weight: 500;
}

#matchupContainer {
  display: flex;
  justify-content: space-around;
  align-items: flex-start; /* Align items to the top */
  gap: 20px;
  margin-bottom: 30px;
}

.competitor {
  flex: 1;
  max-width: 45%;
  background-color: rgba(0, 0, 0, 0.3);
  padding: 15px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.competitor img {
  width: 100%;
  max-width: 350px; /* Limit image size */
  height: auto;
  aspect-ratio: 1 / 1; /* Ensure square images */
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 15px;
  background-color: #222; /* Placeholder background */
  border: 2px solid #444;
  transition: border-color 0.3s, opacity 0.5s;
  opacity: 0.5; /* Start semi-transparent */
}

.competitor img[src]:not([src='']) { /* Style when image is loaded */
  opacity: 1;
  border-color: #888;
}

.competitor img[alt='Generating...'] {
  min-height: 200px; /* Placeholder height */
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 1.2em;
}