@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");

/* Includes colors which are used multiple times all the colors are just these colors with varying alpha values */
:root {
    --body-bg-color: #121212;

    --elem-bg-color: #20315b;
    --elem-text-color: lightgray;
    --elem-icons-bg-color: #141c30;

    --red-color: #e91e63;
    --green-color: #0cd661;
}

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

body {
    background: var(--body-bg-color);
    height: 100svh;
    width: 100svw;
    font-family: "Poppins", sans-serif;
}

/* CSS for starting screen */

.player-screen {
    background: var(--elem-bg-color);
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: var(--elem-text-color);
    border-radius: 7px;
    padding: 10px;
    max-width: 1280px;
    min-width: 310px;
    width: 60%;
    transition: all 2s;
    z-index: 4;
}

.player-screen-heading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13pt;
    font-weight: bold;
}

.players > ul {
    list-style: none;
}

.player-screen-btn {
    border: 1px solid #60c689;
    background: rgba(96, 198, 137, 0.4);
    color: whitesmoke;
    padding: 4px;
    border-radius: 6px;
    margin-top: 0.6em;
    font-size: 1.1em;
    cursor: pointer;
    display: none;
}

.player-screen-wrapper {
    display: none;
    z-index: 3;
    position: absolute;
    height: 100vh;
    width: 100svw;
}

.host {
    color: var(--red-color);
    font-weight: bold;
}

.won {
    color: var(--green-color);
}

.lost {
    color: var(--red-color);
}

/* CSS for ending screen */

.result-screen-wrapper {
    z-index: 5;
    display: block;
    position: absolute;
    height: 100vh;
    width: 100svw;
    display: none;
}

.result-screen {
    display: block;
    background: var(--elem-bg-color);
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: var(--elem-text-color);
    border-radius: 7px;
    max-width: 1280px;
    min-width: 310px;
    width: 60%;
    padding: 10px;
    transition: all 2s;
    z-index: 10;
}

.inGamePlayers-heading,
.winners-heading,
.losers-heading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13pt;
    font-weight: bold;
}

.inGamePlayers-list > ul,
.winners-list > ul,
.losers-list > ul {
    margin-bottom: 5px;
    list-style: none;
}

ion-icon[name="game-controller-outline"],
ion-icon[name="trophy-outline"],
ion-icon[name="sad-outline"] {
    display: inline-block;
    background: var(--elem-icons-bg-color);
    padding: 5px;
    margin-right: 5px;
    border-radius: 6px;
}

.show-result {
    outline: none;
    border: 1px solid #60c689;
    background: rgba(96, 198, 137, 0.4);
    color: whitesmoke;
    padding: 8px;
    margin-bottom: 2vh;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1em;
}

.restart-btn {
    border: 1px solid #60c689;
    background: rgba(96, 198, 137, 0.4);
    color: whitesmoke;
    padding: 4px;
    border-radius: 6px;
    margin-top: 0.6em;
    font-size: 1.1em;
    cursor: pointer;
    display: none;
}

/* CSS for alert */

.alert-wrapper {
    z-index: 11;
    display: none;
    position: absolute;
    height: 100vh;
    width: 100svw;
}

div.alert {
    width: 70%;
    border: 2px solid #141c30;
}

.alert,
.prompt-outer {
    display: none;
    background: var(--elem-bg-color);
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: var(--elem-text-color);
    border-radius: 7px;
    max-width: 1280px;
    min-width: 310px;
    width: 60%;
    transition: all 2s;
    z-index: 10;
}

.alert-head {
    width: 100%;
}

.alert-head > .alert-heading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.725rem;
    font-size: 13pt;
    padding-left: 0.5rem;
    font-weight: bold;
}

ion-icon[name="megaphone-outline"],
ion-icon[name="terminal-outline"],
ion-icon[name="people-circle-outline"] {
    display: inline-block;
    background: var(--elem-icons-bg-color);
    padding: 5px;
    margin-right: 5px;
    border-radius: 6px;
}

.alert-body {
    padding: 0.5rem 0;
    padding-left: 0.5rem;
    width: 100%;
}

ion-icon[name="close-outline"] {
    display: inline-block;
    cursor: pointer;
    background: rgba(233, 30, 98, 0.2);
    padding: 5px;
    border-radius: 6px;
    position: absolute;
    right: 1%;
    top: 1svw;
    color: var(--red-color);
    border: 1px solid var(--red-color);
    font-weight: bolder;
}

/* CSS for prompt */

.prompt-outer {
    justify-content: center;
    align-items: center;
    flex-flow: column;
}
.prompt {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-direction: column;
    padding: 0 4%;
}

.prompt-outer > .prompt-heading > span {
    color: var(--green-color);
}

.prompt-heading {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 16pt;
    font-weight: bold;
    position: relative;
    top: 0;
    left: 4%;
    margin-top: 4px;
    align-self: flex-start;
}

.username-input,
.room-id-input {
    margin-top: 1vh;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    flex-flow: column;
    width: 100%;
}

.username-input > span,
.room-id-input > span {
    align-self: flex-start;
    font-weight: 600;
    font-size: 12pt;
}

ion-icon[name="terminal-outline"] {
    color: var(--green-color);
}

