:root {
   --spacer: 0;
}

html {
  font-size: 24px;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  font-size: 1rem; 
}

nav {
  width: 20%;
  height: auto;
  position: fixed;
  text-align: center;
  border: 1px solid #000;
  overflow: hidden;
  font-weight: bold;
  margin-bottom: 7px;
}

nav header {
  background-color: #FC6;
  border-bottom: 1px solid #000;
  padding: 5px;
}

nav ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

nav ul li {
  border-bottom: 1px solid #000;
}

nav ul li:last-child {
  border-bottom: none;
}

nav ul li a {
  display: block;
  color: black;
  padding: 5px 5px;
  text-decoration: none;
  background-color: #f1f1f1;
}

nav ul li a:hover {
  background-color: #555555;
  color: white;
}

main {
  margin-left: 22%;
}

figure {
  display: block;
  margin: 0 auto;
  width: 320px;
}

img {
  border-radius: 15%;
}

figcaption {
  text-align: center;
  margin-bottom: 30px;
}

section header {
  font-weight: bold;
  text-decoration: underline;
}

.noBidi {
  direction: rtl;
  width: 300px;
  height: 30px;  
  background-color: none;
  border: 2px solid black;
  display: inline-block;
  padding: 5px;
  padding-bottom: 3px;
  margin: 15px;
  margin-top: 5px;
  margin-left: 0;
  overflow: hidden; 
}

.bidi {
  direction: rtl;
  unicode-bidi: bidi-override;
  width: 300px;
  height: 30px;
  background-color: none;
  border: 2px solid black;
  display: inline-block;
  padding: 5px;
  padding-bottom: 3px;
  margin: 15px;
  margin-top: 5px;
  margin-left: 0;
  overflow: hidden; 
}

.relative {
  position: relative;
  bottom: 24px;
}
  
.resetButton {
  display: inline-block;
  background-color: lightgoldenrodyellow;
  font-weight: bold;
  border: 2px solid #000;
  border-radius: 10px;
  padding: 2px;
  margin-top: 10px;
  margin-left: 20px;
  margin-bottom: 30px;
}

.resetButton:hover {
  background-color: #FC6;
}

#less-styling li {
  list-style-type: none;
}

section[class="main-section"]:target {
  padding-top: 8px;
}

#buttonBox {
  height: auto;
  width: auto;
}

#startButton {
  display: block;
  border: 3px solid #000;
  border-radius: 10px;
  background-color: lightgreen;
  margin: 60px 30px 30px 30px;
  font-size: 1.5rem;
  font-weight: bold;
}

#startButton:hover {
  background-color: lightgoldenrodyellow; 
}
  
#startButton.started:hover {
  background-color: lightgoldenrodyellow;  
}
  
#startButton.started {
  margin: 60px 30px 30px 30px;
  background-color: #FC6;
}

#appBox {
  height: auto;
  width: auto;
}

#app {
  position: relative;
  top: 0;
  height: 215px;
  width: 83px;
  background-color: transparent; 
  margin: 0 auto;
  font-size: 1.5rem;
}
  
#multiplicand {
  display: block;
  margin-bottom: 5px;
  text-align: right;
}

#times {
  display: inline-block;
  text-align: left;
}

#multiplier {
  position: absolute;
  right: 0;	
  display: inline-block;
  text-align: right;
}

#subline {
  text-align: right;
}

#answerEntry {
  direction: rtl;
  display: block;
  height: auto;
  width: 83px;
  border: none;
  padding-right: 1px;
  background-color: none;
  text-align: right;
}

#answerEntry:focus {
  outline: none;
}

#resultCheckMssg {
  position: absolute;
  right: 0;
  height: 42px;
  width: 83px;
  display: block;
  text-align: right;
}

#bottom-space {
  height: var(--spacer);
}

@media screen and (max-width: 600px) {
  nav {
  	 position: relative;
  	 width: 100%;
    text-align: center;
  }
  main {
    margin-left: 5px;
    padding-bottom: 0;  
  }
  .bidi {
    width: 280px;  
  }
  .noBidi {
    width: 280px;  
  }
  #startButton {
    font-size: 1rem;  
  }
  #app {
    position: relative;
    bottom: 10dvh; 
    margin: 0 auto; 
  }
  #bottom-space {
    height: 31px;

  }
}
 