body {
  font-family: 'Segoe UI', sans-serif;
  text-align: center;
  background: linear-gradient(to right, #dfefff, #eef7ff);
  margin: 0;
  padding: 1em;
  color: #333;
}

.top-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 1em;
  flex-wrap: wrap;
}

#player-name, select, button {
  padding: 8px 12px;
  font-size: 1em;
  border: 2px solid #4a90e2;
  border-radius: 8px;
  background: #fff;
  transition: all 0.3s ease;
}

#player-name:focus, select:focus, button:hover {
  outline: none;
  border-color: #007aff;
  background: #eaf4ff;
}

.stats {
  margin-bottom: 1em;
  font-size: 1.1em;
}

.board {
  display: grid;
  grid-template-columns: repeat(4, 90px);
  gap: 12px;
  justify-content: center;
  margin-bottom: 1em;
}

.card {
  width: 90px;
  height: 90px;
  perspective: 600px;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.5s;
  cursor: pointer;
}

.card.flipped .card-inner {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  line-height: 90px;
  font-size: 2rem;
  border-radius: 12px;
  backface-visibility: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.card-front {
  background: #ffffff;
  border: 2px solid #ddd;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.card-back {
  background: linear-gradient(145deg, #36d1dc, #5b86e5);
  color: #fff;
  transform: rotateY(180deg);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

table {
  margin: 0 auto;
  border-collapse: collapse;
  width: 340px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

th {
  background-color: #007aff;
  color: white;
  padding: 10px;
}

td {
  padding: 8px;
  border-top: 1px solid #eee;
}

tbody tr:nth-child(even) {
  background-color: #f7faff;
}
