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

body {
    background-color: #ffffff;
    width: 100vw;
    height: 100vh;  
    height: -webkit-fill-available;
    transition: background 0.2s linear;
    overflow: none;
    touch-action: manipulation;
}

body.dark {
    background-color: #121213;

    /*maybe change to #292C35*/
}

/*flexbox*/
.game-container {
    width: 100vw;
    height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.tile-container {
    width: 100vw;
    margin-bottom: 30px;
}

@media only screen and (max-width: 520px) {

    /*row 0*/
    #guessRow-0-tile-0 {
        width: 55px;
    }

    #guessRow-0-tile-1 {
        width: 55px;
    }
    #guessRow-0-tile-2 {
        width: 55px;
    }

    /*row 1*/

    #guessRow-1-tile-0 {
        width: 55px;
    }

    #guessRow-1-tile-1 {
        width: 55px;
    }
    #guessRow-1-tile-2 {
        width: 55px;
    }

    #guessRow-1-tile-3 {
        width: 55px;
    }

    /*row 2*/
    #guessRow-2-tile-0 {
        width: 55px;
    }
    #guessRow-2-tile-1 {
        width: 55px;
    }
    #guessRow-2-tile-2 {
        width: 55px;
    }
    #guessRow-2-tile-3 {
        width: 55px;
    }
    #guessRow-2-tile-4 {
        width: 55px;
    }

    /*row 3*/
    #guessRow-3-tile-0 {
        width: 55px;
    }
    #guessRow-3-tile-1 {
        width: 55px;
    }
    #guessRow-3-tile-2 {
        width: 55px;
    }
    #guessRow-3-tile-3 {
        width: 55px;
    }
    #guessRow-3-tile-4 {
        width: 55px;
    }
    #guessRow-3-tile-5 {
        width: 55px;
    }

    /*row 4*/
    #guessRow-4-tile-1 {
        width: 55px;
    }
    #guessRow-4-tile-2 {
        width: 55px;
    }
    #guessRow-4-tile-3 {
        width: 55px;
    }
    #guessRow-4-tile-4 {
        width: 55px;
    }
    #guessRow-4-tile-5 {
        width: 55px;
    }
    #guessRow-4-tile-6 {
        width: 55px;
    }
    #guessRow-4-tile-6 {
        width: 55px;
    }
  }

  
@media only screen and (max-width: 420px) {

    /*row 0*/
    #guessRow-0-tile-0 {
        width: 45px;
    }

    #guessRow-0-tile-1 {
        width: 45px;
    }
    #guessRow-0-tile-2 {
        width: 45px;
    }

    /*row 1*/

    #guessRow-1-tile-0 {
        width: 45px;
    }

    #guessRow-1-tile-1 {
        width: 45px;
    }
    #guessRow-1-tile-2 {
        width: 45px;
    }

    #guessRow-1-tile-3 {
        width: 45px;
    }

    /*row 2*/
    #guessRow-2-tile-0 {
        width: 45px;
    }
    #guessRow-2-tile-1 {
        width: 45px;
    }
    #guessRow-2-tile-2 {
        width: 45px;
    }
    #guessRow-2-tile-3 {
        width: 45px;
    }
    #guessRow-2-tile-4 {
        width: 45px;
    }

    /*row 3*/
    #guessRow-3-tile-0 {
        width: 45px;
    }
    #guessRow-3-tile-1 {
        width: 45px;
    }
    #guessRow-3-tile-2 {
        width: 45px;
    }
    #guessRow-3-tile-3 {
        width: 45px;
    }
    #guessRow-3-tile-4 {
        width: 45px;
    }
    #guessRow-3-tile-5 {
        width: 45px;
    }

    /*row 4*/
    #guessRow-4-tile-0 {
        width: 45px;
    }
    #guessRow-4-tile-1 {
        width: 45px;
    }
    #guessRow-4-tile-2 {
        width: 45px;
    }
    #guessRow-4-tile-3 {
        width: 45px;
    }
    #guessRow-4-tile-4 {
        width: 45px;
    }
    #guessRow-4-tile-5 {
        width: 45px;
    }
    #guessRow-4-tile-6 {
        width: 45px;
    }
  }
