* {
    box-sizing: border-box;
}

body {
    background-color: rgb(244, 206, 69);
}

img {
    text-align: center;
}

label,
button {
    font-family: 'Silkscreen', 'sans-serif';
}

/* Page 1 */
img {
    text-align: center;
}

label,
button {
    font-family: 'Silkscreen', 'sans-serif';
}

/* Page 1 */
#page1 img {
    width: 90%;
}

#page1 .box {
    height: 420px;
}

#page1 #instPrevBtn {
    margin-right: 20px;
}

#page1 p {
    font-family: 'Silkscreen', sans-serif;
    font-size: 18px;
}

/* Pokedex Circles */
/* Pokedex Circles */
.circles {
    background-color: rgb(164, 32, 32);
    background-color: rgb(164, 32, 32);
    box-shadow: 3px 4px rgb(163, 163, 163);
    border-bottom: 8px double black;
    border-radius: 12px 12px 0 0;
}

.circles button {
    border-radius: 50%;
    cursor: default;
    border: 2px solid black;
}

/* addition of transition on final page results */
.text-3xl, 
.text-2xl
 {
    opacity:0;
}
@keyframes fadeIn {
    from {
        opacity:0;
    } to {
        opacity: 1;
    }
}



.text-3xl, 
.text-2xl {
    animation: fadeIn 0.5s ease-in-out forwards;
}



.text-3xl {
    animation-delay: 1.5ms;
}


.text-2xl {
    animation-delay: 2ms;
}


/* Pokedex Circles: Blink Animation */
@keyframes blinkBlue {

    0%,
    100% {
        background-color: #2980b9;
    }

    50% {
        background-color: #3498db;
    }
}

@keyframes blinkRed {

    0%,
    100% {
        background-color: #c0392b;
    }

    50% {
        background-color: #e74c3c;
    }
}

@keyframes blinkGreen {

    0%,
    100% {
        background-color: #27ae60;
    }

    50% {
        background-color: #2ecc71;
    }
}

@keyframes blinkYellow {

    0%,
    100% {
        background-color: #f39c12;
    }

    50% {
        background-color: #f1c40f;
    }
}

.circles .blue {
    animation: blinkBlue 1s infinite;
    border: 2px solid white;
}

.red {
    animation: blinkRed 0.75s infinite;
}

.green {
    animation: blinkGreen 0.5s infinite;
}

.yellow {
    animation: blinkYellow 1s infinite;
}

/* Box: Pokedex Screen */
.box {
    box-shadow: 3px 4px rgb(163, 163, 163);
    border: 20px solid rgb(164, 32, 32);
    padding: 5px solid black;
}

/* Page 2 */
#page2 img {
    width: 50%;
}

input[type="radio"] {
    transform: scale(1.5);
    margin-right: 5px;
}

input[type="radio"]:checked+label {
    color: rgb(239, 9, 9);
}

/* Page 3 */
#page3 img {
    width: 80%;
}

form input {
    font-family: 'Silkscreen', 'sans-serif';
    width: 100%;
}

/* Buttons */
.buttons {
    background-color: rgb(164, 32, 32);
    box-shadow: 3px 4px rgb(163, 163, 163);
    border-radius: 0 0 12px 12px;
}

.buttons button {
    box-shadow: 2px 3px rgb(162, 161, 161);
}

#startGameBtn,
#backBtn {
    border: 2px solid rgba(59, 130, 246);
}

#nextBtn {
    border: 2px solid rgba(16, 185, 129);
}

#playBtn2,
#playBtn1 {
    border: 2px solid rgba(52, 211, 153);
}

#muteBtn2,
#muteBtn1 {
    border: 2px solid rgba(248, 113, 113);
}


.buttons button:active {
    transform: translate(2px);
    box-shadow: 0 0 0;
    outline: 0;
}

.buttons button:hover {
    border: 2px dashed black !important;
    color: yellow;
}

#page8 .box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 0;
    background-image: url(../battle-background.png);
    font-family: 'Silkscreen', sans-serif;

}

#battle-title {
    grid-column-start: 1;
    grid-column-end: 3;
    padding-bottom: 60px;
    font-size: 50px;
}

.names {
    display: flex;
    justify-content: space-between;
    grid-column-start: 1;
    grid-column-end: 3;
}


.p1,
.p2 {
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: end;
}



.p2 {
    position: relative;
    bottom: 100px;
}

#p1-pokemon {
    z-index: 2;
    animation: battleCenter-p1 2s cubic-bezier(0.9, 0.9, 0.9, 0);
    animation-delay: 6s;
}

#p2-pokemon {
    z-index: 2;
    animation: battleCenter-p2 2s cubic-bezier(0.9, 0.9, 0.9, 0);
    animation-delay: 6s;

}

