*, *::after, *::before {
    box-sizing: border-box;
}

html, body {
    padding: 0;
    margin: 0;
}

body {
    height: 100vh;
    min-height: 600px;
    font-family: monospace;
}

main {
    height: 100%;
    background-color: brown;
    overflow-x: hidden;
    overflow-y: hidden;
    /*display: flex;
    align-items: center;
    justify-content: center;*/

    position: relative;
}

.desktop-layer {
    height: 100%;
    width: 100%;

    position: relative;

    background-color: #090300;

    display: flex;
    flex-direction: column;
    align-items: center;

    overflow: hidden;
}

.application-layer {
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    position: absolute;
}

form {
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    gap: 10px;

    width: 100%;
}

.special-text {
    text-transform: uppercase;
    letter-spacing: 0.6rem;
    text-align: center;
}

.textarea-wrapper:has(textarea:placeholder-shown) .textarea-contents {
    opacity: 1;
}

.textarea-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    
    &:focus-within {
        & textarea {
            cursor: text;
        }

        & .textarea-contents {
            opacity: 0 !important;
            transition: 0.3s ease-in;
        }
    }
}


textarea {
    border: 1px solid black;

    color: black;

    width: 100%;
    height: 200px;

    padding: 10px;

    cursor: text;

    resize: none;

    border-right-color: rgb(240, 240, 240);
    border-bottom-color: rgb(255, 255, 255);
    border-left-color: rgb(110, 110, 110);
    border-top-color: rgb(90, 90, 90);
    border-width: 1px;
    border-style: solid;
}

.textarea-contents {
    top: 0;
    left: 0;
    position: absolute;

    z-index: 2;

    height: 100%;
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    pointer-events: none;

    opacity: 0;
    transition: 0.3s ease-in;
}

button {
    background-color: rgb(220, 220, 220);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;

    outline: none;
    border-width: 2px;
    border-style: solid;

    border-left-color: rgb(240, 240, 240);
    border-top-color: rgb(255, 255, 255);
    border-right-color: rgb(110, 110, 110);
    border-bottom-color: rgb(90, 90, 90);

    outline: 1px solid rgb(50, 50, 50);

    cursor: pointer;

    text-align: center;

    &:hover {
        background-color: rgb(200, 200, 200);

        border-left-color: rgb(200, 200, 200);
        border-top-color: rgb(215, 215, 215);
        border-right-color: rgb(100, 100, 100);
        border-bottom-color: rgb(80, 80, 80);
    }

    &:active {
        background-color: rgb(160, 160, 160);

        border-left-color: rgb(160, 160, 160);
        border-top-color: rgb(175, 175, 175);
        border-right-color: rgb(60, 60, 60);
        border-bottom-color: rgb(40, 40, 40);
    }
}

.btn-text {
   /* display: flex;
    align-items: center;
    justify-content: center;

    padding: 14px 28px;

    border-left: solid 1px black;
    border-top: solid 1px black;
    border-bottom: solid 1px black;

    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;*/
}

.btn-highlight {
    display: none;
    align-items: center;
    justify-content: center;

    padding: 10px;

    background-color: black;

    border: 1px solid black;

    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;

    color: white;
}

applet-container {
    border-left-color: rgb(240, 240, 240);
    border-top-color: rgb(255, 255, 255);
    border-right-color: rgb(110, 110, 110);
    border-bottom-color: rgb(90, 90, 90);
    border-width: 1px;
    border-style: solid;

    background-color: rgb( 180, 180, 180);
    padding: 2px;

    position: relative;

    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;

    max-width: 560px;
    width: 100%;

    box-shadow: 3px 3px 2px 0px rgba(0, 0, 0, 0.2);

    opacity: 0;

    transition: opacity 0.2s ease-in;
    transition-delay: 0.2s;
}

applet-toolbar {
    height: 24px;
    width: 100%;

    background-color: rgb( 180, 180, 180);

    border-bottom: rgb(50, 50, 50) solid 1px;

    display: flex;
    align-items: center;
    justify-content: center;
}

