html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}
body {
  background: #faf8ef;
  font-family: 'Clear Sans', 'Arial', sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}
#game-container {
  background: #fff;
  color: #111;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border-radius: 16px;
  min-width: 100vw;
  min-height: 100vh;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}
#game-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1em;
  gap: 0.5em;
}
#game-header h1 {
  margin-bottom: 0.5em;
  align-self: center;
}
#game-controls {
  display: flex;
  flex-direction: row;
  gap: 1em;
  justify-content: center;
  align-items: center;
  width: 100%;
}
#score {
  background: #eee4da;
  padding: 0.5em 1em;
  border-radius: 5px;
  font-weight: bold;
}
#restart-btn {
  background: #8f7a66;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 0.5em 1em;
  cursor: pointer;
  font-size: 1em;
}
#grid {
  position: relative;
  width: 240px;
  height: 240px;
  background: #bbada0;
  border-radius: 10px;
  margin: 0 auto 32px auto;
}
.grid-cell {
  position: absolute;
  width: 60px;
  height: 60px;
  background: #cdc1b4;
  border-radius: 5px;
  left: 0;
  top: 0;
  z-index: 0;
  box-sizing: border-box;
}
.tile {
  position: absolute;
  width: 60px;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5em;
  font-weight: bold;
  border-radius: 5px;
  transition: transform 0.28s cubic-bezier(0.4, 0.0, 0.2, 1), background 0.2s, color 0.2s;
  will-change: transform;
  z-index: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.tile-2 { background: #eee4da; color: #776e65; }
.tile-4 { background: #ede0c8; color: #776e65; }
.tile-8 { background: #f2b179; color: #f9f6f2; }
.tile-16 { background: #f59563; color: #f9f6f2; }
.tile-32 { background: #f67c5f; color: #f9f6f2; }
.tile-64 { background: #f65e3b; color: #f9f6f2; }
.tile-128 { background: #edcf72; color: #f9f6f2; }
.tile-256 { background: #edcc61; color: #f9f6f2; }
.tile-512 { background: #edc850; color: #f9f6f2; }
.tile-1024 { background: #edc53f; color: #f9f6f2; }
.tile-2048 { background: #edc22e; color: #f9f6f2; }
#game-over-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 2em;
  font-weight: bold;
  z-index: 10;
  cursor: pointer;
}
#game-over-overlay button {
  margin-top: 1em;
  font-size: 1em;
  padding: 0.5em 1.5em;
  border-radius: 5px;
  border: none;
  background: #8f7a66;
  color: #fff;
  cursor: pointer;
} 