*{ margin: 0; padding:0; }

/* Custom Fonts */

@font-face {
    font-family: MuseoModerno;
    src:url("fonts/MuseoModerno-Bold.ttf");
}

@font-face {
    font-family: MintysisAH;
    src:url("fonts/MintysisAH-Bold.ttf");
}

@font-face {
    font-family: VDS;
    src:url("fonts/VDS_Bold.ttf");
}

@font-face {
    font-family: MontserratAlternates;
    src:url("fonts/MontserratAlternates-Bold.ttf");
}

/* Animations */

@keyframes appear {
 	0% {opacity: 0%;}
 	100% {opacity: 100%; }
}


/* Colors */

red {
  color: #fb317a;
}

yellow {
  color: #ebe17e;
}

pink {
  color: #ec66d6;
}

lilac {
  color: #ae81ff;
}

grey {
  color: #aaa;
}

darkgrey {
  color: #222;
}

blue {
  color: #70e1ff;
}

green {
  color: #a0d13d;
}

/* Main Styles */

body {
  background-image: linear-gradient(to top, #1c509b, #1b014d);
  width: 100%;
  height: 100%;
  overflow: hidden;
}

html {
  height: 100%;
  width: 100%;
}


/* Highlight */

.highlight {
  color: #ec66d6;
  cursor: pointer;
}

.highlight:hover {
  filter: brightness(90%);
}

.highlight-label {
  display: none;
  position: absolute;
  background-color: rgba(0, 0, 0, 0.75);
  /* Large:
  padding: 20px 30px;
  margin-top: -31px;*/
  padding: 3px 5px;
  margin-top: -7.5px;
  border-radius: 10px;
  animation: appear 0.5s forwards;
  color: white;
  text-wrap: nowrap;
  z-index: 1;
  cursor: default;
}

.highlight:hover .highlight-label {
  display: block;
}


/* Expected Output */

example {
  background-color: rgba(355, 355, 355, 0.10);
  display: block;
  border-radius: 0px 0px 15px 15px;
  margin: 15px 0px 20px 0px;
  font-size: 18px;
  font-family: Courier New;
}
example headline {
  background-color: rgba(0, 0, 0, 0.35);
  display: block;
  padding: 6px 10px;
  color: #555;
}
example main {
  padding: 6px 10px;
}


/* Overlay */

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
  	opacity: 0;
    z-index: 1;
    /*pointer-events: none;*/ /* Allow interaction with elements beneath the overlay when it's hidden */
    transition: opacity 0.5s ease; /* Smooth transition */
}

.smooth-appear {
  opacity: 0;
  transition: opacity 1s ease;
}


/* Back Button */

.back-button {
  position: fixed;
  margin: 5px 15px;
  color: white;
  font-size: 42px;
  user-select: none;
  opacity: 0.75;
  z-index:1;
  animation: thirdAppearance 2s;
}

.back-button:hover {
  filter: brightness(0.75);
}

@keyframes thirdAppearance {
  from {
    opacity: 0;
  }
  to {
    opacity: 0.75;
  }
}


/* Text Bubble */

.text-bubble {
  margin-top: 25px;
  margin-left: -80px;
  position: fixed;
  min-width: 200px;
  max-width: 300px;
  background-color: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 5px;
  border-radius: 5px;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  z-index: 99;
  cursor: pointer;
}


/* Scrollbar */

::-webkit-scrollbar { /* Width */
  width: 10px;
}

::-webkit-scrollbar-track { /* Track */
  background-color: #111;
}

::-webkit-scrollbar-thumb { /* Handle */
  background-color: #222; 
}

::-webkit-scrollbar-thumb:hover { /* Handle on hover */
  background-color: #555; 
}


/* Background-Color */

.compiler, .control-panel, select, .buttons, #output, body {
  background-color: black;
}


/* Font Families */

body, select, .blocknote, .buttons {
  font-family: MuseoModerno;
}

/* For Cyrilic
body, .blocknote {
  font-family: MintysisAH;
}


.blocknote h1, select, .buttons {
  font-family: VDS;
}*/

/*body, select, .blocknote, .buttons {
  font-family: MontserratAlternates;
}*/

.control-panel {
  font-family: sans-serif;
}

#output {
  font-family: Courier New;
}


/* User Actions */

select, .buttons, .stars, .star, .background img {
  user-select: none;
}

a, img {
  user-drag: none;
  user-select: none;
  -moz-user-select: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  -ms-user-select: none;
}


/* Compiler */

.compiler {
  position: fixed;
  opacity: 80%;
  box-shadow: 0 8px 8px 0 rgba(0, 0, 0, 0.4);
}

.control-panel {
  text-align: right;
  align-content: center;
  margin: 5px;
  padding: 10px;
}

