* {
  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: #e6cf4e;
  color: rgba(0, 0, 0, 0.8);
  font-family: 'PT Sans', sans-serif;
}

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

.header {
  display: flex;
  flex-wrap: wrap;
  margin-top: -0.5rem;
  justify-content: space-between;
}

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

pre {
  margin: 0;
}

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

li {
  line-height: 1.5;
}

a {
  color: rgba(0, 0, 0, 0.8);
}

a:hover {
  color: #fff;
}

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

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

.tooltip > p {
    color: #fff;
}

.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 #374353;
}

#instructions {
  padding-top: 1rem;
}

#instructions,
#instructions p,
#instructions ul {
	/* helps prevent the difficulty animation from jumping */
	margin: 0;
  padding-bottom: 1em;
}

#editor {
  position: relative;
}

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

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

.line-numbers {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  padding: 10px 6px;
  text-align: right;
  background-color: #363f58;
  color: #f5e6d0;
}

#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 {
  position: relative;
  display: inline-block;
  height: 30px;
  margin-top: 0.5rem;
  font-size: 15px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

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

#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.8);
}

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

#level-indicator,
.arrow {
  float: left;
  height: 30px;
  background-color: rgba(255, 255, 255, 0.2);
}

#level-indicator {
  display: inline-block;
  width: 160px;
  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.5);
}

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

.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);
  border-radius: 4px 0 0 4px;
}

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

.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: #DD5044;
  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: #E26D63;
}

#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(0, 0, 0, 0.8);
}

#settings {
  position: relative;
  color: rgba(255, 255, 255, 0.6);
}

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

#settings .tooltip {
  display: none;
  bottom: 30px;
  left: 0px;
  width: 275px;
  max-width: 275px;
  padding: 1em;
  text-align: left;
  z-index: 80;
}

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

#settings section {
  margin: 0.5rem 0;
}

#settings h4 {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
}

#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: 93%;
  padding: 1em;
}

#background {
  z-index: 10;
  border-radius: 0 0 0 10px;
  background-color: #15395F;
}

#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.green.cb-friendly .bg {
  background-image: url("../images/lilypad-green-color-assist.svg");
}

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

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

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

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

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

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

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

/* .frog.green.cb-friendly .bg {
  background-image: url("../images/duck-green-color-assist.svg");
} */

/* .frog.red.cb-friendly .bg {
  background-image: url("../images/frog-red-color-assist.svg");
} */

/* .frog.yellow.cb-friendly .bg {
  background-image: url("../images/frog-yellow-color-assist.svg");
} */

.wrap {
  flex-wrap: wrap;
}

.duck_gif {
    display: flex;
    justify-content: space-around;
}

@media (max-width: 992px)  {
  iframe {
      width: 130px;
      height: 130px;
  }
}

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

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

  .title {
    font-size: 26px;
  }

  iframe {
      width: 80px;
      height: 80px;
  }
}
