/* ==========
GENERAL RULES
========== */

/* Fonts imported from Google Fonts*/
@import url('https://fonts.googleapis.com/css2?family=Lilita+One&family=Permanent+Marker&family=Russo+One&family=Titan+One&display=swap');

/* Basic reset */
* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

/* Set font-size to 62.5% to easy maintain that 10px = 1rem */
html {
    font-size: 62.5%;
}

body {
    background: -webkit-linear-gradient(90deg, rgb(31, 70, 144), rgb(35, 25, 85));
    background: linear-gradient(90deg, rgb(31, 70, 144), rgb(35, 25, 85));
    font-family: 'Russo One', sans-serif;
    color: #CAD6E8;
    font-size: 2rem;
    line-height: 1.2;
}

.text-center {
    text-align: center;
}

.yellow-text {
    color: #fbdb04;
}

.heading {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 2rem auto;
    font-family: 'Lilita One', cursive;
    font-size: 4rem;
    color: #fbdb04;
    text-shadow: 5px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
}

.heading img {
    height: 7rem;
    width: 7rem;
}

/* This container is used in various places across the site */
.container {
    max-width: 160rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 3.2rem;
    margin: 2rem auto;
    background-color: #1f4690;
    border: 2px solid #231955;
    border-radius: 1.5rem;
}

.left-column,
.middle-column,
.right-column {
    margin: 2rem 2rem;
}

.intro-image {
    width: 70rem;
}

/* Buttons */
.buttons {
    display: flex;
    justify-content: center;
    margin: 2rem auto;
    gap: 10rem;
}

.btn {
    display: block;
    text-align: center;
    cursor: pointer;
    background-color: #1f3290;
    font-family: 'Lilita One', cursive;
    font-size: 2.5rem;
    color: white;
    padding: 1.5rem 2.5rem;
    border: 3px solid #fafafa;
    border-radius: 25px;
    box-shadow: 0 15px 35px #231955;
}

.btn:hover {
    background-color: #fbdb04;
    color: #1f3290;
    border: 3px solid #231955;
}

.btn:active {
    transform: translateY(4px);
}

.level-img {
    margin: 3rem auto;
}

.level-img {
    filter: grayscale(80%);
}

.level-img:hover {
    cursor: pointer;
    filter: grayscale(0);
    transition: all .3s ease-in-out;
    transform: scale(1.3);
    position: relative;
    z-index: 1;
}

/* Modal will be displayed by js event after click on rules button */
.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 160rem;
    margin: 1rem 1rem;
    z-index: 1;
    background: rgba(31, 50, 144, 0.65);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(30px);
    border: 1px solid black;
    border-radius: 1.5rem;
    color: white;
}

.modal-heading {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 1rem 1rem;
}

.modal.title {
    font-size: 1.5rem;
    font-weight: bold;
    justify-content: center;
    text-align: center;
    margin-bottom: 1rem;

}

.modal-container {
    display: flex;
    justify-content: center;
}

.modal-left-column,
.modal-middle-column,
.modal-right-column {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1rem;
}

.rules-image img {
    width: 50%;
}

/* Class used by js events to make modal visible */
.modal.visible {
    display: block;
}

.btn--close {
    cursor: pointer;
    float: right;
    margin: 0.5rem 0;
    padding: 0.3rem 0.3rem;
    background-color: red;
    color: white;
    font-size: 2rem;
    border: 1px solid white;
}

.btn--close:hover {
    background-color: darkred;
}

.btn--close:active {
    transform: translateY(4px);
}

/* Classes created  for spans in rules modal */
.color-fire {
    color: #EA7A29;
}

.color-grass {
    color: #7EA640
}

.color-rock {
    color: #8B8A80;
}

.color-ice {
    color: #DFF1FA;
}

.color-ground {
    color: #DBCDB7;
}

.color-water {
    color: #589EA3;
}

/* Author Modal */
.yatech-div {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    margin: 5rem 5rem;
}

.yatech-div img {
    width: 40rem;
    border-radius: 25%;
    margin: 3rem 3rem;
}

.yatech-div a {
    text-decoration: none;
    font-size: 3.5rem;
    color: #fbdb04;
    text-shadow: 3px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
}

.yatech-div a:hover {
    transition: all .3s ease-in-out;
    transform: scale(1.3);
    position: relative;
    z-index: 1;
}

