* {
  box-sizing: border-box;
}

html, body {
  min-height: 100%;
}

html[lang="fa"] #docs,
html[lang="fa"] #instructions,
html[lang="fa"] #credits .translate,
a[href="#fa"] {
  direction: rtl;
  font-family: Tahoma, Verdana, Segoe, sans-serif;
}

body {
  display: flex;
  min-width: 600px;
  margin: 0;
  background-color: #43A047;
  color: rgba(255, 255, 255, 0.7);
  font-family: 'PT Sans', sans-serif;
}

#sidebar {
  width: 50%;
  min-width: 300px;
  position: relative;
  padding: 2em;
  background-color: #43A047;
  font-size: 15px;
}

h1 {
  margin: 0 0 0.5em;
  text-transform: uppercase;
  font-family: 'Fredoka One', cursive;
  font-size: 28px;
}

pre {
  margin: 0;
}

code {
  padding: 0 2px;
  background-color: rgba(255, 255, 255, 0.2);
  font-family: 'Source Code Pro', monospace;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
}

li {
  line-height: 1.5;
}

a {
  color: rgba(255, 255, 255, 0.7);
}

a:hover {
  color: #fff;
}

.help {
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
}

.tooltip {
  position: absolute;
  display: inline-block;
  max-width: 225px;
  padding: 0 1em 1em;
  background-color: #2c3e50;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.5;
  z-index: 60;
}

.tooltip:after {
  content: '';
  position: absolute;
  top: -12px;
  left: 12px;
  width: 0; 
  height: 0; 
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-bottom: 12px solid #2c3e50;
}

#share {
  display: none;
  margin-top: 3em;
  text-align: center;
}

.fb-like {
  z-index: 20;
  vertical-align: top;
}

#editor {
  position: relative;
}

#editor,
pre {
  font-family: 'Source Code Pro', monospace;
  font-size: 16px;
  line-height: 1.5;
  color: #aaa;
}

#css {
  height: 260px;
  position: relative;
  padding: 10px 10px 10px 40px;
  background-color: #ddd;
  border-radius: 4px;
  overflow: hidden;
}

.line-numbers {
  position: absolute;
  top: 0;
  left: 0;
  padding: 10px 6px;
  text-align: right;
  background-color: #999;
  color: #D5D5D5;
}

#code {
  display: block;
  width: calc(100% - 16px);
  height: 24px;
  margin-left: 16px;
  border: none;
  font-family: 'Source Code Pro', monospace;
  font-size: 16px;
  outline: none;
  resize: none;
  overflow: auto;
}

#level-counter {
  float: right;
  position: relative;
  display: inline-block;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  font-size: 15px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

#levelsWrapper {
  display: none;
  top: 30px;
  right: 20px;
  max-width: 160px;
  padding: 1em 0.5em;
  margin-top: 12px;
}

#levelsWrapper:after {
  left: calc(50% - 12px);
}

#levels {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.level-marker {
  float: left;
  display: inline-block;
  width: 30px;
  height: 30px;
  margin: 2px;
  line-height: 26px;
  background-color: rgba(255, 255, 255, 0.2);
  border: 2px solid transparent;
  border-radius: 50%;
  text-align: center;
  cursor: pointer;
}

.level-marker.current,
.level-marker:hover {
  border-color: rgba(255, 255, 255, 0.5);
}

.level-marker.solved {
  background-color: #228B24;
}

#level-indicator,
.arrow {
  float: left;
  height: 30px;
}

#level-indicator {
  display: inline-block;
  width: 144px;
  line-height: 30px;
  text-align: center;
  cursor: pointer;
}

#labelLevel {
  margin-left: 5px;
}

.caret {
  display: inline-block;
  margin-left: 2px;
}

#level-indicator:hover,
.arrow:not(.disabled):hover {
  background-color: rgba(255, 255, 255, 0.2);
}

#labelReset {
  margin-top: 1em;
  text-align: center;
  cursor: pointer;
}

.arrow {
  display: inline-block;
  font-family: 'Comic Sans MS';
  padding: 0.25em 0.4em 0.2em;
  cursor: pointer;
}

.arrow.left {
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.arrow.right {
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.arrow.left:not(.disabled):hover,
.arrow.right:not(.disabled):hover {
  border-color: transparent;
}

.arrow.disabled {
  opacity: 0.5;
}

button {
  display: inline-block;
  padding: 0.4em 0.8em;
  background-color: #D11606;
  border: none;
  border-radius: 4px;
  font-family: 'PT Sans', sans-serif;
  font-size: 16px;
  line-height: 24px;
  color: #fff;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-appearance: none;
  appearance: none;
}

button:active {
  outline: none;
}

button:not(.disabled):hover {
  background-color: #F12D22;
}

#next {
  position: absolute;
  right: 1em;
  bottom: 1em;
}

#next.disabled {
  opacity: 0.5;
}

#credits {
  margin-top: 1.5em;  
  line-height: 1.5em;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}

#language {
  position: relative;
}

#language .toggle {
  display: inline-block;
  padding: 1px 8px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  user-select: none;
}

#language .toggle:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

#language .tooltip {
  display: none;
  bottom: 30px;
  left: 0px;
  width: 200px;
  padding: 1em;
}

#language .tooltip:after {
  top: auto;
  bottom: -12px;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 12px solid #2c3e50;
  border-bottom: none;
}

#language .tooltip a {
  padding: 0 2px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
}

#language .tooltip a:hover {
  color: #fff;
}

#board {
  position: relative;
  width: 50vw;
  height: 50vw;
  min-width: 300px;
  min-height: 300px;
  overflow: hidden;
}

#pond,
#background {
  display: flex;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 1em;
}

#background {
  z-index: 10;
  border-radius: 0 0 0 10px;
  background-color: #1F5768;
}

#pond {
  z-index: 20;
}

.lilypad,
.frog {
  position: relative;
  width: 20%;
  height: 20%;
  overflow: hidden;
}

.frog.bounceOutUp {
  -webkit-animation-delay: .6s;
  -moz-animation-delay: .6s;
  -ms-animation-delay: .6s;
  animation-delay: .6s;
}

.frog .bg.bounce {
  -webkit-animation-duration: 2s;
  -moz-animation-duration: 2s;
  -ms-animation-duration: 2s;
  animation-duration: 2s;
}

.frog.yellow .bg.bounce {
  -webkit-animation-delay: .3s;
  -moz-animation-delay: .3s;
  -ms-animation-delay: .3s;
  animation-delay: .3s;
}

.frog.red .bg.bounce {
  -webkit-animation-delay: .6s;
  -moz-animation-delay: .6s;
  -ms-animation-delay: .6s;
  animation-delay: .6s;
}

.lilypad .bg,
.frog .bg {
  width: 100%;
  height: 100%;
  background-position: center center;
  background-size: contain;
  background-repeat: no-repeat;
}

.frog .bg {
  background-size: 60% 60%;
}

.lilypad.green .bg {
  background-image: url("../images/lilypad-green.svg");
}

.lilypad.red .bg {
  background-image: url("../images/lilypad-red.svg");
}

.lilypad.yellow .bg {
  background-image: url("../images/lilypad-yellow.svg");
}

.frog.green .bg {
  background-image: url("../images/frog-green.svg");
}

.frog.red .bg {
  background-image: url("../images/frog-red.svg");
}

.frog.yellow .bg {
  background-image: url("../images/frog-yellow.svg");
}

.wrap {
  flex-wrap: wrap;
}

@media only screen and (max-width: 1000px)  {

  body,
  #sidebar {
    // font-size: 13px;
  }
}
