* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: all 0.8s ease-in-out;
}

html {
  cursor: context-menu;
  min-height: 100%;
}

body {
  font-family: 'Daytona Light', 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
  font-size:0.9rem;
  height: 100vh;
  background: linear-gradient(45deg, rgba(250,250,0,0.9) 0%,rgba(150,250,50,0.8) 20%, rgba(100,100,250,0.8) 40%, rgba(200,100,200,0.8) 60%, rgba(250,50,50,0.8) 80%, rgba(255,150,0,0.8) 100%);
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-direction: column;
  cursor: default;
}

header {
  width: 96vw;
  height: 15vh;
  margin: 2vh;
  background-color: #0003;
  color: #eee;
  border-radius: 0.7rem;
  display: flex;
  justify-content: center;
  align-items: center;
  border-left: solid 2px #fff6;
  border-top: solid 2px #fff6;
  box-shadow: 3px 3px 5px #0009;
}

main {
  color: #eee;
  width: 96vw;
  height: 85vh;
  margin: 0 2vh;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

main div p {
  margin: 0 5px;
  text-align: center;
  font-size: 1.2rem;
  font-weight: bold;
  color: #eee;
  margin: 0 0 1vh 0;
}

hr {
  margin: 1vh 0 1vh 0;
  border-left: solid 1px #fff;
  border-top: solid 1px #fff;
  box-shadow: 2px 2px 4px #0009;
}

.codeBox {
  width: 49%;
  height: 80vh;
  border-radius: 0.7rem;
  background-color: #0003;
  padding: 10px;
  border-left: solid 2px #fff6;
  border-top: solid 2px #fff6;
  box-shadow: 3px 3px 5px #0009;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

textarea {
  font-family:'Consolas', 'Lucida Console';
  font-size: 1rem;
  width: 100%;
  height: 19vh;
  background-color: #0009;
  padding: 5px;
  margin: 0 0 1vh 0;
  resize: none;
  border: none;
  border-radius: 0.3rem;
  border-left: solid 1px #fffa;
  border-top: solid 1px #fffa;
  border-bottom: solid 1px #000;
  box-shadow: 3px 3px 5px #000e;
  color: #eee;
}

div.buttons {
  width: 100%;
  height: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1vh 0;
}

div#copyEncodedButton,
div#saveEncodedButton,
div#copyDecodedButton,
div#saveDecodedButton,
div#writeCBtoEnc,
div#writeCBtoDec,
div#helpEncode,
div#helpDecode,
button,
input[type="submit"] {
  margin: 0 0 1vh 0;
  padding: 10px;
  background-color: #0003;
  color: #eee;
  font-weight: bold;
  border: none;
  border-radius: 0.4rem;
  border-left: solid 2px #fff6;
  border-top: solid 2px #fff6;
  box-shadow: 3px 3px 5px #0009;
  cursor: pointer;
  transition: none;
}

div#helpEncode,
div#helpDecode {
  cursor: help;
}

.submit {
  width: 100%;
}

div#copyEncodedButton:active,
div#saveEncodedButton:active,
div#copyDecodedButton:active,
div#saveDecodedButton:active,
div#writeCBtoEnc:active,
div#writeCBtoDec:active,
div#helpEncode:active,
div#helpDecode:active,
button:active,
input[type="submit"]:active {
  border-left: solid 2px #000;
  border-top: solid 2px #000;
  border-right: solid 1px #fff;
  border-bottom: solid 1px #fff;
  transition: none;
}

input[type="file"] {
  margin: 0 0 1vh 0;
  padding: 6px;
  background-color: #0003;
  border: none;
  border-radius: 0.4rem;
  border-left: solid 2px #fff6;
  border-top: solid 2px #fff6;
  box-shadow: 3px 3px 5px #0009;
  cursor: pointer;
}

.myPassword input {
  margin: 1vh 1vh 1vh 0;
  background-color: #0006;
  border: none;
  border-radius: 0.2rem;
  border-left: solid 2px #fff6;
  border-top: solid 2px #fff6;
  box-shadow: 3px 3px 5px #0009;
  font-family:'Consolas', 'Lucida Console';
  font-size: 1rem;
  color: #eee;
}

label {
  padding: 0 0 0 0.1vw;
}

button:active {
  border:none;
  border-right: solid 2px #fff6;
  border-bottom: solid 2px #fff6;
}

div.resultOutput {
  font-family:'Consolas', 'Lucida Console';
  font-size: 1rem;
  width: 100%;
  height: 22vh;
  background-color: #0009;
  color: #eee;
  padding: 5px;
  margin: 0 0 1vh 0;
  overflow-y: scroll;
  border: none;
  border-radius: 0.3rem;
  border-left: solid 1px #fff6;
  border-top: solid 1px #fff6;
  border-bottom: solid 1px #000;
  box-shadow: 3px 3px 5px #000e;
}

#encodedDiv {
  font-family:'Consolas', 'Lucida Console';
  font-size: 1rem;
  /* word-break: break-all; */
  word-wrap: break-word;
}

