/* Screen layout */

html {
  font-family: sans-serif;
  cursor: default;
}

a{
  color: inherit;
}
body {
  background-color: #ccc;
  margin: 0px;
}

.bgwood{
  background-image: url("resources/images/103_5846.jpg");
  background-size: cover;
}

.bgstone{
  background-image: url("resources/images/100_6928.jpg");
  background-size: cover; 
}

header {
  width: 100%;
  text-align: center;
  font-size: calc(2rem + 1vw);
  /*cursor: default;*/
  display: inline-flex;
}

.header{
  font-family: papyrus, fantasy;
}

p {
  /*For instructions and feedback*/
  margin: 1em;
  font-size: 16px;
}

.flexwrapper{
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
}

/*Dynamic Font-classes*/
.chinese {
  font-family: simsun;
  font-size: 1.2em;
}

/*h1.chinese {
  font-size: 40px;
}*/
.english {
  font-family: sans-serif;
}

.extrainfo{
  margin: 0.3em auto;
  font-size: 18px;
}

.large{
  font-size: 32px;
}
.medium {
  font-size: 24px;
}

.mediumsmall{
  font-size: 20px;
}

.small {
  font-size: 18px;
}

h1,
h2 {
  font-size: 2rem;
  margin: 1.5rem auto 0.5rem auto;
}

.questionPrompt{
  font-size: 1.8rem;
  margin: 1.5rem auto 0.5rem auto; 
}

.questionPrompt.pinyin{
  font-size: 2rem;
}

.questionPrompt.chinese{
  font-size: 2.5rem;
}

.instructions{
  padding: 0em 1em;
  margin:  1rem;
}

/*Main container*/
#app {
  width: calc(500px + 10vw);
  min-height: calc(5rem + 50vh);
  background: #f7d4a5;
  margin: 1rem auto;
  padding: 0rem 2.5rem 3rem 2.5rem;
  border: 3px solid;
  position: relative;
  box-shadow: 3px 0px 40px 5px rgba(0, 0, 0, 0.8);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
}

#app > form{
  flex:  5;
}

.gridhud {
  font-size: 1rem;
  background-color: lightgreen;
  border: 1px solid darkgreen;
  height: 4em;
  width: 100%;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(6, minmax(30px, 1fr));
  grid-gap: 10px;
  grid-auto-rows: 50px;
}

.teacherlink{
  grid-column: 1;
  color: blue;
  text-decoration: underline;
  cursor: pointer;
}

#user {
  align-items: center;
  padding: 8px;
  margin: auto;
}

#hudhead {
  grid-column: 3/5;
  text-align: center;
  font-size: calc(2rem + 1vw);
}
.personal-greeting {
  text-align: center;
  font-weight: bold;
}


.centerme {
  display: block;
  margin: 0 auto;
  width: max-content;
}

.flexcenter {
  display: flex;
  flex-direction: column;
}


.subtlelink {
  text-decoration: none;
}

.subtlelink:hover, .subtlelink:focus{
  text-shadow: 0.06em 0.06em darkgray;
}


.golink:hover,
.golink:focus {
  text-decoration: none;
  text-shadow: 0.06em 0.06em darkgray;
}

h3 {
  font-size: 1.2rem;
  margin: 0.3rem auto;
}


.navmenu {
  display: flex;
  flex-direction: row;
}

.navmenu div {
  flex: 1;
  text-align: center;
  padding: 1em;
}


/* Lists */

ol {
  padding-inline-start: 20px;
}

dl {
  margin-top: 0px;
}
dt, .golink {
  margin: 1rem 0.5rem;
  font-weight: bold;
  font-size: 1.2rem;
}

dd {
  margin: 0px 1em;
}

dd ul{
  padding-inline-start: 0.5em;
}
dd li{
  margin: 0.5em;
}
/*

*/

/*  Grid-layout */
.grid3 {
  display: grid;
  grid-template-columns: repeat(3,  1fr);
  grid-gap: 1em; /*legacy*/
  gap: 1em; /*future coding*/
  grid-auto-rows: minmax(1rem,1fr);
  margin: 25px auto;
}

.grid2 {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  grid-gap: 1em; /*legacy*/
  gap: 1em; /*future coding*/
  grid-auto-rows: minmax(1rem, 1fr);
  /*margin: 25px auto;*/
  align-items: center;
  justify-items: center;
}

/* Buttons */
button {
  box-sizing: border-box;
  text-align: left;
  cursor: pointer;
}

