* {
  margin: 0;
  padding: 0;
  font-family: "Sen", sans-serif;
  letter-spacing: 2px;
}

html,
body {
  background: #222;
  color: #f5f5f5;
  font-family: "Sen", sans-serif;
  letter-spacing: 2px;
  overflow-x: auto;
}

.wrapper {
  margin: 0;
  padding: 0;
  width: 100vw;
  max-width: 100vw;
}
#container {
  margin: 10px 20px;
  display: grid;
  grid-template-columns: 1fr 3fr 1fr;
}
#launch {
  display: block;
  width: auto;
  margin: 20px auto;
  background: rgb(255, 208, 0);
  color: #222;
  font-size: 16px;
  font-weight: 700;
  padding: 15px 30px;
  border: none;
  outline: none;
  text-align: center;
}
#popup {
  display: none; /* Hidden by default */
  z-index: 1; /* Sit on top */
  overflow: auto; /* Enable scroll if needed */
  width: 80%;
  margin: 5% auto;
  background: #252525;
  padding: 50px;
}
#instructions li {
  margin-left: 50px;
}
.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}
.close:hover,
.close:focus {
  color: rgb(255, 208, 0);
  text-decoration: none;
  cursor: pointer;
}
.list-items {
  line-height: 30px;
  font-size: 18px;
  color: #666;
}

.box {
  margin: 20px;
  padding: 20px 30px;
  border-radius: 25px;
  background: #222;
  box-shadow: 5px 5px 10px #181818, -5px -5px 10px #2c2c2cd8;
}
#canvas {
  grid-column: 2/4;
  grid-row: 1/2;
  order: 2;
  width: 900px;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  vertical-align: baseline;
}

#target {
  height: 480px;
  width: 750px;
  padding: 20px;
  border-radius: 10px;
}

/* ======= canvas ends ======= */
#lowerbound{
  display: grid;
  grid-template-columns: 1fr 2fr;
  grid-gap: 40px;
  padding: 0px;
}

#code {
  grid-column: 1/2;
  grid-row: 1/2;
  order: 1;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  text-align: center;
  color: rgba(255, 208, 0, 0.836);
  font-weight: 700;
  margin: 10px;
  text-shadow: 2px 2px 5px #181818, -2px -2px 5px #2c2c2cd8;
}
#label1 {
  color: rgb(255, 208, 0);
  font-size: 18px;
  transition: 0.8s ease-in;
  text-align: center;
}
#label2 {
  color: rgb(255, 208, 0);
  font-size: 18px;
  transition: 0.8s ease-in;
  text-align: center;
}

/* ========= controls ========= */

.input {
  align-items: center;
  background: #2c2c2c;
  width: 70%;
  margin: 10px 20px;
  outline: none;
  border: none;
  padding: 20px 30px;
  border-radius: 20px;
  color: #999;
  font-size: 18px;
  letter-spacing: 2px;
  font-family: "Sen", sans-serif;
}
.select {
  align-items: center;
  background: #ffee0023;
  margin: 10px 20px;
  outline: none;
  border: none;
  padding: 20px 30px;
  border-radius: 20px;
  color: rgb(255, 208, 0);
  font-size: 18px;
  letter-spacing: 2px;
  font-family: "Sen", sans-serif;
}
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
option {
  display: block;
  background: #2c2c2c;
  outline: none;
  border: none;
  padding: 20px 30px;
  color: #ffd000;
  font-size: 18px;
  letter-spacing: 2px;
  font-family: "Sen", sans-serif;
}
.values {
  letter-spacing: 2px;
}
.btn-container {
  padding: 0px 40px;
  margin: 20px;
  display: flex;
  align-items: center;
  justify-content: space-around;
}
.btn {
  padding: 15px 30px;
  border-radius: 30px;
  outline: none;
  border: none;
  font-size: 18px;
  letter-spacing: 2px;
  font-family: "Sen", sans-serif;
  font-weight: 700;
  margin: 10px;
}
.btn:hover {
  transition: 0.5s ease;
  box-shadow: 10px 10px 10px #0e0e0e, -7px -7px 10px #333333d8;
}
.btn-yellow {
  background: rgb(255, 208, 0);
  color: #222;
}
.btn-green {
  background: #28a745;
  color: #eee;
}
.btn-red {
  background: #ff0730;
  color: #eee;
}
.btn-blue {
  background: rgb(0, 122, 255);
  color: #fff;
}