select {
  appearance: none;
  color: white;
  border-radius: 10px;
  position: relative;
  pointer-events: none;
  border: 0;
  opacity: 0.9;
  height: -webkit-fill-available;
}

.buttons {
  position: relative;
  color: white;
  float: left;
  cursor: pointer;
}

.buttons:disabled {
  cursor: default;
  color: #222;
}

#output {
  overflow: auto;
  position: relative;
  color: white;
  resize: none;
  /*border: 2px solid grey;*/
}


/* Background */

.stars {
  background-image: linear-gradient(to top, #1c509b, #1b014d);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  animation: twinkle 5s infinite;
  overflow: hidden;
}

.star {
  position: fixed;
  border-radius: 50%;
  background-color: #fff;
  animation: startwinkle linear infinite, starmove linear infinite;
  overflow: hidden;
}

@keyframes starmove {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(-20px, 20px) rotate(45deg);
  }
  50% {
    transform: translate(20px, 40px) rotate(90deg);
  }
  75% {
    transform: translate(-40px, 60px) rotate(135deg);
  }
}

@keyframes startwinkle {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 0.25;
  }
}

.background {
  position: fixed;
  height: 100%;
  width: 100%;
}

.background img {
  position: fixed;
  width: 100%;
  transition: opacity 1s ease-in-out;
  object-fit: cover;
}

@keyframes windmove {
  0%, 100% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(0px, 20px);
  }
  50% {
    transform: translate(0px, 40px);
  }
  75% {
    transform: translate(0px, 60px);
  }
}


/* Blocknote */

.blocknote {
  position: fixed;
  background-color: rgba(0, 0, 0, 0.80);
  animation: appearance 1s 2s ease-in-out forwards;
  word-wrap: break-word;
  color: #d1cddc;
  opacity: 0;
}

.text {
  overflow: auto;
  width: 100%;
  cursor: default;
}

.blocknote h1, h2, h3, h4, h5, h6 {
  text-align: center;
  margin-bottom: 15px;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-image: linear-gradient(
    35deg,
    #ff4ce1,
    #21a0bf
  );
}

.blocknote p {
  margin-bottom: 14px;
  animation: boo 2s alternate infinite;
  position: relative;
  z-index: 1;
}

@keyframes boo {
  from {
    text-shadow: 0px 0px 2px rgba(235, 255, 255, 0.35);
  }
  to {
    text-shadow: 0px 0px 7px rgba(235, 255, 255, 0.35);
  }
}

@keyframes appearance {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

::selection {
  background-color: rgba(100, 100, 100, 0.25);
}


/* Map */

.map {
  position: fixed;
  background-color: rgba(0, 0, 0, 0.80);
  animation: appearance 1s 0s ease-in-out forwards;
  word-wrap: break-word;
  color: #d1cddc;
  opacity: 0;
  width: 83.5%;
  height: 77.5%;
  border-radius: 50px;
  left: 5%;
  top: 5%;
  padding: 50px 3.5%;
  font-size: 20px;
  font-weight: 500;
  user-select: none;
}

.map-inside {
  width: 100%;
  height: 100%;
  cursor: default;
  display: flex;
  flex-flow: wrap;
  overflow-y: auto;
  justify-content: flex-start;
  align-content: flex-start;
}

.block {
  background-color: rgba(75, 75, 75, 0.25);
  animation: appearance 1s 0s ease-in-out forwards;
  color: #d1cddc;
  opacity: 0;
  border-radius: 20px;
  width: 75px; height: 75px;
  text-align: center;
  align-content: center;
  margin: 15px;
}

.block-label {
  display: none;
  position: fixed;
  background-color: rgba(0, 0, 0, 0.45);
  margin-top: 10px;
  border-radius: 10px;
  animation: appear 0.5s forwards;
}

.block:hover .block-label {
  display: block;
}

.map-inside button{
  border-style: none;
  font-size: inherit;
  font-family: inherit;
}

.map-inside button:hover:enabled {
  filter: brightness(75%);
  transform: scale(1.05);
  cursor: pointer;
}

.map-inside button:disabled {
  filter: brightness(30%);
  z-index: -10;
}


/* User Input */

.textarea-container {
  position: relative;
  width: 100%;
  display: flex;
  max-height: 10%;
}

.line-numbers {
  padding: 0px 6px 6px 12px;
  border-right: 1px solid #ddd;
  background-color: #f7f7f7;
  text-align: right;
  user-select: none;
  pointer-events: none;
  font-family: monospace;
  color: #999;
  font-size: 18px;
  line-height: 1.5;
}

.line-numbers {
  overflow: hidden;
  background-color: #ddd;
}

.user-input {
  flex-grow: 1;
  font-family: monospace;
  font-size: 18px;
  line-height: 1.5;
  padding-left: 4px;
  border: none;
  resize: none;
  overflow: auto;
  box-sizing: border-box;
  outline: none;
  background-color: #ccc;
}

#user-input::-webkit-scrollbar-track {
  background-color: #aaa;
}

