body {
    font-family: sans-serif;
    text-align: center;
    background: #2e7d32;
    color: white;
}

/* turn off debug display with css so we can turn it back on if we need */
#debug {
    display: none;
}

#new-game-button {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1000;

    padding: 6px 10px;
    font-size: 14px;
    background-color: #9c31ff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;

    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    transition: background-color 0.2s ease;
}

#new-game-button:hover {
    background-color: #00ffff;
    color: #000;
}

#new-game-menu {
    position: fixed;
    top: 40px;
    left: 10px;
    background: #333;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    width: 150px;
    font-size: 14px;
}

#new-game-menu .option {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

#new-game-menu .option:last-child {
    border-bottom: none;
}

#new-game-menu .option:hover {
    background-color: #797979;
}

.game-board {
    position: relative;
    width: 900px;
    height: 450px;
    margin: 20px auto;
    border: 2px solid #fff;
    border-radius: 10px;
    background: #388e3c;
}

.player-area {
    position: absolute;
    text-align: center;
    border: black 1px;
}

.player-area.player {
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.player-area.comp1 {
    top: 20px;
    left: 30px;
}

.player-area.comp2 {
    top: 20px;
    right: 30px;
}

.ladder.neutral {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.played,
.previous,
.ladder {
    margin: 5px 0;
}

.played,
.ladder {
    height: 110px;
}

.ladder {
    width: 400px;
}

.card {
    display: inline-block;
    width: 72px;
    height: 96px;
    background-image: url('cards_four.webp');
    background-size: calc(72px * 13) auto;
    margin: 5px;
    border: 1px solid #aaa;
    border-radius: 5px;
    transition: transform 0.1s;
}

.card-back {
    background-image: url("back.svg");
    background-size: auto;
}

.hand .card {
    cursor: pointer;
}

.hand .card:hover {
    transform: scale(1.05);
    border-color: #fff;
}

.played-card {
    opacity: 0.9;
}

.hand {
    position: relative;
    margin-top: 30px;
    height: 110px;
}

@media (max-width: 1430px) {
    .game-board {
        top: 200px;
    }

    .hand {
        top: 200px;
    }
}

.suit-icon {
    background-image: url('card_suits.png');
    background-color: rgb(255, 255, 255);
    display: inline-block;
    border-radius: 5px;
    width: 32px;
    height: 32px;
    transform: scale(1.3);
}

.holding-bonus-icon {
    transform: scale(0.8);
    background-color: rgba(255, 255, 255, 0.1);
}

.scores-area {
    text-align: left;
}

#scores-previous {
    font-size: 80%;
    font-style: italic;
    color: #ccc;
}

#score-breakdown {
    color: #f89b9b;
}

.trump-suit {
    position: absolute;
    left: 30px;
    bottom: 30px;
    width: 50px;
}

#trumps {
    transform: scale(0.8);
}

#advance .suit-icon {
    transform: scale(0.7) translate(0px, 10px);
}

.previous-trick {
    position: absolute;
    right: 20px;
    top: 100px;
    width: 200px;
    text-align: center;
}

.prev-area {
    position: relative;
    width: 100%;
    height: 200px;
}

.prev-slot {
    position: absolute;
    transform: scale(0.75);
    transform-origin: center center;
}

#prev-comp1 {
    top: 0;
    left: 0;
}

#prev-comp2 {
    top: 0;
    right: 0;
}

#prev-player {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scale(0.75);
}

.prev-slot .card {
    margin: 2px;
}

.penultimate-cards {
    position: absolute;
    right: 0px;
    top: 20px;
    width: 200px;
    text-align: center;
}

.dead-cards {
    position: absolute;
    right: 145px;
    top: 20px;
    width: 200px;
    text-align: center;
}

.dead-cards .card {
    opacity: 0.6;
}

body.modal-open {
    position: fixed;
    overflow: hidden;
    width: 100%;
}

#help-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: #9c31ff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

#help-modal {
    position: fixed;
    z-index: 999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);

    opacity: 0;
    visibility: hidden;
    transition: opacity 400ms ease, visibility 400ms ease;
}

#help-modal.show {
    opacity: 1;
    visibility: visible;
}

#help-content {
    background-color: white;
    color: #333;
    text-align: left;
    margin: 10% auto;
    padding: 20px;
    width: 80%;
    max-width: 600px;
    max-height: 70%;
    overflow-y: auto;
    border-radius: 8px;
    position: relative;
    scroll-behavior: smooth;
}

#help-close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

#help-close:hover {
    color: #000;
}