h1 {
  margin: 40px auto 30px;
  font-weight: 700;
  font-size: 22px;
  color: #fff;
  text-align: center;
}

.container {
  background: #394555;
  padding: 25px;
  margin: 40px auto;
  border-radius: 10px;
  width: calc(100% - 30px);
  max-width: 560px;
  box-shadow: 0 0 15px rgba(0,0,0,.3);
  border: 1px solid #3a3a5e;
}

h2 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 24px;
}

p {
  line-height: 1.6;
}

.hidden {
  display: none;
}

.start-options {
  margin: 20px 0;
}

.start-options label {
  display: inline-block;
  margin-right: 10px;
  font-weight: bold;
  font-size: 15px;
}

select {
  padding: 10px;
  font-size: 16px;
  border: none;
  border-radius: 5px;
}

button {
  width: 100%;
  padding: 12px;
  font-size: 17px;
  border: none;
  border-radius: 5px;
  background-color: #4caf50;
  color: #fff;
  cursor: pointer;
  margin-top: 10px;
}

button:hover {
  background-color: #45a049;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.stat-item {
  background: #2d3a4a;
  padding: 10px;
  border-radius: 8px;
  text-align: center;
  font-size: 15px;
}

#targetDisplay {
  background: #2d3a4a;
  padding: 20px 10px;
  margin-bottom: 15px;
  border-radius: 10px;
  text-align: center;
}

#instruction {
  margin-bottom: 8px;
  font-size: 15px;
  color: #cbd5e1;
}

#targetColor {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: 2px;
}

#message {
  min-height: 28px;
  margin-bottom: 10px;
  font-weight: 700;
  text-align: center;
}

.msg-good {
  color: #2ecc71;
}

.msg-bad {
  color: #e74c3c;
}

#gameArea {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.color-button {
  margin-top: 0;
  padding: 18px 6px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.6);
  border-radius: 8px;
  transition: transform .15s ease, filter .15s ease;
}

.color-button:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

.color-button:active {
  transform: scale(.96);
}

.color-button.bg-red { background-color: #e74c3c; }
.color-button.bg-blue { background-color: #3498db; }
.color-button.bg-green { background-color: #2ecc71; color: #1e252e; text-shadow: none; }
.color-button.bg-yellow { background-color: #f1c40f; color: #1e252e; text-shadow: none; }
.color-button.bg-purple { background-color: #9b59b6; }
.color-button.bg-orange { background-color: #e67e22; }
.color-button.bg-pink { background-color: #ff69b4; color: #1e252e; text-shadow: none; }
.color-button.bg-cyan { background-color: #00bcd4; color: #1e252e; text-shadow: none; }

.txt-red { color: #e74c3c; }
.txt-blue { color: #3498db; }
.txt-green { color: #2ecc71; }
.txt-yellow { color: #f1c40f; }
.txt-purple { color: #9b59b6; }
.txt-orange { color: #e67e22; }
.txt-pink { color: #ff69b4; }
.txt-cyan { color: #00bcd4; }

.end-row {
  margin-top: 20px;
  text-align: center;
}

@media (max-width: 599px) {
  #gameArea {
    grid-template-columns: repeat(2, 1fr);
  }

  #targetColor {
    font-size: 36px;
  }
}
