@import url('https://fonts.googleapis.com/css2?family=Jersey+15&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Jersey+20&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: url('../assets/img/cursor-reg.png'), pointer;
}

* button:hover {
    cursor: url('../assets/img/cursor-button.png'), pointer;
}

body {
    background-image: url('../assets/img/pixel-casino-floor-bg.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-blend-mode: darken;
    background-color: #d3d6c5;
    font-family: "Jersey 20", monospace;
    min-height: 100dvh;
    letter-spacing: .07rem;
    display: flex;
    flex-direction: column;
    color: #fff;
  }

h1 {
    font-size: 4rem;
    letter-spacing: .16rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.6rem;
    letter-spacing: .1rem;
}

#main-content, #home-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 1%;
}

#home-screen {
    gap: 10px;
}

/* Bet Selection and Selectors */
#bet-selection {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin: 20px;
}

#bet-selectors {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 23px;
    margin: 5px 0 3px 0;
    filter: drop-shadow(rgb(3, 3, 3) 1rem 1rem 13px);
}

#bet-selectors img {
    width: 76px;
    cursor: url('../assets/img/cursor-button.png'), pointer;
}

#bet-selectors img:hover {
    transform: scale(1.2)
}

/* Player Actions like Hit or Stand */
#actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin: 12px 0;
    max-width: 246px;
}

#actions button {
    background-color: #4DB7D1;
    color: #fff;
    font-size: 1.15rem;
    font-family: "Jersey 15", monospace;
    min-width: 115px;
    min-height: 68px;
    padding: 18px;
    letter-spacing: .06rem;
    border-radius: 7px;
    border: none;
}

#actions #double {
    background-color: #F5A614;
}

#actions #split {
    background-color: #EF6CD7;
}

/* INACTIVE BUTTON STATES FOR ACTIONS */
#actions button:disabled {
    opacity: 0.3;
}

#actions button:disabled:hover {
    transform: none;
    cursor: url('../assets/img/cursor-reg.png'), pointer;
}

/* Instructions, help/mute icon */
#instructions {
    display: none;
    flex-direction: column;
    max-width: 600px;
    padding: 24px 32px;
    margin: 10px 0 20px 0;
    gap: 8px;
    align-items: center;
    background-color: rgb(0, 0, 0);
}

#instructions ul {
    padding: 7px 50px;
}

#info-button, #mute-button, #music-button {
    cursor: url('../assets/img/cursor-button.png'), pointer;
    margin: 5px;
    height: 23px;
}

#info-button:hover, #mute-button:hover, #music-button:hover {
    transform: scale(1.2);
}

/* Play Buttons Div, play and play again */
.play, #change-bet {
    background-color: #cb2222;
    color: #fff;
    font-size: 1.15rem;
    font-family: "Jersey 15", monospace;
    padding: 23px 20px;
    letter-spacing: .06rem;
    border-radius: 7px;
    cursor: url('../assets/img/cursor-button.png'), pointer;
    border: none;
}

#start-game {
    padding: 19px 26px;
}

#play-again-buttons {
    display: none;
    flex-direction: column;
    gap: 18px;
}

#change-bet {
    background-color: #777777;
}

/* Main Logos */
#large-logo {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 35px 0 8px 0;
    filter: drop-shadow(rgb(3, 3, 3) 1rem 1rem 20px);
}

    #large-logo img {
        width: 46px;
        transform: rotate(-10deg);
    }

#small-logo {
    display: none;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 5px;
}

    #small-logo img {
        width: 22px;
        transform: rotate(-11deg);
    }

/* Top Bar and Top bar buttons */
#top-bar {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background-color: black;
    min-height: 50px;
}

#top-buttons {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#reset-wallet {
    display: none;
    background-color: #000;
    cursor: url('../assets/img/cursor-button.png'), pointer;
}

/* Home Bank and Game Bank Sections (bet, wallet) */
#home-bank {
    display: flex;
    flex-direction: row;
    gap: 22px;
    justify-content: space-around;
    align-items: center;
    margin: 10px 20px 20px;
}

    #home-bank h3 {
        font-size: 4rem;
    }

#game-bank {
    display: none;
    flex-direction: row;
    gap: 20px;
    justify-content: space-around;
    align-items: center;
    margin: 12px 0;
}

    #game-bank h3 {
        font-size: 3rem;
    }

.wallet-icon, .chip-icon {
    width: 58px;
}

/* Game Table - Dealer vs Player */
.score-section {
    display: none;
    flex-direction: row;
    gap: 18px;
    padding: 2px 0 10px 0;
}

#home-score {
    padding: 15px 10px;
    font-size: 1.7rem;
}

#split-view-1 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

#split-view-2 {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

#dealer, #player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 5px;
    margin: 2px;
}

    #player-total, #dealer-total, #splitHand-total {
        font-size: 1.2rem;
        background-color: black;
        color: white;
        padding: 4px 7.5px;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    #player-total span, #dealer-total span, #splitHand-total span {
        background-color: red;
        padding: 3px;
        font-size: .8rem;
    }

    #dealer-cards, #player-cards, #splitHand-cards {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 2px;
        min-width: 400px;
        max-width: 410px;
    }

#result {
    color: rgb(255, 255, 255);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3px;
    margin-top: 6px;
    padding: 4px;
}

    #result h2 {
        text-align: center;
        font-size: 2.4rem;
    }

/* Game screen rows */
#game-table-column-1 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    gap: 10px;
}

    #game-table-column-1 p {
        text-align: center;
        font-size: .85rem;
    }

#game-table-column-2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    min-width: 340px;
}

#game-table {
    display: none;
    flex-direction: row;
    align-items: center;
    justify-content: space-evenly;
    margin: 0 20px;
    background-color: rgba(17, 17, 17, 0.974);
    border: 6px double #000000;
    border-radius: 35px;
    padding: 20px 32px 20px 20px;
}

/* Card images */
.card {
    width: 74px;
    padding: 2px;
}

    .card:hover {
        transform: scale(1.5);
    }

/* Button transforms */
.play:hover, #change-bet:hover, #reset-wallet:hover, #actions button:hover {
    transform: scale(1.1)
}

/* Temp message and fade in/fade out */
#temp-msg {
    display: none;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transition: opacity 0.8s ease;
    margin-top: 10px;
    background-color: black;
    padding: 10px;
}
  
#temp-msg.fade-in {
    opacity: 1;
}

#temp-msg.fade-out {
    opacity: 0;
}

/* This highlights the cards section when splitting cards */
.cards-border {
    border: 3px solid rgb(255, 255, 199);
    padding: 8px;
}

/* ! CARD FLIP ANIMATION */
.card-container {
    background-color: transparent;
    width: 74px;
    perspective: 1000px; /* 3D effect */
  }
  
  /* add this class when needing to flip */
.flip-card-inner {
    position: relative;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    transform: rotateY(180deg);
  }
  
  /* position the front and back side */
  .flip-card-back, .flip-card-front {
    position: absolute;
    -webkit-backface-visibility: hidden; /* Safari */
    backface-visibility: hidden;
  }
  
  /* shows the back side by rotating the front card */
  .flip-card-front {
    transform: rotateY(180deg);
  }

  @media screen and (max-width: 989px) {
    #dealer-cards, #player-cards, #splitHand-cards {
        min-width: 280px;
        max-width: 315px;
    }

    #game-table-column-1 {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 10px;
        gap: 10px;
    }
    
        #game-table-column-1 p {
            text-align: center;
            font-size: .85rem;
        }
    
    #game-table-column-2 {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 10px;
        gap: 18px;
        max-width: 200px;
    }
}