html {
   -webkit-box-sizing: border-box;
   -moz-box-sizing: border-box;
   box-sizing: border-box;
   font-size: medium;
   }
  *, *:before, *:after {
   -webkit-box-sizing: inherit;
   -moz-box-sizing: inherit;
   box-sizing: inherit;
   }
  

body {
      background-size: cover;
      font-family: Baskerville, Garamond, Georgia, Serif;
      padding: 0;
      margin: 0;
      }

/*                                PHONE SCREENS                  */
      .container {
            display: grid;
            grid-template-columns: 1fr 10fr 12fr;
            grid-template-rows: fitcontent(5vh) 4vh 1fr 5vh;
            grid-template-areas:
              "header-logo header-titles header-titles"
              "header-home header-home header-search"
              " . . header-postnav"
              "content content content"
              " . sidebar sidebar";
            align-items: center;
            width: 100%;
            margin: auto;    
       }
       .header-logo {
            display: flex;
            grid-area: header-logo;
        }
       .header-titles {
            display: flex;         
            grid-area: header-titles;
            font-family: "Cookie";
        }
        .header-titles a {
            font-size: 1.8rem;
            font-style: italic;
            color: #660066;
            padding-left: 0.4rem;
            margin: 0.4rem 0.1rem;
        }
        #header {
            height: 7vh;
        }
        .header-search {
            display: flex;
            justify-content: flex-end;
            margin: 0 1rem;
            grid-area: header-search;
        }
        .header-sas {
            display: flex;
            padding: 0;
            justify-content: flex-start;
            grid-area: header-sas;
        }
        .header-home {
            display: flex;
            grid-area: header-home;
            position: sticky;
            top: 0.4rem;                   
            justify-content: flex-start;  
        }
        .sidebar {
            display: flex;
            flex-wrap: wrap;
            grid-area: sidebar;
            justify-content: flex-start;
            align-items: flex-start;
            padding: 1rem;
        }
        .header-postnav {
            display: flex;
            grid-area: header-postnav;
            position: sticky;
            top: 0.6rem;                   
            justify-content: flex-end;
            margin: 0 1rem;
        }   
main    {
            grid-area: content;
            display: flex;
            flex-direction: column;
            background: rgba(255, 255, 255, 0.75);
            border: 1px solid #aaa;
            border-radius: 6px;
            margin: 1rem;
        }

article {
            display: flex;
            flex-direction: column;
            width: 100%;
        }

main, article {
      font-size: 1rem;
      line-height: 1.2;      
      }
img, iframe {
          max-width: 100%;
      }

   h1 {
          font-size: 3rem;
          font-style: italic;
          color: #660066;
      }
   h2 {
          font-size: 1.8rem;
          color: #660066;

      }
   h3 {
          font-size: 1.3rem;
          margin-bottom: 0.3rem;
      }
   h4 {
          font-size: 1rem;
          font-style: bold;
          margin-bottom: 0.1rem;
          margin-bottom: 0.3rem;
      }
a, a:link, a:visited {
            text-decoration: none;
            color: #660066;
        }
a:hover, a:focus {
            text-decoration: underline;
            color:#663399;
        }
    .homepage-button {
            background-size: cover;
            height: 2rem;
            padding: 0.4em;
            margin-right: 1rem;
            margin-bottom: 1rem;
            align-self: flex-end;
            border-radius: 4px;
            font-family: Verdana, Arial, sans-serif;
            color: white;
            border: solid 1px #660066;
            float: right;
      }
      .logo {
            position: relative;
            display: inline-block;
            height: 3.2rem;
            min-width: 1.5em; 
            max-width: 3rem;
            margin: 0.4rem;
        }
      .logo .mauve {
            display: none;
            position: absolute;
            top: 0;
            left: 0;
            z-index: 99;
        }
      .logo:hover .mauve {
           display: inline;
        }
      .go-home {
            position: relative;
            display: inline-block;
            padding: 0.4rem;
            min-width: 2rem; 
            max-width: 3rem;
            margin-left: 0.4em;
        }
      .go-home .mauve {
            display: none;
            position: absolute;
            top: 0;
            left: 0;
            padding: 0.4rem;
            z-index: 99;
        }
      .go-home:hover .mauve {
           display: inline;
        }
       .nav-button {
            height: 100%;
            background: rgba(255, 255, 255, 0.85);
            border-radius: 3px;
            padding: 0.4rem;
            margin-left: 0.4em;
        }
/*                                TABLET SCREENS                   */

