body {
  font-family: Arial, sans-serif;
  display: flex;
  justify-content: center;
  background-color: #f4f4f4;
}

.game-container {
  text-align: center;
  width: 95%;
  max-width: 1400px;
  margin-left: auto;
}

.game-content {
  display: flex;
}

.game-content h1 {
  text-align: center;  
  padding-left: 0;  
  margin-bottom: 20px;
}

.side-panels {
  display: flex;
  flex-direction: column;
  width: 200px;
  margin-right: 20px;
}

.panel {
  background-color: #D2191D;  
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-bottom: 15px;
}

.leaderboard .panel {
  background-color: #D2191D;  
}

.panel h2 {
  background-color: #FF0000;  
  color: white;
  padding: 10px;
  margin: 0;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  font-size: 16px;
}

.panel-content {
  padding: 10px;
  min-height: 150px;
  background-color: white;
}

.game-area {
  flex-grow: 1;
}

.button-container {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.button-container button {
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  background-color: #D2191D;
  color: white;
  border: none;
  border-radius: 5px;
}

button {
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  background-color: #D2191D;
  color: white;
  border: none;
  border-radius: 5px;
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(100px, 1fr)); 
  grid-template-areas: 
    ". . . . . . ."
    ". . . . . . ."
    ". . . . . . .";
  gap: 10px;  
  justify-content: center;
}

.tile {
  perspective: 1000px;
  width: 100px;  
  height: 133px; 
}

.tile-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s;
  transform-style: preserve-3d;
  cursor: pointer;
}

.tile.flipped .tile-inner {
  transform: rotateY(180deg);
}

.tile-front, .tile-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 6px;
  border: 1px solid #333;  
  font-size: 20px;  
}

.tile-front {
  background-color: #3498db;
  color: white;
  font-weight: bold;
}

.tile-back {
  background-color: #2ecc71;
  transform: rotateY(180deg);
  font-weight: bold;
}

/* Specific grid positioning for TX and OK tiles */
#tile-grid .tile[data-state="OK"] {
  grid-row: 1;
  grid-column: 4;
}

#tile-grid .tile[data-state="TX"] {
  grid-row: 2;
  grid-column: 4;
}

.tile.highlight {
  animation: highlight 0.6s ease-in-out;
}

@keyframes highlight {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(255, 215, 0, 0);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.7);
  }
}