/* Container for selection items*/
/*.ansgroup{
  margin: 1em auto;
}*/

.onecol{
  display: flex;
  /*justify-content: space-evenly;*/
  flex-direction: column;
}

.wrap{
  display: flex;
  justify-content: space-evenly;
  flex-wrap: wrap;
}


/*
  positioning buttons in column

.ansgroup > div, .ansgroup > li {
  margin: 5px;
  /*font-size: 1.2em;*/
  /*min-width: 9rem;
  }
  */


.ansgroup > li {
  list-style-type: decimal;
  list-style-position: inside;
}

.altliststyle > li {
  list-style-type: lower-latin;
}

 /* Styling of button like behavior */

.answerchoice {
  margin: 0.25em;
  padding: 0.5em 1em;
  box-sizing: border-box;
  cursor: pointer;
  border-radius: 0.5em;
  background-color: #c7c7c780; /*fallback*/
  background-color: hsla(0, 0%, 78%, 0.5);
  border: 2px solid;
  border-color: #e0e0e0 #636363 #636363 #e0e0e0; /*fallback*/
  border-color: hsl(0,0%,88%) hsl(0,0%,39%) hsl(0,0%,39%) hsl(0,0%,88%);
}

.answerchoice:hover,
.answerchoice:focus {
  background-color: rgba(180, 180, 180, 0.7); /*fallback*/
  border-color: #636363 #e0e0e0 #e0e0e0 #636363;
  border-color: hsl(0,0%,39%) hsl(0,0%,88%) hsl(0,0%,88%) hsl(0,0%,39%);
}

.answerchoice.selected {
  border-color: #636363 #e0e0e0 #e0e0e0 #636363; /*fallback*/
  border-color: hsl(0,0%,39%) hsl(0,0%,88%) hsl(0,0%,88%) hsl(0,0%,39%);
  background-color: #94949480; /*fallback*/
  background-color: hsla(0,0%,58%,0.5);
}


.answerchoice.key{
  text-align: center;
  padding: calc(.25em + 5px) 0.5em;
  margin: 0px;
  height: calc(2em + 4px);
  width: calc(2em + 4px);
}

.correct{
    border-color: #0a5c0a #47eb47 #47eb47 #0a5c0a; /*fallback*/
    border-color: hsl(120,80%,20%) hsl(120,80%,60%) hsl(120,80%,60%) hsl(120,80%,20%);
    background-color: #14b814B3; /*fallback*/
    background-color: hsla(120,80%,40%,0.7);
}

.wrong{
    border-color: #5c0a0a #eb4747 #eb4747 #5c0a0a; /*fallback*/
    border-color: hsl(0,80%,20%) hsl(0,80%,60%) hsl(0,80%,60%) hsl(0,80%,20%);
    background-color: #cf1717B3; /*fallback*/
    background-color: hsla(0,80%,45%,0.7);
}
/*.grid3 > .key {
  /* 
  font-size: 48px;
}

.grid2 > .key {
  font-size: 30px;
  padding: auto 0px;
}*/

.key > span {
  display: block;
  margin: 0px;
  padding: 0px;
}

/*Some CSS Rules for the Matching Question Test*/
.columns {
  display: flex;
  justify-content: space-evenly;
}

.short {
  flex: 1;
}

.long {
  flex: 2;
}

@media screen and (width<600px) {
  .short {
    margin: 0.5em;
  }
  .long {
    margin: 0.5em;
  }
}

/*.ansgroup > .matchselected {
  border-style: dashed;
  padding: 9px 24px;
  border-radius: 5px;
  background-color: rgba(255, 255, 255, 0.2);
}*/

.erroneous{
  color: darkred;
  text-shadow: 1px 1px whitesmoke;
  background-color: rgba(180, 180, 180, 0.7);
  border-color: #636363 #e0e0e0 $e0e0e0 #636363; /*fallback*/
  border-color: hsl(0,0%,39%) hsl(0,0%,88%) hsl(0,0%,88%) hsl(0,0%,39%);
}

.correcto{
  font-weight: bolder;
  outline-offset: -1px;
}

