html, body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    font-size: 16px;
    background-color: #242424;
    color: white;
}

#modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1a1a1a;
    opacity: 0.5;
    z-index: 999;
}

#dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #1a1a1a;
    opacity: 1.0    ;
    color: white;
    padding: 20px;
    border: 1px solid darkgray;
    border-radius: 5px;
    box-shadow: #1a1a1a 0 0 10px;
    z-index: 1000;
}

#newGameSettings div {
    text-align: center;
    margin: 10px;
}

#newGameSettings input {
    padding: 5px;
    border-radius: 5px;
    border: 1px solid lightgray;
    background-color: #1a1a1a;
    color: white;
    margin: 5px;
}

#newGameSettings select {
    padding: 5px;
    border-radius: 5px;
    border: 1px solid lightgray;
    background-color: #1a1a1a;
    color: white;
    margin: 5px;
}

#newGameSettings button {
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    margin: auto;
    display: block;
    border: 1px solid #095f67;
    box-shadow: #095f67 0 0 10px;
    background-color: #095f67;
    color: lightgray;
    font-weight: bold;
}

#gameOver button {
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    margin: auto;
    display: block;
    border: 1px solid #095f67;
    box-shadow: #095f67 0 0 10px;
    background-color: #095f67;
    color: lightgray;
    font-weight: bold;
}

#gameOver #scores {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
    margin-bottom: 10px;
}

#container {
    display: flex;
    width: 1280px;
    margin: auto;
}

#baize {
    background-image: url("../images/dark-green-wall.jpg");
    width: 900px;
    height: 900px;
    line-height: 0;
    border: 2px solid #1a1a1a;
    position: relative;
    margin: 10px;
    box-shadow: 0 0 20px 10px #1a1a1a;
}

@media only screen and (max-width: 1250px) {
    #container {
        display: block;
        width: 360px;
        margin: auto;
        padding-top: 5px;
    }

    #baize {
        width: 360px;
        height: 360px;
        margin: 0;
        border: none;
    }
}

.area {
    display: flex;
    justify-content: center;
    align-items: center;
}

.bottom-area {
    position: absolute;
    left: 100px;
    top: 750px;
    width: 700px;
    height: 150px;
}

.top-area {
    position: absolute;
    left: 100px;
    top: 0;
    width: 700px;
    height: 150px;
}

.left-area {
    position: absolute;
    left: 0;
    top: 100px;
    width: 150px;
    height: 700px;
}

.right-area {
    position: absolute;
    left: 750px;
    top: 100px;
    width: 150px;
    height: 700px;
}

@media only screen and (max-width: 1250px) {
    .bottom-area {
        top: 315px;
        left: 40px;
        width: 280px;
        height: 45px;
    }

    .top-area {
        left: 40px;
        top: 0;
        width: 280px;
        height: 45px;
    }

    .left-area {
        top: 40px;
        width: 45px;
        height: 280px;
    }

    .right-area {
        top: 40px;
        left: 315px;
        width: 45px;
        height: 280px;
    }
}

.player-name {
    font-size: 1em;
    color: lightgray;
}

.bottom-player-name {
    position: absolute;
    left: 100px;
    top: 750px;
    width: 700px;
    height: 20px;
    text-align: center;
}

.right-player-name {
    position: absolute;
    left: 750px;
    top: 100px;
    width: 20px;
    height: 700px;
    text-align: center;
    text-orientation: mixed;
    writing-mode: vertical-lr;
}

.top-player-name {
    position: absolute;
    left: 100px;
    top: 150px;
    width: 700px;
    height: 20px;
    text-align: center;
}

.left-player-name {
    position: absolute;
    left: 150px;
    top: 100px;
    width: 20px;
    height: 700px;
    text-align: center;
    text-orientation: mixed;
    writing-mode: vertical-lr;
}

@media only screen and (max-width: 1250px) {
    .player-name {
        font-size: 0.8em;
        line-height: normal;
    }

    .bottom-player-name {
        left: 40px;
        top: 295px;
        width: 280px;
        height: 20px;
    }

    .right-player-name {
        left: 295px;
        top: 40px;
        width: 20px;
        height: 280px;
    }

    .top-player-name {
        left: 40px;
        top: 45px;
        width: 280px;
        height: 20px;
    }

    .left-player-name {
        left: 45px;
        top: 40px;
        width: 20px;
        height: 280px;
    }
}

.left-area img.card-image {
    transform: rotate(90deg);
}

