:root {
  --color-light:    #8d99ae;
  --color-dark:    #667182;
  --color-bg:         #2b2d42;
  --color-text:      #ffffff;


  --radius:           5vh;
  --shadow:           0 3px 8px rgba(0, 0, 0, 0.1);
}



@font-face {
    font-family: 'Londrina Solid';
    src: url('fonts/LondrinaSolid-Thin.ttf') format('truetype');
    font-weight: 100;
    font-style: normal;
  }
  @font-face {
    font-family: 'Londrina Solid';
    src: url('fonts/LondrinaSolid-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
  }
  @font-face {
    font-family: 'Londrina Solid';
    src: url('fonts/LondrinaSolid-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
  }
  @font-face {
    font-family: 'Londrina Solid';
    src: url('fonts/LondrinaSolid-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
  }

* {
    -webkit-tap-highlight-color: transparent;
}

.ease-out-back {
  transition-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1);
}


html, body {
    height: 100%;
    margin: 0;
    background-color: var(--color-bg);
    
    font-family: "Londrina Solid", sans-serif;
    font-weight: 400;
    font-style: normal;
    letter-spacing: 0.05em;
    
    overflow: hidden;
    overscroll-behavior: none;
}


.text_big {
    font-family: "Londrina Solid", sans-serif;
    font-size: 3vh;
    font-weight: bold;
    color: var(--color-text);
    transition: opacity 0.3s ease, transform 0.3s ease;
    text-align: center;
}

.text_extra_large{
    font-family: "Londrina Solid", sans-serif;
    font-size: 6vh;
    font-weight: bold;
    color: var(--color-text);
    transition: opacity 0.3s ease, transform 0.3s ease;
    text-align: center;
}

.text_massive{
    font-family: "Londrina Solid", sans-serif;
    font-size: 20vh;
    font-weight: bold;
    color: var(--color-text);
    transition: opacity 0.3s ease, transform 0.3s ease;
    text-align: center;
}


/* OPTIONS PAGE 90% */
#options_page {
    display: flex;
    flex-direction: column;
    height: 85%;
    width: 100%;
    
}



    /* PREVIEW */
    #preview {
        height: 50%;
        width: 20%;
        left: 40%;
        top: 0%;
        position: relative;
        transform-origin: bottom center;
        opacity: 0;
        transition: top 0.3s ease, height 0.3s ease, opacity 0.3s ease;
    }
    
    #preview.active{
        opacity: 1;
    
    }

    #preview.home{
        transition: top 0.3s ease, height 0.3s ease, transform 0.5s ease , opacity 0.3s ease;
    }

    #preview.scaled{
        top: 10%;
        height: 100%;
    }

    #preview.send{
        top: -70%;
        height: 100%;
        transition: top 0.4s ease-in;
    }

    #preview img {
        max-height: 100%;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        
    }


    #head{
        height: 100%;
        position: absolute;
        transform: translateX(-50%);
        transform-origin: center center;
        left: 50%;
    }

    #head.home{
       transition: transform 0.5s ease;
    }

    #hat_offset{
        height: 100%;
        position: absolute;
        transform: translateX(-50%);
        transform-origin: center center;
        left: 50%;
    }

    /* OPTIONS */
    #options {
        position: relative;
        height: 50%;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        overflow-y: auto;
        overflow-x: hidden;
        padding-top: 2%;
        
        opacity: 0;
        pointer-events: none;
        
        
        /* oben und unten ausfaden */
        mask-image: linear-gradient(
            to bottom,
            transparent 0%,
            black 10%,
            black 90%,
            transparent 100%
        );
        -webkit-mask-image: linear-gradient(
            to bottom,
            transparent 0%,
            black 5%,
            black 95%,
            transparent 100%
        );
        
         /* Scrollbar stylen */
        scrollbar-width: thin;           /* Firefox */
        scrollbar-color: #555 transparent; /* Firefox: thumb track */
    }
    
    /* Chrome/Safari */
    .options::-webkit-scrollbar {
        width: 4px;
    }

    .options::-webkit-scrollbar-track {
        background: transparent;
    }

    .options::-webkit-scrollbar-thumb {
        background: #555;
        border-radius: 99px;
    }

    #options.active {
        opacity: 1;
        pointer-events: auto;
    }

    #options img {
        height: 28%;
        object-fit: contain;
        cursor: pointer;
        transform: scale(1.0);
        
        user-select: none;
        -webkit-user-select: none;
        -webkit-user-drag: none;
        
        filter: 
        drop-shadow(0.2vh 0 0 var(--color-dark))
        drop-shadow(-0.2vh 0 0 var(--color-dark))
        drop-shadow(0 0.2vh 0 var(--color-dark))
        drop-shadow(0 -0.2vh 0 var(--color-dark));
        
        transition: opacity 0.3s ease;
    }

    #options img.selected {
       transform: scale(1.1);
        filter: 
        drop-shadow(0.2vh 0 0 var(--color-text))
        drop-shadow(-0.2vh 0 0 var(--color-text))
        drop-shadow(0 0.2vh 0 var(--color-text))
        drop-shadow(0 -0.2vh 0 var(--color-text));
    }






