html {
  scroll-behavior: smooth;
}

:root {
  --font-scale: 1;
}

.light {
  --bg-rgb: 232, 232, 232;
  --fg-rgb: 12, 12, 12;
  --gray0: #D0D0D0;
  --gray1: #FFFFFF;
  --gray2: #E0E0E0;
  --gray3: #F0F0F0;
  --gray4: #CCC;
  --gray7: #888;
}

.dark {
  --bg-rgb: 0, 0, 0;
  --fg-rgb: 224, 224, 224;
  --gray0: #000;
  --gray1: #121212;
  --gray2: #202020;  
  --gray3: #282828;
  --gray4: #363636;
  --gray7: #666;
}

* {
  -webkit-transition: all 0.3s ease, font-size 0s linear;
  -moz-transition: all 0.3s ease, font-size 0s linear;
  -o-transition: all 0.3s ease, font-size 0s linear;
  -ms-transition: all 0.3s ease, font-size 0s linear;
  transition: all 0.3s ease, font-size 0s linear;
}

body {
  --bg: rgb(var(--bg-rgb));
  --fg: rgb(var(--fg-rgb));

  font-family: sans-serif, sans;
  padding: 0;
  margin: 0;
  background: var(--bg);
  color: var(--fg);
}

pre {
  margin: 0.3rem 0.1rem;
  white-space: pre-wrap;
  line-height: 1.4em;
}

.container {
  display: flex;
  flex-direction: column;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0.5%;
}

.column {
  margin-left: 1%;
  margin-right: 1%;      
}

.header {
  position: absolute;
  justify-content: center;
  display: flex;
  column-gap: 10%;
  width: 100%;
  z-index: 1000;
  background: rgba(var(--fg-rgb), 10%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding-bottom: 0.5em;
  padding-top: calc(0.5em + env(safe-area-inset-top, 0em));
}

body, .prompt * {
  font-size: calc(1rem * var(--font-scale));
}

@media only screen and (min-width: 768px) {
  .header {
    column-gap: 5%;
    padding-bottom: 1em;
    padding-top: calc(1em + env(safe-area-inset-top, 0em));
  }

  .column {
    margin-left: 10%;
    margin-right: 10%;
    bottom: 10%;
  }
}

@media only screen and (min-width: 1200px) {
  .column {
    margin-left: 20%;
    margin-right: 20%;
    bottom: 20%;
  }
}

@media only screen and (min-width: 2000px) {
  .column {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    bottom: 20%;
  }
}

.btn {
  display: inline;
  border-radius: 0.5em;
  color: rgba(var(--fg-rgb), 50%);

  font-size: 1.2em;
  font-weight: bold;

  padding: 0em 0.5em;

  cursor: pointer;
  user-select: none;
}

.btn-group {
  display: flex;
}

.btn-slim {
  padding-left: 0;
  padding-right: 0;
}

.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: var(--gray2);
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  padding: 0em 1em;
  z-index: 1000;
  top: 100%;
  left: 50%;
  transform: translate(-50%, 0%);
}

.dropdown-content a {
  color: var(--fg);
  opacity: 50%;
  font-weight: bold;
  text-decoration: none;
}

.dropdown-content a:hover {
  opacity: 100%;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.icon {
  font-size: 0.5em;
  padding: 0 1rem;
  vertical-align: middle;
  cursor: pointer;

  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: 50% 50%;
  mask-position: 50% 50%;

  background-color: rgba(var(--fg-rgb), 50%);
}

.icon-text:hover {
  color: var(--fg);
}

.icon:hover {
  background-color: var(--fg);  
}

.dark .i-mode {
  -webkit-mask-image: url("../img/sun.svg");
  mask-image: url("../img/sun.svg"); 
}

.light .i-mode {
  -webkit-mask-image: url("../img/moon.svg");
  mask-image: url("../img/moon.svg");
}

.i-moon {
  -webkit-mask-image: url("../img/moon.svg");
  mask-image: url("../img/moon.svg");
}

.i-sun {
  -webkit-mask-image: url("../img/sun.svg");
  mask-image: url("../img/sun.svg");
}

.i-down-arrow {
  -webkit-mask-image: url("../img/down-arrow.svg");
  mask-image: url("../img/down-arrow.svg");
}

.i-up-arrow {
  -webkit-mask-image: url("../img/up-arrow.svg");
  mask-image: url("../img/up-arrow.svg");
}

.i-play {
  -webkit-mask-image: url("../img/play.svg");
  mask-image: url("../img/play.svg");
}

.i-book {
  -webkit-mask-image: url("../img/book.svg");
  mask-image: url("../img/book.svg");
}

.i-github {
  -webkit-mask-image: url("../img/github.svg");
  mask-image: url("../img/github.svg");
}

.i-translate {
  -webkit-mask-image: url("../img/translate.svg");
  mask-image: url("../img/translate.svg");
}