.right-area img.card-image {
    transform: rotate(-90deg);
}

div.trick-card {
    width: 80px;
    height: 120px;
    padding-top: 15px;
}

div.bottom-trick-card {
    position: absolute;
    left: 410px;
    top: 510px;
}

div.right-trick-card {
    position: absolute;
    left: 490px;
    top: 390px;
}

div.top-trick-card {
    position: absolute;
    left: 410px;
    top: 270px;
}

div.left-trick-card {
    position: absolute;
    left: 330px;
    top: 390px;
}

#trickPointsValue {
    position: absolute;
    top: 390px;
    left: 410px;
    width: 80px;
    height: 120px;
    text-align: center;
    line-height: 120px;
}

@media only screen and (max-width: 1250px) {
    div.trick-card {
        width: 30px;
        height: 45px;
        padding-top: 5px;
    }

    div.bottom-trick-card {
        left: 165px;
        top: 202px;
    }

    div.right-trick-card {
        left: 195px;
        top: 157px;
    }

    div.top-trick-card {
        left: 165px;
        top: 112px;
    }

    div.left-trick-card {
        left: 135px;
        top: 157px;
    }

    #trickPointsValue {
        top: 157px;
        left: 165px;
        width: 30px;
        height: 45px;
        line-height: 45px;
    }
}

#scoreboard {
    background-color: #1a1a1a;
    color: white;
    border: 1px solid darkgray;
    border-radius: 5px;
    padding: 20px;
    margin: 10px;
    width: 280px;
}

@media only screen and (max-width: 1250px) {
    #scoreboard {
        width: 360px;
        margin: 10px 0 0;
        padding: 2px;
        border: none;
    }
}

.title {
    text-align: center;
    font-size: 1.5em;
    margin-bottom: 10px;
    color: darkgray;
    font-weight: bold;
}

.subtitle {
    text-align: center;
    font-size: 1.2em;
    margin-bottom: 10px;
    color: darkgray;
}

.lead {
    font-weight: bold;
    color: darkgray;
}

@media only screen and (max-width: 1250px) {
    .title {
        font-size: 1.2em;
        margin-bottom: 5px;
    }

    .subtitle {
        font-size: 1.1em;
        margin-bottom: 5px;
    }

    .lead {
        font-size: 1em;
    }
}

div.team-score {
    background-color: #242424;
    color: white;
    border: 1px solid #1a1a1a;
    padding: 20px;
    display: flex;
    margin-bottom: 10px;
    justify-content: center;
}

div.team-points {
    width: 30%;
    text-align: center;
    font-size: 2em;
}

div.team-details {
    width: 70%;
    padding-left: 10px;
}

.team {
    font-size: 1.2em;
    color: dimgrey;
}

.player {
    font-weight: normal;
    color: darkgray;
    margin-left: 10px;
}

.human {
    font-weight: bold;
    color: #095f67;
}

@media only screen and (max-width: 1250px) {
    #teams {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    div.team-score {
        border: 1px solid #1a1a1a;
        margin-bottom: 2px;
        padding: 2px;
        width: 45%;
    }

    div.team-points {
        font-size: 1.5em;
    }

    div.team-details {
        padding-left: 10px;
    }

    .team {
        font-size: 0.8em;
    }

    .player {
        font-size: 0.7em;
        margin-left: 10px;
    }

    .human {
    }
}

#round {
    margin-top: 50px;
}

#trump {
    padding: 20px;
    display: flex;
    margin-bottom: 10px;
    justify-content: center;
}

#trump div#trumpDetails {
    margin-left: 20px;
}

#trump .trump-suit {
    font-size: 2em;
    color: #095f67;
}

img.trump-suit-image {
    width: 70px;
    height: 100px;
}

.trump-decider {
    color: dimgrey;
}

.trump-suit-value {
    color: darkgray;
    font-weight: bold;
}

.trump-decider-player {
    font-weight: bold;
    color: darkgray;
}

#melds {
    margin-top: 20px;
    margin-bottom: 20px;
}

#meldsContent {
}

.meld {
    display: flex;
}

.meld-highest-card {
    width: 50px;
}

.meld-player {
    color: dimgray;
    margin-left: 5px;
    width: 100px;
}

.meld-type {
    color: lightgray;
    margin-left: 5px;
    width: 100px;
}

.meld-points {
    margin-left: 5px;
    color: dimgrey;
    width: 50px;
}

