* {
  margin: 0;
  padding: 4px;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}
.game {
  display: grid;
  grid-template-columns: repeat(4, 80px);
  gap: 10px;
  justify-content: center;
}

.box {
  height: 80px;
  background: #152938;
  color: white;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

body {
  background: #152938;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

section {
  width: 100%;
  text-align: center;
}

h1 {
  color: white;
  font-size: 40px;
  margin-bottom: 40px;
}

.card {
  background: white;
  width: 100%;
  max-width: 420px;
  margin: auto;
  padding: 32px;
  border-radius: 16px;
}

h2 {
  text-align: left;
  color: #7191a5;
  font-size: 14px;
  margin: 20px 0 10px;
}

.row {
  display: flex;
  gap: 10px;
}

button {
  flex: 1;
  border: none;
  padding: 12px 0;
  border-radius: 26px;
  background: #bcced9;
  color: white;
  font-size: 16px;
  cursor: pointer;
}

button.active {
  background: #304859;
}

.start {
  width: 100%;
  margin-top: 30px;
  background-color: #fda214;
  font-size: 20px;
  padding: 14px 0;
}

.controls button {
  padding: 10px 20px;
  background: #c8a367;
}

.controls button:hover {
  background: #fda214;
  color: #152938;
}

.timer {
  font-weight: bold;
  font-size: 18px;
}

.scores {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.scores p {
  padding: 10px 14px;
  background: #304859;
  border-radius: 8px;
  font-size: 14px;
}

.scores .active-player {
  background: #fda214;
  color: #152938;
  font-weight: bold;
}

.game {
  display: grid;
  gap: 10px;
  justify-content: center;
  grid-template-columns: repeat(4, 1fr);
  max-width: 480px;
  margin: auto;
}

.box {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #304859;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 40px;
  transition: transform 0.4s, background 0.3s;
  transform: rotateY(0deg);
}

.box:hover {
  background: #3c5a6b;
}

.box.open,
.box.matched {
  background: #fda214;
}

.box.matched {
  cursor: default;
}

@media (max-width: 600px) {
  h1 {
    font-size: 36px;
  }

  .box {
    font-size: 28px;
  }

  .controls {
    flex-direction: column;
  }
}
