@font-face {
    font-family: 'PokerFont';
    src: url('Fonts/upheavtt.woff2') format('woff2'),
        url('Fonts/upheavtt.woff') format('woff');
}

html, body {
    overflow: hidden;
}

#gameBody {
    background-image: url('Images/startMenuBackground.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

#dealerHand {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: absolute;
    bottom: 90px;
}

#playerHand {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: absolute;
    top: 90px;
}

#playerHand img, #dealerHand img {
    width: 165px; 
    margin: 15px;
    filter: drop-shadow(2px 2px 5px rgba(0, 0, 0, 0.5)); /* Add drop shadow to cards */
}

#dealerPoints {
    position: absolute;
    bottom: 25px;
    left: 10px;
}

#playerPoints {
    position: absolute;
    top: 25px;
    left: 10px;
}

.score {
    -webkit-text-stroke: 1px black;
    text-shadow:
       3px 3px 0 #000,
       -1px -1px 0 #000,  
       1px -1px 0 #000,
       -1px 1px 0 #000,
       1px 1px 0 #000;
    padding: 0;
    border: none;
    background: none;
    font-family: "PokerFont", sans-serif;
    color: white;
    font-size: 30px;
    text-decoration: none;
}
  
#dealButton {
    font-family: 'PokerFont', sans-serif;
    background: #ff1212;
    background-image: linear-gradient(to bottom, #ff1212, #9e2929);
    border: 4px solid #000;
    border-radius: 0;
    color: #ffffff;
    font-size: 200px;
    text-decoration: none;
    transition: font-size 0.3s ease;
    image-rendering: pixelated;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    filter: drop-shadow(2px 2px 5px rgba(0, 0, 0, 0.5)); /* Add drop shadow to buttons */
}

#dealButton:hover {
    font-size: 225px;
}
  
#stayButton {
    position: absolute;
    bottom: 10px;
    right: 10px;
    filter: drop-shadow(2px 2px 5px rgba(0, 0, 0, 0.5)); /* Add drop shadow to buttons */
}
   
#hitButton {
    position: absolute;
    top: 55px;
    right: 10px;
    filter: drop-shadow(2px 2px 5px rgba(0, 0, 0, 0.5)); /* Add drop shadow to buttons */
}
    
.button {
    font-family: 'PokerFont', sans-serif;
    background: #ff1212;
    background-image: linear-gradient(to bottom, #ff1212, #9e2929);
    border: 4px solid #000;
    border-radius: 0;
    color: #ffffff;
    font-size: 80px;
    text-decoration: none;
    transition: font-size 0.3s ease;
    image-rendering: pixelated;
    filter: drop-shadow(2px 2px 5px rgba(0, 0, 0, 0.5)); /* Add drop shadow to buttons */
}

.button:hover {
    font-size: 100px;
}
    
#title {
    -webkit-text-stroke: 2px black;
    text-shadow:
      3px 3px 0 #000,
      -1px -1px 0 #000,  
      1px -1px 0 #000,
      -1px 1px 0 #000,
      1px 1px 0 #000;
    padding: 0;
    border: none;
    background: none;
    font-family: "PokerFont", sans-serif;
    color: #ffffff;
    font-size: 53px;
    text-decoration: none;
    text-align: left;
    position: fixed;
    left: 25%;
    animation: floatAnimation 4.5s ease-in-out infinite;
}
   
@keyframes floatAnimation {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes cardFloatAnimation {
    0%, 100% {
        transform: translateY(-50%);
    }
    50% {
        transform: translateY(-55%);
    }
}
  
#startButton {
    font-family: 'PokerFont', sans-serif;
    background: #ff1212;
    background-image: linear-gradient(to bottom, #ff1212, #9e2929);
    border: 4px solid #000;
    border-radius: 0;
    color: #ffffff;
    font-size: 53px;
    text-decoration: none;
    transition: font-size 0.3s ease;
    image-rendering: pixelated;
    position: fixed;
    bottom: 40px; 
    left: 25%;
    transform: translateX(-50%); 
    filter: drop-shadow(2px 2px 5px rgba(0, 0, 0, 0.5)); /* Add drop shadow to buttons */
}

#startButton:hover {
    font-size: 60px;
}

@media screen and (max-width: 500px) {
    #title {
        text-align: center;
        font-size: 45px;
        left: 17%;
    }
    #playerHand img,
    #dealerHand img {
        width: 100px;
        margin: 10px;
    }

    .score {
        font-size: 20px;
    }

    .button {
        font-size: 20px;
    }

    .button:hover {
        font-size: 25px;
    }
    
    #dealButton {
        font-size: 30px;
    }

    #dealButton:hover {
        font-size: 35px;
    }

    #startButton {
        font-size: 40px;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
    }

    #startButton:hover {
        font-size: 25px;
    }
}

