@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');


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

html {
    scroll-behavior: smooth;
}

body,
html {
    overflow: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-size: 16px;
    font-family: "Poppins", sans-serif;
    color: #171717;
}

input {
    padding: 10px;
    border-radius: 7px;
    font-size: 16px;
}


body {
    overflow-y: hidden;
    height: 100vh;
    --bg: #f5f4f4;
    --primary: #318ce7;
    --secondary: #abb1bd;
    --text: #171717;
    --text-hover: #444;
    --action: #71d44d;
    --alert: #DF2935;

    --shadow: var(--secondary) 0px 0px 5px 1px;

    --primary-active: #2873bf;


    background-color: var(--bg);
    color: var(--text);
    height: 100vh;
    font-family: "Poppins", sans-serif;
    background-color: #f5f4f4;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%232873bf' fill-opacity='0.11' fill-rule='evenodd'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}


header {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    z-index: 3;
}

main {
    z-index: 3;
}


.logo {
    display: flex;
    align-items: center;
    gap: 3px;
    padding-top: 30px;
}

.logo span {
    font-size: 45px;
    font-weight: 600;
    line-height: 80%;
}

.logo img {
    width: 70px;
    height: 70px;
}

.home .logo {
    flex-direction: column-reverse;
    gap: 25px;
}

.home .logo img {
    width: 220px;
    height: 220px;
}

.ingame img {
    width: 30px;
    height: 30px;
}

.ingame span {
    font-size: 22px;
}

.btn-cta {
    padding: 7px 21px;
    background-color: var(--action);
    font-size: 25px;
    border: none;
    outline: none;
    border-radius: 7px;
    cursor: pointer;
}

.btn-cta:hover {
    box-shadow: var(--action) 0px 0px 5px;
}

.btn-light {
    padding: 5px 15px;
    background-color: var(--primary);
    color: var(--bg);
    border: none;
    outline: none;
    border-radius: 7px;
    cursor: pointer;
}

.btn-light:hover {
    box-shadow: var(--secondary) 0px 0px 4px;
}

.btn-light:active {
    background-color: var(--primary-active);
}

.btn-black {
    padding: 5px 15px;
    background-color: var(--text);
    color: var(--bg);
    border: none;
    outline: none;
    border-radius: 7px;
    cursor: pointer;
}

.btn-black:hover {
    box-shadow: var(--text) 0px 0px 2px;
}

.btn-black:active {
    background-color: var(--text-hover);
}

.btn-trans {
    background-color: transparent;
    border: none;
    outline: none;
    display: flex;
    align-items: center;
    font-weight: 600;
    cursor: pointer;
    padding: 0 10px 0 0;
}

.btn-ani {
    overflow: hidden;
    position: relative;
    border-radius: 7px;
}

.btn-ani span:last-child {
    opacity: 0;
    transition: all 1s;
    color: var(--bg)
}

.btn-ani span:first-child {
    background-color: var(--primary);
    padding: 7px;
    border-radius: 7px;

}

.btn-ani span {
    z-index: 2;
    color: var(--bg)
}

.btn-ani::before {
    content: '';
    width: 100%;
    height: 100%;
    background-color: var(--primary);
    position: absolute;
    left: -100%;
    transition: all 500ms;
    z-index: 1;
}

.btn-ani::before:hover {
    transition: 1.5s;
}

.btn-ani:hover span {
    opacity: 100%;
    transition: 1s;
}

.btn-ani:hover::before {
    left: 0;
}



.btn-ani::before:hover {
    animation-name: btn-animation;
    animation-duration: 1s;
}

@keyframes btn-animation {
    from {
        translate: 0px;
    }

    to {
        translate: 100px;
    }
}









/* Homepage ----------------------------- Homepage */

.intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: start;
    gap: 30px;
    height: 600px;
    margin-top: 100px;
}

.intro-txt {
    max-width: 700px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.intro-txt h1 {
    font-size: 30px;
}

.intro-txt p {
    font-size: 16px;
}

/* CREATE NAME */

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10;
    display: none;
}

