@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;700&display=swap');

* {
    font-family: "Nunito", sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border: none;
    outline: none;
    text-decoration: none;
    transition: .2s linear;

}

html {
    font-size: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 7rem;
}

body {
    background: #fff;
    color: #333;
}

.particle {
    position: absolute;
    width: 5px;
    height: 5px;
    background: orange;
    border-radius: 50%;
    pointer-events: none;
    animation: explode 700ms forwards;
}

@keyframes explode {
    to {
        transform: translate(var(--x), var(--y));
        opacity: 0;
    }
}


.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: whitesmoke;
    padding: .8rem 0;
    text-align: center;
    align-items: center;
    justify-content: center;
    display: flex;
    box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .3);
    z-index: 1000;
    border-bottom: .5px solid gainsboro;

}

.header .logo {
        display: flex;

    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    vertical-align: middle;
    text-align: center;
    text-shadow: 2px 2px 4px #000000;
         align-items: center;


}

.header .logo span {
    color: orangered;
    font-size: 1.4rem;
    vertical-align: middle;
    margin-left: .5rem;
}




.container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin-top: 4rem;
    padding: 1rem;
}

.card {
    width: 100%;
    max-width: 1200px;
    height: calc(100vh - 18rem);
    /* fill screen minus header+footer */
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: .5px solid gainsboro;

}

.card-header img {
    width: 100%;
    /* height: auto; */
    max-height: 80px;
    object-fit: cover;
}

.card-content {
    flex: 1;
    overflow: auto;
    padding: .8rem;
}

.card-content p {
    font-size: 2rem;
    line-height: 1.6;
    word-wrap: break-word;
    letter-spacing: 2px;
}

.card-footer {
    background: #fff;
    padding: .5rem;
    text-align: center;
    border-top: .5px solid #ddd;
    box-shadow: 0px -1px 10px rgba(0, 0, 0, 0.1);

}

.card-footer h3 {
    font-size: 1.2rem;
    margin: .2rem 0;
    color: orangered;
}



 .card .card-footer a:hover{
    text-decoration: underline;
    text-underline-offset: 0.3rem;
    color: orangered;
 }


.letter{
    /* display: inline-block; */
    cursor: pointer;
    color: black;
    margin: 2px;
    font-weight: normal;
    transition: opacity 0.3s ease;

}

.letter.matched{
    color: orangered;
    font-weight: bold;
}

.hidden{
    /* opacity: 0; */
    /* visibility: hidden; */
    display: none;
}

.selected{
    color: orangered;
    font-weight: bold;
}

button:disabled{
    cursor: not-allowed;
    opacity: 0.3;
}

.letter.removed{
    /* visibility: hidden; */
    display: none;
    opacity: 0;
}
.removed{
    display: none;
}

#changeBtn:disabled{
    opacity: 0.3;
    cursor: not-allowed;
}

#prevBtn:disabled{
    opacity: 0.3;
    cursor: not-allowed;
}

#changeBtn.active { 
    animation: glowPulse 1.5s infinite alternate; 
    box-shadow: 0 0 10px #ff9800, 0 0 20px #ff9800; 
} 

#prevBtn.active { 
    animation: glowPulse 1.5s infinite alternate; 
    box-shadow: 0 0 10px #ff9800, 0 0 20px #ff9800; 
} 

@keyframes glowPulse { 
    from { box-shadow: 0 0 10px #ff9800, 0 0 20px #ff9800; } 
    to { box-shadow: 0 0 20px #ff5722, 0 0 40px #ff5722; } 
}



.navbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: block;
    align-items: flex-end;
    text-align: center;
    background: whitesmoke;
    box-shadow: 0 -.3rem 1.5rem rgba(0, 0, 0, .3);
    border-top: .5px solid gainsboro;
    padding: .3rem 0;
}

.navbar h3 {
    font-size: 1rem;
    color: orangered;
    margin-top: .2rem;
}

.navbar button {
    display: inline-block;
    margin: .1rem;
    padding: .3rem .8rem;
    font-size: 1rem;
    color: #fff;
    background: orangered;
    cursor: pointer;
}

.navbar button:hover {
    opacity: .85;
}

 .navbar a:hover{
    text-decoration: underline;
    text-underline-offset: 0.3rem;
    color: orangered;
 }
 




@media screen and (min-width: 769px) and (max-width: 1200px) {



    .header .logo {
        font-size: 1.4rem;
    }

    .header .logo span {
        font-size: 1.6rem;
    }



    .card-header img {
        max-height: 90px;
    }

    .card-content p {
        font-size: 1.8rem;
    }



    .navbar button {
        font-size: .9rem;
    }

    .navbar h3 {
        font-size: 1.4rem;
    }

}

@media screen and (min-width: 450px) and (max-width: 768px) {



    .header .logo {
        font-size: 1.2rem;
    }

    .header .logo span {
        font-size: 1.4rem;
    }



    .card-header img {
        max-height: 80px;
    }

    .card-content p {
        font-size: 1.7rem;
    }



    .navbar button {
        font-size: .8rem;
    }

    .navbar h3 {
        font-size: 1.2rem;
    }


}