* {
    margin:0;
    padding: 0;
    box-sizing: border-box;
    /*border: 1px solid red;*/
}

:root {
    --ball-left: 0;
    --ball-top: 0;
    --pad-left: 0;
    --power-up-left: 0;
    --power-up-top: 0;
}

@font-face {
    font-family: 'chopsic';
    src: url('../fonts/Chopsic.ttf');
}


@font-face {
    font-family: 'Lovelo';
    src: url('../fonts/Lovelo Line Bold.otf');
}

@font-face {
    font-family: 'squartiqa';
    src: url('../fonts/Squartiqa4F.ttf');
}

body {
    display: flex;
    align-content: center;
    align-items: center;
    justify-content: center;
    background-image: url("../img/bg.gif");
    background-size: cover;
    overflow: hidden;
}

.main-container {
    position: relative;
    width: 100vw;
    padding: 20px;
    height: 100vh;
    border: black 1px solid;
    display: flex;
    justify-content: space-between;
    flex-direction: column;
}

.brick-container {
    display: grid;
    grid-template-columns: repeat(10, auto);
    grid-gap: 5px;
    pointer-events: none;
}

.brick {
    height: 5vh;
    background: rgb(0, 0, 0);
    /*background: linear-gradient(180deg, rgba(255, 255, 255, 1) 1%, rgba(200, 200, 200, 1) 21%, rgba(255, 255, 255, 1) 100%);*/
    box-shadow: 0 0 5px #000;
    border-radius: 10px;
}

.score-container {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    justify-content: space-between;
    color: #fff;
    padding: 10px;
    z-index: -1;
}

.score-container div {
    font-family: chopsic, serif;
    font-size: 3vh;
}


#ball {
    position: absolute;
    height: 4vh;
    width: 4vh;
    border-radius: 100%;
    background-image: url("../img/ball1.png");
    background-position: center;
    background-size: 100%;
    left: calc(var(--ball-left) * 1px);
    top: calc(var(--ball-top) * 1px);
}

.broken {
    opacity: 0;
}

/*.smoothMove {*/
/*    transition: left 0.01s, top 0.01s;*/
/*}*/

#pad {
    width: 15vw;
    height: 3vh;
    position: absolute;
    bottom: 5vh;
    background: rgb(255, 255, 255);
    background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(208, 208, 208, 1) 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgb(0, 0, 0);
    border: 3px solid #cfff00;
    box-shadow: inset 0 0 20px #cfff00;
    border-radius: 10px;
    left: calc(var(--pad-left) * 1px);
}

.power-up {
    position: absolute;
    height: 4vh;
    width: 4vh;
    background-color: #FFBF00;
    color: red;
    font-size: 3vh;
    font-weight: bold;
    text-align: center;
    line-height: 4vh;
    /*font-family: Arial;*/
    border-radius: 100%;
    left: calc(var(--power-up-left) * 1px);
    top: calc(var(--power-up-top) * 1px);
}

.leftpad {
    height: 130%;
    width: 20%;
    box-shadow: inset 0 0 20px #ec00ff;
    border: 3px solid #ec00ff;
    background-color: black;
    border-bottom-left-radius: 10px;
    border-top-left-radius: 10px;
    transform: translate(-5px, 0);
}

.rightpad {
    height: 130%;
    width: 20%;
    box-shadow: inset 0 0 20px #ec00ff;
    border: 3px solid #ec00ff;
    background-color: black;
    border-bottom-right-radius: 10px;
    border-top-right-radius: 10px;
    transform: translate(5px, 0);
}

.l4 {
    box-shadow: inset 0 0 20px red;
    border: 2px solid red;
}

.l2 {
    box-shadow: inset 0 0 20px #ec00ff;
    border: 2px solid #ec00ff;
}

.l3 {
    box-shadow: inset 0 0 20px #88ff55;
    border: 2px solid #88ff55;
}

.l1 {
    box-shadow: inset 0 0 20px #cfff00;
    border: 2px solid #cfff00;
}

.l0 {
    animation: blast .5s ease;
    opacity: 0;
    /*position: absolute;*/
}

@keyframes blast {
    25% {
        transform: scale(1.3);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }
    75% {
        transform: scale(1.7);
        opacity: 0.3;
    }
    100% {
        transform: scale(2);
        opacity: 0;
        display: none;
    }
}
.animateball {
    animation: powerball 10s infinite linear;
}
.powerball {
    background-color: transparent !important;
    background-image: url("../img/powerball.png") !important;
    background-size: 100%;
    background-position: center;
    width: 8vh !important;
    height: 8vh !important;
    animation: powerball 5s infinite linear;
}

