@import url('https://fonts.googleapis.com/css2?family=Cabin:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&family=Red+Hat+Mono:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&family=Share+Tech+Mono&display=swap');

@-webkit-keyframes append-animate {
	from {
		opacity: 1;
		transform: scale(0.7);
	}
	to {
		opacity: 1;
		transform: scale(1);	
	}
}

@keyframes append-animate {
	from {
		opacity: 1;
		transform: scale(0.7);
	}
	to {
		opacity: 1;
		transform: scale(1);	
	}
}

:root {
    --btnsize: 4rem;
}
* {
    transition: all 0.5s;
}
*:hover {
    cursor: default;
    -webkit-user-select: none;
       -moz-user-select: none;
        -ms-user-select: none;
            user-select: none;
}
body {
    background: linear-gradient( rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.1) ),url(./bg.jpg) repeat;
    background-size: auto;
    background-position: 5% 7%;
    height: 100vh;
    width: 100%;
}
#output {
    box-sizing: border-box;
    color: #7bd8ff;
    font-family: 'Red Hat Mono', monospace;
    margin: 1%;
    position: fixed;
    top: 30%;
    width: 20vw;
}
a {
    color:white;
    text-decoration: none;
}

a:hover {
    cursor: pointer;
    font-size: 1.2rem;
}
section {
    font-family: 'Red Hat Mono', monospace;
    color: rgba(255, 255, 255, 0.482);
    position: absolute;
    right:9px;
    top:2px;
    font-size: 0.7rem;
}
.newgame {
    border: 2px solid #7bd8ff;
    box-shadow: 0 0 5px #7bd8ff,
    0 0 25px #145cc3,
    0 0 50px #145cc3,
    0 0 200px #145cc3;
    box-sizing: border-box;
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.2rem;
    height: 40px;
    line-height: 2.4rem;
    margin-top: 15%;
    position: absolute;
    text-align: center; 
    width: 100%;
}

.newgame:hover{
    background: #03e9f4;
    border-color: #03e9f4;
	box-shadow: 0 0 5px #03e9f4,
				0 0 25px #03e9f4,
				0 0 50px #03e9f4,
				0 0 200px #03e9f4;
	color: #050801;
}
.worddisplay2 {
    display: flex;
    flex: auto;
    flex-flow: row wrap;
    left: 6px;
    position: absolute;
    top: 2%;
    width: 98%;
    z-index: 0;
}

.letterBox {
    align-items: center;
    aspect-ratio: 1/1;
    background: #d6131300;
    border: 2px solid #7bd8ff;
    box-shadow: 0 0 5px #7bd8ff,
    0 0 25px #145cc3;
    color: #7bd8ff;
    display: flex;
    font-family: monospace;
    font-family: 'Share Tech Mono', monospace;
    font-size: 2rem;
    justify-content: center;
    margin: 0 2px;
    max-width: 6rem;
    max-width: 6rem;
    min-height: 15px;
    min-width: 15px;
    padding: 2rem;
    text-transform: uppercase;
    z-index: -1;
}

#buttonsHolder {
    bottom: 5rem;
    display: grid;
    grid-gap: 4.5rem 5px;
    grid-template-columns: repeat(9, 1fr);
    padding: 15px 0 0 15px;
    position: absolute;
    right: 8px;
}
.letterbtn {
    border: 3px solid #03e9f4;
            -webkit-box-reflect: below 1px linear-gradient(transparent, #0005);
    box-sizing: border-box;
            /* padding: 25px 30px; */
	color: #03e9f4;
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.5rem;
	font-size: 2rem;
    height: var(--btnsize);
    line-height: 3.7rem;
	overflow: hidden;
    text-align: center;
	text-transform: uppercase;
    -webkit-user-select: none;
       -moz-user-select: none;
        -ms-user-select: none;
            user-select: none;
    width: var(--btnsize);
}
.letterbtn:hover {
    background: #03e9f4;
    border: 3px solid #03e9f4;
	box-shadow: 0 0 5px #03e9f4,
				0 0 25px #03e9f4,
				0 0 50px #03e9f4,
				0 0 200px #03e9f4;
	color: #050801;
}

.lives {
    display:flex;
    flex:1 0 auto;
    flex-flow: row nowrap;
    gap: 4px;
    height: 40px;
    padding: 2%;
    position: relative;
    width: 100%;
}
.life {
    aspect-ratio: 1/1;
    background-color: #39FF14;
    border-radius: 50%;
    height: 40px;
    width: 40px;
}

.lostlife {
    background-color: #F72119;
    opacity:0.5;
}
.wrong {
    background: #F72119;
    border: 3px solid #F72119;
	box-shadow: 0 0 5px #F72119,
				0 0 25px #F72119,
				0 0 50px #F72119,
				0 0 200px #F72119;
	color: #050801;
    pointer-events:none;
    z-index: -1;
}
.correct {
    background: #39FF14;
    border: 3px solid #39FF14;
	box-shadow: 0 0 5px #39FF14,
				0 0 25px #39FF14,
				0 0 50px #39FF14,
				0 0 200px #39FF14;
	color: #050801;
    pointer-events:none;
    z-index: -1;
}

.guessed {
    -webkit-animation: append-animate .3s linear;
            animation: append-animate .3s linear;
    background: #39FF14;
    border: 3px solid #39FF14;
	box-shadow: 0 0 5px #39FF14,
				0 0 25px #39FF14,
				0 0 50px #39FF14,
				0 0 200px #39FF14;
    color: #050801;
    z-index: 1;
    font-size: 2.8rem;
}


#gameover, .winwrapper {
    align-items: center;
    background: black;
    color: white;
    display:flex;
    flex-direction: column;
    font-family: 'Share Tech Mono', monospace;
    font-size: 6rem;
    height: 100vh;
    justify-content: center;
    line-height: 7rem;
    position: absolute;
    text-align: center;
    transition: all 1s;
    width: 100vw;
    z-index: 2;
}

.hidden {
    display: none !important;
}
.end {
    position: relative;
    width: 50vw;
}

@media (max-width: 779.98px){
    #output {
        top: 35%;
        width: 30vw;

    }
}

@media (max-width: 792.98px){
    #buttonsHolder {
        bottom: 1%;
        grid-gap: 10px 5px;
        left: 0;
        position: absolute;
        /* width: 50%; */
    }
    .letterbtn {
    -webkit-box-reflect: unset;
        height: 3rem;
        line-height: 3rem;
        width: 3rem;
}
#output {
    top: 35%;
    width: 30vw;
}
}
@media (max-width: 500.98px){
    .letterBox {
        padding: 1.3rem;
    }
    #output {
        top: 40%;
        width: 50vw;

    }
    #buttonsHolder {
        bottom: 0;
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        padding: 15px 0 0 0;
        position: absolute;
    }
    .newgame .end {
        top: 20px;
    }
    #answer, .win {
        font-size: 4.5rem;
    line-height: 6rem;
        
    }
}

@media (max-width: 384.98px){ 

.endgame {
    font-size: 3rem;
}
#answer, .win {
    font-size: 2.7rem;
    line-height: 5rem;

}
}

.hidden {
    display:none;
}