/* Game Navigation Tabs */
.game-tabs {
  margin: 20px 0;
}
.game-tab-btn {
  padding: 10px 20px;
  font-size: 1rem;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}
.game-tab-btn:not(.active) {
  opacity: 0.7;
}

/* 3D Racing Game Styles */
#racing-mobile-controls {
  display: none; /* Shown via JS on touch devices */
}

.mobile-btn {
  background: rgba(255,255,255,0.8);
  border: 2px solid #ccc;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  font-size: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #333;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.mobile-btn:active {
  background: #ccc;
  transform: scale(0.95);
}
.gas-btn {
  width: 80px;
  height: 80px;
  border-radius: 40px;
  background: rgba(226,27,34,0.9);
  color: white;
  border: 2px solid #fff;
  font-weight: bold;
}
.gas-btn:active {
  background: rgba(200,0,0,1);
}

/* Quiz Game Styles */
.quiz-option {
  padding: 12px 20px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: white;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
  text-align: left;
}
.quiz-option:hover {
  background: #f8f9fa;
  border-color: #999;
}
.quiz-option.correct {
  background: #2ecc71;
  color: white;
  border-color: #27ae60;
}
.quiz-option.wrong {
  background: #e74c3c;
  color: white;
  border-color: #c0392b;
}

/* Memory Match Styles */
.memory-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-width: 500px;
  margin: 0 auto;
}

.memory-card {
  aspect-ratio: 1;
  background: var(--primary-red);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2.5rem;
  color: white;
  transition: transform 0.3s, background 0.3s;
  transform-style: preserve-3d;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.memory-card.flipped {
  background: white;
  color: #333;
  transform: rotateY(180deg);
  border: 2px solid var(--border-color);
}

.memory-card.matched {
  background: #2ecc71;
  color: white;
  transform: rotateY(180deg) scale(0.95);
  pointer-events: none;
}

@media (max-width: 600px) {
  .memory-board {
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
  }
  .memory-card {
    font-size: 1.5rem;
  }
}


/* ========================================== */
/* 4. WORD SEARCH GAME STYLES                 */
/* ========================================== */
#ws-grid-container {
  display: grid;
  gap: 2px;
  grid-template-columns: repeat(12, 1fr);
  background: var(--border-color);
  border: 2px solid var(--border-color);
}
.ws-cell {
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--text-primary);
  cursor: pointer;
  user-select: none;
  transition: background 0.1s;
}
.ws-cell.selected {
  background: rgba(226, 27, 34, 0.4);
  color: white;
}
.ws-cell.found {
  background: #27ae60;
  color: white;
}
#ws-word-list li {
  margin-bottom: 5px;
  transition: all 0.3s;
}
#ws-word-list li.found-word {
  text-decoration: line-through;
  color: #27ae60;
  opacity: 0.6;
}
