@font-face {
    font-family: "streamsterregular";
    src: url("fonts/Streamster/streamster-webfont.woff2") format("woff2"),
        url("fonts/Streamster/streamster-webfont.woff") format("woff");
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: "karmatic_arcaderegular";
    src: url("fonts/karmatic-arcade/ka1-webfont.woff2") format("woff2"),
        url("fonts/karmatic-arcade/ka1-webfont.woff") format("woff");
    font-weight: normal;
    font-style: normal;
}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --font-family-arcade: "karmatic_arcaderegular";
}

/* =======================================
=============== INTRO PAGE ================
======================================= */

.introPage {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: url("assets/80s-wallpaper.jpeg") no-repeat rgba(0, 0, 0, 1);
    background-position: center;
    background-size: cover;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.introPage::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.5);
}
.introPage.animated {
    animation: 0.5s zoomOut forwards linear;
    opacity: 1;
    transform: translateX(-50%, 50%);
    display: none;
}
.introPage.animated::after {
    display: none;
}
@keyframes zoomOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0.25;
        transform: scale(2);
        background: black;
        display: none;
        z-index: -100;
    }
}
.introContainer {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100vh;
    margin: 0 auto;
}
.logo {
    width: 45vw;
    height: auto;
    animation: 2s slideInLogo 1s forwards linear;
    opacity: 0;
    z-index: 10000;
    position: relative;
    margin: 0 auto;
    text-align: center;
    top: 0%;
}
@keyframes slideInLogo {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
        top: 50%;
        transform: translateY(-50%);
    }
}

.spiced {
    font-family: "streamsterregular";
    font-size: calc(2rem + 1vw);
    text-align: center;
    margin-bottom: 0;
    color: hotpink;
    z-index: 10000;
    animation: 1s spicedslideInLogo 1.5s forwards linear;
    opacity: 0;
    position: absolute;
    left: 0;
    right: 0;
    top: 10%;
    margin: 0 auto;
    line-height: 1.4rem;
}
@keyframes spicedslideInLogo {
    0% {
        opacity: 0;
        transform: translateY(0%);
    }
    100% {
        opacity: 1;
        transform: translateY(-50%);
    }
}

.start {
    z-index: 10000;
    text-align: center;
    font-family: var(--font-family-arcade);
    font-size: calc(1rem + 1vw);
    color: white;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 15%;
    top: 85%;
    animation: 0.5s blinkingText 4s linear 5;
    cursor: pointer;
}
@keyframes blink182 {
    0% {
        opacity: 0.25;
    }
    100% {
        opacity: 1;
    }
    0% {
        opacity: 0.25;
    }
}

.start:hover {
    color: orange;
    transition: 0.25s all ease-in-out;
}

/* =======================================
=============== WIN MODAL ================
======================================= */

.winModal {
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 1);
    background: url("assets/neon-grid.jpg") no-repeat center cover;
    z-index: -1;
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    text-align: center;
    opacity: 1;
    display: none;
    transition: 0.1s all ease-in-out;
}

.winModal.appear {
    animation: 1s endFade forwards linear;
    opacity: 0;
    display: flex;
    z-index: 100;
}
@keyframes endFade {
    0% {
        opacity: 0.25;
    }
    100% {
        opacity: 1;
    }
}
.winMessage {
    text-align: center;
    font-family: var(--font-family-arcade);
    font-size: calc(3rem + 1vw);
    color: white;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    margin-bottom: 1rem;
    animation: 2s winBiggly infinite linear;
    opacity: 0;
    line-height: 1;
}
@keyframes winBiggly {
    from {
        font-size: calc(2.5rem + 1vw);
        z-index: 5;
        opacity: 1;
    }
    50% {
        font-size: calc(4rem + 1vw);
        color: hotpink;
        opacity: 1;
    }
    100% {
        font-size: calc(2.5rem + 1vw);
        opacity: 1;
    }
}

.playAgain {
    font-family: var(--font-family-arcade);
    font-size: calc(1rem + 1vw);
    color: white;
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: 100%;
    cursor: pointer;
    margin: 0;
    animation: 0.5s blinkingText 3s linear 15;
}
@keyframes blinkingText {
    0% {
        opacity: 0.25;
    }
    100% {
        opacity: 1;
    }
    0% {
        opacity: 0.25;
    }
}
.playAgain:hover {
    color: orange;
    transition: 0.25s all ease-in-out;
}

