@import url('https://fonts.googleapis.com/css2?family=Quattrocento:wght@400;700&display=swap');
:root {
  --bg-color: #fefefe;
  --graphite: #dddddd;
  --ink: #121212;
  --red-ink: #CC0000;
  --unit: 2vh;
  --full-width: calc(19.4 * var(--unit));
}
html {
  box-sizing: border-box;
  font-family: 'Quattrocento', serif;
  color: var(--ink);
}
*, *:before, *:after {
  box-sizing: inherit;
}
html,body {
  padding:0px;
  margin:0px;
}
body {
  background-image: url("./../img/clean-gray-paper.png");
}
#view {
  position:relative;
/*  background-color:#ddd;*/
  height:100vh;
	aspect-ratio: 0.4281;
	width:auto;
  margin-left:auto;
  margin-right:auto;
}
.solution,.attempts {
  position: absolute;
/*  background-color:#777;*/
  top:calc(2 * var(--unit));
  width:calc(9 * var(--unit));
/*  height:calc(6 * var(--unit));*/
}
.solution {
  left:calc(1 * var(--unit));
}
.attempts {
  right:calc(1 * var(--unit));
}
#graph,.coverGraphic,#winView,#loseView,.levelCoverGraphic, .levelWinGraphic, .levelLoseGraphic {
  position: absolute;
/*  background-color:#777;*/
  top:calc(11 * var(--unit));
  width: var(--full-width);
  height:var(--full-width);
  left:calc(1 * var(--unit));
}
.coverGraphic {
  text-align:center;
}
.levelCoverGraphic, .levelWinGraphic, .levelLoseGraphic {
  top: 0px;
    height: calc(1.6 * var(--full-width));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
}
#winView, #loseView {
  top:0px;
  display: none;
  height:unset;
  left:unset;
}
#equation,.midPanel {
  position: absolute;
  top: calc(33 * var(--unit));
  left: calc(1 * var(--unit));
  width: var(--full-width);
  height: calc(3 * var(--unit));
  text-align: center;
}
#equation{
  border-bottom: 2px solid var(--ink);
  color: var(--red-ink);
}
#equation:after {
  content: 'EQUATION';
    position: absolute;
    bottom: calc(-2 * var(--unit));
    font-size: 16px;
    font-size: 1.8vh;
    font-weight: 700;
    user-select: none;
    text-transform: uppercase;
    width: 100%;
    left: 0px;
    color: var(--ink);
}
#winView .midPanel, #loseView .midPanel {
width:var(--full-width);
}

.controls, .statsControls {
  position: absolute;
  top:calc(39 * var(--unit));
  left:calc(1 * var(--unit));
  width:var(--full-width);
  height:calc(6 * var(--unit));
  display: flex;
    flex-direction: row;
    justify-content: space-between;
}
.statsControls  {
  justify-content: center;
}
#credits {
  position: absolute;
  top:calc(46 * var(--unit));
  left:calc(1 * var(--unit));
  width:var(--full-width);
  height:calc(2 * var(--unit));
  display: flex;
    flex-direction: row;
    justify-content: center;
}
#credits > * {
  align-self: center;
}
/*#overlay {
  position: absolute;
  top:calc(2 * var(--unit));
  left:calc(6 * var(--unit));
  width:var(--full-width);
  height:calc(45 * var(--unit));
  border-radius: var(--unit);
}*/
.winGraph, .winGraph_row {
  display:flex;
  flex-direction: column;
  gap: var(--unit);
  align-items: start;
  justify-content: start;
  width:100%;
  margin-top: var(--unit);
}
.winGraph_row,.winGraph_bar  {
  flex-direction: row;
    align-items: center;
}
.winGraph_row img {
  width: calc(3.9 * var(--unit));
}
.winGraph_bar {
  text-align: end;
  background-color: #ddd;
  padding: 0.2rem 1rem;
}

#statsRow {
  display:flex;
  justify-content: space-around;
  flex-direction: row;
  align-items: center;
  width:100%;
  column-gap: calc(1.6 * var(--unit));
}


#graphPlot {
  scale: .8;
  width: 100%;
  height: 100%;
}
svg {
  overflow:visible;
}
svg circle {
  transform-box: fill-box;
  transform-origin: center
}

.node {
  position: absolute;
  height:30%;
  aspect-ratio: 1 / 1;
  width:auto;
/*  border: 3px solid #777;*/
  border-radius:60px;
  transform: translate(-50%, -50%);
  display:flex;
  justify-content: center;

  align-items: center;
  user-select: none; 
}