#user-input::-webkit-scrollbar-thumb {
  background-color: #ddd;
}

#user-input::-webkit-scrollbar-thumb:hover {
  background-color: #eee;
}


/* Sticker */

.sticker{
  position: fixed;
  z-index: 100;
  height: 40%;
  right: 50px;
  top: 40px;
  animation: sticker-anim 3.5s forwards ease-in-out;
  display: none;
  overflow: hidden;
  overflow-x: hidden;
  overflow-y: hidden;
}

@keyframes sticker-anim {
  0% {
    opacity: 0%;
    rotate: 75deg;
  }
  10% {
    opacity: 100%; 
    rotate: 5deg;
  }
  95% {
    opacity: 100%; 
    rotate: -5deg;
  }
  100% {
    opacity: 0%; 
    rotate: -45deg;
  }
}




/* ///////////////////////////////////////////////////////////////////////////////////////////////////////////// */
/* //////////////////////////////////////////////// Desktop CSS //////////////////////////////////////////////// */
/* ///////////////////////////////////////////////////////////////////////////////////////////////////////////// */

@media (min-height: 950px) {
  
  .background img {
    height: 100%;
  }
  
}

@media (min-width: 1025px) {

  /* Compiler */

  .compiler {
    width: 50%;
    height: 100%;
    right: -100%; /* Move the element off-screen initially */
    animation: slideFromRight 1.5s ease-in-out forwards; /* Apply the animation */
  }

  /* Disable animation in landscape mode or when prefers-reduced-motion is enabled */
  @media screen and (orientation: landscape), screen and (prefers-reduced-motion: reduce) {
    .compiler {
      right: 0%;
      animation: none;
    }
  }
  
  @keyframes slideFromRight {
    from {
      right: -50%;
    }
    to {
      right: 0%; /* Slide in to the initial position */
    }
  }

  .control-panel img {
    width: 27px;
    height: 27px;
  }

  select {
    padding: 8px;
    font-size: 22px;
    opacity: 0.9;
  }

  #editor { 
    height: 50%;
    font-size: 18px;
    z-index: 0;
  }

  .preview {
    margin: 30px 0px 30px 0px;
    font-size: 18px;
    z-index: 0;
  }

  .preview-len {
      height: calc(45px + (22.5px * (var(--length) - 1)));
  }

  .buttons {
    min-width: 45px;
    height: 45px;
    padding: 6px;
    margin-right: 10px;
    font-size: 18px;
    border-radius: 10px;
  }

  #output {
    height: 20%;
    padding: 8px;
    font-size: 18px;
  }

  /* Background */

  .stars {
    height: 100%;
  }

  .background img.smoke-bot {
    position: fixed;
    top: -60%;
    animation: windmove 40s infinite; /* Apply animation with a duration of 40s */
  }

  .background img.smoke-top {
    position: fixed;
    top: -60%;
    animation: windmove 20s 3s infinite; /* Apply animation with a duration of 30s and a delay of 2s */
  }

  /* Blocknote */
  
  .blocknote {
    width: 33.5%;
    height: 77.5%;
    border-radius: 50px;
    left: 5%;
    top: 5%;
    padding: 2.5% 3.5%;
    font-size: 20px;
    font-weight: 500;
  }

  .text {
    height: 100%;
    padding-right: 20px;
  }

  #clickMarker{
    width: 25px;
  }

  .blocknote h1 {
    font-size: 24px;
  }
  
  .text::-webkit-scrollbar { /* Scrollbar Width */
    width: 7.5px;
  }

}


/* ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// */
/* ///////////////////////////////////////// Mobile and Tablets Horizontal CSS ////////////////////////////////////////////// */
/* ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// */