#betControls {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

#increaseBetButton, #decreaseBetButton {
    font-family: 'PokerFont', sans-serif;
    background: #ff1212;
    background-image: linear-gradient(to bottom, #ff1212, #9e2929);
    border: 4px solid #000;
    border-radius: 0;
    color: #ffffff;
    font-size: 20px;
    text-decoration: none;
    transition: font-size 0.3s ease;
    image-rendering: pixelated;
    filter: drop-shadow(2px 2px 5px rgba(0, 0, 0, 0.5)); /* Add drop shadow to buttons */
}

#increaseBetButton:hover, #decreaseBetButton:hover {
    font-size: 25px;
}

#currentBet {
    -webkit-text-stroke: 1px black;
    text-shadow: 3px 3px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
    padding: 0;
    border: none;
    background: none;
    font-family: "PokerFont", sans-serif;
    color: white;
    font-size: 30px;
    text-decoration: none;
}

#resultScreen {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    color: white;
    font-family: "PokerFont", sans-serif;
}

#resultMessage, #resultCash {
    font-size: 30px;
    margin: 10px 0;
}

#dealAgainButton, #quitButton {
    margin: 10px;
    font-size: 20px;
    padding: 10px;
    border-radius: 0;
    background: #ff1212;
    color: #ffffff;
    border: 4px solid #000;
    cursor: pointer;
    image-rendering: pixelated;
    filter: drop-shadow(2px 2px 5px rgba(0, 0, 0, 0.5)); /* Add drop shadow to buttons */
}

#dealAgainButton:hover, #quitButton:hover {
    font-size: 25px;
}

#lostScreen {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    color: white;
    font-family: "PokerFont", sans-serif;
}

#lostMessage {
    font-size: 30px;
    margin: 10px 0;
}

#restartButton {
    margin: 10px;
    font-size: 20px;
    padding: 10px;
    border-radius: 0;
    background: #ff1212;
    color: #ffffff;
    border: 4px solid #000;
    cursor: pointer;
    image-rendering: pixelated;
    filter: drop-shadow(2px 2px 5px rgba(0, 0, 0, 0.5)); /* Add drop shadow to buttons */
}

#restartButton:hover {
    font-size: 25px;
}

#cardDeck {
    position: fixed;
    right: -50px;
    top: 50%;
    transform: translateY(-50%);
    width: 236px;  
    filter: drop-shadow(2px 2px 5px rgba(0, 0, 0, 0.5)); 
    animation: cardFloatAnimation 4.5s ease-in-out infinite;
}

@keyframes slideFromRight {
    0% {
        transform: translate(100vw, -50%) rotate(10deg); 
        opacity: 0;
    }
    100% {
        transform: translate(var(--card-x), var(--card-y)) rotate(0deg);
        opacity: 1;
    }
}

.card-animation {
    animation: slideFromRight 1s ease-out forwards;
}

@keyframes flip-2-ver-right-1 {
    0% {
        transform: rotateY(0);
        transform-origin: 50% 50%;
    }
    50% {
        transform: rotateY(-90deg);
        transform-origin: 50% 50%;
        opacity: 0; /* Hide the card at the midpoint */
    }
    100% {
        transform: rotateY(-180deg);
        transform-origin: 50% 50%;
        opacity: 1; /* Show the card at the end */
    }
}

.flip-2-ver-right-1 {
    -webkit-animation: flip-2-ver-right-1 0.5s cubic-bezier(0.455, 0.030, 0.515, 0.955) both;
            animation: flip-2-ver-right-1 0.5s cubic-bezier(0.455, 0.030, 0.515, 0.955) both;
}

#openMenu {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 1000;
    font-size: 20px;
    padding: 10px;
    border-radius: 5px;
    background: #ff1212;
    color: white;
    border: 2px solid black;
    cursor: pointer;
    filter: drop-shadow(2px 2px 5px rgba(0, 0, 0, 0.5));
}

#openMenu:hover {
    background: #9e2929;
    font-size: 25px;
}

#menuScreen {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    color: white;
    font-family: "PokerFont", sans-serif;
    z-index: 999;
}

.menuButton {
    display: block;
    margin: 10px auto;
    font-size: 20px;
    padding: 10px;
    border-radius: 5px;
    background: #ff1212;
    color: white;
    border: 2px solid black;
    cursor: pointer;
    filter: drop-shadow(2px 2px 5px rgba(0, 0, 0, 0.5));
}

.menuButton:hover {
    background: #9e2929;
}

#shopScreen {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    color: white;
    font-family: "PokerFont", sans-serif;
    z-index: 999;
}

#shopTitle {
    font-size: 30px;
    margin-bottom: 20px;
}

