/* style.css */

:root {
  --card-size: 140px;
  --emoji-size: 64px;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: sans-serif;
  margin: 20px;
}
h1 {
  margin-bottom: 10px;
}

/* Restart button now sits on its own line under the title */
button#restart {
  margin-bottom: 20px;
  padding: 6px 12px;
  font-size: 14px;
  cursor: pointer;
}

#controls {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}
#moves {
  font-weight: bold;
}
label {
  font-weight: bold;
}

/* Make the dropdown larger and easier to click */
#card-count {
  width: 80px;
  padding: 4px;
  font-size: 16px;
}

.board {
  display: grid;
  grid-gap: 10px;
  perspective: 1000px;
}

.card {
  width: var(--card-size);
  height: var(--card-size);
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s;
  cursor: pointer;
}
.card.flipped {
  transform: rotateY(180deg);
}
.card.matched {
  cursor: default;
}

.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: var(--emoji-size);
  backface-visibility: hidden;
}

.back {
  background: #444;
  color: transparent;
}

.front {
  background: #eee;
  color: #000;
  transform: rotateY(180deg);
}

/* Bling animation */
@keyframes bling {
  0%   { transform: scale(1); box-shadow: 0 0   0 gold; }
  50%  { transform: scale(1.2); box-shadow: 0 0  12px gold; }
  100% { transform: scale(1); box-shadow: 0 0   0 gold; }
}
.bling {
  animation: bling 0.6s ease-out;
}

/* Win message */
#message {
  margin-top: 20px;
  font-size: 1.2em;
  font-weight: bold;
  color: #088;
}