#decodedDiv {
  font-family:'Consolas', 'Lucida Console';
  font-size: 1rem;
  /* word-break: break-all; */
  word-wrap: break-word;
}

#dummy {
  display: none;
}

#divOverlay {
  width: 100vw;
  height: 100vh;
  background-color: #0009;
  font-size: 3rem;
  color: #44bb00;
  text-align: center;
  display: none;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  animation: fadeOut ease 2.05s;
  animation-delay: 1.05s;
}

#divHelpEncode,
#divHelpDecode {
  width: 80vw;
  height: 70vh;
  position: fixed;
  left: 10vw;
  top: 15vh;
  overflow-y: scroll;
  overflow-x: hidden;
  background-color: hsla(0, 0%, 0%, 0.9);
  font-size: 1rem;
  color: #fff;
  text-align: center;
  display: none;
  justify-content: flex-start;
  align-items: center;
  flex-direction: column;
  position: fixed;
  border-radius: 20px;
  padding: 25px 25px 50px 25px;
  border-top: solid 1px #fff9;
  border-left: solid 1px #fff6;
  border-bottom: solid 1px #111;
  border-right: solid 1px #111;
  box-shadow: 6px 6px 6px #0009;
}

#divHelpEncode div h2 {
  padding: 25px;
}

.h2Header {
  width: 80vw;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
}

.tableEncHelp {
  width: 80%;
  border: solid 1px #fff;
  border-radius: 10px;
  margin: 10px;
}

.divDecHelp {
  width: 80%;
  border: solid 1px #fff;
  border-radius: 10px;
  margin: 10px;
  padding: 10px;
  line-height: 2rem;
  text-align: left;
}

.code {
  border: solid 1px #000;
  border-radius: 5px;
  color:#000;
  font-weight: bold;
  font-size: 1.25rem;
  background-color: #faa;
  padding: 0 10px;
  max-width: 100%;
  min-width: 50px;
}

div.code {
  display: inline-block
}

.helpResult {
  border: solid 1px #000;
  border-radius: 5px;
  color:#000;
  font-weight: bold;
  font-size: 1rem;
  background-color: #bfb;
  padding: 3px 5px;
  width: 337px;
  height: 100px;
  margin: 25px 0;
}

.tableEncHelpHead tr th{
  border-bottom: solid 1px #fff;
}

.tableEncHelpHead tr th {
  padding: 15px;
}

.tableEncHelpBody tr td {
  padding: 15px 15px 0 15px;
}

.tableEncHelpBody tr:last-child td {
  padding: 15px;
}

.tableEncHelpBody tr td:nth-child(even)  {
  border-right: dashed 1px #fff;
}

.tableEncHelpBody tr td:last-child  {
  border-right: none;
}

#closeEncHelp,
#closeDecHelp {
  border: 1px solid #44bb00;
  border-radius: 10px;
  margin: 15px;
  padding: 15px;
  cursor: pointer;
}

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

@media screen and (orientation: portrait) {
  body {
    min-height: fit-content;
  }

  header {
    width: 94vw;
  }

  main {
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-bottom: 164vh;

  }

  .codeBox {
    width: 98%;
    margin-bottom: 2vh;
  }

  textarea,
  #resultOutput {
    height: 30vh;
  }
}

::-webkit-scrollbar {
  background-color: #fff3;
  width: 10px;
  cursor: context-menu !important;
}
::-webkit-scrollbar-button {
  display: block;
  color: #333;
  background-color: #fff6;
  background-repeat: no-repeat;   
  background-size: 75%;
  background-position: center;
  cursor: context-menu !important;
}
::-webkit-scrollbar-button:vertical:start:increment {
  background-image: url('../img/chevron-up.svg');
  cursor: context-menu !important;
}
::-webkit-scrollbar-button:vertical:start:decrement {
  display: none;
}
::-webkit-scrollbar-button:vertical:end:increment {
  display: none;
}
::-webkit-scrollbar-button:vertical:end:decrement {
  background-image: url('../img/chevron-down.svg'); 
  cursor: context-menu !important;
}
::-webkit-scrollbar-track {
  -webkit-box-shadow: inset 0 0 6px #0006; 
  box-shadow: inset 0 0 6px #0006; 
  -webkit-border-radius: 5px;
  border-radius: 5px;
  cursor: context-menu !important;
}
::-webkit-scrollbar-thumb {
  -webkit-border-radius: 5px;
  border-radius: 5px;
  background: #fff6; 
  -webkit-box-shadow: inset 0 0 6px #0009; 
  box-shadow: inset 0 0 6px #0009; 
  cursor: context-menu !important;
}
::-webkit-scrollbar-thumb:hover {
  background: #fff4; 
  cursor: context-menu !important;
}
::-webkit-scrollbar-corner { 
  background: #fff3; 
  cursor: context-menu !important;
}

@media screen and (max-width: 550px) {
  body {
    overflow-x: hidden;
  }
  h1 {
    font-size: 1.1rem;
  }
}

@media screen and (max-width: 320px) {
  h1 {
    font-size: 0.7rem;
  }
}