/* NAV PAGE 10% */
#nav_page{
    display: flex;
    flex-direction: column;
    height: 15%;
    width: 100%;
    pointer-events: none;
}
    /* NAVIGATION */
    #nav {
        position: relative;
        height: 70%;
        display: flex;
        justify-content: center;
        gap: 1%;
    }

    #nav button{
        border-radius: var(--radius);
        border: none;
        box-shadow: var(--shadow);
        background-color: var(--color-light);
        color: var(--color-text);
        padding: 1%;
    

        font-weight: bold;
        font-style: normal;
        font-size: 3vh;

        cursor: pointer;
        
        top: 0%;
        
        
        transition: all 0.3s ease;
    }

    /* STEPS */
    #steps{
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        justify-content: center;
        height: 30%;
        
        opacity: 0;
    }
    
    #steps.active{
        opacity: 1;
    }

#nextBtn{
    opacity: 0;
    pointer-events: none;
    height: 9vh;
    justify-content: center;
    align-items: center;
    display: flex;   
}

#nextBtn.active{
    min-width: 35vw;
    height: 9vh;
    opacity: 1;
    pointer-events: auto;
}

#nextBtn.send{
    transform: scale(2.2);
    position: absolute;
    top: -130%;
    min-width: 20vw;
    height: 5vh;
    font-size: 2.2vh;
}

#backBtn{
    opacity: 0;
    pointer-events: none;
    width: 0.001px;
    padding: 0.001px;
    height: 9vh;
}

#backBtn.active{
    opacity: 1;
    pointer-events: auto;
    padding: 1%;
    width: 25vw;
    background-color: var(--color-dark);
}


#hair_wrapper {
  isolation: isolate;

}


#hair_color {
  mix-blend-mode: multiply;
  mask-size: contain;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  mask-mode: alpha;
  -webkit-mask-mode: alpha;
}


/* SIZE PAGE */
#size_page {
    opacity: 0;
    pointer-events: none;
    position: absolute;
    top: 70%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    justify-content: center;
    align-content: center;
    
    transition: opacity 0.3s ease;
}

#size_page.active {
    opacity: 1;
    pointer-events: auto;
}


input[type="range"] {
  margin-top: 2vh;
  appearance: none;
  width: 60vw;
  height: 4vh;              /* feste Höhe für das gesamte Element */
  background: transparent;    /* wichtig, damit nur der Track sichtbar ist */
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

input[type="range"]::-webkit-slider-runnable-track {
  width: 100%;
  height: 4vh;                  /* feste Höhe für die Bahn */
  background: var(--color-light);
  border-radius: var(--radius);
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 4vh;                  /* feste Größe statt % */
  height: 4vh; 
  background: var(--color-text);
  border-radius: 50%;
  box-shadow: var(--shadow);
}

/* NAME PAGE */
#name_page{
    position: absolute;
    top: 70%;
    left: 50%;
    width: 90%;
    transform: translate(-50%, -50%);
    text-align: center;
    justify-content: center;
    align-content: center;
    
    opacity: 0;
    pointer-events: none;
    
    transition: opacity 0.3s ease;
}

#name_page.active{
    opacity: 1;
    pointer-events: auto;
}

#name_input{
    margin-top: 2vh;
    border: none;
    min-width: 50vw;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    height: 4vh;
    background: var(--color-light);
    color: var(--color-text);
}

/* Suppress browser autofill styling */
#name_input:-webkit-autofill,
#name_input:-webkit-autofill:hover,
#name_input:-webkit-autofill:focus,
#name_input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0px 1000px var(--color-light) inset !important;;
  -webkit-text-fill-color: var(--color-text);
  transition: background-color 5000s ease-in-out 0s;
}




#after_send_page{
    position: absolute;
    top: 40%;
    left: 50%;
    width: 90%;
    transform: translate(-50%, -50%) scale(0.5);
    text-align: center;
    justify-content: center;
    align-content: center;
    opacity: 0;
    pointer-events: none;
    
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#after_send_page.active{
    transform: translate(-50%, -50%) scale(1.0);
    opacity: 1;
}




#emote_page{
    position: absolute;
    top: 42%;
    left: 50%;
    width: 90%;
    transform: translate(-50%, 0%);
    text-align: center;
    justify-content: center;
    align-content: center;
    transition: opacity 0.8s ease;
    opacity: 0;
    pointer-events: none;
}

#emote_page.active{
    opacity: 1;
    pointer-events: auto;
}

#emote_grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(30%, 1fr));
    grid-auto-rows: minmax(0, 1fr);
    gap: 1vh;
    margin-top: 2vh;
    margin-bottom: 2vh;
    height: 30vh;
    max-width: 100%;
    overflow-y: auto;
    align-items: center;
    justify-items: center;
    justify-content: center;
    transition: opacity 0.4s ease;
}