/* holds the whole game 100vw/100vh */
.gameArea {
    display: flex;
    margin: auto;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 100vh;
    background: url(assets/80s-wallpaper.jpeg) no-repeat;
    background-size: cover;
    opacity: 1;
    z-index: -2;
}

/* =======================================
========== EXTRA PAGE ELEMENTS ===========
======================================= */
.gogoText {
    font-family: var(--font-family-arcade);
    font-size: calc(2rem + 2vw);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    z-index: -1;
    text-align: center;
    margin: auto;
    width: 100%;
    background-image: -webkit-linear-gradient(
        #378dbc 0%,
        #b6e8f1 46%,
        #ffffff 50%,
        #32120e 54%,
        #ffc488 58%,
        #582c11 90%,
        #ec9b4e 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 1px #f5f5f5;
    font-style: italic;
    margin: 0;
    line-height: 1;
}
.gogoText.animate {
    animation: 0.75s zoomInandFadeAway 0.25s forwards;
}
@keyframes zoomInandFadeAway {
    from {
        opacity: 0;
        z-index: 200;
    }
    90% {
        opacity: 1;
    }
    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(2.5);
        display: none;
    }
}

/* =======================================
========== PLAYERS DETAILS ETC ===========
======================================= */

.credit {
    font-family: var(--font-family-arcade);
    font-size: calc(0.5rem + 1vw);
    position: absolute;
    bottom: 5vh;
    left: 5vw;
    color: white;
    background: none;
    border: none;
    z-index: 4;
}
.insert {
    font-family: var(--font-family-arcade);
    font-size: calc(0.5rem + 1vw);
    position: absolute;
    bottom: 5vh;
    right: 5vw;
    color: white;
    opacity: 0;
    z-index: 9999;
    animation: 0.5s flash 25s linear 15;
}
@keyframes flash {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}
.copyright {
    font-family: var(--font-family-arcade);
    font-size: calc(0.25rem + 0.9vw);
    position: absolute;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    z-index: 4;
    text-align: center;
}
.players {
    font-family: var(--font-family-arcade);
    position: absolute;
    top: 5vh;
    right: 5vw;
    color: white;
    z-index: 4;
    text-align: right;
    display: flex;
}
.p1,
.p2,
.slash {
    font-size: calc(0.5rem + 1vw);
    position: relative;
    color: rgba(270, 270, 270, 1);
    z-index: 4;
    letter-spacing: 0.25rem;
}
.p1.lowOpacity,
.p2.lowOpacity {
    color: rgba(270, 270, 270, 0.25);
    transition: 0.5s all ease-in-out;
}
.slash {
    border-right: 2px solid orange;
    margin: 0 1rem;
}

/* /////////////// SCORES  /////////////// */

.scoreboard {
    position: absolute;
    top: 5vh;
    left: 5vw;
    display: flex;
    flex-direction: column;
}
.hiScore {
    font-family: var(--font-family-arcade);
    font-size: calc(0.5rem + 1vw);
    color: white;
    z-index: 4;
    text-align: left;
    margin-bottom: 1rem;
}
.p1Score,
.p2Score {
    font-family: var(--font-family-arcade);
    font-size: calc(0.25rem + 1vw);
    color: white;
    z-index: 4;
    text-align: left;
}
#resetScore {
    font-family: var(--font-family-arcade);
    font-size: calc(0.25rem + 0.5vw);
    color: white;
    text-align: center;
    padding: calc(0.25rem + 0.3vw);
    border: none;
    background: #c90b80;
    margin-top: 1rem;
    display: inline-block;
    transition: 0.2s all ease-in-out;
    border-radius: 3px;
    z-index: 10;
}
#resetScore:hover {
    cursor: pointer;
    color: black;
    background: rgba(270, 270, 270, 0.5);
}
#resetScore:focus {
    outline: none;
}