#code {
  padding: 10px 20px;
  height: 650px;
  max-width: 300px;
}
#code-panel {
  height: 300px;
  border-left: 3px solid #333;
  padding: 5px 10px;
  font-size: 16px;
  line-height: 22px;
  letter-spacing: 2px;
  font-family: "Sen", sans-serif;
  color: #4caf50;
  overflow: scroll;
  scrollbar-width: thin;
  scrollbar-color: #444 transparent;
}

/* Scrollbars */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
  background: transparent;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #333;
  border-radius: 4px;
}
::-webkit-scrollbar-corner {
  background: black;
  visibility: hidden;
}
.code-line {
  list-style-type: none;
  padding: 10px;
}
.code-line.active {
  background: #4caf5023;
}
#l1,
#l2,
#l3,
#l4,
#l5,
#l6,
#l7 {
  border-radius: 5px;
  transition: 0.5s ease;
}

/* ============ draggable div functionality ============= */
.drag {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: move;
}
.drag img {
  display: inline;
  width: 30px;
  margin: 15px;
  cursor: move;
}

.drag:hover,
.drag:focus {
  color: rgb(255, 208, 0);
  text-decoration: none;
  cursor: pointer;
}

.current-step {
  display: block;
  height: 150px;
  margin-top: 10px;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 18px;
  line-height: 22px;
  letter-spacing: 2px;
  font-weight: 400;
  color: #4caf50;
  background: #4caf5023;
  overflow: scroll;
}

.check {
  margin-top: 10px;
  font-size: 16px;
  line-height: 40px;
  letter-spacing: 2px;
  font-family: "Sen", sans-serif;
  background: #ffee0023;
  border-radius: 10px;
}

.hide {
  visibility: hidden;
  display: none;
}
.show {
  visibility: visible;
}

/* ================ Dashboard Data Card like Designs for Live Data =============== */
#step-tracker {
  display: flex;
  flex-direction: column;
  -ms-flex-direction: column;
  vertical-align: middle;
  justify-content: space-between;
  height: 200px;
  min-width: 250px;
  margin-top: 30px;
}
.step-box {
  display: flex;
  margin: 10px;
  padding: 10px;
  height: 100px;
  width: inherit;
  border-radius: 20px;
  background: #2c2c2c;
  box-shadow: 5px 5px 10px #181818, -5px -5px 10px #2c2c2cd8;
  transition: background 0.6s ease-in-out;
  animation: flip 1s cubic-bezier(0.07, 0.84, 0.96, 0.23) forwards;
  animation-timing-function: ease-in;
  animation-delay: 0ms;
  animation-direction: normal;
  animation-fill-mode: forwards;
  transform-origin: 50%;
}
.step-box h3 {
  text-align: left;
  color: #eee;
  font-weight: 400;
  text-shadow: none;
  font-size: 16px;
  line-height: 28px;
}
.box-title .highlight {
  font-size: 22px;
  line-height: 30px;
  font-weight: 700;
  text-shadow: 2px 2px 5px #181818, -2px -2px 5px #2c2c2cd8;
}
#start-step {
  background: rgba(0, 185, 43, 0.2);
  color: #4caf50;
}
#start-step .highlight {
  color: #4caf50;
}
#mid-step {
  background: rgba(255, 208, 0, 0.2);
  color: #ffd000;
}
#mid-step .highlight {
  color: #ffd000;
}
#last-step {
  background: rgba(255, 7, 48, 0.2);
  color: #ff0730;
}
#last-step .highlight {
  color: #ff0730;
}
#blue-box{
  background: rgba(0, 122, 255, 0.2);
  color: rgb(0, 122, 255);
}
#blue-box .highlight{
  color: rgb(0, 122, 255);
}
.box-value {
  font-size: 48px;
  margin: auto 10px;
  transition: 0.6s ease;
}
#start-val {
  color: #4caf50;
}
#mid {
  color: #ffd000;
}
#last {
  color: #ff0730;
}