@keyframes powerball {
    100% {
        transform: rotate(360deg);
    }
}

.startbtn {
    height: 23%;
    width: 100%;
    position: absolute;
    bottom: 27%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}


.home, .restart, .next {
    width: 130px;
    height: 70px;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;

}

#M1,#M2,#M3,#M4,#M5 {
    align-items: center;
    cursor: pointer;
}

.nextcard {
    position: absolute;
    right: 4%;
    top: 45%;
    height: 50px;
    width: 100px;
    display: flex;
    background-image: url(../img/nextbtn.gif);
}

/* The Modal (background) */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 2; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0, 0, 0); /* Fallback color */
    background-color: rgba(0, 0, 0, .5); /* Black w/ opacity */
}

.title {
    font-family: squartiqa, serif;
    color: #88ff55;
    font-size: 2.5rem;
    text-align: center;
}

.titlediv {
    width: 100%;
    display: flex;
    position: absolute;
    top: 30%;
    justify-content: center;
}

.startbtn {
    display: flex;
    justify-content: space-evenly;
}

.play-text, .game-text {
    font-family: Lovelo, serif;
    font-size: 4rem;
}

.play-text {
    color: #ec00ff;
    text-shadow: 0 0 20px #ec00ff;
}

.game-text {
    color: #cfff00;
    text-shadow: 0 0 20px #cfff00;
}
.stars{
    display: flex;
    justify-content: center;
}
.s1,.s2,.s3{
    width: 110px;
    height: 100px;
    background: #050a30;
}
.star{
    background: transparent;
}
.playagain {
    width: 100%;
    height: 100px;
    position: absolute;
    /*border: 1px solid red;*/
    left: 0;
    cursor: pointer;
    bottom: 25%;
}

/* Modal Content */
.modal-content {
    position: relative;
    background-color: #fefefe;
    margin: auto;
    padding: 0;
    border-radius: 20px;
    width: 1000px;
    height: 550px;
    box-shadow: 0 0 50px #ec00ff;
    -webkit-animation-name: animatetop;
    -webkit-animation-duration: 0.4s;
    animation-name: animatetop;
    animation-duration: .4s;
}

.modal-c1 {
    background-image: url("../img/start.gif");
    background-size: cover;
    background-position: center;
}

.modal-c2 {
    background-image: url("../img/end.gif");
    background-size: cover;
    background-position: center;
}

.modal-c3 {
    background-image: url("../img/next.gif");
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.modal-c3 .modal-body {
    width: 100%;
    display: flex;
    justify-content: center;
    position: absolute;
    bottom: 10%;
}

/* Add Animation */
@-webkit-keyframes animatetop {
    from {
        transform: scale(0);
        opacity: 0
    }
    to {
        transform: scale(1);
        opacity: 1
    }
}

@keyframes animatetop {
    from {
        transform: scale(0);
        opacity: 0
    }
    to {
        transform: scale(1);
        opacity: 1
    }
}

/* The Close Button */
.close {
    color: white;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.modal-header {
    padding: 2px 16px;
    background-color: #5cb85c;
    color: white;
}

.modal-body {
    padding: 2px 16px;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.modal-footer {
    padding: 2px 16px;
    background-color: #4339ff;
    color: white;
}

.storycenter {
    height: 100%;
    width: 80%;
    display: flex;
    margin: auto;
    justify-content: center;
    align-items: center;
}

.story-img {
    height: 50%;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    flex-basis: 30%;
}

.story-text {
    flex-basis: 70%;
    display: flex;
    justify-content: center;
    color: white;
}
.active{
    display: flex;
    animation: cards 2s ease;
}
@keyframes cards {
    from{
        transform: translate(1500px,0);
    }
    to{
        transform: translate(0,0);
    }
}
.img1 {
    background-image: url("../img/s1.webp");
}
.img2 {
    background-image: url("../img/s2.webp");
}
.img3 {
    background-image: url("../img/s3.gif");
}
.img4 {
    background-image: url("../img/s4.gif");
}
.img5 {
    background-image: url("../img/s5.webp");
}

.modal-s {
    background-image: url("../img/story.gif");
    background-size: cover;
    background-position: center;
}
.next{
    cursor: pointer;
}