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

html * {
  font-family: "Inter", sans-serif;
  box-sizing: border-box;
}
body {
  background: #efefef;
}
.n-preview-img-wrapper {
  height: 100%;
  max-height: 100%;
  width: 100%;
  margin: 0;
}

.main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100vh;
  position: relative;
  overflow: hidden;
  border: none;
}
.main::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: #ededed;
  /* background-image: url('');*/
}
img#im1 {
  grid-row: 1 / 2;
  margin-bottom: 15px;
}
#txt_cont {
  grid-row: 2 / 3;
  text-align: center;
}
.main > img {
  align-self: flex-end;
  padding: 1em;
  cursor: pointer;
  position: absolute;
  top: 0;
}
.screen-main {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr;
  grid-template-rows: 2fr 1fr 0.5fr;
  grid-gap: 0px;
  justify-items: center;
  position: relative;
}
.winScreen,
.loseScreen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  row-gap: 1em;
  position: relative;
}

#close-button {
  margin-top: 10px;
}

p {
  font-size: 16px;
  font-weight: 450;
  color: #1e1e1e;
}
#btnContainer {
  grid-row: 6 / 7;
  margin-top: 30px;
  margin-left: 5px;
}
a#cta1 {
  border-radius: 6px;
  color: #ffffff;
  width: 180px;
  height: 40px;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  font-size: 14px;
  font-weight: 400;
  background: #5446bf;
  text-align: center;
  border: 1.5px solid #000000;
  line-height: 32px;
  box-shadow: 0px 3px 2px 0px #000000;
  text-decoration: none;
}
h2 {
  /*grid-row: 2 / 3;*/
  font-style: normal;
  font-weight: bold;
  font-size: 20px;
  line-height: 140%;
  color: #1e1e1e;
  font-family: "Inter", sans-serif;
}
h4 {
  /*grid-row: 3 / 4;*/
  font-weight: 450;
  color: #1e1e1e;
  font-size: 12px;
  margin: 0;
}
span {
  display: block;
  text-transform: capitalize;
}
code {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  border-radius: 4px;
  width: 150px;
  height: 44px;
  gap: 10px;
  margin: auto;
}
code > p {
  font-family: "Inter", sans-serif;
}
code img {
  cursor: pointer;
}
code > span {
  display: none;
  color: #000000;
  background: white;
  font-size: 16px;
}
.greeting-img div > p {
  margin-bottom: 16px;
}
.scratchContainer + p,
.greeting-img div > p {
  font-size: 12px;
  color: #475467;
  margin-top: 15px;
}
.screen-main > p {
  grid-row: 6 / 7;
}
.screen-main h2 + h4 + div + p {
  font-size: 11px;
  font-family: "Inter", sans-serif;
}
.scratchContainer {
  grid-column: 1 / 2;
  grid-row: 5 / 6;
  position: relative;
  width: 280px;
}
.scratchContainer svg {
  width: min-content;
  height: 100%;
  grid-column: 1 / 2;
  grid-row: 1 / -1;
}
.scratchContainer canvas {
  width: 100% !important;
  height: 100% !important;
  top: 0;
  left: 0;
  border-radius: 8px;
  /* background: #5446BF;*/
}
.scratchpad {
  width: 180px;
  height: 180px;
  margin: 0 auto;
  background: #ffffff;
  box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.25);
  border-radius: 10px;
}
.scratchContainer .scratchpad {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  box-shadow: 6px 6px 1px 0px #000000;
  border: 2px solid #000000;
  border-radius: 25px;
  width: 100%;
  height: 280px;
}
.scratchContainer .scratchpad p {
  font-size: 16px;
}
.winScreen,
.loseScreen {
  display: none;
}
.winScreen > p > span {
  text-align: center;
  font-weight: bold;
}
.loseScreen > button {
  margin-top: 2em;
}
.hide {
  -webkit-animation: fadeOut 1s linear forwards;
  animation: fadeOut 1s linear forwards;
  opacity: 1;
  visibility: hidden;
  display: none;
}
.show {
  -webkit-animation: fadeIn 0.5s linear forwards;
  animation: fadeIn 0.5s linear forwards;
  visibility: visible;
  opacity: 0;
  display: flex;
  /*display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr 2fr 0.5fr;*/
}
.greeting-text,
.greeting-img {
  text-align: center;
}
.greeting-img {
  display: flex;
  flex-direction: column;
  align-items: center;
  row-gap: 0.7em;
}

@keyframes fadeOut {
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes fadeIn {
  50% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@media (orientation: landscape) {
  .main::before {
    transform: rotate(360deg);
  }
  .main > img {
    padding: 0.5em;
  }
  .screen-main {
    grid-template-columns: 40px 1fr 1fr 40px;
    grid-template-rows: 1fr 250px 1fr;
    grid-gap: 0;
    align-items: center;
  }
  .winScreen,
  .loseScreen {
    padding-top: 0;
    flex-direction: row;
    column-gap: 3em;
  }
  h2 {
    grid-column: 2 / 3;
    align-self: center;
  }
  h4 {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    align-self: center;
    padding-top: 4em;
  }
  .scratchContainer {
    grid-column: 3 / 4;
    grid-row: 2 / 3;
    height: 180px;
    bottom: 11%;
    left: 0%;
  }
  .screen-main > p {
    grid-column: 3 / 4;
    grid-row: 3 / 4;
  }
}