/* =======================================
============ CONNECT 4 AREA ==============
======================================= */
.boardBack {
    display: flex;
    margin: auto;
    justify-content: center;
    align-items: center;
    z-index: 4;
    width: 100vw;
    height: 100vh;
    /* number equivalent to 6/7vw to maintain aspect ratio */
}
.boardContainer {
    z-index: 1;
    display: flex;
    margin: auto;
    justify-content: center;
    flex-direction: column;
    width: 45vw;
    height: calc(45vw * 0.85714286);
}
.board {
    display: flex;
    margin: auto;
    background: url(assets/board.png) no-repeat;
    background-size: contain;
    width: 100%;
    height: 100%;
    z-index: 9999;
    overflow: hidden;
}
.column {
    width: 14.28571429%;
    height: 16.66666667%;
    position: relative;
    z-index: -1;
}
.slot {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 10%;
    z-index: -1;
}

/* turned off background-color to see through svg bg */
.hole {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}
.column .hole:hover {
    cursor: pointer;
    border: 3px solid white;
    transition: 0.25s all ease-in-out;
    border: 0;
    animation: 0.4s blingBorderAnimate linear;
}
.column .hole:hover::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: 0.25s all ease-in-out;
    border: 3px solid orange;
    border-radius: 50%;
    animation: 0.5s blingBorderAnimate 0.25s linear;
    opacity: 0;
}
.column .hole:hover::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: 0.25s all ease-in-out;
    border: 1px solid orange;
    border-radius: 50%;
    animation: 0.25s blingBorderAnimate 0.15s linear;
    opacity: 0;
}

@keyframes blingBorderAnimate {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    75% {
        opacity: 1;
        transform: scale(1.1);
        border: 2px solid rgba(270, 270, 270, 0.75);
        filter: blur(8px);
        -webkit-filter: drop-shadow(2px 2px 15px #3f59f4);
    }
    to {
        opacity: 0;
        transform: scale(1.25);
        border: 1px solid rgba(270, 270, 270, 0.15);
    }
}

.slot.player1 .hole {
    background: rgba(246, 178, 22, 1);
    z-index: 1;
}
.slot.player2 .hole {
    background: rgba(18, 206, 215, 1);
}
.slot.player2.fall .hole,
.slot.player1.fall .hole {
    animation: 500ms drop-animation;
}
.slot.player2.fall.victoryDancing .hole,
.slot.player1.fall.victoryDancing .hole {
    background: white;
    animation: 0.5s flashDance linear infinite;
}
@keyframes flashDance {
    from {
        opacity: 0.5;
    }
    to {
        transform: 1;
    }
}
@keyframes drop-animation {
    from {
        transform: translateY(-500px);
    }
    to {
        transform: translateY(0);
    }
}
.slot.player2 .hole::before,
.slot.player1 .hole::before {
    content: "";
    position: absolute;
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
    border-radius: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.15) 50%,
        transparent 100%
    );
    z-index: 301;
}
.slot.player2 .hole::after,
.slot.player1 .hole::after {
    content: "";
    position: absolute;
    width: 78%;
    height: 78%;
    top: 11%;
    left: 11%;
    border-radius: 100%;
    background: linear-gradient(
        to top,
        rgba(270, 270, 270, 0.1) 40%,
        transparent 100%
    );
    z-index: 301;
}
#top-left {
    border-top-left-radius: 20%;
}
#top-right {
    border-top-right-radius: 20%;
}
#bottom-left {
    border-bottom-left-radius: 20%;
}
#bottom-right {
    border-bottom-right-radius: 20%;
}
@media (min-width: 426px) and (max-width: 768px) {
    .boardContainer {
        width: 85vw;
        height: calc(85vw * 0.85714286);
        margin: auto;
        padding: 0;
    }
    .players {
        flex-direction: column;
    }
    .p1 {
        margin-bottom: 0.5rem;
    }
    .wunderbar,
    .super,
    .yourock,
    .amazing {
        display: none;
    }
    .logo {
        width: 70vw;
    }
}
@media only screen and (max-width: 425px) {
    .boardContainer {
        width: 85vw;
        height: calc(85vw * 0.85714286);
        margin: auto;
        padding: 0;
    }
    .players {
        flex-direction: column;
    }
    .p1 {
        margin-bottom: 0.5rem;
    }
    .wunderbar,
    .super,
    .yourock,
    .amazing {
        display: none;
    }
    .logo {
        width: 88vw;
    }
}
