/* 2048 Game Styles */

.game-container {
  padding: 2rem 1rem;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.game-title {
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1rem;
}

.game-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.game-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.new-game-btn {
  background: var(--primary);
  color: white;
}

.new-game-btn:hover {
  transform: translateY(-2px);
}

.score-info {
  display: flex;
  gap: 2rem;
  margin-bottom: 1rem;
  color: var(--text);
  font-weight: 600;
  justify-content: center;
}

.score-box {
  background: var(--card-bg);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--secondary);
}

.game-board {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin: 0 auto;
  max-width: 400px;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 8px;
}

.grid-cell {
  width: 80px;
  height: 80px;
  background: var(--card-bg);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  transition: all 0.2s ease;
  border: 1px solid var(--secondary);
}

.tile {
  position: absolute;
  width: 80px;
  height: 80px;
  background: var(--primary);
  color: white;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  transition: all 0.15s ease-in-out;
}

.tile-2 {
  background: #eee4da;
  color: #776e65;
}
.tile-4 {
  background: #ede0c8;
  color: #776e65;
}
.tile-8 {
  background: #f2b179;
  color: #f9f6f2;
}
.tile-16 {
  background: #f59563;
  color: #f9f6f2;
}
.tile-32 {
  background: #f67c5f;
  color: #f9f6f2;
}
.tile-64 {
  background: #f65e3b;
  color: #f9f6f2;
}
.tile-128 {
  background: #edcf72;
  color: #f9f6f2;
  font-size: 1.3rem;
}
.tile-256 {
  background: #edcc61;
  color: #f9f6f2;
  font-size: 1.3rem;
}
.tile-512 {
  background: #edc850;
  color: #f9f6f2;
  font-size: 1.3rem;
}
.tile-1024 {
  background: #edc53f;
  color: #f9f6f2;
  font-size: 1.1rem;
}
.tile-2048 {
  background: #edc22e;
  color: #f9f6f2;
  font-size: 1.1rem;
}

.game-message {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 1rem;
  padding: 1rem;
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.instructions {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 1rem;
  max-width: 400px;
  line-height: 1.5;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .game-container {
    padding: 1rem;
  }

  .game-title {
    font-size: 2rem;
  }

  .grid-cell,
  .tile {
    width: 60px;
    height: 60px;
    font-size: 1.2rem;
  }

  .tile-128,
  .tile-256,
  .tile-512 {
    font-size: 1rem;
  }

  .tile-1024,
  .tile-2048 {
    font-size: 0.9rem;
  }

  .score-info {
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
  }
}