applet-contents {
    display: flex;

    border-right-color: rgb(240, 240, 240);
    border-bottom-color: rgb(255, 255, 255);
    border-left-color: rgb(110, 110, 110);
    border-top-color: rgb(90, 90, 90);
    border-width: 1px;
    border-style: solid;

    background-color: rgb(220, 220, 220);

    width: 100%;

    padding: 20px;
}

.godrays {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: -20px;
    position: absolute;
    top: -30px;
}

.ray {
    height: 110svh;
    width: 100px;

    filter: blur(80px);

    transform-origin: top center;

    background: 
    radial-gradient(
        ellipse at top, 
        rgba(98,31,0,1) 0%, 
        rgba(98,31,0,0) 70%);

    &:nth-child(1){
        animation: raynimation1 10s infinite;
        transform: rotateZ(60deg);
    }
    &:nth-child(2){
        animation: raynimation2 8s infinite;
        transform: rotateZ(30deg);
    }
    &:nth-child(3){
        animation: raynimation3 9s infinite;
        transform: rotateZ(0deg);
    }
    &:nth-child(4){
        animation: raynimation4 11s infinite;
        transform: rotateZ(-30deg);
    }
    &:nth-child(5){
        animation: raynimation5 12s infinite;
        transform: rotateZ(-60deg);
    }
}

@keyframes raynimation1 {
    20% {opacity: .4;}
    40% {opacity: .6;}
    60% {opacity: .1;}
    80% {opacity: .3;}
  }

  @keyframes raynimation2 {
    20% {opacity: .9;}
    40% {opacity: .4;}
    60% {opacity: .6;}
    80% {opacity: .2;}
  }

  @keyframes raynimation3 {
    20% {opacity: .8;}
    40% {opacity: .6;}
    60% {opacity: .4;}
    80% {opacity: .2;}
  }

  @keyframes raynimation4 {
    20% {opacity: .2;}
    40% {opacity: .6;}
    60% {opacity: .8;}
    80% {opacity: .4;}
  }

  @keyframes raynimation5 {
    20% {opacity: .5;}
    40% {opacity: .2;}
    60% {opacity: .3;}
    80% {opacity: .7;}
  }

.topglow {
    filter: blur(300px);
    mix-blend-mode: screen;
    width: 300%;
    height: 70%;
    background: radial-gradient(
        ellipse at top, 
        rgba(201, 74, 0, 0.4) 0%, 
        rgba(201, 84, 0, 0) 70%
    );

    position: absolute;
    top: -80px;

    animation: raynimation5 12s infinite;
}

.bottomglow {
    filter: blur(200px);
    mix-blend-mode: screen;
    width: 180%;
    height: 120%;
    background: radial-gradient(
        ellipse at top, 
        rgba(98,31,0,0) 60%,
        rgba(98,31,0,0.4) 0% 
    );

    position: absolute;
    top: 50px;

   animation: raynimation3 12s infinite;
}

.symbolic-title {
    mix-blend-mode: hard-light;

    position: absolute;

    width: calc(100% - 40px);
    height: auto;
    left: 20px;
    bottom: 20px;

    & img {
        width: 100%;
        height: auto;
        opacity: 0.05;
        filter: blur(1px);
    }
}

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

@keyframes shroud {
    0% {color: rgba(255, 255, 255, 0.6);}
    25% {color: rgba(255, 255, 255, 0.3);}
    50% {color: rgba(255, 255, 255, 0.6);}
    75% {color: rgba(255, 255, 255, 0.3);}
    100% {color: rgba(255, 255, 255, 0.6);}
}

.shroud {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    pointer-events: none;
    opacity: 1;
    z-index: 999;
    background-color: #090300;
    transition: opacity 0.1s ease-in;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: shroud 4s infinite;
}

form.loading {
    pointer-events: none;

    & .form-shroud {
        height: 100%;
        width: 100%;
        z-index: 1;
        position: absolute;
        top: 0;
        left: 0;
        background-color: rgb(120, 120, 120);
        opacity: 0;
        transition: opacity 0.7s ease-in;
        animation: loading 1.2s infinite;
    }
}