/*.ansgroup > .confirmed {
  border: 1px solid;
  padding: 9px 24px;
  border-radius: 5px;
}*/
:root{
  --color1: 60;
  --color2: 114;
  --color3: 240;
  --color4: 294;
  --light: 88%;
  --dark: 39%;
  --std:  60%;
}
.confirmed[data-id="1"], .confirmed[data-match="1"] {
  background-color: #ebeb4799; /*fallback*/
  border-color: #b3b314 #f9f9c8 #f9f9c8 #b3b314; /*fallback*/
  background-color: hsla(var(--color1),80%,var(--std),0.6);
  border-color: hsl(var(--color1),80%,var(--dark)) hsl(var(--color1),80%,var(--light)) hsl(var(--color1),80%,var(--light)) hsl(var(--color1),80%,var(--dark));
}

.confirmed[data-id="2"], .confirmed[data-match="2"] {
  background-color: #58eb4799; /*fallback*/
  border-color: #24b314 #cdf9c8 #cdf9c8 #24b314; /*fallback*/
  background-color: hsla(var(--color2),80%,60%,0.6); 
  border-color: hsl(var(--color2),80%,var(--dark)) hsl(var(--color2),80%,var(--light)) hsl(var(--color2),80%,var(--light)) hsl(var(--color2),80%,var(--dark));
}

.confirmed[data-id="3"], .confirmed[data-match="3"] {
  background-color: #4747eb99; /*fallback*/
  border-color: #1414b3 #c8c8f9 #c8c8f9 #1414b3; /*fallback*/
  background-color: hsla(var(--color3),80%,60%,0.6);
  border-color: hsl(var(--color3),80%,var(--dark)) hsl(var(--color3),80%,var(--light)) hsl(var(--color3),80%,var(--light)) hsl(var(--color3),80%,var(--dark));
}

.confirmed[data-id="4"], .confirmed[data-match="4"]{
  background-color: #da47eb99; /*fallback*/
  border-color: #a314b3 #f4cef9 #f4c8f9 #a314b3; /*fallback*/
  background-color: hsla(var(--color4),80%,60%,0.6);
  border-color: hsl(var(--color4),80%,var(--dark)) hsl(var(--color4),80%,var(--light)) hsl(var(--color4),80%,var(--light)) hsl(var(--color4),80%,var(--dark));
}


footer {
  display: inline-flex;
  position: relative;
  background-color: black;
  color: whitesmoke;
  height: 6vh;
  line-height: 6vh;
  width: 100%;
  font-size: calc(0.5rem + 1vh);
  justify-content: space-between;
}



.rightalign{
  position: absolute;
  right:  10px;
  bottom: 0px;
}

.centervertical{
  position: absolute;
  top: 50%;
}

#next {
  position: absolute;
  text-align: center;
  box-sizing: border-box;
  bottom: 10px;
  right: 10px;
  width: 80px;
  height: 30px;
  font-size: 1rem;
}

.clicknext {
  animation: fillmeup 1.5s linear;
}

@keyframes fillmeup {
  100% {
    background-color: white;
  }
}

.constructionsign{
  position: absolute; 
  top: 0px; 
  left:-250px; 
  font-size: 16px;
  font-family: serif;
  width:  250px;
  background-color: lightcoral;
  border: 2px darkorange dashed;
}

#quit {
  border: 1px solid black;
  position: absolute;
  left: 10px;
  top: 10px;
  font-size: 20px;
  height: 23px;
  width: 23px;
  text-align: center;
  line-height: 23px;
  border-radius: 15px;
  background-color: darkorange;
  cursor: pointer;
}

#quit:hover,
#quit:focus {
  background-color: orange;
}


/* Drop down option menu */
.dropdown {
  position: absolute;
  float: right;
  top: 10px;
  right: 10px;
  display: inline-block;
  cursor: pointer;
}

.dropdown > span:hover{
  font-weight: bold;
}

.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  min-width: 160px;
  background-color: #ffdcaf;
  box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.dropdown-content div {
  color: black;
  padding: 12px 16px;
  display: block;
}

.dropdown-content div:hover {
  background-color: #ddd;
}

.show {
  display: block;
}

#options {
  /*position: absolute;
  right: 10px;
  top: 10px;*/
  font-size: 30px;
  text-align: center;
  line-height: 25px;
}
/*Audio icon for playing sounds*/
.play {
  display: block;
  background: linear-gradient(to bottom right, white, grey);
  border: none;
  border-radius: 15px;
  margin: 1em auto;
  height: 100%;
  padding: 1em;
  cursor: pointer;
}

#textInput {
  box-sizing: border-box;
  width: 100px;
  display: block;
  font-size: 16px;
  margin: 1em auto;
  padding: 3px;
}

.pinyinFeedback {
  margin: 0 auto;
  font-size: 20px;
}