@media only screen and (max-width: 1250px) {
    #round {
        margin-top: 5px;
    }

    #trump {
        padding: 0;
        display: flex;
        margin-bottom: 5px;
        justify-content: center;
    }

    #trump div#trumpDetails {
        margin-left: 20px;
    }

    img.trump-suit-image {
        width: 30px;
        height: 45px;
    }

    .trump-decider {
        font-size: 0.7em;
    }

    .trump-suit-value {
        font-size: 0.8em;
    }

    .trump-decider-player {
    }

    #melds {
        display: flex;
        justify-content: center;
        gap: 10px;
        margin-top: 5px;
        margin-bottom: 5px;
    }

    .meld {
        display: flex;
    }

    .meld-highest-card {
        width: 50px;
    }

    .meld-player {
        color: dimgray;
        margin-left: 5px;
        width: 50px;
        font-size: 0.8em;
    }

    .meld-type {
        color: lightgray;
        margin-left: 5px;
        width: 50px;
        font-size: 0.8em;
    }

    .meld-points {
        margin-left: 5px;
        color: dimgrey;
        width: 30px;
        font-size: 0.8em;
    }

    .meld-highest-card {
        width: 30px;
    }
}

div.player-hand {
    display: flex;
    flex-wrap: wrap; /* Allow items to wrap to the next line */
    justify-content: center; /* Horizontally center the items */
    gap: 0; /* Ensure no extra space between rows or columns */
}

div.card {
    display: inline-block;
    vertical-align: middle;
    margin: 0;
    padding: 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

div.card-winning {
    border: 1px solid #095f67;
    box-shadow: white 0 0 10px;
}

div.card-normal {
    margin: 0 1px;
}

div.card-rotated {
    margin: 1px 0;
}

@media only screen and (max-width: 1250px) {
    div.card-normal {
        margin: 0;
    }

    div.card-rotated {
        margin: 0;
    }
}

img.card-image-small {
    width: 30px;
    height: 45px;
    box-shadow: #1a1a1a 0 0 10px;
    border-radius: 2px;
}

img.card-image {
    width: 70px;
    height: 100px;
    box-shadow: #1a1a1a 0 0 10px;
    border-radius: 2px;
}

img.card-image-rotated {
    width: 100px;
    height: 70px;
    box-shadow: #1a1a1a 0 0 10px;
}

@media only screen and (max-width: 1250px) {
    img.card-image-small {
        width: 20px;
        height: 30px;
        box-shadow: #1a1a1a 0 0 10px;
        border-radius: 1px;
    }

    img.card-image {
        width: 30px;
        height: 45px;
        box-shadow: #1a1a1a 0 0 10px;
        border-radius: 1px;
    }

    img.card-image-rotated {
        width: 45px;
        height: 30px;
        box-shadow: #1a1a1a 0 0 10px;
    }
}

div.card-playable {
    cursor: pointer;
    box-shadow: white 0 0 10px;
}

@media only screen and (max-width: 1250px) {
    div.card-playable {
        box-shadow: white 0 0 5px;
    }
}

div.card-cover {
    position: absolute;
    top: 0;
    left: 0;
    background-color: #242424;
    opacity: 0.3;
    height: 100%;
    width: 100%;
    border-radius: 2px;
}

#trumpDecision {
    min-width: 700px;
}

.trump-decision-info {
    margin-top: 20px;
    margin-bottom: 10px;
}

.trump-decision-suits {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.trump-decision-suit {
    cursor: pointer;
    padding: 5px;
}

.trump-decision-suit-recommended {
    box-shadow: #095f67 0 0 10px;
    background-color: #095f67;
    border-radius: 5px;
}

.trump-decision-pass {
    text-align: center;
}

.pass-button {
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    border: 1px solid lightgray;
    background-color: lightgray;
    color: #1a1a1a;
    width: 150px;
    margin: auto;
}

.pass-button-recommended {
    border: 1px solid #095f67;
    box-shadow: #095f67 0 0 10px;
    background-color: #095f67;
    color: lightgray;
}

.trump-decision-hand {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    margin-top: 10px;
}

@media only screen and (max-width: 1250px) {
    #trumpDecision {
        min-width: 300px;
    }

    .trump-decision-suits {
        gap: 0;
    }

    .trump-decision-hand {
        gap: 0;
    }
}

#playedTrumpCards {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}

@media only screen and (max-width: 1250px) {
    #playedTrumpCards {
        gap: 1px;
        margin-top: 1px;
    }
}
