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

body {
  min-height: 100vh;
  background: linear-gradient(135deg, #020617, #0f172a);
  font-family: "Segoe UI", sans-serif;

  display: flex;
  justify-content: center;
  align-items: center;

  padding: 30px;
}

.container {
  width: 100%;
  max-width: 650px;

  background: #1e293b;

  padding: 35px;
  border-radius: 25px;

  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);

  text-align: center;
}

h1 {
  font-size: 55px;
  color: #60a5fa;
  margin-bottom: 10px;
}

.subtitle {
  color: #94a3b8;
  font-size: 20px;
  margin-bottom: 30px;
}

.board {
  width: 540px;
  margin: auto;

  display: grid;
  grid-template-columns: repeat(9, 1fr);
}

.cell {
  width: 60px;
  height: 60px;

  background: #334155;

  border: 1px solid #475569;

  display: flex;
  justify-content: center;
  align-items: center;

  color: white;

  font-size: 28px;
  font-weight: bold;

  transition: 0.3s;

  cursor: text;
}

.cell:hover {
  background: #475569;
}

.cell:focus {
  outline: none;
  background: #2563eb;
}

.bl {
  border-left: 4px solid white;
}

.br {
  border-right: 4px solid white;
}

.bt {
  border-top: 4px solid white;
}

.bb {
  border-bottom: 4px solid white;
}

.buttons {
  margin-top: 30px;

  display: flex;
  justify-content: center;
  gap: 20px;
}

button {
  padding: 14px 35px;

  border: none;
  border-radius: 12px;

  font-size: 18px;
  font-weight: bold;

  cursor: pointer;

  transition: 0.3s;
}

#SolvePuzzle {
  background: #2563eb;
  color: white;
}

#SolvePuzzle:hover {
  background: #1d4ed8;
  transform: translateY(-3px);
}

#ResetPuzzle {
  background: #ef4444;
  color: white;
}

#ResetPuzzle:hover {
  background: #dc2626;
  transform: translateY(-3px);
}

.footer {
  margin-top: 35px;

  color: #94a3b8;

  font-size: 14px;

  line-height: 1.8;
}

.footer a {
  color: #60a5fa;
  text-decoration: none;
  font-weight: 600;
}

.footer a:hover {
  color: white;
}

@media (max-width: 700px) {
  .container {
    padding: 20px;
  }

  .board {
    width: 360px;
  }

  .cell {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  h1 {
    font-size: 38px;
  }

  .subtitle {
    font-size: 16px;
  }

  .buttons {
    flex-direction: column;
    align-items: center;
  }

  button {
    width: 200px;
  }
}
