@import url('https://fonts.googleapis.com/css2?family=Asimovian&family=Zalando+Sans+Expanded:ital,wght@0,200..900;1,200..900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    font-family: "Zalando Sans Expanded", sans-serif;
}

body {
    background-color: #fcfcc8;
}

main {
    height: 90dvh;
}

h1 {
    font-size: 3rem;
    font-optical-sizing: auto;
}

button {
    background-color: #fafa66;
}





/* full screen div (masking transition) to change screen to result screen */

#divForMask {
    width: 100%;
    height: 100vh;
    background-color: #f4cffe;
    inset: 0;
    display: none;
}


/* animation for masking */

@keyframes blinksAnimation {
    0% {
        --segment-size: 0px;
    }

    50% {
        --segment-size: 41px;
    }

    100% {
        --segment-size: 0px;
    }
}


/* advance way to changes */

@property --segment-size {
    syntax: "<length>";
    inherits: false;
    initial-value: 0px;
}

.blinks {
    --initial-segment-size: 40px;
    --segment-size: var(--initial-segment-size);
    -webkit-mask-image: repeating-linear-gradient(to bottom,
            #000000,
            #000000 var(--segment-size),
            transparent var(--segment-size),
            transparent var(--initial-segment-size));
    animation: blinksAnimation 2.6s forwards;
}





/* Result Screen to show the result to user. And it appear midway during masking transition */

#resultScreen {
    width: 100%;
    height: 100dvh;
    background-color: #fcfcc8;
    inset: 0;
    display: none;
}


/* animation for appear instantly */

@keyframes delayAppear {
    0% {
        opacity: 0;
    }

    49% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }
}


/* Class that triggers the animation */

.animateResultScreen {
    animation: delayAppear 2.6s forwards;
}


#resultScreen div {
    height: 90dvh;
    display: none;
}





@media (max-width: 600px) {

    h1 {
        font-size: 2em;
        font-weight: 600;
    }

    input {
        width: 200px;
    }

    #resultScreen-d2 h1, #resultScreen-d3 h1 {
        font-size: 3rem;
    }
}





@media (max-width: 460px) {
    h1 {
        font-size: 1.5em;
    }

    input {
        width: 170px;
    }

    #resultScreen-d2 h1, #resultScreen-d3 h1 {
        font-size: 3rem;
    }

    #resultScreen-d2 p , #resultScreen-d3 p {
        font-size: 0.9rem;
    }
}





@media (max-width: 410px) {

     #resultScreen-d2 p , #resultScreen-d3 p {
        font-size: 0.77rem;
    }
}





@media (max-width: 350px) {

     #resultScreen-d2 p , #resultScreen-d3 p {
        font-size: 0.7rem;
    }
}





@media (max-width: 320px) {

     #resultScreen-d2 p , #resultScreen-d3 p {
        font-size: 0.63rem;
    }
}