/* Narrow Screens */
@media screen and (width<600px) {
  #app {
    width: 95%;
    margin: 1rem auto;
    padding: 1rem 0.5rem;
  }

  header {
    font-size: 1.5rem;
    margin: 0px;
  }
  h1,
  h2 {
    font-size: 1.5rem;
  }

  p {
    margin: 0.5em;
    font-size: 0.8em;
  }

  dt {
    margin: 0.5em;
    font-size: 1.1em;
  }

  .grid {
    grid-gap: 25px; /*legacy*/
    gap: 25px; /*future coding*/
  }
}

.arrow {
  display: inline-block;
  transition: all 0.2s linear;
}
.rotate {
  transform: rotate(90deg);
  transform-origin: center;
  transition: all 0.2s linear;
}

/* Graphical Feedback*/
/* Initial loading spinner*/
.loader {
  border: 16px solid #f3f3f3; /* Light grey */
  border-top: 16px solid #3498db; /* Blue */
  border-radius: 50%;
  width: 120px;
  height: 120px;
  animation: spin 2s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

#loadingmessage{
  text-align: center;
  font-style: italic;
}

.hidden {
  display: none;
}

/* Progress Meter*/
.prog_out {
  width: 90%;
  border: 1px solid black;
  background: linear-gradient(to right, beige, lime 50%, green);
  margin: 1rem auto;
  position: relative;
  top: 10px;
}

.progbar {
  position: relative;
  width: 100%;
  height: 20px;
  line-height: 20px;
  border-style: none;
  background-color: white;
  box-sizing: border-box;
  /*padding-left: 10px;*/
  font-size: 12px;
  overflow: hidden;
}

.progtext {
  position: absolute;
  width: 4em;
  top: 0px;
  left: 50%;
  margin-left: -2em;
  text-align: center;
}

/* CSS for the Live Bar with circles (now hearts) */
#lives {
  position: absolute;
  bottom: 10px;
  left: 10px;
  line-height: 24px;
  font-size: 1rem;
  display: flex;
  padding: 0px 12px;
}
#lives > div {
  /*background-color: rgba(255, 0, 0, 1);
  border-radius: 1em;*/
  width: 20px;
  height: 20px;
  margin: 0px 5px;
}

/* Make the app flash */
.beat {
  animation: pulse 0.5s linear;
  animation-fill-mode: forwards;
}

@keyframes pulse {
  /*0% {
    left: 0px;
  }
  25% {
    left: -5px;
  }
  75% {
    left: 5px;
  }*/
  100% {
    background-color: gray;
    /*left: 0px;*/
  }
}

.heart {
  fill: red;
}

.halfheart {
  transform: scale(0.6);
  transition: 1s linear;
}

.lostheart {
  transform: scale(0);
  transition: 1s linear;
}

/*.lostheart {
  animation: loseheart 1s ease-out;
  animation-fill-mode: forwards;
}

@keyframes loseheart {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.5);
  }
  100% {
    transform: scale(0);
  }
}*/

/* countdown Timer*/
#timer {
  position: absolute;
  top: 50px;
  right: 10px;
}

.base-timer {
  position: relative;
  height: 50px;
  width: 50px;
}