.key-container {
    width: 515px;
    display: none;
}

.key-container.show-keys {
    display: flex;
}

/* START BUTTON */

/* CSS */
.start{
  appearance: none;
  backface-visibility: hidden;
  background-color: #27ae60;
  border-radius: 8px;
  border-style: none;
  box-shadow: rgba(39, 174, 96, .15) 0 4px 9px;
  box-sizing: border-box;
  color: #fff;
  cursor: pointer;
  display: inline-block;
  font-family: Inter,-apple-system,system-ui,"Segoe UI",Helvetica,Arial,sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: normal;
  line-height: 1.5;
  outline: none;
  padding: 13px 20px;
  position: relative;
  text-align: center;
  text-decoration: none;
  transform: translate3d(0, 0, 0);
  transition: all .3s;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  vertical-align: top;
  white-space: nowrap;
  text-transform: uppercase;
}

.start:hover {
  background-color: #1e8449;
  opacity: 1;
  transform: translateY(0);
  transition-duration: .35s;
}

.start:active {
  transform: translateY(2px);
  transition-duration: .35s;
}

.start:hover {
  box-shadow: rgba(39, 174, 96, .2) 0 6px 12px;
}
.start.hide {
    display: none;
}


/*END OF START BUTTON */

.key {
    cursor: pointer;
    font-weight: bold;
    z-index: 99;
}

@media only screen and (max-width: 520px) {
    .key-container {
        width: 450px;
    }
    .message-container {
        margin-top: 0px;
    }
    .tile-container {
        margin-bottom: 0px;
    }
  }
@media only screen and (max-width: 420px) {
    .key-container {
        width: 400px;
    }
    .tile {
        width: 50%;
        margin: 0 auto;
   }
}

@media only screen and (max-width: 390px) {
    .key-container {
        width: 365px;
    }
}

@media only screen and (max-width: 320px) {
    .key-container {
        width: 315px;
    }
    .tile-container {
        margin-top: 100px !important;
    }
    .tile {
        height: 58px !important;
    }
}

@media (max-width: 470px){
    html{
        overflow: hidden;
        height: 100vh;
    }
    .left-header-section{
        position: absolute;
        left: 0;
        top: 60px;
    }
    .middle-header-section .h1{
        margin-right: 0;
        margin-left: 14px;
    }
    .tile-container .tile {
        width: 40px !important;
    }
}


@media (max-width:480px){
    .game-container{
    justify-content: flex-start;
    }
    .tile-container {
    margin-bottom: 20px;
    }
}

@media (max-width:800px) {
    .game-container {
        height: 80vh !important;
    }
    #streak {
        margin-top: 31px !important;
    }    
}

@media (max-width:575px){
    .message-container{
    margin-top: 0px !important;
    }
    .tile-container {
    margin-top: 80px;
    }
    .right-header-section {
        flex: 3 !important;
    }
}

.key-container button {
    width: 43px;
    height: 58px;
    border-radius: 4px;
    border: none;
    background-color: #d3d6da;
    margin: 4px;
}

.key-container button:nth-child(1),
.key-container button:nth-child(9) {
    width: 68px;
}

.tile-container div {
    display: flex;
    justify-content: center;
}

.tile-container .tile {
    width: 62px;
    height: 62px;
    border: 2px solid #d3d6da;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #000000;
    margin: 2px;
    font-weight: bold;
    font-size: 25px;
}

.message-container {
    margin-top: 80px;
    height: 30px;
}
.message-container p {
    background-color: #000000;
    color: #ffffff;
    border-radius: 10px;
    padding: 10px;
    margin-top: 30px;
}

