*, *::after, *::before {
    box-sizing: border-box;
    font-family: Arial;
  }
  
  body {
    background-color: white;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 1em;
    font-size: clamp(.5rem, 2.5vmin, 1.5rem);
  }
  
  .keyboard {
    display: grid;
    grid-template-columns: repeat(20, minmax(auto, 1.25em));
    grid-auto-rows: 3em;
    gap: .25em;
    justify-content: center;
  }
  
  .key {
    font-size: inherit;
    grid-column: span 2;
    border: none;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: lightgray;
    color:black;
    fill: white;
    text-transform: uppercase;
    border-radius: .25em;
    cursor: pointer;
    user-select: none;
  }
  
  .key.large {
    grid-column: span 3;
  }
  
  .key > svg {
    width: 1.75em;
    height: 1.75em;
  }
  
  .key:hover, .key:focus {
    --lightness-offset: 10%;
  }
  
  .key.wrong {
    --lightness: 23%;
    color: white;
    background-color: grey;
  }
  
  .key.wrong-location {
    --hue: 49;
    --saturation: 51%;
    --lightness: 47%;
    background-color: hsl(49, 51%, 47%);
    color: white;
  }
  
  .key.correct {
    --hue: 115;
    --saturation: 29%;
    --lightness: 43%;
    background-color:hsl(115, 29%, 43%);
    color: white;
  }
  
  .guess-grid {
    display: grid;
    justify-content: center;
    align-content: center;
    flex-grow: 1;
    grid-template-columns: repeat(5, 3.5em);
    grid-template-rows: repeat(6, 3.5em);
    gap: .25em;
    margin-bottom: 1em;
    margin-top: 1em;
  }
  
  .tile {
    font-size: 2em;
    border: .05em solid hsl(210, 1%, 50%);
    text-transform: uppercase;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
    transition: transform 250ms linear;
  }
  
  .tile[data-state="active"] {
    border-color: hsl(200, 1%, 34%);
  }
  
  .tile[data-state="wrong"] {
    border: none;
    background-color: lightgrey;
    color: white;
  }
  
  .tile[data-state="wrong-location"] {
    border: none;
    background-color: hsl(49, 51%, 47%);
    color: white;
  }
  
  .tile[data-state="correct"] {
    border: none;
    background-color: hsl(115, 29%, 43%);
    color: white;
  }
  
  .tile.shake {
    animation: shake 250ms ease-in-out;
  }
  
  .tile.dance {
    animation: dance 500ms ease-in-out;
  }
  
  .tile.flip {
    transform: rotateX(90deg);
  }
  
  @keyframes shake {
    10% {
      transform: translateX(-5%);
    }
  
    30% {
      transform: translateX(5%);
    }
  
    50% {
      transform: translateX(-7.5%);
    }
  
    70% {
      transform: translateX(7.5%);
    }
  
    90% {
      transform: translateX(-5%);
    }
  
    100% {
      transform: translateX(0);
    }
  }
  
  @keyframes dance {
    20% {
      transform: translateY(-50%);
    }  
  
    40% {
      transform: translateY(5%);
    }  
  
    60% {
      transform: translateY(-25%);
    }  
  
    80% {
      transform: translateY(2.5%);
    }  
  
    90% {
      transform: translateY(-5%);
    }  
  
    100% {
      transform: translateY(0);
    }
  }
  
  .alert-container {
    position: fixed;
    top: 75vh;
    left: 50vw;
    transform: translateX(-50%);
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .alert {
    pointer-events: none;
    background-color: hsl(204, 7%, 85%);
    padding: .75em;
    border-radius: .25em;
    opacity: 1;
    transition: opacity 500ms ease-in-out;
    margin-bottom: .5em;
  }
  
  .alert:last-child {
    margin-bottom: 0;
  }
  
  .alert.hide {
    opacity: 0;
  }

  .header {
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    padding: 0px;
    text-align: center;
    background: #1abc9c;
    color: white;
    font-size: 15px;
  } 

    .modal {
      display: none;
      position: fixed;
      z-index: 1;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      overflow: auto;
      background-color: rgb(0,0,0); 
      background-color: rgba(0,0,0,0.4);
    }
    
    
    .modal-content {
      background-color: #fefefe;
      margin: 15% auto;
      padding: 5px;
      border: 1px solid #888;
      width: 25%;
    }
    
    
    .close {
      color: #aaa;
      float: right;
      font-size: 28px;
      font-weight: bold;
    }
    
    .close:hover,
    .close:focus {
      color: black;
      text-decoration: none;
      cursor: pointer;
    }

  .footer 
  {
    color: grey;
    text-align: center;
    display: block;
  }

  .hr {
    width: 70%;
    margin-left: auto;
    margin-right: auto;
  }