.rules-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    z-index: 20;
    text-align: center;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.rules-txt {
    font-size: 14px;
    text-align: start;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rules-txt h3 {
    font-size: 25px;
}

.rules-txt h4 {
    font-size: 15px;
}

.rules-txt ol {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-left: 8px;
}

.rules-txt ul {
    padding-left: 14px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.create-name {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--bg);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    z-index: 20;
    text-align: center;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.create-title {
    font-size: 20px;
    font-weight: 700;
}

.prev-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.prev-game {
    display: flex;
    align-items: center;
    flex-direction: column;
    font-size: 13px;
}

.prev-info {
    display: flex;
    align-items: center;
    gap: 2px;
}

.prev-info span {
    font-size: 18px;
    font-weight: 500;
}

.close-btn {
    position: absolute;
    right: 5px;
    top: 5px;
    font-size: 15px;
    cursor: pointer;
}

/*ScoreBoard*/

.scoreboard {
    position: absolute;
    left: 20px;
    bottom: 20px;
}

.content-scoreboard {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--bg);
    padding: 50px 25px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    z-index: 20;
    text-align: center;
    display: none;
    flex-direction: column;
    align-items: center;

}

.table-scoreboard {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 15px;
}

.table-scoreboard th,
.table-scoreboard td {
    border-bottom: 2px solid var(--text);
    padding: 10px 15px;
}


.table-scoreboard table {
    border-collapse: collapse;

}

.table-scoreboard span {
    display: flex;
    align-items: center;
    gap: 2px;
}







/* GAME SECTION ------------------------- GAME SECTION */


/*Navbar*/

.game-nav {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 50px;
}

.close-game {
    position: absolute;
    left: 25px;
    top: 25px;
}

.close-game a {
    display: flex;
    align-items: center;
    gap: 2px;
}

.table {
    display: flex;
    gap: 50px;
    width: 100%;
    background-color: var(--text);
    color: var(--bg);
    padding: 7px 14px;
    border-radius: 7px;
}



.points {
    font-weight: 500;
    display: flex;
    align-items: center;
    font-size: 20px;
}

.timer {
    display: flex;
    align-items: center;
    justify-content: end;
    gap: 2px;
    font-weight: 500;
    width: 80px;
    font-size: 20px;
}

.shop-area {
    position: absolute;
    right: 25px;
    top: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;

}

.shop-btn {
    border: none;
    outline: none;
    border-radius: 7px;
    display: flex;
    align-items: center;
    gap: 2px;
    cursor: pointer;
    background-color: transparent;

}

.shop {
    background-color: #f5f4f4;
    border-radius: 10px;
    box-shadow: var(--shadow);
    position: fixed;
    top: 200px;
    padding: 20px;
    z-index: 20;
    display: none;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex-direction: column;
    gap: 20px;
}

.shop-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    height: 100%;
    justify-content: center;
    align-items: center;
}


.shop-item {
    width: 200px;
    height: 200px;
    box-shadow: var(--shadow);
    border-radius: 7px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.shop-item img {
    height: 50%;
    width: 90%;
    object-fit: cover;
}

.shop-item span {
    font-weight: 500;
}

.shop-item p {
    font-size: 12px;
    font-weight: 500;
}



.sold-box {
    border: none;
    font-weight: 700;
    color: var(--action);
    display: flex;
    align-items: center;
    gap: 2px;
}

.button-disabled {
    cursor: not-allowed;
}



/* Main */

main {
    height: 70%;
    padding: 0 10px;
}

.main-content {
    height: 100%;
    position: relative;
    margin-top: 50px;

}

.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60%;
}

.image {
    height: 100%;
    width: auto;
    overflow: hidden;
    display: flex;

}

.image img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.upgrades-content {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 30px;
}

.upgrades-grp {
    display: flex;
    gap: 30px;
}

.upgrades-item {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}


.upgrades-item img {
    width: 150px;
    height: 150px;
    object-fit: cover;

}




.quiz {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    height: 40%;
}

.question {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: .5px;
}


.correct {
    border: 2px solid var(--action);
}


.options {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;

}

.option-item {
    font-size: 20px;
    outline: none;
    border: 5px solid #171717;
    padding: 5px 15px;
    border-radius: 7px;
    background-color: transparent;
}

.time-up {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--bg);
    padding: 15px;
    border: 3px solid var(--text);
    border-radius: 7px;
    display: none;
    text-align: center;
}


.time-up-content span:first-child {
    font-size: 25px;
    font-weight: 600;
}

.time-up-content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

@media screen and (max-width: 700px) {

    .home .logo img {
        width: 120px;
        height: 120px;
    }



    .game-nav {
        gap: 30px;

    }

    .hero {
        height: 50%;

    }

    .quiz {
        gap: 15px;
    }


    .option-item {
        font-size: 13px;
        width: 300px;
        height: 50px;
        border-width: 5px;
    }

    .options {
        gap: 5px;
        padding: 0px;
        flex-direction: column;
    }

    .shop {
        padding: 50px;
        top: 0;
        height: 100vh;
    }

    .shop-content {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;

    }

    .rules-content {
        width: 90%;

    }

    .shop-item {
        width: 180px;
        height: 180px;

    }

    .question {
        font-size: 15px;

    }

    .intro {
        height: 100%;
        margin-top: 50px
    }

    .shop-item span {
        font-size: 14px;
    }


    .intro-txt h1 {
        font-size: 20px;
    }

    .intro-txt p {
        font-size: 14px;
    }

    .rules-txt {
        font-size: 12px;
    }


    .upgrades-item img {
        width: 90px;
        height: 90px;
        object-fit: cover;

    }

    .main-content {

        margin-top: 30px;

    }

}