/* CSS Reset */
html {
  font-size: 62.5%;
  box-sizing: border-box;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: inherit;
}

@font-face {
  font-family: NorseBold;
  src: url(fonts/NorseBold-2Kge.otf);
}

/* Full Page Background Image */
body {
  background-image: url("images/bg-stone3.jpg");
  /* Background image is centered vertically and horizontally at all times */
  background-position: center center;
  /* Background image doesn’t tile */
  background-repeat: no-repeat;
  /* Background image is fixed in the viewport so that it doesn’t move when the content’s height is greater than the image’s height */
  background-attachment: fixed;
  /* Background image will rescale based on the container’s size */
  background-size: cover;
  /* Background color that will be displayed while the background image is loading */
  background-color: #464646;

  font-family: NorseBold, serif;
  width: 100%;
}

/* Structure */
.container {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

#header-left,
#header-right {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.7rem;
  text-align: center;
}

#header-center {
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 1.6rem;
}

header {
  min-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 4rem;
}

main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex-grow: 1;
  min-width: 100%;
}

.main-top,
.main-middle,
.main-bottom {
  display: flex;
}

footer {
  width: 100%;
  border-top: 3px groove #393939;
  text-shadow: 0 1px rgba(255, 255, 255, 0.6);
  background-color: rgba(0, 0, 0, 0.75);
}

footer .wrapper {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-around;
  font-size: 1.8rem;
  color: #393939;
  padding: 1rem;
}

.app-name {
  font-size: 4.7rem;
  text-align: center;
}

.credits {
  text-align: center;
  line-height: 2.5rem;
  max-width: 55%;
}

.html-css-js {
  background: transparent center/cover url("images/html-css-js.png") no-repeat;
  width: 6.4rem;
  height: 6.4rem;
}

footer a {
  color: #4d4d4d;
  text-decoration: none;
}

footer a:hover {
  text-shadow: 0 0 1vw #fa1c16, 0 0 3vw #fa1c16, 0 0 10vw #fa1c16, 0 0 10vw #fa1c16, 0 0 0.4vw #fed128;
  color: #fed128;
}

/* Styles */
.header {
  color: #252525;
  text-shadow: 0 1px rgba(255, 255, 255, 0.7);
  text-align: center;
}
.odin {
  background: transparent center/cover url("images/odin.png") no-repeat;
  height: 9rem;
  width: 9rem;
  margin-top: 0.8rem;
}

.odin.power-on {
  background: transparent center/cover url("images/odin-power-on.png") no-repeat;
}

.power-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 12rem;
  height: 12rem;
  border: 0.8rem solid #252525;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.75), inset 0 1px 0 0 rgba(255, 255, 255, 1), inset 0 -1px 0 0 rgba(255, 255, 255, 1), 0 1px 0 0 rgba(255, 255, 255, 0.75);
}

.power-button.power-on {
  /* radial gradient bg for The Odin Project logo */
  background: transparent;
  background: -webkit-radial-gradient(center, rgba(254, 209, 41, 0.75), transparent 70%);
  background: -moz-radial-gradient(center, rgba(254, 209, 41, 0.75), transparent 70%);
  background: radial-gradient(circle at center, rgba(254, 209, 41, 0.75), transparent 70%);
  border-color: #28d7fe;
  /* matching the text-shadow from .magic-txt */
  box-shadow: 0 0 40px -5px #1041ff;
}

.power-button:hover {
  border-color: #28d7fe;
}

.power-button:active {
  border: 4px inset #28d7fe;
}

.runes {
  margin: 0;
  padding: 0;
  font-size: 5rem;
  color: #252525;
  text-shadow: 0 1px rgba(255, 255, 255, 0.7);
  display: flex;
  justify-content: center;
  text-align: center;
}

#runes-top.runes {
  letter-spacing: 4rem;
  margin-right: -3.1rem;
}

#runes-bottom.runes {
  letter-spacing: 3.1rem;
  margin-right: -3.1rem;
  padding-bottom: 4rem;
}