#p1-grass,
#p2-grass {
    position: relative;
    z-index: 1;
    bottom: 30px;
    width: 200px;
}

#p1-pokemon-name,
#p2-pokemon-name {
    position: relative;
    bottom: 30px;
}

.battle-wrapper {
    font-weight: bolder;
    display: flex;
    grid-column-start: 1;
    grid-column-end: 3;
    justify-content: space-between;
}

.p2-battle-details .names {
    display: block;
    text-align: right;
}

.score-display {
    display: flex;
    gap: 5px;
}

.point {
    width: 10px;
    height: 10px;
    border-radius: 100%;
}

.empty-score {
    background-color: grey;
}

.score {
    width: 10px;
    height: 10px;
    background-image: url(../pokeball-sprite.png);
    background-size: cover;
}


@keyframes battleCenter-p1 {
    0% {
        transform: translate(0px, 0px);
    }

    50% {
        transform: translate(40px, -40px);
    }

    100% {
        transform: translate(0px, 0px);
    }
}

@keyframes battleCenter-p2 {
    0% {
        transform: translate(0px, 0px);
    }

    50% {
        transform: translate(-40px, 40px);
    }

    100% {
        transform: translate(0px, 0px);
    }
}

#page8 .box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 0;
    background-image: url(../battle-background.png);
    font-family: 'Silkscreen', sans-serif;

}

#battle-title {
    grid-column-start: 1;
    grid-column-end: 3;
    padding-bottom: 60px;
    font-size: 50px;
}

.names {
    display: flex;
    justify-content: space-between;
    grid-column-start: 1;
    grid-column-end: 3;
}


.p1,
.p2 {
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: end;
}



.p2 {
    position: relative;
    bottom: 100px;
}

#p1-pokemon {
    z-index: 2;
    animation: battleCenter-p1 2s cubic-bezier(0.9, 0.9, 0.9, 0);
    animation-delay: 6s;
}

#p2-pokemon {
    z-index: 2;
    animation: battleCenter-p2 2s cubic-bezier(0.9, 0.9, 0.9, 0);
    animation-delay: 6s;

}

#p1-grass,
#p2-grass {
    position: relative;
    z-index: 1;
    bottom: 30px;
    width: 200px;
}

#p1-pokemon-name,
#p2-pokemon-name {
    position: relative;
    bottom: 30px;
}

.battle-wrapper {
    font-weight: bolder;
    display: flex;
    grid-column-start: 1;
    grid-column-end: 3;
    justify-content: space-between;
}

.p2-battle-details .names {
    display: block;
    text-align: right;
}

.score-display {
    display: flex;
    gap: 5px;
}

.point {
    width: 10px;
    height: 10px;
    border-radius: 100%;
}

.empty-score {
    background-color: grey;
}

.score {
    width: 10px;
    height: 10px;
    background-image: url(../pokeball-sprite.png);
    background-size: cover;
}


@keyframes battleCenter-p1 {
    0% {
        transform: translate(0px, 0px);
    }

    50% {
        transform: translate(40px, -40px);
    }

    100% {
        transform: translate(0px, 0px);
    }
}

@keyframes battleCenter-p2 {
    0% {
        transform: translate(0px, 0px);
    }

    50% {
        transform: translate(-40px, 40px);
    }

    100% {
        transform: translate(0px, 0px);
    }
}

@media (max-width: 640px) {

    .circles,
    .box,
    .buttons {
        width: 70%;
    }
}

@media (min-width: 641px) and (max-width: 768px) {

    .circles,
    .box,
    .buttons {
        width: 55%;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {

    .circles,
    .box,
    .buttons {
        width: 48%;
    }
}

@media (min-width: 1025px) and (max-width: 1280px) {

    .circles,
    .box,
    .buttons {
        width: 35%;
    }
}

@media (min-width: 1281px) and (max-width: 1440px) {

    .circles,
    .box,
    .buttons {
        width: 33%;
    }
}

@media (min-width: 1441px) {

    .circles,
    .box,
    .buttons {
        width: 30%;
    }
}

@media (min-width: 1601px) {

    .circles,
    .box,
    .buttons {
        width: 25%;
    }
}

#playerSel1,
#playerSel2,
#pokemonList1,
#pokemonList2 {
    font-family: 'Silkscreen', 'sans-serif';
}

#page7 h1 {
    font-size: 2.5rem;
    font-family: 'Silkscreen', 'sans-serif';
}

#page7 img {
    width: 40%;
}

#page9 h1, table {
    font-family: 'Silkscreen', 'sans-serif';
}

#page9 img {
    width: 50%;
}