/* ==========
GAME AREA
========== */
.game-area {
    max-width: 180rem;
    display: flex;
    flex-direction: column;
    padding: 0 3.2rem;
    margin: 2rem auto;
    background-color: #1f4690;
    border: 2px solid #231955;
    border-radius: 1.5rem;
}

.top-div,
.middle-div,
.bottom-div {
    display: flex;
    padding: 1rem;
    margin: 1.5rem 0;
}

.top-div {
    align-items: center;
    justify-content: center;
}

.middle-div {
    align-items: center;
    justify-content: space-around;
}

.bottom-div {
    justify-content: space-evenly;
}

/* List of pokemons in game area */
.pokemon {
    display: flex;
    justify-content: center;
}

.pokemon img {
    width: 60%;
    filter: grayscale(90%);
}

.pokemon img:hover {
    cursor: pointer;
    filter: grayscale(0);
    transition: all .3s ease-in-out;
}

.pokemon:hover {
    transition: all .3s ease-in-out;
    transform: scale(1.3);
    position: relative;
    z-index: 1;
    border: 1px solid #231955;
    border-radius: 5rem;
}

.avatar img {
    width: 90%;
}

.score {
    text-align: center;
}

.score p {
    font-size: 3rem;
}

.player-score p {
    color: #41dc0d;
}

.cpu-score p {
    color: #EFAEAE;
}

.game-result {
    font-size: 4rem;
}

/* Class to make smaller Pokemon images in easy mode */
.easy img {
    width: 70%;
}

/* Classes for modals after the game end */
.modal-won,
.modal-lost {
    width: 80rem;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: 5rem;
    padding: 2rem 0;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    background: rgba(31, 50, 144, 0.65);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(30px);
    border: 1px solid black;
    border-radius: 1.5rem;
    color: white;
}

.modal-won.visible,
.modal-lost.visible {
    display: flex;
}

.modal-won {
    color: #41dc0d;
}

.modal-lost {
    color: #EFAEAE;
}

/* AUDIO */
.audio-div {
    display: grid;
    margin: 0 auto;
}

.audio-buttons-div {
    display: flex;
    justify-content: space-evenly;
    margin-top: 1rem;
}

.music-btn {
    cursor: pointer;
    background-color: #1f3290;
    color: white;
    font-size: 3rem;
    height: 6rem;
    width: 6rem;
    border-radius: 50%;
    border: 2px solid #fafafa;
    box-shadow: 0 1.5rem 3.5rem #231955;
}

.music-btn:hover {
    background-color: #fbdb04;
    color: #1f3290;
    border: 3px solid #231955;
}

.music-btn:active {
    transform: translateY(4px);
}

/* FOOTER */
footer {
    display: flex;
    justify-content: center;
    margin: 2rem auto;
}

footer a {
    text-decoration: none;
    color: #fbdb04;
    text-shadow: 3px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
}

footer a:hover {
    color: #fbdb04;
    transition: all .3s ease-in-out;
    transform: scale(1.3);
    position: relative;
    z-index: 1;
}

footer a:active {
    text-decoration: none;
    transform: translateY(4px);
}

footer a:visited {
    text-transform: none;
    text-decoration: none;
}

/* 404 PAGE */
.page-404 {
    display: flex;
    flex-direction: column;
    gap: 2rem
}

.head-404 {
    font-family: 'Lilita One', cursive;
    font-size: 4rem;
    color: #fbdb04;
    text-shadow: 5px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
}

/* ==========
MEDIA QUERIES
========== */

/* Tablet and Laptop */
@media screen and (min-width: 769px) and (max-width: 1400px) {

    .intro-image {
        width: 80%;
    }

    .intro-container p {
        font-size: 2rem;
    }

    .heading img {
        width: 8rem;
        height: 8rem;
    }

    .heading {
        font-size: 3.5rem;
    }

    .buttons {
        gap: 0;
    }

    .btn {
        font-size: 2rem;
        margin: 0 0.5rem;
        padding: 2rem 3rem;
    }

    .right-column p {
        text-align: center;
    }

    .level-img{
        width: 30rem;
        filter: grayscale(0);
    }

    .level-img:hover {
        transition: none;
        transform: none;
        position: relative;
        z-index: 1;
    }

    .modal-won,
    .modal-lost {
        max-width: 80%;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 3rem;
        padding: 2rem 0;
    }

    .modal-won div,
    .modal-lost div {
        display: flex;
        justify-content: center;
    }

    .modal-won div img,
    .modal-lost div img {
        width: 70%;

    }

    .modal-won button,
    .modal-lost button {
        width: 60%;
        font-size: 2rem;
    }

    .modal {
        width: 80%;
        background: rgba(31, 50, 144, 1);
    }

    .modal-title {
        font-size: 1.5rem;
    }

    .modal-left-column,
    .modal-middle-column,
    .modal-right-column{
        font-size: 1.5rem;
    }

    .rules-image {
        width: 90%;
    }

    .yatech-div img {
        width: 80%;
    }
}

