* {
   box-sizing:border-box;
}
  

body {
  background-color:black;
  font-family: Helvetica, Arial, sans-serif;
  color:white;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
}

h2 {
  font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  width:100%;
  margin-top:10px auto;
  color:goldenrod;
}
h4 {
  color:#e3dac9;
  margin:6vh auto 0 1%;
}
.secret-btn-row {
  margin:0 2% 1% auto;
  width:96%;
  height:7vh;
  display: flex;
  justify-content:center;
  align-items: flex-end;
  touch-action: manipulation;
}


/************************
*** Sidebar and Menu ****
************************/
#sidebar {
  position:relative;
  float:left;
  width: 25%;
  height:99vh;
  background: rgba(49, 49, 49, 0.9);
  background-image: url("images/skins/snakeskin.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  transition: 0.2s;
  z-index: 2000;
  overflow: hidden;;
}

#sidebar::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.35); /* Black overlay at 0.5 opacity */
  pointer-events: none;
  z-index: 1;
}


#sidebar img {
  width:94%;
  margin:3px 3%;
}
#sidebar a {
  text-decoration:none;
  color:white;
}
#sidebar a:hover {
  color:white;
}
#sidebar a:visited {
  color:white;
}
#menu-title {
  width:100%;
  display: flex;
  padding:0;
  margin:0;
}
#menu-title p {
  width:90%;
  margin:4px 5% 10px 5%;
  text-align:center;
  padding:0;
}
#menu-items {
  width:100%;
  height:60px;
  display: flex;
  justify-content: center;
  align-items: center;
}
#menu-items:hover {
  background-color:#89CFF0;
  color:#333;
}
#menu-items img {
  width:12%;
}
#menu-items p {
  width:82%;
  margin:auto 1%;
  text-align:left;
}
#top-link {
  display: none;
  background-color:goldenrod;
  color:black;
  width:60px;
  height:30px; 
  font-weight: bold; 
  align-items: center; 
  justify-content: center;
}

/************************
*******  MAIN  **********
************************/
#main {
  padding-top:2px;
  float:left;
  transition: 0.2s;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom:100px;
}
#calc-body {
  margin-top:0;
  padding-top:2%;
  height:99vh;
  background-color:#000435;
  background-image: url("images/skins/bluesteel.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  border:none;
  border-radius:10px;
}
#calc-cover {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color:#007bff;
  border:2px solid white;
  border-radius:10px;
  z-index: 10000; /* This should be higher than the z-index of calc-body */
}


/***********************/
/* This is the Screen  */
/***********************/
#screen {
  font-family: Cambria Math;
  font-weight:600;
  position:relative;
  margin:0 2% 0 2%;
  width:96%;
  height:32vh;
  background-color:#89CFF0;
  border:2px solid black;
  border-radius:10px;
  overflow-y:auto;
  overflow-x:hidden;
  word-wrap: break-word;
  font-size:34px;
  caret-color: black;
  padding: 3px 4px;
  user-select: none;
}
#size-error {
  display:none;
  background-color: black;
  border: 2px solid white;
  border-radius: 10px;
}

#screen p {
  margin:0;
  padding:0;
  font-size:34px;
  color:#333;
}
.output {
  font-family:Cambria Math;
  text-align: right;
  font-weight: 600;
  color:#333;
  margin:0;
}
#input {
  text-align: left;
  font-size:34px;
  height:36px;
  background-color: #89CFF0;
  width: 100%;
  border: none;
  margin:0;
  padding:0;
}
#blinker {
  width:6px;
}

#functionInput{
  background-color: white;
  font-size:18px;
  margin:0;
  padding-left:6px;
  text-align: left;
  height:36px;
  width: 100%;
  border: none;
}

#divInput {
  height:auto;
  width: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
}

.inputText {
  width: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
}
.regularText {
  display: inline-block;
  white-space: nowrap;
}
.blinking-cursor {
  color: #333;
  margin-top:-2px;
  animation: blink 1s infinite;
}
@keyframes blink {
  0% {opacity: 1;}
  50% {opacity: 0;}
  100% {opacity: 1;}
}
.exponent {
  font-size:18px;
  margin:auto 1px;
  padding-top:1px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  white-space: nowrap;
}
.fractionDiv {
  height:100%;
  padding:0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  white-space: nowrap;
}
.numerator, .denominator {
  height: 50%;
  min-width: 24px;
  font-size:20px;
  font-weight:bold;
  text-align:center;
  box-sizing: border-box; /* Include border and padding in element's total width and height */
}
.numerator:focus, .denominator:focus {
  outline: none;
  caret-color: transparent;
}
.triangle-container {
  width:100%;
  float:right;
  margin:5px 10px 0 10px;
}