/* =========== array box designs ========== */
.index {
  margin-top: -40px;
  margin-bottom: 40px;
  color: #ffd000;
}
.array_box {
  padding: 10px;
  font-size: 22px;
  line-height: 32px;
  letter-spacing: 2px;
  color: #ffd000;
}
.ansbox {
  background-color: #444;
  height: 50px;
  width: 50px;
  margin: 2px;
  padding: 10px;
  border-radius: 5px;
  border: none;
  box-shadow: 5px 5px 5px #181818, -5px -5px 10px #5050503a;
  text-align: center;
  vertical-align: middle;
}
.high {
  margin-left: -10px;
  margin-top: 40px;
  padding: 20px 25px;
  padding-right: 40px;
  font-size: 22px;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  box-shadow: 1px 1px 10px #181818, -1px -1px 10px #181818;
  text-align: center;
  vertical-align: middle;
  font-size: 22px;
  color: rgb(0, 122, 255);
  background: rgb(0, 122, 255, 0.2);
}

/* ============= draggable div ============= */
#moveable {
  position: absolute;
  top: 50px;
  right: 15px;
  width: 360px;
  height: 320px;
  background: #111;
  border-radius: 25px;
  box-shadow: 10px 10px 10px #0f0f0f,
              -5px -5px 10px #2c2c2cd8;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-top: none;
}
#handle {
  width: 358px;
  height: 25px;
  margin: 1px;
  cursor: move;
  background: rgb(255, 196, 0);
  border-radius: 20px 20px 0px 0px;
}
.dragcontent{
  text-align: center;
  display: block;
  font-size: 14px;
  letter-spacing: 2px;
  padding: 5px;
  color: #000;
  font-weight: 700;
}
.form-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin: 5px 10px;
  padding: 0px 10px;
}
.form-row .input {
  margin: 10px auto;
  padding: 15px 25px;
  border-radius: 25px;
  width: auto;
}
.push-btn, .pop-btn{
  width: 50%;
}

.flip {
  animation: flip 1s cubic-bezier(0.07, 0.84, 0.96, 0.23) forwards;
  animation-timing-function: ease-in;
  animation-delay: 0ms;
  animation-direction: normal;
  animation-fill-mode: forwards;
  transform-origin: 50%;
}