.emote_btn {
    margin: 0;
    appearance: none;
    width: 100%;
    height: 100%;
    border-radius: var(--radius);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    background-color: var(--color-light);
    border: none;
}

.emote_btn img {
  width: 70%;
  height: 70%;
  object-fit:contain;
  pointer-events: none;
}


#magify_grid {
    height: 10vh;
    margin-top: 2vh;
}




#randomBtn{
    position: absolute;
    top:35%;
    left:75%;
    width: 10vh;
    height: 10vh;
    border-radius: var(--radius);
    background-color: var(--color-light);
    border:none;
    box-shadow: var(--shadow);
    
    opacity: 0;
    pointer-events: none;
    
    transition: opacity 0.3s ease, top 0.3s ease;
}

#randomBtn.active{
    opacity: 1;
    pointer-events: auto;
    top:55%;
}

#randomBtn img{
    height: 8vh;
    width: 8vh;
    left: 50%;
}


#homeSubmit{
    position: absolute;
    top:35%;
    right:75%;
    width: 10vh;
    height: 10vh;
    border-radius: var(--radius);
    background-color: var(--color-light);
    border:none;
    box-shadow: var(--shadow);
    
    font-weight: bold;
    font-style: normal;
    font-size: 2.2vh;
    color: var(--color-text);

    
    opacity: 0;
    pointer-events: none;
    
    transition: opacity 0.3s ease, top 0.3s ease;
}

#homeSubmit.active{
    opacity: 1;
    pointer-events: auto;
    top:55%;
}





#langBtn{
    position: absolute;
    top: -10vh;
    right: 2vh;
    width: 6vh;
    height: 6vh;
    border-radius: var(--radius);
    background-color: var(--color-dark);
    border:none;
    box-shadow: var(--shadow);
    
    opacity: 1;
    pointer-events: none;
    
    color: var(--color-light);
    
    transition: opacity 0.3s ease, top 0.3s ease;
}

#langBtn.active{
    opacity: 1;
    pointer-events: auto;
    top:2vh;
}








@keyframes shake {
  0%   { transform: translateX(-50%); }
  8%   { transform: translateX(-60%); }
  16%  { transform: translateX(-43%); }
  30%  { transform: translateX(-53%); }
  55%  { transform: translateX(-48%); }
  100% { transform: translateX(-50%); }
}

.shaking {
  animation: shake 0.4s ease-out;
}



.popup{
    position: absolute;
    top: 50vh;
    width: 80vw;
    height: 40vh;
    border-radius: 2vh;
    background: var(--color-dark);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: var(--shadow);
    
    transform: translateX(-50%);
    left: 50%;
    font-weight: bold;
    font-style: normal;
    font-size: 3.8vh;
    color: var(--color-text);
    padding: 3vh 5vw;
  box-sizing: border-box;
}



#reallySubmit{
    top: 110%;
    transition: top 0.3s ease;
}

#reallySubmit.active{
    top:45%;
}

.popup label{
  display: flex;
  justify-content: center;  
  align-items: center; 
    text-align: center
}

.popupBtn{
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 70vw;
    justify-content: center;
    align-items: center;
    display: flex;   
    gap: 2%;
    text-align: center;
}

.popupBtn button{
    border-radius: var(--radius);
    border: none;
    box-shadow: var(--shadow);
    background-color: var(--color-light);
    color: var(--color-text);
    padding: 3vh 6vw;
    

    font-weight: bold;
    font-style: normal;
    font-size: 3vh;
}


button{
    font-family: "Londrina Solid", sans-serif;
    font-weight: 400;
    font-style: normal;
    letter-spacing: 0.05em;
}




#start_img{
    position: absolute;
    top: 12%;
    max-height: 50%;
    max-width: 100%;
    aspect-ratio: 1 / 1;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    
    opacity: 0;
    transition: opacity 0.3s ease;
}

#start_img.active{
    opacity: 1;
}


#error_banner{
    background: #ff8e00;
    opacity: 0;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.1s ease;
}

#error_banner.active{
    opacity: 1;
    pointer-events: auto;
}



/*ONLY FOR COLOR SELECT SERIOUS PLAY!!!!*/
#work_select{
    position: absolute;
    top: 43%;
    width: 100%;
    height: 40%;
    display: flex;
    flex-direction: column;
    align-content: center;
    overflow-y: auto;
    overflow-x: hidden;
    padding-top: 2%;
    opacity: 0;
    pointer-events: none;
    
    transition: opacity 0.3s ease;
}

#work_select.active{
    opacity: 1;
    pointer-events: auto;
}

#work_select_field{
    padding: 1vh;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    box-shadow: var(--shadow);
    background: var(--color-light);
    transition: transform 0.2s ease, background 0.3s ease;
    width: 80%;
    max-width: 1000px;
    position: absolute;
    top: 13vh;
    left: 50%;
    transform: translate(-50%, -50%);
  
}