/* ====== Layout ====== */
body {
  font-family: Arial, sans-serif;
  background-color: #1a1a1a;
  color: #f5f5f5;
  text-align: center;
  margin: 0;
  padding: 0;
}

h1 {
  margin-top: 3.25rem;
}

#game {
  display: flex;
  justify-content: center;
  gap: 3.125rem;
  margin-top: 3.25rem;
}

/* ====== Board ====== */
.board {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.board-title {
  margin-bottom: 0.625rem;
  font-size: 1.2em;
  font-weight: bold;
}

.grid {
  display: grid;
  grid-template-columns: repeat(10, 1.875rem);
  grid-template-rows: repeat(10, 1.875rem);
  gap: 0.125rem;
  background-color: #003366;
  padding: 0.3125rem;
  border-radius: 0.5rem;
}

/* ====== Cells ====== */
.cell {
  width: 1.875rem;
  height: 1.875rem;
  background-color: #3399ff;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.cell:hover {
  transform: scale(1.05);
}

/* ====== Placement Phase ====== */
.cell.preview-valid {
  background-color: rgba(0, 255, 0, 0.5);
}

.cell.preview-invalid {
  background-color: rgba(255, 0, 0, 0.5);
}

.cell.ship {
  background-color: #666; /* Player's ship color */
}

/* ====== Hits & Misses - Higher specificity ====== */
.cell.hit {
  background-color: red !important; /* Override ship color when hit */
}

.cell.miss {
  background-color: lightblue !important; /* Ensure miss shows */
}

/* ====== Status Bar ====== */
#status {
  margin-top: 1.25rem;
  font-size: 1.2em;
  min-height: 1.5rem;
}

/* ====== Buttons ====== */
button {
  background-color: #3399ff;
  color: white;
  border: none;
  padding: 0.5rem 0.875rem;
  margin: 0.625rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

button:hover {
  background-color: #2673b8;
}