/* Mobile Landscape & Tablet Portrait */
@media screen and (min-width: 320px) and (max-width: 768px) {

    .container {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        margin: 0 1rem;
    }

    .intro-image {
        width: 100%;
    }

    .intro-description {
        font-size: 1.4rem;
    }

    .heading img {
        width: 5rem;
        height: 5rem;
    }

    .heading {
        font-size: 1.1rem;
    }

    .buttons {
        gap: 0;
    }

    .btn {
        font-size: 1.2rem;
        margin: 0 0.5rem;
        padding: 1.2rem 2.2rem;
    }

    .right-column p {
        text-align: center;
    }

    .level-img{
        width: 30rem;
        filter: grayscale(0);
    }

    .level-img:hover {
        transition: none;
        transform: none;
        position: relative;
        z-index: 1;
    }

    .levels-container {
        display: flex;
        flex-direction: column;
    }

    .level-description {
        order: 1;
    }

    .easy-level {
        order: 2;
    }

    .hard-level {
        order: 3;
    }

    .level-description :nth-child(6),
    .level-description :nth-child(7),
    .level-description :nth-child(8) {
        display: none;
    }

    .game-area {
        margin: 2rem 1rem;
    }

    .top-div {
        order: 3;
        flex-direction: column-reverse;
    }

    .audio-div {
        order: 3;
    }
    .game-home-btn {
        order: 2;
    }
    .game-rules-btn {
        order: 1;
    }

    .middle-div {
        order: 1;
    }

    .audio-div p {
       font-size: 1.2rem;
    }

    .audio-buttons-div {
        margin: 1rem;
    }

    .music-btn {
        font-size: 2rem;
        height: 5rem;
        width: 5rem;
        border-radius: 50%;
        border: 2px solid #fafafa;
        box-shadow: 0 1.5rem 3.5rem #231955;
    }

    .audio-div br {
        display: none;
    }

    .avatar {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .avatar img {
        width: 80%;
    }

    #battleResult {
        font-size: 1rem;
    }

    .score p {
        font-size: 1.8rem;
    }

    .pokemon img {
        width: 75%;
        filter: grayscale(0);
    }

    .pokemon img:hover {
        transition: all .3s ease-in-out;
    }

    .pokemon:hover {
        transform: scale(1.3);
    }

    .bottom-div {
        order: 2;
    }

    .game-rules-btn {
        margin: 1rem;
    }

    .modal-won,
    .modal-lost {
        max-width: 80%;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 3rem;
        padding: 2rem 0;
    }

    .modal-won div,
    .modal-lost div {
        display: flex;
        justify-content: center;
    }

    .modal-won div img,
    .modal-lost div img {
        width: 70%;

    }

    .modal-won button,
    .modal-lost button {
        width: 60%;
        font-size: 2rem;
    }

    .modal {
        width: 80%;
        position: relative;
        background: rgba(31, 50, 144, 1.65);
    }

    .modal-container {
        flex-direction: column;
    }

    .modal-title {
        font-size: 1.5rem;
    }

    .modal-left-column,
    .modal-middle-column,
    .modal-right-column{
        font-size: 1.5rem;
    }

    .rules-image {
        width: 90%;
    }

    .pokemon-circle {
        display: flex;
        justify-content: center;
    }

    .yatech-div {
        margin: 2rem;
    }

    .yatech-div img {
        width: 80%;
    }

    .page-404 {
        display: flex;
        flex-direction: column;
        gap: 2rem;
        margin: 2rem;
    }

    .head-404 {
        font-family: 'Lilita One', cursive;
        font-size: 3rem;
        color: #fbdb04;
        text-shadow: 5px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
    }

    .psyduck {
        width: 70%;
    }
}

