 /*Custom game container*/
.game-container{
    display: flex;
    flex-direction: column;
    width: 500px;
    max-width: 95vw; /*for responsive design*/
    margin: 0 auto;
    position: relative;
}
/*This Styles are needed for the game */
/*Don't modify if you don't know how it works, */
/*Wrapper for the game */
.connect4box{
  position: relative;
  --cellsize : 70px;
  --gap : 5px;
  & *{
    user-select: none;
    font-family: arial, "Gill Sans", "Gill Sans MT", "Myriad Pro", "DejaVu Sans Condensed", Helvetica, Arial, "sans-serif"
  }
  
  /**Title of the game**/
    .title{
    text-align: center
  }
  .title img{
    width: 200px;
  }
  /*Login panel for insert player names*/
  .loginGame{
    position: absolute;
    display: flex;
    justify-content: center;
    align-items:center;
    left: 0px;
    top: 0;
    z-index: 1;
    color: white;
    width: 100%;
    height: 100%;
    background-image: url("cover.webp");  
    background-repeat:no-repeat;
    background-size: 100% 100%;

  form{
    background: #0d12ad;
    padding: 0.5rem;
    box-shadow: 0 0 12px 5px #afa5a5;
    margin-top: 2rem;
    border-radius: 8%;
  }
  form h2{
    text-align: center;
  }
  form input{
    padding: 0.5rem;
    border:0;
  }
  form button{
    display:block;
    margin: 10px auto;
    color: black;
    font-size: 1.15rem;
    border-radius: 10px;
    padding: .5rem 1rem;
    border: none;
    outline: none;
    cursor: pointer;
  }
 form button:hover{
    background-color: white;
    box-shadow: 2px 2px 2px 1px lightgray
  }
}

/*Grid for cells  */  
.board{
  display: grid;
  overflow-x: clip;
  overflow-y: visible;
  grid-template-columns: repeat(7, var(--cellsize));
  grid-template-rows: repeat(6, var(--cellsize));
  position: relative;
  background: #0000ff00;
  border: var(--gap) solid #1c3cca;
  margin-top: calc(0.8 * var(--cellsize));
  margin-bottom:  1rem;
  box-shadow: -1px 1px 5px 2px gray;
  border-radius: 10px 10px 0 0;
}
.cell {
      position: relative;
      width: 100%;
      height: 100%;
      display:flex;
      justify-content: center;
      align-items: center
  }

  .hole {
      width: 100%;
      height: 100%;
      background-color: #1c3cca;
      mask: radial-gradient(circle closest-side at center,transparent calc(100% - var(--gap)),#000 90%);
      position:absolute;
      border: 1px solid #1c3cca;
  }
  .cell::after {
          content: '';
          position: absolute;
          top: 50%;
          left: 50%;
          transform:translate(-50%, -50%);
          width: calc(100% - 2*var(--gap));
          height:calc(100% - 2*var(--gap));
          box-shadow: inset -4px -3px 4px 0px #0000004f;
          border-radius: 50%;
   }

  /* Contenido que se verÃ¡ a travÃ©s del cÃ­rculo */
  .chip {
      position: absolute;
      width: calc(var(--cellsize) - 2*var(--gap));
      height: calc(var(--cellsize) - 2*var(--gap));
      margin: var(--gap);
      top: calc(-1 * var(--cellsize));
      left: calc(-1 * var(--cellsize));
      background-size: contain;
      background-color: red;
      border-radius: 50%;
      z-index: -1;
      transition: left 300ms ease-in;
  }
  
  .chip.player1{
      background: url(red.svg);
  }
  .chip.player2{
      background: url(yellow.svg);
  }

  .chip.placed{
        position: relative;
        top: 0px;
        left: 0px;
        border-radius: 50%;
        background-color: #80808096;
    }
 /*Cell of winner player*/
 .winner:after{
   content:'W';
   font-weight: bold;
   width: 40%;
   height: 40%;
   border-radius: 50%;
   position:absolute;
   top:50%;
   left:50%;
   transform: translate(-50%, -50%);
   background: white;
   display: flex;
   justify-content:center;
   align-items:center  
 }
  

/* Block for butons restart and help*/
  .status{
    display: flex;
    justify-content:space-around;
    align-items:center;
    user-select: none;
   .alias{
      text-align: center;
      padding: 0 10px;
      font-weight: bold;
      font-size: 1.2rem;
      min-width: 10%;
     }
    & >div:nth-of-type(2){
      border-right : 5px solid #1c3cca;
    }
    .resetbtn, .helpbtn{
      display: flex;
      justify-content: space-around;
      align-items: center;
      margin: 0 auto;
      background-color: #c74144;
      width: 32px;
      height: 31px;
      padding: 4px;
      border-radius: 50%;
      border: 2px solid #FF5722;
      fill: #ffffff;
      cursor: pointer;
      box-shadow: 0px 0px 4px 1px #e2aea9;
      transition: transform 300ms ease-in-out,  border-color 300ms ease-in-out;
    }
    .resetbtn svg, .helpbtn svg{
      width: 100%;
      height: 100%;
    }
    .resetbtn:hover, .helpbtn:hover{
        transform: rotate(-180deg);
        box-shadow: 0px 0px 2px 0px #b3585f6b;
        border: 2px solid #ec6565;
    } 
  }
  .help{
    --helpWidth : 100%;
    --helpHeight: fit-content;
    position: absolute;
    color:  black;
    top: 0;
    left:  0;
    height:  var(--helpHeight);
    max-height: 98%;
    width: var(--helpWidth);
    background: #f8eeee;
    line-height: 150%;
    transition: all 600ms ease-in;
    overflow: auto;
    z-index:1;
  
  &>div{
    box-sizing: border-box;
    padding: 10px;
    height: var(--helpHeight);
    width: calc(var(--helpWidth) - 15px);
  }
  & >div  li{
    margin: 0.8rem 0;
  }
  &.hidden{
    height: 0;
    width:0;
  }
}
  
   
  dialog {
    position: absolute;
    top: 50%;
    transform: translate(-0, -50%);
    width: 80%;
    height: 35%;
    clip-path: url(boom.svg#boomstar);
    justify-content: center;
    align-items: center;
    background-color: #3e3e3ea8;
    color: #fff;
  }
  dialog[open]{
    display:flex;
  }
  dialog >div{
    display: flex;
    justify-content:center;
    align-items:center;
    text-align: center;
    clip-path: url(boom.svg#boomstar);
    width: 99%;
    height: 99%;
    background-color: red;
    color: #ffffff
  }
 
}


