body, html {
    font-family: 'Arial Black', Impact, sans-serif;
    margin: 0;
    padding: 0;
    background: rgb(240, 240, 240);
    color: #333;
}

header {
    background: #333;
    color: white;
    padding: 10px 20px;
    text-align: center;
    font-size: 24px;
}

header img {
    height: 120px;
    width: auto;
    margin-right: 50px;
}

.nav-dropdown a {
    color: white;
    text-decoration: none;
    font-size: 18px;
    padding: 10px 20px;
    margin-top: 80px;
}

.nav-dropdown a:not(:first-child) {
    margin-left: 20px;
}

.nav-dropdown a:not(:last-child) {
    margin-right: 20px;
}

.menu-toggle {
    display: none;
}

#gameContainer {
    width: 80%;
    max-width: 1024px;
    margin: 20px auto;
    padding: 20px;
    background: #771d09;
    box-shadow: 0px 10px 15px rgba(0, 0, 0, 0.2),
        0px 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.playerSetup {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.playerSetup label {
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    margin-right: 5px;
}

.playerSetup select {
    border-radius: 6px;
    background: #fff;
    font-size: 16px;
    padding: 5px;
    color: black;
    border: 1px solid #ccc;
    transition: border-color 0.3s;
}

.playerSetup select:focus {
    outline: none;
    border-color: #ffc107;
}

#startSetupButton {
    background-color: #f200ff;
    border: none;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    font-size: 16px;
    padding: 10px 20px;
    margin-left: 10px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

#startSetupButton:hover {
    background-color: #f600ff;
    transform: translateY(-3px);
    box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.3);
    color: gold;
    border: 2px solid rgb(247, 255, 2);
    font-weight: bold;
}

#dealerArea, #playerArea {
    border: 1px solid #35654d;
    border-radius: 5px;
    padding: 10px;
    margin: 10px 0;
    background: #35654d;
    color: white;
    box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.2);
}

.cards {
    display: flex;
    justify-content: space-around;
    margin: 10px 0;
}

.cards div {
    width: 50px;
    height: 70px;
    background: #fff;
    border: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: black;
}

.card {
    width: 100px;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    object-fit: cover;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#dealerScore, #playerScore, #playerMoney {
    font-size: 16px;
    margin: 5px 0;
}

#textPromptArea {
    padding: 10px;
    margin-top: 10px;
    background: #ddd;
    text-align: center;
    border: 3px solid #7378f9;
    border-radius: 5px;
    font-size: 20px;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.2);
}

.nameInput {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    gap: 10px;
}

.nameInput input {
    height: 25px;
    font-size: 16px;
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #CCC;
}

.controlsContainer {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-top: 10px;
}

.bettingControls, .gameControls {
    display: flex;
    justify-content: center;
    margin-top: 15px;
    width: 100%;
    gap: 20px;
}

.bettingControls label {
    margin-top: 5px;
    margin-left: 10px;
}

/* remove up down arrows */
/* input[type='number']::-webkit-inner-spin-button, input[type='number']::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
} */

.bettingControls input {
    height: 25px;
    width: 150px;
    font-size: 20px;
    margin-top: 3px;
    border-radius: 5px;
}

.bettingControls button {
    font-size: 20px;
    padding: 10px 13px;
    border: none;
    background-color: #FFC107;
    color: white;
    border: 1px solid #ffff00;
    border-radius: 20px;
    cursor: pointer;
    width: 100px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

.gameControls button {
    padding: 12px 15px;
    font-size: 16px;
    margin-right: 5px;
    cursor: pointer;
    border: none;
    color: white;
    width: 150px;
    border-radius: 25px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

#startGameButton {
    padding: 10px 15px;
    font-size: 16px;
    border: none;
    background-color: #f200ff;
    color: white;
    border-radius: 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#hitButton {
    background-color: #D32F2F;
}

#standButton {
    background-color: #1976D2;
}

#cashOutButton {
    background-color: #388E3C;
}

#resetButton {
    background-color: #616161;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.3);
}

.bettingControls button:hover,
.gameControls button:not(#resetButton):hover, #startGameButton:hover {
    border: 1.5px solid rgb(115, 255, 255);
    color: rgb(115, 255, 255);
    transform: translateY(-3px);
    box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.3);
}

.bettingControls button:active,
.gameControls button:active, #startGameButton:active {
    background-color: #3e8e41;
    box-shadow: 0 5px #666;
    transform: translateY(4px);
    box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.2);
}

.nameInput input:disabled, #startGameButton:disabled, .bettingControls input:disabled, #betButton:disabled, #hitButton:disabled, #standButton:disabled, #cashOutButton:disabled, #resetButton:disabled {
    background-color: #D3D3D3;
    color: red;
    border: 1px solid #A9A9A9;
    cursor: not-allowed;
}

#about:hover, #rules:hover, #leaderboardLink:hover {
    color: #7fffbf;
}