@media only screen and (min-width:600px) {
        .container {
            display: grid;
            grid-template-columns: 2fr 2fr 10fr 3fr 3fr;
            grid-template-rows: fitcontent(40vh) 5vh 1fr;
            grid-template-areas:
              "header-logo header-titles header-titles header-search header-search"
              "header-home header-home header-sas header-postnav header-postnav"
              "sidebar sidebar content content content";
        }
        .header-titles {
            display: flex;
            grid-area: header-titles;
            padding: 0 0.1rem;
        }
        .header-titles a {
            font-size: 2.2rem;
            font-style: italic;
            color: #660066;
            margin: 0.4rem 0.1rem;
        }
        #header {
            height: 8vh;
        }
        .header-search {
            display: flex;
            grid-area: header-search;
            justify-content: flex-end;
            margin: 0 1rem;
         }


  main {
            grid-area: content;
            display: flex;
            flex-direction: row;
            justify-content: flex-start;
            flex-wrap: wrap;     
            background: rgba(255, 255, 255, 0.75);
            margin: 1rem;
            border: 1px solid #aaa;
            border-radius: 6px;
        }
   .homepage-button {
            margin-bottom: 0;
            margin-top: auto;
      }
      .logo {
            position: relative;
            display: inline-block;
            height: 4.5rem;
            min-width: 1.5em; 
            max-width: 5rem;
            margin: 0.4rem 0.1rem;
        }
   .go-home {
            position: relative;
            display: inline-block;
            padding: 0.2rem;
            min-width: 1.5rem; 
            max-width: 2.5rem;
            margin-left: 0.4em;
        }
      .go-home .mauve {
            padding: 0.2rem;
        }
      .nav-button {
            height: 100%;
            background: rgba(255, 255, 255, 0.5);
            border-radius: 3px;
            padding: 0.2rem;
            margin-left: 0.4em;
        }
     article {
            width: 100%;
    }
}     
/*                                COMPUTER SCREENS                   */
@media only screen and (min-width:768px) {
        .container {
            display: grid;
            grid-template-columns: 1fr 2fr 1fr 12fr 2fr;
            grid-template-rows: fitcontent(30vh) 5vh 1fr;
            grid-template-areas:
              "header-logo header-titles header-titles header-titles header-search"
              "header-home header-home header-sas header-postnav header-postnav"
              "sidebar sidebar  content    content     content";
        }
        .header-titles a {
            font-size: 3rem;
        }	
        #header {
            height: 10vh;
        }
     main    {
            padding: 1rem;         
    }

}

#intro {
  padding: 5vw;
}

.mystyle {
  background-color: #ffee99;
  color: #660066;
}
.demo {
  border-color: #660066;
  border-radius: 10%;
  height: 3vh;
  width: 3vh;
  margin: 1px;
  font-size: 2vh;
}
.startButton {
  width: 8vh;
  height: 4vh;
  border-color: #660066;
  border-radius: 1vh;
  margin: 1px;
  font-size: 2vh; 
}
#levelHeading {
  position: relative;
  left: 5vw;
}
       #nextLevel {
          position: absolute;
          display: none;
          left: 1em;
          top: 5em;
          width: 17em;
          height: 10.5em;
          background-color: #ffeeaa;
          color: #660066;
          padding: 0.4em 1em 0.4em 1em;
          border-radius: 1em;
       }
      #continue {
          position: absolute;
          display: none;
      }
         #continue button {
           border-color: #660066;
           border-radius: 1vh;
           height: 3.5vh;
           width: 12vh;
           margin: 1px;
          font-size: 2vh; 
         }
#levelHeading button {
  position: absolute;
  top: 8em;
  border-color: #660066;
  border-radius: 10%;
  padding: 0.4em 1em 0.4em 1em;
}
#otherGames {
   display: none;
   zIndex: -1;
   position: absolute;
   top: 22em;
   width: 26em;
   height: 4em;
}
#otherGames img {
  height: 2em;
}
#otherGames.gameLink {
  padding: 0 .5em;
  margin-right: 1em;
}

#controlbox {
    position: relative;
    top: -4em;
    margin-right: auto;
  }
    #hintBtn {
       position: absolute;
       top: 1.4em;
       left: 18em;
       font-size: 1.5vh;
    }
       #hintBtn button {
          background-color: #ffffcc;
          color: #660066;
          padding: 0.4em 1em 0.4em 1em;
          border-radius: 0.8em;
          border: 1px solid #ff00cc;  
       }
       #hintPopup {
          position: absolute;
          display: none;
          left: 13em;
          top: 1em;
          width: 10em;
          height: 10em;
          background-color: #ffffcc;
          color: #660066;
          padding: 0.4em 1em 0.4em 1em;
          border: 1px solid #ff00cc;  
          border-radius: 1em;
       }
          .hintHeader {
            padding: 0;
            margin-top: 0.5em;
          }
          .hintClose {
            position: absolute;
            right: 0;
         }

#restart {
  position: absolute;
  top: 1em;
  left: 22em;
  width: 10em;
  font-size: 1.5vh;
  padding: 5px;
}

#restart button {
  border-color: #660066;
  border-radius: 10%;
  height: 3vh;
}

#feedback {
  position: absolute;
  opacity: 0;
  width: 7em;
  border-radius: 5px;
}

#gameBoard {
  position: relative;
  top: 6vh;
  height: 60vh;
  width: 95%;
  margin: auto;
}
@media only screen and (min-width:768px) {
  #gameboard {
    top:3vh;
    left: 5vw;
    width: auto;
    margin: 0;
  }
}