/* Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Noto Sans TC", sans-serif;
  background-color: #fffbe6;
  color: #333;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
}

/* Intro Overlay */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(250, 250, 250, 0.95);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.overlay input {
  margin-top: 1rem;
  padding: 0.6rem 1rem;
  font-size: 1.1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.overlay button {
  margin-top: 1rem;
  padding: 0.6rem 1.2rem;
  background-color: #8bc34a;
  border: none;
  color: white;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
}

/* Status Panel */
.status-panel {
  margin-bottom: 1rem;
  background: #f5f5f5;
  padding: 1rem;
  border-radius: 10px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  text-align: center;
  font-size: 1.1rem;
}

.status-panel div {
  margin: 0.3rem 0;
}

/* Game Board */
.game-board {
  display: grid;
  grid-template-columns: repeat(4, 80px);
  grid-gap: 15px;
  justify-content: center;
  margin-top: 1rem;
}

.tile {
  width: 80px;
  height: 80px;
  background-color: #ffe082;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.3s;
  user-select: none;
}

.tile:hover {
  transform: scale(1.05);
}

.tile.matched {
  background-color: #a5d6a7;
  pointer-events: none;
}
