:root{
    --dark-background: #272822;
    --light-background: #F5E5D5;
    --background-color: var(--dark-background);

    --highlight-color: #f92672;

    --dark-title-color: #d4d4dc;
    --light-title-color: #272822;
    --title-color: var(--dark-title-color);

    --dark-box-shadow: 0 0 15px #191A19;
    --light-box-shadow: 0 0 15px #f0d7bf;
    --box-shadow: var(--dark-box-shadow);

    --dark-cell-border: #fd971f;
    --light-cell-border: #ec8000;
    --cell-border: var(--dark-cell-border);

    --mobile-threshold: 640px;

    font-size: 16px;
}

@font-face {
    font-family: DejaVuSans;
    src: url(DejaVuSans-Bold.ttf);
}

@font-face {
    font-family: NotoSansMono;
    src: url(NotoSansMono-Regular.ttf);
}

html, body {
    height: 100vh;
    overflow-y: auto;
    margin: 0;
    box-sizing: border-box;
}

body {
    font-family: "Times New Roman", Times, serif;
    font-size: 18px;
    padding: 4vh 5%;
    background-color: var(--background-color);
    display: flex;
    flex-direction: column;
    gap: 4vh;
}

.loading-overlay {
    position: absolute;
    left: 0;
    top: 0;
    height: 100vh;
    width: 100vw;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    grid-gap: 1rem;
    z-index: 10;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.3;
    background: black;
}

.loading-overlay .loading-spinner {
    height: 3.5rem;
    width: 3.5rem;
    animation: spin 1.5s ease-in-out infinite;
    transform-origin: center;
}

.loading-overlay .loading-text {
    font-family: NotoSansMono, sans-serif;
    color: white;
    font-size: 1.2rem;
    position: absolute;
    top: 55vh;
    font-weight: 700;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

header {
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

header h1 {
    color: var(--title-color);
    font-family: DejaVuSans, sans-serif;
    font-weight: 200;
    letter-spacing: 0.1em;
    text-align: left;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    height: 100%;
    margin: 0;
    position: relative;
}

header h1 span {
    position: relative;
    top: 0;
}

header h1 strong {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
}

#headerButtons button {
    background: transparent;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    cursor: pointer;
}

#themeButton .hide {
    display: none;
}

main {
    display: flex;
    flex-direction: row;
    height: 78%;
    flex-wrap: wrap;
}

main > section {
    flex-grow: 1;
    min-width: min(100%, 400px);
    display: inline-block;
    width: 50%;
    height: 100%;
    box-sizing: border-box;
}

#codeBlocks {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

#editor,
.box {
    color: var(--title-color);
    border-style: solid;
    border-width: 0;
    box-shadow: var(--box-shadow);
    border-radius: 5px;
    border-color: var(--title-color);
    font-size: 12px; 
    font-style: normal; 
    font-variant: normal; 
    font-weight: 400; 
    line-height: 20px;
    background-color: var(--background-color);
    overflow: auto;
    overflow-x: hidden;
    resize: none;
    box-sizing: border-box;
    outline: 1px solid #606060;
}



#Text {
    display: inline-block;
    width: 100%;
    height: 68%;
    box-sizing: border-box;
    margin-right: 50px;
    position: relative;
}

#editor {
    font-size: 1rem;
    width: 100%;
    height: 82%;
    padding: 20px;
    resize: none;
    box-sizing: border-box;
}

.flex-buttons {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 1rem;
}

#textBoxOptions {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    margin-top: 0.9rem;
    gap: 1rem;
    flex-wrap: wrap;
}

#lang_container {
    width: 75px;
    position: relative;
}

#lang_options {
    width: 75px;
    display: inline-block;
    position: absolute;
    font-size: 16px;
    transition: all 300ms ease-out;
    box-shadow: var(--box-shadow);
    overflow-y: hidden;
}

#lang_options p {
    margin: 0;
    padding-top: 5px;
    padding-bottom: 5px;
    padding-left: 10px;
}

.lang_item:hover{
    background-color: #31322D;
}

.arrow {
  border: solid var(--highlight-color);
  border-width: 0 3px 3px 0;
  display: inline-block;
  padding: 3px;
  transform: rotate(45deg);
  position: absolute;
  left: 71%;
  top: 7px;
  transition: all 300ms ease-out;
}

