/* style.css */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh; /* Use min-height to ensure content isn't cut off */
  background: #f0f0f0;
  font-family: sans-serif;
  overflow: hidden; /* Prevent body scrolling */
  touch-action: manipulation; /* Prevent double-tap zoom on iOS */
}

#game-container {
  width: 100vw;
  height: 100%; /* Changed from 100vh */
  max-width: 480px; /* Limit width on larger screens */
  background: #fff;
  border: 2px solid #333;
  border-radius: 0;
  overflow: hidden;
  position: relative;
  display: flex; /* Use flexbox for the container */
  flex-direction: column; /* Stack header and main area vertically */
}

#main-area {
  display: flex;
  flex-grow: 1; /* Allow main area to take up remaining space */
}

#game-board {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(12, 1fr);
  gap: 2px;
  background: #222;
  padding: 2px;
  width: 75vw;
  height: 100%; /* Added height: 100% */
}

.cell {
  background: #444;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  color: #fff;
}

#side-panel {
  padding: 8px;
  width: 25vw;
}

#score-area {
  margin-bottom: 16px;
  font-size: 1.2rem;
  text-align: center;
}

#next-emoji-area {
  margin-bottom: 16px;
}

#next-emoji {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
}

#game-over-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#retry-button {
  margin-top: 12px;
  padding: 8px 16px;
  font-size: 1rem;
  cursor: pointer;
}