.tile.flip {
    animation: 0.5s linear flipping;
}

@keyframes flipping {
    0% {
        transform: rotateX(0deg);
    }
    50% {
        transform: rotateX(90deg);
    }
    100% {
        transform: rotateX(0deg);
    }
}

.grey-overlay {
    background-color: #3a3a3c !important;
    border:none !important;
}
.green-overlay {
    background-color: #6aaa64 !important;
    border:none !important;
}

.right-header-button {
    background: none;
    border: none;
    float: right;
    margin-right: 20px;
    margin-top: 15px;
}

.stats-button {
    background: none;
    border: none;
    float: right;
    margin-right: 20px;
    margin-top: 15px;
}

.chart-icon.night {
    color: #ffffff;
}

header {
    margin: 0;
    width: 100%;
    display: flex;
    height: 55px;
    border-bottom: solid 1px #d3d6da;
}

h1.night {
    color: #ffffff;
}

@media only screen and (max-width: 550px) {
    .h1 {
        margin-top: 8px;
        font-size: large;
        margin-right: 160px;
    }
}

.left-header-section {
    flex: 1;
}

.middle-header-section {
    text-align: center;
    
    text-transform: uppercase;
    margin-top: 10px;
    padding: 0;
    right: 50%;
    flex: 1;
}

.right-header-section {
    flex: 1 !important;
}

.question-mark {
    cursor: pointer;
}

.chart-icon {
    cursor: pointer;
}

.close-button {
    background: none;
    color: #000;
    border: none;
    padding: 0;
    cursor: pointer;
    outline: inherit;
    position: absolute;
    top: 10px;
    right: 10px;
}

.close-button.night {
    color: #fff;
}

.stats-close.night {
    color: #ffffff;
}


#time {
    top: 20px;
    font-size: 20px;
}

.time-container {
    margin-top: 15px;
    margin-left: 20px;
}


/* DARK MODE */

label{
    position: absolute;
    width: 45px;
    height: 24px;
    right: 110px;
    top: 16px;
    border: 2px solid;
    border-radius: 20px;
}
label:before{
    position: absolute;
    content: '';
    width:20px;
    height: 18px;
    left: 2px;
    top: 1px;
    border-radius: 50%;
    background: #000;
    cursor: pointer;
    transition: 0.4s;
}
label.active:before{
    left: 19px;
    background: #ffffff;
}

#dark-change.active {
    border-color: #ffffff;
}

body.night{
    background: #121213;
    color: #ffffff;
}

.middle-header-section.night {
    color: #ffffff;
}

.question-mark.night {
    color: #fff;
}

#time.night {
    color: #fff;
}

.key.night {
    background-color: #818384; 
    color: #fff;
}

.key.night i {
    color: #fff;
}

.tile-container .tile.night {
    border-color: #ffffff;
    color: #ffffff;
}

#active.night{
    background-color: #121213 !important;
}

/* MODAL */

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background-color: white;
    transition: 200ms ease-in-out;
    border: 1px solid black;
    border-radius: 10px;
    z-index: 1000;
    width: 500px;
    max-width: 80%;
  }

  .modal.night {
    background-color: #121213 !important;
    border: 1px solid #ffffff;
  }

  .modal-header .title.night {
    color: #ffffff !important;
  }

  .modal-header .stats-title {
    font-size: 1.25rem;
    font-weight: bold;
  }
  
  .modal-header .stats-title.night {
    color: #ffffff !important;
  }

  .modal.active {
    transform: translate(-50%, -50%) scale(1);
  }
  
  .modal-header {
    padding: 10px 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid #000;
  }

  .stats-header.night {
    border-bottom: 1px solid #ffffff !important;
  }
  
  .modal-header .title {
    font-size: 1.25rem;
    font-weight: bold;
  }
  
  .modal-header .close-button {
    cursor: pointer;
    border: none;
    outline: none;
    background: none;
    font-size: 1.25rem;
    font-weight: bold;
  }


  .modal-header.night {
    border-bottom: 1px solid #ffffff;
  }
  
  .modal-body {
    padding: 10px 15px;
  }

  .modal-body.night {
    color:  #ffffff;
  }

  .stats-body {
    padding: 10px 15px;
    text-align: center;
  }

  .stats-p {
    margin-top: 15px;
    margin-bottom: 10px;
  }

  .stats-p.night {
    color:  #ffffff;
  }
  
  .stats-body.night {
    color: #ffffff;
  }
  #overlay {
    position: fixed;
    opacity: 0;
    transition: 200ms ease-in-out;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, .5);
    pointer-events: none;
  }
  
  #overlay.active {
    opacity: 1;
    pointer-events: all;
  }