#cover {
  text-align:center;
}

.overlay{
  position: absolute;
    display: none;
    flex-direction: column;
    height: calc(100vh - 6vh);
    width: calc(100% - 4vh);
    top: 2vh;
    left: 0px;
    background-color: #fff;
    justify-content: space-between;
    align-items: center;
    padding: 2vh;
    margin-left: 2vh;
    margin-right: 2vh;
    border-radius: var(--unit);
}
.overlay .ovCloseBtn {
  position: absolute;
  display:block;
  top: var(--unit);
  right: var(--unit);
}
.overlay .ovCloseBtn img {
    transform: translate(-50%, -50%); /* center the image in the overlay */
}
.overlay .ov-body {
  text-align: center;
  margin-bottom: calc(3 * var(--unit));
  display:flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  row-gap: calc(2 * var(--unit));
}
.overlay .ov-actions, .overlay .ov-header {

}

/* TYPE */
.displayText,.logoType {
display: block;
    font-size: 2em;
    font-size: 4.5vh;
    margin-block-start: 0.67em;
    margin-block-end: 0.67em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    font-weight: bold;
user-select: none; 
text-align: center;
text-transform: uppercase;
  }
.logoType {
}
.displayLabel {
  font-size: 16px;
  font-size: 1.8vh;
font-weight: 700;
user-select: none;
text-transform: uppercase;
}
.figure {
  font-size: 1.7em;
  font-size: 4.5vh;
  font-weight: bold;
user-select: none; 

}
.figure sup {
  margin-bottom: 30%;
}
.fraction {
  display: inline-flex;
    flex-direction: column;
    padding: 1em;
    align-items: center;
    font-size: smaller;
}
.numerator {
  border-bottom: 2px solid #000;
}
.guess {
  font-size: 1.7em;
  font-size: 3.7vh;
    font-weight: bold;
    user-select: none;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    height: inherit;
    padding-bottom: 0.5em;
}

#eqWin {
  text-align: center;
    margin-top: 1vh;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
}

.repeatDecimal {
  border-top: 2px solid;
}

button {
  background-color: transparent;
  border-radius: 8px;
  border-width: 0;
  color: var(--ink);
  cursor: pointer;
  display: inline-block;
  font-family: 'Quattrocento', serif;
  font-size: 2em;
  font-size:4vh;
  font-weight: 700;
  line-height: 2rem;
  list-style: none;
  margin: 0;
  padding: 10px 12px;
  text-align: center;
  transition: all 200ms;
  vertical-align: baseline;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
button.small {
  font-size: 16px;
  font-size: 2.2vh;
  color:var(--red-ink);
}
button:hover {
  color:var(--red-ink);
  filter: brightness(1.1);
  -webkit-filter: brightness(1.1);
}

button:disabled {
  opacity: .4;
}

#submitBtn, #startBtn, #gotItBtn {
  color:var(--red-ink);
}

.hudEl {
  display:flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
}

.sr-only {
  position: absolute;
  white-space: nowrap;
  width: 1px;
  height: 1px;
  overflow: hidden;
  border: 0;
  padding: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  margin: -1px;
}

.nightSky {
  transform: translate3d(0,0,0);
  background: linear-gradient(#000, rgba(10,10,10,.5) ,rgba(0,0,0,0));
    position: absolute;
    top: 0px;
    left: 0px;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    opacity:0;

    mix-blend-mode: overlay;

}

.dim {
  opacity: .5;
}

/*    #answerGeometry .star {
      fill: #fff;
      opacity: 1;

      animation: pulse 3s infinite;
    }
    #answerGeometry .star:nth-child(2n) {
      animation: pulse 5s infinite;
    }
    #answerGeometry .star:nth-child(3n) {
      animation: pulse 7s infinite;
    }
    #answerGeometry .star:nth-child(5n) {
      animation: pulse 9s infinite;
    }
    @keyframes pulse {
     0% { transform: scale(.8) rotate(0deg)}
     25% { transform: scale(1) rotate(90deg)}
     50% { transform: scale(.4) rotate(-80deg)}
     75% { transform: scale(1) rotate(100deg)}
     100% { transform: scale(.8) rotate(0deg)}
   }*/
    
/* INITS */

.overlay, #game, #levelCover, #startBtn, #waitBtn {
  display:none;
}