/* ============= Stack designs ============== */
#array-wrapper {
  display: block;
  height: 60px;
  padding: 5px;
  background: #101010;
  width: 540px;
  border-radius: 20px;
  margin-bottom: 10px;
  box-shadow: 10px 10px 10px #181818, -5px -5px 10px #4e4e4e4f;
}
#array {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: flex-start;
}
.array_box {
  height: 40px;
  width: 40px;
  padding: 5px;
  margin: 5px;
  border-radius: 10px;
  background: rgba(0, 122, 255, 0.2);
  color: rgb(0, 122, 255);
  box-shadow: 5px 5px 10px #000b20,
              -2px -2px 5px #b0f3ff33;
  animation: flip 0.5s cubic-bezier(0.07, 0.84, 0.96, 0.23) forwards;
  animation-timing-function: ease-in;
  animation-delay: 0ms;
  animation-direction: normal;
  animation-fill-mode: forwards;
  transform-origin: 50%;
}
#stack-wrapper {
  display: block;
  height: 280px;
  padding: 10px 50px;
  width: 200px;
}
#stack {
  display: table-cell;
  text-align: center;
  width: 200px;
  height: 350px;
  vertical-align: bottom;
  background: #101010;
  border-radius: 20px;
  box-shadow: 5px 5px 10px #181818, -5px -5px 10px #4e4e4e4f;
  margin-left: 0px;
  margin-bottom: 0px;
}
.stack_box {
  height: 30px;
  line-height: 30px;
  width: 180px;
  padding: 0px;
  margin: 0px 10px;
  margin-bottom: 8px;
  border-radius: 5px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.24);
  background: rgba(0, 122, 255, 0.2);
  color: rgb(0, 122, 255);
  animation: flip 0.5s cubic-bezier(0.07, 0.84, 0.96, 0.23) forwards;
  animation-timing-function: ease-in;
  animation-delay: 0ms;
  animation-direction: normal;
  animation-fill-mode: forwards;
  transform-origin: 50%;
}
#pushed{
  color: #4caf50;
}
#popped{
  color: #ff0730;
}
#pointer{
  color: #ffd000;
}
#top_element{
  color: rgb(0, 122, 255);
}
#algo-box{
  margin: 0px;
  margin-top: 60px;
  padding: 20px 30px;
  height: 250px;
  width: 450px;
  max-width: 500px;
  background: rgba(0, 185, 43, 0.2);
  color: #4caf50;
  border-radius: 25px;
  box-shadow: 5px 5px 10px #000c00a8,
              -2px -2px 10px #3aff4428;
  overflow: scroll;
}
.algo-steps{
  list-style-type: none;
  font-size: 20px;
  font-weight: 700px;
  line-height: 28px;
}

/* ================= styles for question popup =============== */
.question-modal{
  display: none;
  z-index: 1;
  position: absolute;
  top: 100px;
  left: 25%;
  margin: 50px;
  height: 350px;
  width: 600px;
  background: #111;
  border-radius: 20px;
  box-shadow: 5px 5px 10px #181818, -5px -5px 10px #2c2c2cd8;
}
#modal-head{
  padding: 20px 30px;
  background: #ffd000;
  height: 30px;
  display: flex;
  justify-content: space-between;
  border-radius: 20px 20px 0px 0px;
}
.close-btn {
  color: rgb(255, 0, 0);
  float: right;
  font-size: 30px;
  font-weight: bold;
  visibility: hidden;
}
.close-btn:hover,
.close-btn:focus {
  color: #000000;
  transition: 0.5s ease;
  text-decoration: none;
  cursor: pointer;
}
#modal-content{
  padding: 15px 30px;
}
#question{
  font-size: 20px;
  line-height: 30px;
  height: 100px;
  width: 540px;
  text-align: justify;
}
#answer{
  display: flex;
  justify-content: space-between;
}
.option{
  background: #222;
  padding: 10px 20px;
  font-size: 18px;
  line-height: 28px;
  border: 5px solid #333;
  border-radius: 30px;
  width: 200px;
  margin: 10px;
}
.wrong{
  background: #ff0730;
  color: #fff;
  border: 3px solid #eee;
}
.correct{
  background: #0caa31;
  color: #fff;
  border: 3px solid #eee;
}
.blur{
  filter: blur(20px);
}





/* ************** CSS Animations ************ */
@keyframes flip {
  0% {
    opacity: 0;
    transform: rotateX(270deg);
  }
  /* 50%{
        opacity: 0.5;
        transform: rotateX(270deg);
    } */
  100% {
    transform: rotateX(360deg);
    opacity: 1;
  }
}

/* ========== Code for Smaller Screens =========== */

@media screen and (max-width: 780px) {
  #container {
    margin: 60px 40px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 20px;
  }
  #canvas {
    grid-column: span 3;
    grid-row: 2/3;
    padding: 40px;
   }
  #code {
    grid-column: 1/4;
    grid-row: 3/4;
    padding: 40px;
  }
  .list-items {
    line-height: 24px;
    font-size: 16px;
    color: #666;
  }
}
