Make a square custom radio checkbox using html and css

Make a square custom radio checkbox using html and css

Build A custom checkbox using html and css 

HTML:

<div class="container">
 <h2>I Like Most:</h2>
  <ul>
  <li>
    <input type="radio" id="pizza" name="selector">
    <label for="pizza">Pizza</label>
    
    <div class="check"></div>
  </li>
  
  <li>
    <input type="radio" id="burger" name="selector">
    <label for="burger">Burger</label>
    
    <div class="check"><div class="inside"></div></div>
  </li>
  
  <li>
    <input type="radio" id="fries" name="selector">
    <label for="fries">Fries</label>
    
    <div class="check"><div class="inside"></div></div>
  </li>
</ul>
</div>

CSS:

@import url('https://fonts.googleapis.com/css?family=Lato');
*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body, html{
  height: 100%;
  background: #aaa;
 font-family: 'Lato', sans-serif;
  box-shadow: 0px 0px 2px 0px rgba(0,0,0,.5);
  text-transform: uppercase;
}

.container{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #fff;
  height: 400px;
  width: 500px;
  padding: 20px;
}

h2{
  text-align: center; 
  color: #2079df; 
  width: 100%; 
  position: relative; 
  line-height: 50px; 
  font-weight: 700;
}
h2:before{
  content: ""; 
  position: absolute; 
  left: 50%; 
  bottom: 0; 
  width: 100px; 
  height: 2px; 
  background-color: #2079df; 
  margin-left: -50px;
}
.container ul{
 overflow: auto;
}
ul li{
  color: #2079df;
  display: block;
  position: relative;
  float: left;
  width: 100%;
  height: 100px;
 border-bottom: 1px solid #bbb;
}
ul li:last-child{
  border-bottom: none;
}
ul li input[type=radio]{
  position: absolute;
  visibility: hidden;
}
ul li label{
  display: block;
  position: relative;
  font-weight: 400;
  font-size: 1.35em;
  padding: 25px 25px 25px 80px;
  margin: 5px auto;
  height: 20px;
  z-index: 9;
  cursor: pointer;
  -webkit-transition: all 0.25s linear;
}

ul li:hover label{
 color: #290;
}

ul li .check{
  display: block;
  position: absolute;
  border: 5px solid #2079df;
  border-radius: 0%;
  height: 25px;
  width: 25px;
  top: 30px;
  left: 20px;
 z-index: 5;
 transition: border .25s linear;
 -webkit-transition: border .25s linear;
}

ul li:hover .check {
  border: 5px solid #290;
}

ul li .check::before {
  display: block;
  position: absolute;
 content: '';
  border-radius: 0%;
  height: 15px;
  width: 15px;
  top: 0px;
 left: 0px;
  margin: auto;
 transition: background 0.25s linear;
 -webkit-transition: background 0.25s linear;
}

input[type=radio]:checked ~ .check {
  border: 5px solid #0DFF92;
}

input[type=radio]:checked ~ .check::before{
  background: #290;
}

input[type=radio]:checked ~ label{
  color: #0DFF92;
}

Demo