#runes-right,
#runes-left {
  height: 50rem; /* same height as .calculator */
}

.power-button.power-on #runes-top.runes.firey-txt {
  letter-spacing: 3rem;
  background: blue;
}

/* All-Browser Compliant Vertical Text */
.vertical-text {
  width: 0;
  word-break: break-all;
  white-space: pre-wrap;
  /* Center vertically */
  display: flex;
  align-items: center;
}
/* All-Browser Compliant Vertical Text v2 */
/* .vertical-text {
  width: 0px;
  word-wrap: break-word;
  white-space: pre-wrap;
} */

/* Calculator */
.calculator {
  border: 3px groove #7c7c7c;
  margin: 0 3rem;
  width: 30rem;
  height: 50rem;
  background-image: linear-gradient(to bottom, transparent, transparent 50%, rgba(0, 0, 0, 0.2));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), inset 0 1px 0 0 rgba(255, 255, 255, 0.45), inset 0 -1px 0 0 rgba(255, 255, 255, 0.15), 0 1px 0 0 rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

.calculator-screen {
  width: calc(100% - 20px);
  font-size: 6rem;
  line-height: 4rem;
  height: 80px;
  border: none;
  background-color: rgba(37, 37, 37, 0.75); /* #252525 75%*/
  color: #97928c;
  text-align: right;
  padding: 0 10px;
  margin: 10px 10px 0 10px;
  border: 2px inset #6e6e6e;
  box-shadow: inset 0 0 10px 3px rgba(0, 0, 0, 0.5);
  overflow: scroll;
}

.calculator-keys {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 10px;
  padding: 10px;
}

.calculator-screen,
button {
  font-family: NorseBold, serif;
}

/* Calculator Buttons */
button {
  width: 6rem;
  height: 6rem;
  border-radius: 2px;
  border: 3px groove #797979;
  background-color: transparent;
  font-size: 4rem;
  color: #252525;
  background-image: linear-gradient(to bottom, transparent, transparent 50%, rgba(0, 0, 0, 0.04));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), inset 0 1px 0 0 rgba(255, 255, 255, 0.45), inset 0 -1px 0 0 rgba(255, 255, 255, 0.15), 0 1px 0 0 rgba(255, 255, 255, 0.15);
  text-shadow: 0 1px rgba(255, 255, 255, 0.7);
  cursor: pointer;
}

.magic-pulse:hover {
  text-shadow: 0 0 1vw #fa1c16, 0 0 3vw #fa1c16, 0 0 10vw #fa1c16, 0 0 10vw #fa1c16, 0 0 0.4vw #fed128;
  color: #fed128;
}

button:active {
  border: 2px inset #797979;
}

.operator {
  font-size: 6rem;
  line-height: 5rem;
}

.equal-sign {
  height: 100%;
  grid-row: 2 / 5;
  grid-column: 4 / 5;
  font-size: 6rem;
}

.decimal:disabled {
  cursor: not-allowed;
}

/* Custom checkbox
 *  REF: https://www.w3schools.com/howto/howto_css_custom_checkbox.asp 
 */

/* Customize the label (the container) */
.custom-checkbox-container {
  display: block;
  position: relative;
  margin: 5px 10px 10px;
  cursor: pointer;
  font-size: 2.2rem;
  line-height: 2rem;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Hide the browser's default checkbox */
.custom-checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

/* Create a custom checkbox */
.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 24px;
  width: 24px;
  border: 3px groove #797979;
  background-image: linear-gradient(to bottom, transparent, transparent 50%, rgba(0, 0, 0, 0.04));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), inset 0 1px 0 0 rgba(255, 255, 255, 0.45), inset 0 -1px 0 0 rgba(255, 255, 255, 0.15), 0 1px 0 0 rgba(255, 255, 255, 0.15);
}

.checkmark-txt {
  position: relative;
  margin-left: 3rem;
  color: #1e1e1e;
  text-shadow: 0 1px rgba(255, 255, 255, 0.7);
}

