/* 🌟 Base Styles */
body {
  font-family: Arial, "Comic Sans MS", "Trebuchet MS", sans-serif;
  background: #fff;
  color: #333;
  text-align: center;
  margin: 0;
  padding: 0;
}

/* 🧩 Game Container */
#game-container {
  position: relative;
  display: inline-block;
  margin-top: 10px;
  max-width: 100%;
  overflow-x: auto;
}

/* 🔡 Puzzle Grid */
#grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(28px, 1fr));
  gap: 2px;
  justify-content: center;
  margin: 0 auto;
  padding: 10px;
}

/* 🔠 Cell Styling */
.cell {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: white;
  border: 1.5px solid lightblue;
  font-size: clamp(12px, 3vw, 15px);
  line-height: 1;
  cursor: pointer;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 🖱️ Selection */
.selected {
  background: #8faedc;
  border-color: #5c7ea3;
}

/* ✅ Found Word */
.found {
  background: #A5D6A7;
  color: white;
  pointer-events: none;
  border-color: #4caf50;
}

/* ⛔ Used Cell */
.used {
  background: #ccc;
  pointer-events: none;
}

/* 🧡 Orange Stroke Overlay */
#overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.line {
  stroke: orange;
  stroke-width: 4;
  stroke-linecap: round;
}

/* 💬 Feedback */
#feedback {
  margin-top: 15px;
  font-size: 1.1em;
  padding: 0 10px;
}

.page-container {
  max-width: 900px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
  padding-top: 20px;
}

.layout-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
  box-sizing: border-box;
}


/* 📱 Mobile Optimization */
@media (max-width: 480px) {
  #grid {
    grid-template-columns: repeat(10, minmax(28px, 1fr));
    padding: 5px;
  }

  .cell {
    font-size: 0.9rem;
  }
}

.page-text {
  max-width: 800px;
  margin: 0 auto;
  text-align: center; /* or left if you prefer */
  padding: 10px 20px;
}