#lineController {
    --highlight-color: var(--cell-border);
    display: none;
    flex-direction: row;
    justify-content: end;
    gap: 0.5rem;
}

@media (width < 640px) {
    #lineController {
        width: 100%;
        flex-grow: 1;
    }
    #lineController button {
        flex-grow: 1;
    }
    .flex-buttons {
        width: 100%;
        flex-grow: 1;
    }
}

#lineController.show {
    display: flex;
}

#compileButton {
    display: block;
}

#compileButton,
#lineController button {
    transition: all 150ms ease-out;
    box-shadow: var(--box-shadow);
    padding: 0 0.5rem;
}

#compileButton:hover,
#lineController button:hover {
    transform: scale(0.99);
    box-shadow: var(--box-shadow), 0 0 3px 0 var(--highlight-color);
}

.button {
    border: 1px solid var(--highlight-color);
    box-shadow: var(--box-shadow), 0 0 3px 0 var(--highlight-color);
    border-radius: 20px;
    height: 29px;
    background-color: var(--background-color);
    color: var(--highlight-color);
    font-family: Arial, sans-serif;
    font-weight: 600;
    cursor: pointer;
}

#Blocks {
    vertical-align: top;
    width: 100%;
    height: 26%;
}

#inputBlock {
    display: inline-block;
    width: 40%;
    height: 100%;
    margin-left: 0;
    vertical-align: top;
}

#outputBlock {
    display: inline-block;
    width: 40%;
    height: 100%;
    margin-right: 0;
    vertical-align: top;
    float: right;
}

label, 
h2,
h3,
h4 {
    color: var(--highlight-color);
    vertical-align: top;
    margin: 0;
    margin-bottom: 12px;
    text-align: left;
    font-family: Arial, sans-serif;
    font-weight: 600;
    letter-spacing: 2px;
    display: block;
    font-size: 1rem;
}

#Blocks p,
#Blocks label {
    text-align: center;
}

#inputC {
    width: 100%;
    height: 75%;
    padding-top: 6px;
    padding-left: 10px;
    padding-right: 13px;
    white-space: pre-line;
    margin: 0;
    font-family: Lucida Sans Typewriter, Lucida Console, monaco, Bitstream Vera Sans Mono, monospace; 
    line-height: 20px;
    overflow: auto;
    overflow-x: hidden;
    resize: none;
    box-sizing: border-box;

}

#outputC {
    width: 100%;
    height: 75%;
    padding-top: 6px;
    padding-left: 10px;
    padding-right: 13px;
    white-space: pre-line;
    font-family: Lucida Sans Typewriter, Lucida Console, monaco, Bitstream Vera Sans Mono, monospace;
    line-height: 20px;
    overflow: auto;
    overflow-x: hidden;
    word-wrap: break-word;
    text-align: left;
    box-sizing: border-box;
}

footer {
    color: #eaeaea;
    font-family: Arial, sans-serif;
    font-weight: 400;
    font-size: 14px;
    position: absolute;
    bottom: 1%;
    vertical-align: bottom;
}

footer a {
    color: #66d9ef;
    text-decoration: none;
}



/*Ace editor custom style*/
#editor.running .ace_marker-layer .ace_active-line {
    background: #fd971f2e;
}

#editor.running .ace_gutter-layer .ace_gutter-active-line {
    background: var(--cell-border);
    color: var(--background-color);
}

#editor.compiler-error .ace_marker-layer .ace_active-line {
    background: rgba(253, 31, 31, 0.18);
}
#editor.compiler-error .ace_gutter-layer .ace_gutter-active-line {
    background: #fd1f1f;
    color: var(--background-color);
}

/*.ace_gutter-active-line::before {*/
/*    content: "→";*/
/*    color: var(--cell-border);*/
/*    font-size: 1.5rem;*/
/*    width: 15px;*/
/*    height: 15px;*/
/*    position: absolute;*/
/*    left: 0px;*/
/*    vertical-align: center;*/
/*}*/


.visually-hidden {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    white-space: nowrap;
    outline: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    left: 0;
}


textarea:disabled,
input:disabled {
    opacity: 0.4;
}