.exponentDiv .fractionDiv {
  vertical-align: super;
  /* Optionally, tweak margin or position for best appearance */
  position: relative;
  top: -0.5em; /* Try -0.4em to -0.7em for fine-tuning */
  margin-left: 2px;  /* Optional: add a little space before/after */
  margin-right: 2px;
}
.exponentDiv > .fractionDiv {
  vertical-align: super;
}
/* Reduce fraction font size when inside an exponent */
.exponentDiv .numerator,
.exponentDiv .denominator {
  font-size: 14px;
  line-height: 1.1;
  min-width: 14px;
  min-height: 1em;
  padding: 0;
}

.logBase, .logArg {
  width:auto;
  min-width: 18px;
}

/* Reduce fraction size when inside a log base (subscript) */
.logBase .fractionDiv {
  font-size: 0.5em;
  vertical-align: sub;
  position: relative;
  top: 0.2em;
  margin-left: 1px;
  margin-right: 1px;
}
.logBase .numerator,
.logBase .denominator {
  font-size: 14px;
  line-height: 1.1;
  min-width: 12px;
  min-height: 1em;
  padding: 0;
}
.logBase .fraction-line {
  margin: 1px 0;
}
/***********************/
/* Top Row with Slider */
/***********************/
#top-panel {
  display:flex;
  align-items:center;
  margin:0;
  width:100%;
  height:7vh;
  border-radius:5px;
  touch-action: manipulation;
}

.link-btn {
  width:25%;
  margin:0;
  padding:0;
  float:left;
}

#divSlider {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40%;
  float: right;
}
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: black;
  transition: .4s;
}
.slider:before {
  position: absolute;
  content: "";
  height: 24px;
  width: 24px;
  left: 1px;
  bottom: 1px;
  background-color: #89cff0e1;
  transition: .4s;
}
input:checked + .slider {
  background-color:black;
}
input:checked + .slider:before {
  transform: translateX(24px);
}
.slider.round {
  border-radius: 34px;
}
.slider.round:before {
  border-radius: 50%;
}




/***********************/
/*  Rows of Buttons    */
/***********************/
.btn-2nd-row {
  margin:2% 2% 0 2%;
  width:96%;
  height:7vh;
  display: flex;
  justify-content:center;
  align-items: center;
  touch-action: manipulation;
}
.btn-row {
  margin:1% 2%;
  width:96%;
  height:9vh;
  display: flex;
  justify-content:center;
  align-items: flex-end;
  touch-action: manipulation;
}
.top-text {
  color:#89CFF0;
  font-size: 16px;  
  margin:0 auto auto 8px;
  padding:0;
  font-weight:bold;
  
}
#pi-symbol {
  font-family: 'Euclid';
  font-size: 20px;
}
.single-btn {
  width:20%;
  margin:0;
  padding:0;
  float:left;
}
.btn {
  width:96%;
  height:6vh;
  margin:0 2%;
  border:none;
  border-radius:5px;
  font-weight:bold;
  font-size: 18px;
  border:.5px solid #555

}
.link-btn button {
  font-size:16px;
  margin:0px;
  border:.5px solid #555

}
.link-btn p {
  margin:0px;
}

.symbols {
    font-weight:300px;
    font-size:26px;
    padding-top:3px
}
.delete button {
  font-size:14px;
}

#btn-frac-numer {
  margin-left:35%;
  margin-top:-6px;
  width:30%;
  font-size:22px;
  height:25px;
}
#btn-frac-denom {
  margin-left:35%; 
  margin-top:-7px;
  width:30%;
  font-size:22px;
  height:24px;
}


/***********************/
/* Content on the Side */
/***********************/
#content {
  float:left;
  background:black;
  width: calc(75% - 420px);
  height: 95vh;
  transition: 0.2s;
  z-index: 1;
}
.pnl-content {
  height:94vh;
}
#content a {
  padding:5px;
  color:#89CFF0;
}
#content a:visited {
  color:#89CFF0;
}

#featuredH2 {
  width:100%;
  margin:6px auto;
  color:white;
}
#featuredDiv {
  width:60%;
  margin-left:20%;
  padding-top:5px;
}
.featuredFont1 {
  font-size: 18px;
  margin:0;
}
.featuredFont2 {
  color:#777;
  font-size: 18px;
  margin:10px auto;
}
.featuredImage1 {
  width:50%;
  margin:10px auto;
}
.featuredImageRound1 {
  width:120px;
  border:4px solid white; 
  border-radius:50%;
}