.average-time.night {
    color: #ffffff;
}

.game-count.night {
    color: #ffffff;
}

.share {
    color: #000000;
    width: 200px;
    background-color: #6aaa64; /* Green */
    border: none;
    padding: 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 30px 2px;
    cursor: pointer;
    border-radius: 30px;
}

.share.night {
    color: #ffffff;
}

.share-icon.night {
    color: #ffffff;
}

.share.hide {
    display: none;
}

.cr {
    display: none;
}

/* forfit button */
.forfit-button {
    position: absolute;
    right: 20px;
    top: 75px;
    appearance: none;
    backface-visibility: hidden;
    background-color: #ff4436;
    border-radius: 8px;
    border-style: none;
    box-shadow: rgba(39, 174, 96, .15) 0 4px 9px;
    box-sizing: border-box;
    color: #fff;
    cursor: pointer;
    display: inline-block;
    font-family: Inter,-apple-system,system-ui,"Segoe UI",Helvetica,Arial,sans-serif;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: normal;
    line-height: 1.5;
    outline: none;
    overflow: hidden;
    padding: 10px 15px;
    text-align: center;
    text-decoration: none;
    transform: translate3d(0, 0, 0);
    transition: all .3s;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    vertical-align: top;
    white-space: nowrap;
    text-transform: uppercase;
}

@media only screen and (max-width: 800px) {

    .forfit-button {
        font-size: 10px;
        padding: 5px 10px;
    }
}


.forfit-button:hover {
    background-color: #b62d23;
    opacity: 1;
    transform: translateY(0);
    transition-duration: .35s;
  }
  
.forfit-button:active {
    transform: translateY(2px);
    transition-duration: .35s;
  }
  
.forfit-button:hover {
    box-shadow: rgba(39, 174, 96, .2) 0 6px 12px;
  }

.forfit-button.hide {
    display: none;
}
  
.forfit-title {
    font-size: 1.25rem;
    font-weight: bold;
}

.forfit-title.night {
    color: #fff;
}
.forfit-body {
    padding: 10px 15px;
    text-align: center;
}
.forfit-header.night {
    color: #fff;
    border-bottom: 1px solid #fff;
}

.forfit-close.night {
    color: #fff;
}

.forfit-p {
    font-size: 20px;
    margin-top: 15px;
    margin-bottom: 10px;
}

.forfit-p.night {
    color:  #ffffff;
}

.no {
    background: none;
    cursor: pointer;
    border-radius: 8px;
    font-size: 30px;
    border: 1px solid #000;
    padding: 0px 10px;
    margin-right: 20px;
}

.no.night {
    border: 1px solid #fff;
}

.yes {
    background: none;
    cursor: pointer;
    border-radius: 8px;
    font-size: 30px;
    border: 1px solid #000;
    padding: 0px 10px;
}

.yes.night {
    border: 1px solid #fff;
}

#backspace.night {
    color: #fff;
}

.fa-check.night, .fa-xmark.night {
    color: #fff;
}

#streak {
    margin-top: 45px;
}

#streak.night {
    color: #fff;
}