#blackandwhitebuy {
    display: block;
    margin: 10px auto;
    font-size: 20px;
    padding: 10px;
    border-radius: 5px;
    background: white;
    color: #000000;
    border: 2px solid black;
    cursor: pointer;
    filter: drop-shadow(2px 2px 5px rgba(0, 0, 0, 0.5));
}

#blackandwhitebuy:hover {
    background: #929292;
}

#darkbuy {
    display: block;
    margin: 10px auto;
    font-size: 20px;
    padding: 10px;
    border-radius: 5px;
    background: #363636;
    color: rgb(211, 211, 211);
    border: 2px solid black;
    cursor: pointer;
    filter: drop-shadow(2px 2px 5px rgba(0, 0, 0, 0.5));
}

#darkbuy:hover {
    background: #000000;
}

#goldbuy {
    display: block;
    margin: 10px auto;
    font-size: 20px;
    padding: 10px;
    border-radius: 5px;
    background: #ffd700;
    color: rgb(116, 94, 0);
    border: 2px solid black;
    cursor: pointer;
    filter: drop-shadow(2px 2px 5px rgba(0, 0, 0, 0.5));
}

#goldbuy:hover {
    background: #b8860b;
}

#closeShop {
    margin-top: 20px;
}

#styleScreen {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    color: white;
    font-family: "PokerFont", sans-serif;
    z-index: 999;
}

#defaultStyle {
    background: #ff1212;
    color: #ffffff;
}

#defaultStyle:hover {
    background: #9e2929;
}

.styleButton {
    display: block;
    margin: 10px auto;
    font-size: 20px;
    padding: 10px;
    border-radius: 5px;
    border: 2px solid black;
    cursor: pointer;
    filter: drop-shadow(2px 2px 5px rgba(0, 0, 0, 0.5));
}

#blackandwhiteStyle {
    background: white;
    color: #000000;
}

#blackandwhiteStyle:hover {
    background: #929292;
}

#darkStyle {
    background: #363636;
    color: rgb(211, 211, 211);
}

#darkStyle:hover {
    background: #000000;
}

#goldStyle {
    background: #ffd700;
    color: rgb(116, 94, 0);
}

#goldStyle:hover {
    background: #b8860b;
}

#signInScreen {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    color: white;
    font-family: "PokerFont", sans-serif;
    z-index: 999;
}

#signInTitle {
    font-family: "PokerFont", sans-serif;
    color: white;
    font-size: 30px;
    margin-bottom: 20px;
}

#signInForm {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

#signInForm input {
    padding: 10px;
    border: none;
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.9);
    font-family: Arial, sans-serif;
}

#signInError {
    font-family: Arial, sans-serif;
    margin-top: 10px;
    color: #ff1212;
}

#signInForm button {
    margin-top: 10px;
    font-family: 'PokerFont', sans-serif;
    background: #ff1212;
    background-image: linear-gradient(to bottom, #ff1212, #9e2929);
    border: 4px solid #000;
    border-radius: 0;
    color: #ffffff;
    font-size: 20px;
    padding: 10px;
    cursor: pointer;
}

#signInForm button:hover {
    font-size: 25px;
}

#createAccountScreen {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    color: white;
    font-family: "PokerFont", sans-serif;
    z-index: 999;
}

#createAccountTitle {
    font-family: "PokerFont", sans-serif;
    color: white;
    font-size: 30px;
    margin-bottom: 20px;
}

#createAccountForm {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

#createAccountForm input {
    padding: 10px;
    border: none;
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.9);
    font-family: Arial, sans-serif;
}

#passwordRequirements {
    font-family: Arial, sans-serif;
    font-size: 14px;
    color: #cccccc;
    text-align: left;
    margin: 5px 0;
}

#createAccountError {
    font-family: Arial, sans-serif;
    margin-top: 10px;
    color: #ff1212;
}

#createAccountForm button {
    margin-top: 10px;
    font-family: 'PokerFont', sans-serif;
    background: #ff1212;
    background-image: linear-gradient(to bottom, #ff1212, #9e2929);
    border: 4px solid #000;
    border-radius: 0;
    color: #ffffff;
    font-size: 20px;
    padding: 10px;
    cursor: pointer;
}

#createAccountForm button:hover {
    font-size: 25px;
}

#leaderboardScreen {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 20px;
    border: 2px solid #ff1212;
    border-radius: 10px;
    color: white;
    text-align: center;
    z-index: 1000;
}

#globalLeaderboardTable {
    width: 100%;
    margin: 20px 0;
    border-collapse: collapse;
}

#globalLeaderboardTable th,
#globalLeaderboardTable td {
    padding: 10px;
    border: 1px solid #ff1212;
    text-align: center;
}

#globalLeaderboardTable th {
    background-color: #ff1212;
}

#personalStats {
    margin: 20px 0;
    padding: 15px;
    border: 1px solid #ff1212;
    border-radius: 5px;
}