body {
  background: #eef2f3;
  font-family: Arial, sans-serif;
  text-align: center;
  color: #222;
  margin: 0;
  padding: 0;
}

h1 {
  margin-top: 2rem;
  color: #d7263d;
  font-size: 2.1rem;
  line-height: 1.2;
}

/* Tablero responsive */
#board {
  display: grid;
  grid-template-columns: repeat(7, minmax(35px, 11vw));
  grid-template-rows: repeat(6, minmax(35px, 11vw));
  gap: 0.6em;
  justify-content: center;
  margin: 2rem auto 1.3rem auto;
  background: #1565c0;
  padding: 1.2em 0;
  border-radius: 15px;
  max-width: 100vw;
  box-sizing: border-box;
}

/* Celda responsive */
.cell {
  width: 100%;
  height: 100%;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px #bbb;
  font-size: 4.2em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.cell:hover,
.cell:focus {
  background: #ffe082;
}

#status {
  font-size: 1.1em;
  min-height: 2em;
  margin-bottom: 1em;
  word-break: break-word;
}

#restart-btn {
  background: #d7263d;
  color: #fff;
  font-size: 1em;
  border: none;
  border-radius: 7px;
  padding: 0.7em 2em;
  cursor: pointer;
  transition: background 0.2s;
  margin-bottom: 2em;
}

#restart-btn:hover,
#restart-btn:focus {
  background: #920c22;
}

/* Celulares */
@media (max-width: 520px) {
  h1 {
    font-size: 1.2rem;
    margin-top: 1rem;
  }
  #board {
    grid-template-columns: repeat(7, minmax(22px, 12vw));
    grid-template-rows: repeat(6, minmax(22px, 12vw));
    gap: 0.25em;
    padding: 0.5em 0;
    border-radius: 10px;
    margin: 1rem auto 1rem auto;
    max-width: 100vw;
  }
  .cell {
    font-size: 4.2em;
    border-radius: 50%;
  }
  #status {
    font-size: 0.97em;
    min-height: 1.2em;
    margin-bottom: 0.8em;
  }
  #restart-btn {
    font-size: 0.9em;
    padding: 0.45em 1em;
    border-radius: 5px;
    margin-bottom: 1em;
  }
}

/* Tablets */
@media (max-width: 900px) {
  h1 {
    font-size: 1.4rem;
  }
  #board {
    grid-template-columns: repeat(7, minmax(28px, 11vw));
    grid-template-rows: repeat(6, minmax(28px, 11vw));
  }
  .cell {
    font-size: 4.2em;
  }
}

/* Pantallas grandes */
@media (min-width: 1200px) {
  #board {
    grid-template-columns: repeat(7, 64px);
    grid-template-rows: repeat(6, 64px);
    gap: 1em;
  }
  .cell {
    font-size: 2em;
  }
}