.base-timer__label {
  position: absolute;
  top: 0;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.base-timer__circle {
  fill: none;
  stroke: none;
}

.base-timer__path-elapsed {
  stroke-width: 15px;
  stroke: grey;
}

.base-timer__path-remaining {
  stroke-width: 15px;
  /*stroke-linecap: round;*/
  transform: rotate(90deg);
  transform-origin: center;
  transition: all 1s linear;
  stroke: currentColor;
}

.base-timer__path-remaining.green {
  color: rgb(65, 184, 131);
}

.base-timer__path-remaining.orange {
  color: orange;
}

.base-timer__path-remaining.red {
  color: red;
}
.base-timer__svg {
  transform: scaleX(-1);
}

/* Graph (For HSK Results)*/
canvas {
  margin: 0px auto;
  padding: 10px;
}


/* Page Overlays*/
.mask {
  background-color: rgba(0, 0, 0, 0.8);
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
}

.popup {
  max-height: 90vh;
  width: 300px;
  border: 1px solid black;
  margin: auto;
  background-color: beige;
  padding: 20px;
  overflow-y: auto;
}

.popupformbtns {
  width: 70%;
  display: flex;
  justify-content: space-between;
  margin: auto;
}

.popupformbtns > button {
  font-size: 1em;
  width: 40%;
  text-align: center;
}

.popup > form > ul {
  margin: auto;
  width: 50%;
  list-style-type: none;
  padding-left: 10px;
}

fieldset {
  display: flex;
  flex-direction: column;
  /*align-items: center;*/
}

fieldset > span {
  margin: 4px 25%;
}



.section1, .section2, .section3{
  width: 100%;
  min-height: 98vh;
  overflow: hidden;
  box-sizing: border-box;
}

.banner{
  background: rgba(0,0,0,0.1);
  margin: 0;
  position: fixed;
  font-family: papyrus, fantasy;
  z-index: 1;
  /*display: inline-flex;*/
}

header .main{
  font-weight: bolder;
  color: khaki;
  text-shadow: 4px 2px black;
  font-size: calc(1.2rem + 2vw);
  margin: auto;
  text-decoration: none;
}

header .signin{
  font-size: calc(0.3rem + 1vw);
  position: absolute;
  right: 10px;
  width:  20%;
  color: white;
  align-self: center;
}

.responsive{
  height: auto;
  max-width: 192px;
  /*width: 40%;*/
}


.section1{
  background-image: url("resources/images/100_6876_1.jpg");
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
}

.s1content{
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  align-content: space-evenly;
  justify-content: space-evenly;
  min-height: 99vh;
  padding:  2rem 1rem;
}

.s1column{
  flex:  200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  margin: 1rem;
  box-sizing: border-box;
}

.tagline{
  color: whitesmoke;
  font-family: papyrus, fantasy;
  font-size: calc(1rem + 2vw);
}

.s1column .spmenu{
  font-size: calc(1rem + 1.5vw);
  font-family: cursive;

  background-color: khaki;
  border-color: saddlebrown;
  margin: 15px;
  width: 65%;
}

.enumerateItem{
  font-size: calc(1rem + 1.1vw);
  background-color: rgba(245,236,195,0.5);
  margin: 1rem;
  padding: 1rem;
  border-radius: 10px;
  border: 2px solid saddlebrown;
  width: 70%;
  min-width: 280px;

}

.section2{
  background: linear-gradient(90deg, rgba(203,203,207,1) 0%, rgba(150,150,176,0.5) 35%, rgba(11,207,249,0.5) 74%, rgba(0,255,252,1) 100%); 
}

.section3{
  background-image: url("resources/images/100_7393_1.jpg");
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
}

.section2, .section3{
  border-top: 2px solid black;
  font-family: tahoma, serif;
  font-size: calc(0.8rem + 1vw);
  text-align: justify;
}

.contentbox{
  border: 2px solid darkgrey;
  flex: 350px;
  min-width: 40%;
  max-width: 400px;
  background-color: rgba(0, 0, 0, 0.6);
  padding: 2rem;
  padding-top: 0px;
  color: whitesmoke;
  text-shadow: 2px 2px black;
  border-radius: 15% 5%;
  display: flex;
  flex-flow: column;
}
.subheading{
  margin: 1rem auto;
  font-size: 1.5em;
  color: khaki;
  text-shadow: 2px 2px black;
  align-self: center;
}

.sectionheading{
  margin: 1rem auto 0 auto;
  font-size: 2rem;
  color: darkkhaki;
  text-shadow: 2px 2px darkgreen;
  position: sticky;
  top:  20px;
}

.brandname{
  font-weight: bold;
}


.input{
  width: 95%;
  margin: 0 auto;
  font-size: 1em;
  display: flex;
  justify-content: space-evenly;
}

.input input{
  width:  100%;
  font-size: inherit;
  margin-bottom: 1em;
  box-sizing: border-box;
  padding: 10px;
}

.input button{
  min-width: 25%;
  font-size: 0.8em;
  text-align: center;
  padding: 5px 10px;
  width: max-content;
}

.underconstruction{
  position: relative;
}

.footpopup{
  position: sticky;
  font-family: serif;
  background-color: lightcyan;
  bottom: 0px;
  height:  10vh;
  width: 100%;
  font-size: 1.2em;
  color: black;
  box-sizing: border-box;
}

.footpopup div{
  margin: 0.5em auto;
  padding: 0.5em;
}

.footpopup div button{
  margin: 0em 1em;
}

.updatelog{
  font-size: 1.5em;
  color: whitesmoke;
  font-family: monospace;
  margin: 4rem 1rem 0rem 1rem;
  width: 100%;
  min-height: 80vh;
}

#log > li{
  font-weight: bold;
  margin-top: 0.5em;
}