* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  width: 100%;
  font-family: 'Arial', sans-serif;
}

body {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.game-container {
  text-align: center;
  background: white;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 90%;
}

h1 {
  color: #333;
  margin-bottom: 20px;
  font-size: 2em;
}

.color-indicators {
  margin-bottom: 20px;
}

.color-row {
  display: flex;
  justify-content: space-between;
  max-width: 300px;
  margin: 0 auto;
}

.color-label {
  padding: 10px 20px;
  border-radius: 10px;
  color: white;
  font-weight: bold;
  font-size: 1.1em;
  min-width: 80px;
}

.color-label.blue {
  background-color: #4285f4;
}

.color-label.green {
  background-color: #34a853;
}

.color-label.red {
  background-color: #ea4335;
}

.game-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 5px;
  max-width: 300px;
  margin: 20px auto;
  background-color: #333;
  padding: 5px;
  border-radius: 10px;
}

.grid-cell {
  width: 90px;
  height: 90px;
  background-color: #f0f0f0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.grid-cell:hover {
  background-color: #e0e0e0;
}

.game-piece {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 0.9em;
  transition: all 0.3s ease;
  cursor: pointer;
}

.game-piece:hover {
  transform: scale(1.05);
}

.piece-blue {
  background-color: #4285f4;
}

.piece-green {
  background-color: #34a853;
}

.piece-red {
  background-color: #ea4335;
}

.empty {
  background-color: transparent;
}

.game-controls {
  margin: 20px 0;
}

.start-btn, .reset-btn {
  padding: 12px 24px;
  margin: 0 10px;
  border: none;
  border-radius: 25px;
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.start-btn {
  background-color: #4caf50;
  color: white;
}

.start-btn:hover {
  background-color: #45a049;
}

.start-btn:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

.reset-btn {
  background-color: #f44336;
  color: white;
}

.reset-btn:hover {
  background-color: #da190b;
}

.timer {
  font-size: 1.3em;
  font-weight: bold;
  margin: 15px 0;
  color: #333;
}

.win-message {
  background: linear-gradient(135deg, #4caf50, #81c784);
  color: white;
  padding: 20px;
  border-radius: 15px;
  margin-top: 20px;
  animation: slideIn 0.5s ease-out;
}

.win-message h2 {
  margin-bottom: 10px;
}

.hidden {
  display: none;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive design */
@media (max-width: 480px) {
  .game-container {
    padding: 20px;
    width: 95%;
  }
  
  .grid-cell {
    width: 70px;
    height: 70px;
  }
  
  .game-piece {
    width: 55px;
    height: 55px;
    font-size: 0.8em;
  }
  
  .color-label {
    padding: 8px 15px;
    font-size: 1em;
    min-width: 60px;
  }
}