/* On mouse-over, show checkmark */
.custom-checkbox-container:hover input ~ .checkmark:after {
  display: block;
}

/* When the checkbox is checked, add a blue background */
.custom-checkbox-container input:checked ~ .checkmark {
  background-color: rgba(40, 215, 254, 0.75);
}

/* Create the checkmark/indicator (hidden when not checked) */
.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

/* Show the checkmark when checked */
.custom-checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

/* Style the checkmark/indicator */
.custom-checkbox-container .checkmark:after {
  left: 7px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid #fed128; /* check color */
  border-width: 0 3px 3px 0;
  -webkit-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  transform: rotate(45deg);
}

/* Fire And Magic */
.magic-bg {
  box-shadow: 0 0 1vw #1041ff, 0 0 3vw #1041ff, 0 0 10vw #1041ff, 0 0 10vw #1041ff, 0 0 0.4vw #8bfdfe;
  background-color: rgba(40, 215, 254, 0.75); /* #28d7fe */
}

.magic-txt {
  text-shadow: 0 0 1vw #1041ff, 0 0 3vw #1041ff, 0 0 10vw #1041ff, 0 0 10vw #1041ff, 0 0 0.4vw #8bfdfe;
  color: #28d7fe;
}

.firey-txt {
  text-shadow: 0 0 1vw #fa1c16, 0 0 3vw #fed128, 0 0 10vw #fed128, 0 0 10vw #fed128, 0 0 0.4vw #fed128;
  color: #fed128;
}

.golden-txt {
  /* firey stroke on gold */
  color: #fed128;
  -webkit-text-fill-color: #fed128; /* will override color (regardless of order) */
  -webkit-text-stroke-width: 1px;
  -webkit-text-stroke-color: #fa1c16;
}

/* Based on Neon Flux https://codepen.io/Trinca/pen/NrvpWa */
.firey-pulse {
  color: #fb4264;
  text-shadow: 0 0 3vw #f40a35;
}

.magic-pulse {
  color: #426dfb;
  text-shadow: 0 0 3vw #2356ff;
}

.firey-pulse {
  animation: firey-pulse 5s ease infinite;
  -moz-animation: firey-pulse 5s ease infinite;
  -webkit-animation: firey-pulse 5s ease infinite;
}

@keyframes firey-pulse {
  0%,
  100% {
    text-shadow: 0 0 1vw #fa1c16, 0 0 3vw #fa1c16, 0 0 10vw #fa1c16, 0 0 10vw #fed128, 0 0 0.4vw #fed128;
    color: #fed128;
  }
  50% {
    text-shadow: 0 0 0.5vw #800e0b, 0 0 1.5vw #800e0b, 0 0 5vw #800e0b, 0 0 5vw #800e0b, 0 0 0.2vw #800e0b;
    color: #806914;
  }
}

.magic-pulse {
  animation: magic-pulse 5s linear infinite;
  -moz-animation: magic-pulse 5s linear infinite;
  -webkit-animation: magic-pulse 5s linear infinite;
  -o-animation: magic-pulse 5s linear infinite;
}

.magic-pulse:hover {
  text-shadow: 0 0 1vw #fa1c16, 0 0 3vw #fa1c16, 0 0 10vw #fa1c16, 0 0 10vw #fa1c16, 0 0 0.4vw #fed128;
  color: #fed128;
  animation: none;
}

@keyframes magic-pulse {
  0%,
  100% {
    text-shadow: 0 0 1vw #1041ff, 0 0 3vw #1041ff, 0 0 10vw #1041ff, 0 0 10vw #1041ff, 0 0 0.4vw #8bfdfe;
    color: #28d7fe;
  }
  50% {
    text-shadow: 0 0 0.5vw #082180, 0 0 1.5vw #082180, 0 0 5vw #082180, 0 0 5vw #082180, 0 0 0.2vw #082180, 0.5vw;
    color: #1d4953;
  } /* alt color #146c80 */
}