#resetButton:hover {
    border: 1.5px solid rgb(255, 0, 0);
    color: rgb(255, 0, 0);
    transform: translateY(-3px);
    box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.3);
}

#cashOutButton:hover span, #resetButton:hover span, #startGameButton:hover span {
    padding-right: 25px;
}

#cashOutButton span, #resetButton span,
#startGameButton span {
    display: inline-block;
    position: relative;
    transition: 0.5s;
    font-size: 20px;
}

#cashOutButton span:after, #resetButton span:after, #startGameButton span:after {
    content: '\00bb';
    position: absolute;
    opacity: 0;
    top: 0;
    right: -20px;
    transition: 0.5s;
}

#cashOutButton:hover span:after, #resetButton:hover span:after, #startGameButton:hover span:after {
    opacity: 1;
    right:0;
}

#leaderboardSection {
    margin: 20px auto;
    padding: 10px;
    background-color: #388E3C;
    border: 1px solid #35654D;
    border-radius: 5px;
    color: #FFD700;
    width: 80%;
    max-width: 1024px;
    box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.3), 0px 4px 6px rgba(0, 0, 0, 0.2);
}

#leaderboardSection h2 {
    font-size: 24px;
    color: #FFD700;
    text-align: center;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
    margin-bottom: 10px;
}

#leaderboardList {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
    font-size: 18px;
    color: #FFD700;
    font-weight: bold;
}

#leaderboardList li {
    background: #35654D;
    color: #FFD700;
    padding: 10px 15px;
    margin: 5px 0;
    border-radius: 5px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#leaderboardList li:nth-child(odd) {
    background: #2E4E3F;
}

#leaderboardList li:hover {
    transform: translateY(-3px);
    box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.3);
}

#leaderboardList li:first-child {
    background: #FFD700;
    color: #333;
    font-size: 20px;
    font-weight: 900;
    border: 2px solid #FFDF00;
}

#leaderboardList li:nth-child(2) {
    background: #C0C0C0;
    color: #333;
    font-size: 19px;
    font-weight: 800;
}

#leaderboardList li:nth-child(3) {
    background: #CD7F32;
    color: #333;
    font-size: 19px;
    font-weight: 700;
}

.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.popup-content {
    position: relative;
    background: #333;
    color: white;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.closeButton {
    position: absolute;
    top: -2px;
    right: 20px;
    font-size: 40px;
    font-weight: bold;
    color: yellow;
    cursor: pointer;
    transition: transform 0.3s ease, color 0.3s ease;
}

.closeButton:hover {
    color: red;
    transform: rotate(360deg) scale(1.5);
}

/*----- Tablet size (max 768px)  -----*/

@media (max-width: 768px) {
    header {
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
    }

    header img {
        margin-right: 0;
        height: 80px;
    }

    .nav-dropdown {
        display: none;
        position: absolute;
        top: 80%;
        right: 10px;
        background: #555555;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 10px;
        border-radius: 5px;
    }

    .nav-dropdown.show {
        display: flex;
    }

    .nav-dropdown a {
        margin: 5px 0;
        text-align: left;
        padding: 8px 15px;
        font-size: 16px;
    }

    .menu-toggle {
        display: block;
        position: absolute;
        right: 30px;
        top: 25px;
        background: none;
        border: none;
        color: #fff;
        font-size: 40px;
        cursor: pointer;
    }

    .menu-toggle:hover {
        color: yellow;
        transform: scale(1.1);
    }

    #gameContainer {
        width: 95%;
        padding: 10px;
    }

    .cards {
        flex-wrap: wrap;
        justify-content: center;
    }

    #leaderboardSection {
        width: 95%;
        padding: 10px;
    }

    .nameInput {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/*----- Mobile size (max 480px) -----*/

@media (max-width: 480px) {
    header {
        flex-direction: column;
        /* padding: 10px 0; */
    }

    header img {
        height: 60px;
    }

    .menu-toggle {
        top: auto;
        bottom: 10px;
        right: 20px;
        font-size: 30px;
    }

    .nav-dropdown {
        right: 0;
        left: 0;
        margin: 0 auto;
        width: 80%;
        border-radius: 5px;
        align-items: center;
    }

    .nav-dropdown a {
        font-size: 14px;
        padding: 10px;
        margin: 2px 0;
    }

    #gameContainer {
        width: 95%;
        padding: 10px;
    }

    .card {
        width: 80px;
    }

    .cards {
        gap: 5px;
    }

    #textPromptArea {
        font-size: 16px;
    }

    .playerSetup {
        flex-direction: column;
        gap: 5px;
    }

    .playerSetup select,
    #startSetupButton {
        width: 100%;
    }
    .gameControls {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    .gameControls button {
        width: 90%;
        max-width: 250px;
        font-size: 20px;
        padding: 14px 20px;
        margin: 5px 0;
    }
}