/* entire container, keeps perspective */
.flip-container {
    -webkit-perspective: 1500px;
    perspective: 1500px;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
    width: 10vh;
    height: 10vh;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    z-index: 1;
}

.click, .flip, .discardonclick {
    cursor: pointer;
}
    
.flip-container.flip .back {
    -webkit-transform: rotateY(0deg);
            transform: rotateY(0deg);
}

.flip-container.flip .front {
    -webkit-transform: rotateY(180deg);
            transform: rotateY(180deg);
}


.flip-container,{
    height: 10vh;
    width: 10vh;
}

 .flipper, .front, .back {
    height: 100%;
    width: 100%;
    border-radius: 50%;
 }

/* flip speed goes here */
.flipper {
     -webkit-transition: all 0.8s;
     -o-transition: all 0.8s;
     transition: all 0.8s;
    -webkit-transform-style: preserve-3d;
            transform-style: preserve-3d;

    position: relative;
}

/* hide back of pane during swap */
.front, .back {
    -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
    -webkit-transition: all 0.8s;
    -o-transition: all 0.8s;
    transition: all 0.8s;
    -webkit-transform-style: preserve-3d;
            transform-style: preserve-3d;
    position: absolute;
    top: 0;
    left: 0;
    border: solid 0.5vh #fff;
     -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

/*  UPDATED! front pane, placed above back */
.front {
    z-index: 2;
    -webkit-transform: rotateY(0deg);
            transform: rotateY(0deg);
    background-color: #ec313f;
    background-image: url(../img/cardbg1.png);
    background-position: center;
    background-size: 80%;
    background-repeat: no-repeat;
}



.front.right {
    -webkit-transform: rotateZ(-90deg);
        -ms-transform: rotate(-90deg);
            transform: rotateZ(-90deg);
    background-image: url(../img/cardbg2.png);
    background-position: center;
    background-size: 80%;
    background-repeat: no-repeat;
}

/* back, initially hidden pane */
.back {
    -webkit-transform: rotateY(-180deg);
            transform: rotateY(-180deg);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.back.blue {
    background-color: #3785c6;
}

.back.red {
    background-color: #ec313f;
}

.back.black {
    background-color: #0C0F12;
}
    


    

.flip {
    z-index: 1000;
    height: 90vh; /* Default height for non-mobile screens */
    width: 90vh; /* Default width for non-mobile screens */
    -webkit-perspective: 1500px;
    perspective: 1500px;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
    -webkit-transition: all 0.8s;
    -o-transition: all 0.8s;
    transition: all 0.8s;
    -webkit-transform-origin: center;
    -ms-transform-origin: center;
    transform-origin: center;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    background-size: cover;
    background-repeat: no-repeat;
    top: 50%;
    margin-top: -45vh;
    left: 50%;
    margin-left: -45vh;
}

/* Media query for small screens (max-width: 738px) */
@media (max-width: 738px) {
    .flip {
        height: 70vh; /* Height becomes 90vw for mobile screens */
        width: 70vh; /* Width becomes 90vw for mobile screens */
        margin-top: -35vh;
        margin-left: -35vh;

    }
}




.flip .back {
    border: solid 4.5vh #fff;
}

.discard {
    position: absolute;
    height: 10vh;
    width: 10vh;
    -webkit-perspective: 1500px;
            perspective: 1500px;
    -webkit-transform-style: preserve-3d;
            transform-style: preserve-3d;
    -webkit-transition: all 0.8s;
    -o-transition: all 0.8s;
    transition: all 0.8s;
    -webkit-transform-origin: center;
        -ms-transform-origin: center;
            transform-origin: center;

    top: 100px;
    left: calc(50vw - 5vh) !important;
    margin: 0 !important;
}


.discard .front, .discard .back {
    border: solid 0.5vh #fff;
}


.keep {
    position: absolute;
    top: 5vh !important;
    left: 5vh !important;
    height: 15vh;
    width: 15vh;
    -webkit-perspective: 1500px;
            perspective: 1500px;
    -webkit-transform-style: preserve-3d;
            transform-style: preserve-3d;
    -webkit-transition: all 0.8s;
    -o-transition: all 0.8s;
    transition: all 0.8s;
    -webkit-transform-origin: center;
        -ms-transform-origin: center;
            transform-origin: center;
    margin: 0 !important;
}


.keep .front, .keep .back {
    border: solid 0.5vh #fff;
}



.front:has(> .blackbeard) {
    -webkit-transform: rotateZ(90deg);
        -ms-transform: rotate(90deg);
            transform: rotateZ(90deg);
    background-image: url(../img/cardbg2.png);
    background-position: center;
    background-size: 80%;
    background-repeat: no-repeat;
}

#windSelectR, #windSelectL {
    display: none;
    color: #fff;
    width: 100vw;
    height: 100vh;
}

.windSelect {
   z-index: 20000;
   background-color: #fff;
   height: 10vh;
   width: 10vh;
   border-radius: 50%;
}


.spectate {
    width: 80vw; /* Adjust width as needed */
    height: 80vw; /* Maintaining a 1:1 aspect ratio */
    border-radius: 50%; /* Makes the div circular */
    overflow: hidden; /* Ensure content within the div doesn't overflow */
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}


.showOpponent {
    width: 30vw; /* Adjust width as needed */
    height: 30vw; /* Maintaining a 1:1 aspect ratio */
    border-radius: 50%; /* Makes the div circular */
    overflow: hidden; /* Ensure content within the div doesn't overflow */
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 10%;
    left: 10%;
}