* {
  padding: 0px;
  margin: 0px;
  box-sizing: border-box;
  font-family: monospace;
}
.mid{
  font-family: Arial, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #071024;
  color: #fff;
  margin: 0;
}
.game-container {
  text-align: center;
}
h1 {
  margin-bottom: 10px;
}
.controls {
  margin-bottom: 15px;
}
button {
  background: #0b1220;
  color: #e6eef8;
  border: 1px solid rgba(255,255,255,0.1);
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  margin: 0 5px;
}
button:hover {
  background: #06b6d4;
  color: #000;
 }
.status {
  margin-bottom: 15px;
}
.board {
  display: grid;
  grid-template-columns: repeat(4, 80px);
  gap: 10px;
  justify-content: center;
}
.tile {
  width: 80px;
  height: 80px;
  background: #0b1220;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 32px;
  cursor: pointer;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.4s;
}
.tile.flipped {
    transform: rotateY(180deg);
}
.tile .front, .tile .back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 8px;
}
.tile .front {
  background: #06b6d4;
  color: #000;
  transform: rotateY(180deg);
}
.tile .back {
  background: #0b1220;
  color: #e6eef8;
}
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: none;
  justify-content: center;
  align-items: center;
}
.modal.show {
  display: flex;
}
.modal-content {
  background: #06121a;
  padding: 20px 30px;
  border-radius: 10px;
  text-align: center;
  color: #fff;
}