.room-id-input {
    margin-top: 1%;
}

.submit-btn {
    display: block;
    margin-top: 2vh;
    margin-bottom: 2%;
    outline: none;
    background: rgba(96, 198, 137, 0.2);
    padding: 5px;
    border-radius: 6px;
    color: var(--green-color);
    border: 1px solid var(--green-color);
    font-size: 12pt;
    font-weight: bold;
    cursor: pointer;
}

.username-input > input,
.room-id-input > input {
    margin-top: 4px;
    padding: 6px;
    outline: none;
    border: 1px solid #f8f8f8;
    background-color: var(--elem-bg-color);
    color: var(--elem-text-color);
    transition: all 150ms;
    border-radius: 6px;
    font-size: 11pt;
    width: 100%;
}

.username-input > input:focus,
.room-id-input > input:focus {
    border: 1px double var(--green-color);
}

@font-face {
    font-family: "neontubes";
    src: url("https://bitbucket.org/kennethjensen/webfonts/raw/fc13c1cb430a0e9462da56fe3f421ff7af72db71/neontubes/neontubes-webfont.eot");
    src: url("https://bitbucket.org/kennethjensen/webfonts/raw/fc13c1cb430a0e9462da56fe3f421ff7af72db71/neontubes/neontubes-webfont.eot?#iefix")
            format("embedded-opentype"),
        url("https://bitbucket.org/kennethjensen/webfonts/raw/fc13c1cb430a0e9462da56fe3f421ff7af72db71/neontubes/neontubes-webfont.woff2")
            format("woff2"),
        url("https://bitbucket.org/kennethjensen/webfonts/raw/fc13c1cb430a0e9462da56fe3f421ff7af72db71/neontubes/neontubes-webfont.woff")
            format("woff"),
        url("https://bitbucket.org/kennethjensen/webfonts/raw/fc13c1cb430a0e9462da56fe3f421ff7af72db71/neontubes/neontubes-webfont.ttf")
            format("truetype");
    font-weight: normal;
    font-style: normal;
}
.game-headings {
    font-family: "neontubes";
    height: 14svh;
    padding-top: 1svh;
    width: 100svw;
    line-height: 7svh;
    text-align: center;
    text-justify: center;
}
.game-main-heading {
    font-size: 3em;
    color: #ffd9e2;
    text-shadow: 0 0 0 transparent, 0 0 10px #ff003c,
        0 0 20px rgba(255, 0, 60, 0.5), 0 0 40px #ff003c, 0 0 100px #ff003c,
        0 0 200px #ff003c, 0 0 300px #ff003c, 0 0 500px #ff003c,
        0 0 1000px #ff003c;
    -webkit-animation: blink 4s infinite alternate;
    animation: blink 4s infinite alternate;
}
.game-sub-heading {
    color: #d4eaff;
    font-size: 1.5em;
    text-shadow: 0 0 0 transparent, 0 0 10px #2695ff,
        0 0 20px rgba(38, 149, 255, 0.5), 0 0 40px #2695ff, 0 0 100px #2695ff,
        0 0 200px #2695ff, 0 0 300px #2695ff, 0 0 500px #2695ff;
    -webkit-animation: buzz 0.01s infinite alternate;
    animation: buzz 0.01s infinite alternate;
}
@keyframes buzz {
    70% {
        opacity: 0.75;
    }
}
@keyframes blink {
    40% {
        opacity: 1;
    }
    42% {
        opacity: 0.8;
    }
    43% {
        opacity: 1;
    }
    45% {
        opacity: 0.2;
    }
    46% {
        opacity: 1;
    }
}
main {
    height: calc(100vh - 14vh);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-flow: column;
    position: relative;
    z-index: 1;
}
.game {
    width: 96%;
    color: white;
    display: grid;
    grid-template-columns: repeat(5, 20%);
    grid-template-rows: repeat(6, 14%);
    padding: 0.725rem 0;
}
.cells,
.cell-dummy {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #ff0b6ad1;
    font-size: 4.5vmin;
}

.cells {
    cursor: pointer;
}

.cell-dummy.initials {
    background: #c2186b8c;
    font-weight: bold;
    font-size: 6vmin;
}
footer {
    color: var(--elem-text-color);
    width: 100svw;
    text-align: center;
    opacity: 0.5;
    font-size: 0.95em;
}
.number-ball-container {
    height: 200px;
    width: 200px;
    position: relative;
}
.number-ball {
    background: radial-gradient(
        circle at 70px 80px,
        #21c2fddc,
        rgb(2, 63, 150),
        rgb(0, 23, 44),
        rgb(0, 0, 3)
    );
    border: 0px;
    border-radius: 50%;
    position: absolute;
    height: 120px;
    width: 120px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-flow: column;
}
.number-ball-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-flow: column;
    background: white;
    border-radius: 50%;
    height: 50%;
    width: 50%;
}
.roll-ball-btn {
    display: none;
    border: 1px solid #60c689;
    background: rgba(96, 198, 137, 0.4);
    color: whitesmoke;
    padding: 8px;
    border-radius: 6px;
    font-size: 4.5vmin;
    cursor: pointer;
}
.text {
    font-weight: bold;
    font-size: 4vmin;
}