.grade-input {
  text-align: center;
}

/* Remove up/down arrows in Chrome, Safari, Edge, Opera */
.grade-input::-webkit-outer-spin-button,
.grade-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}




/*************************/
/* Hidden Math Functions */
/*************************/
#functionInput {
  width:98%;
  margin:8px 1%;
  font-size:18px;
}
.div-function {
  background-color: #222;
  height:34px;
  justify-content: center;
  align-items: center;
  display:flex;
  margin:5px;
  border-radius:5px;
  font-weight: bold;
}
.div-function:hover {
  background-color: goldenrod;
}
.div-function:hover p {
  color:black;
}
.grid-item {
  margin:5px;
}
.function-name {
  color:goldenrod;
  margin:0;
  float:left;
}
.long-description {
  color:#afafaf;
  margin:3px 0;
}
.short-description {
  color:#89CFF0;
  margin:3px 0;
}



/***********************/
/* Slideshow container */
/***********************/
.slideshow-container {
  max-width: 1000px;
  display: flex;
    justify-content: center;
    align-items: center;
}
/* Hide the images by default */
.mySlides {
  display: none;
}
/* Next & previous buttons */
.prev, .next {
  cursor: pointer;
  width: auto;
  color: white;
  font-weight: bold;
  font-size: 18px;
  border-radius: 0 3px 3px 0;
  user-select: none;
}
.plusSlidesBtn {
  background-color:black;
  border:none;
  border-radius:10px;
  width:50px;
  height:40px;
  margin:auto 8px;
}
.plusSlidesBtn:hover {
  background-color:goldenrod;
  color:black;
}
/* Position the "next button" to the right */
.next {
  right: 0;
}
/* Caption text */
.text {
  color: #f2f2f2;
  font-size: 15px;
  padding: 8px 12px;
  position: absolute;
  bottom: 8px;
  width: 100%;
  text-align: center;
}
/* Fading animation */
.fade {
  animation-name: fade;
  animation-duration: 1.5s;
}
@keyframes fade {
  from {opacity: .4}
  to {opacity: 1}
}




@media (max-width: 660px) {
    body {
      overflow-x: hidden;
      overflow-y: hidden;
    } 
    #sidebar {
      width:50%;
      position:absolute;
      display:none;
    }
    #main {
      width:100%;
      margin:0px;
      float:none;
      z-index:auto;
      position: relative;
    } 
    #calc-body {
      width:100%;
      margin:0;
    }

    #screen p {
      height:36px;
      font-size:36px;
      margin:0;
      padding-top:0;
    }
    #input {
        height:36px;
    }
    input[type="text"] {
      font-size:36px;
      margin:0;
      padding-top:6px;
    }

     #content {
      width: 100%;
      margin-left: 0;
      margin-top: 12px;
    }
    .top-text {
      font-size: 18px;  
    }
}

@media (max-height: 800px) {
  #screen {
      height:31vh;
  }
}
@media (max-height: 700px) {
  #screen {
      height:30.5vh;
  }
}
@media (max-height: 650px) {
  #screen {
      height:29vh;
  }
}
@media (max-height: 600px) {
    #screen {
        height:28vh;
    }
    #top-panel button {
      font-size: 12px;
    }
    #btn-frac-numer {
      display:none;
    }
    #btn-frac-denom {
      font-size: 22px;
    }

    .btn-2nd-row button {
      font-size: 12px;
    }
    .btn-row button {
      font-size: 13px;
    }
    .top-text {
      font-size: 14px;  
    }
}
@media (max-height: 420px) {
  #screen {
    display:none;
  }
  .btn {
    display:none;
  }
  .top-text {
    display: none;
  }
  h4 {
    display:none;
  }
  #size-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: white;
  }
  #size-error img {
    width: 50vh;
    height: auto;
  }
}

@media (max-width: 430px) {

}
@media (max-width: 380px) {
  #calc-cover {
    top:0;
  }
  #screen {
    height:32vh;
  }
  #btn-frac-numer {
    font-size:18px;
    height:23px;
    margin-top:-3px;
  }
  #btn-frac-denom {
    font-size:18px;
    margin-top:-2px;
  }
  .top-text {
    font-size: 14px;  
  }
  #pi-symbol {
    font-size:17px !important;
    position: relative;
    top: 1px;
  }
}
    