@media (max-width: 1025px) and (orientation: landscape) {

  /* Back Button */
  
  .back-button {
    margin: 5px 10px;
    font-size: 200%;
  }
  
  /* Text Bubble */

  .text-bubble {
    margin-top: 10px;
  }
  
  /* Compiler */

  .compiler {
    width: 50%;
    height: 100%;
    right: 0%; /* Move the element off-screen initially */
  }

  @keyframes slideFromRight {
    from {
      right: -50%;
    }
    to {
      right: 0%; /* Slide in to the initial position */
    }
  }

  .control-panel img {
    width: 27px;
    height: 27px;
  }

  select {
    padding: 8px;
    font-size: 14px;
  }

  #editor { 
    height: 45%;
    font-size: 14px;
    z-index: 0;
  }

  .preview {
    margin: 10px 0px 10px 0px;
    font-size: 14px;
    z-index: 0;
  }

  .preview-len {
      height: calc(35px + (17.5px * (var(--length) - 1)));
  }

  .buttons {
    min-width: 35px;
    height: 35px;
    font-size: 16px;
    margin-right: 10px;
    border-radius: 7px;
    border-width: 1px;
  }

  #output {
    height: 15%;
    padding: 10px;
    font-size: 12px;
  }

  /* Background */

  .stars {
    height: 100%;
  }

  .background img.smoke-bot {
    position: fixed;
    top: -60%;
    animation: windmove 40s infinite; /* Apply animation with a duration of 40s */
  }

  .background img.smoke-top {
    position: fixed;
    top: -60%;
    animation: windmove 20s 3s infinite; /* Apply animation with a duration of 30s and a delay of 2s */
  }

  /* Blocknote */
  
  .blocknote {
    width: 33.5%;
    height: 77.5%;
    border-radius: 30px;
    left: 5%;
    top: 5%;
    padding: 2.5% 3.5%;
    font-size: 14px;
    font-weight: 500;
  }

  .text {
    height: 100%;
    padding-right: 10px;
  }

  #clickMarker{
    width: 25px;
  }

  .blocknote h1 {
    font-size: 18px;
  }
  
  .text::-webkit-scrollbar { /* Scrollbar Width */
    width: 7.5px;
  }
  
  .background img {
    height: 100%;
  }

  .sticker{
    height: 50%;
    right: 50px;
    top: 180px;
  }
  
}


/* ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// */
/* ////////////////////////////////////////// Mobile and Tablets Vertical CSS ////////////////////////////////////////// */
/* ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// */

@media (max-width: 1025px) and (orientation: portrait) {

  /* Back Button */
  
  .back-button {
    margin: 0px 5px;
    font-size: 150%;
  }
  
  /* Text Bubble */

  .text-bubble {
    margin-top: 10px;
  }

  /* Compiler */

  .compiler {
    width: 100%;
    height: 70%;
    bottom: -50%; /* Move the element off-screen initially */
    animation: slideFromDown 1.5s ease-in-out forwards; /* Apply the animation */
    overflow: hidden;
  }

  @keyframes slideFromDown {
    from {
      bottom: -50%;
    }
    to {
      bottom: -20%; /* Slide in to the initial position */
    }
  }

  .control-panel {
    height: 35px;
    align-content: center;
  }

  .control-panel img {
    margin-top: 5px;
    width: 20px;
    height: 20px;
  }

  select {
    font-size: 14px;
    right: 15px;
  }

  #editor { 
    height: 35%;
    font-size: 14px;
    z-index: 0;
  }

  .preview {
    margin: 10px 0px 10px 0px;
    font-size: 14px;
    z-index: 0;
  }

  .preview-len {
      height: calc(35px + (17.5px * (var(--length) - 1)));
  }

  .buttons {
    min-width: 32.5px;
    height: 32.5px;
    font-size: 14px;
    margin-right: 10px;
    border-radius: 7px;
    border-width: 1px;
  }

  #output {
    height: 25%;
    padding: 10px;
    font-size: 12px;
    font-weight: 500;
  }

  /* Background */

  .stars {
    height: 120%;
  }

  .star {
    position: fixed;
    border-radius: 50%;
    background-color: #fff;
    animation: startwinkle linear infinite, starmove linear infinite;
    overflow: hidden;
  }

  .background img {
    height: 100%;
  }

  .background img.smoke-bot {
    top: -10%;
    animation: windmove 40s infinite; /* Apply animation with a duration of 40s */
  }

  .background img.smoke-top {
    top: -10%;
    animation: windmove 30s 3s infinite; /* Apply animation with a duration of 30s and a delay of 2s */
  }

  /* Blocknote */

  .blocknote {
    width: 79%;
    height: 44.5%;
    border-radius: 30px;
    left: 4%;
    top: 3%;
    padding: 0% 6.5%;
    font-size: 14px;
  }


  .text {
    height: 85%;
    margin-top: 24px;
    padding-right: 5px;
  }

  #clickMarker{
    width: 15px;
  }

  .blocknote h1 {
    font-size: 18px;
  }

  .text::-webkit-scrollbar { /* Scrollbar Width */
    width: 7.5px;
  }

  /* Tapping highlight */
  a, button, span {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0); /* Set to fully transparent */
    tap-highlight-color: rgba(0, 0, 0, 0); /* For newer browsers */
  }

  .sticker{
    height: 30%;
    right: 30px;
    bottom: 10px;
    top: auto;
  }

}


/* ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// */
/* /////////////////////////////////////////////////// Correcting ////////////////////////////////////////////////////// */
/* ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// */

@media (min-width: 1025px) and (max-width: 1300px) {

  .sticker{
    height: 35%;
    right: 50px;
    top: 180px;
  }
  
}
