body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-color: #2E7D32;
}

#game-board {
    display: grid;
    grid-template-areas:
        "stock waste . . foundations foundations foundations foundations"
        "tableau tableau tableau tableau tableau tableau tableau tableau";
    gap: 10px;
    padding: 10px;
    background-color: #388E3C;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    max-width: 90%;
}

.card-pile {
    width: 100px;
    height: 140px;
    background-color: #4CAF50;
    border-radius: 10px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
    position: relative;
}

#stock {
    grid-area: stock;
}

#waste {
    grid-area: waste;
}

#foundations {
    display: flex;
    gap: 10px;
    grid-area: foundations;
}

.foundation {
    width: 100px;
    height: 140px;
}

#tableau {
    display: flex;
    gap: 10px;
    grid-area: tableau;
}

.tableau-pile {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.card {
    width: 100px;
    height: 140px;
    border-radius: 10px;
    background-color: white;
    border: 2px solid #000;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: 'Georgia', serif;
    font-weight: bold;
    color: #000;
    position: absolute;
}

.card.dragging {
    opacity: 0.5;
    z-index: 1000;
}

.card.face-down {
    background-color: #4CAF50;
    border: 2px solid #388E3C;
    box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.5);
}

.card.face-up {
    background-color: white;
}

.card .rank {
    position: absolute;
    top: 5px;
    left: 5px;
    font-size: 18px;
}

.card .suit {
    position: absolute;
    bottom: 5px;
    right: 5px;
    font-size: 24px;
}

.card.hearts .rank,
.card.hearts .suit {
    color: red;
}

.card.diamonds .rank,
.card.diamonds .suit {
    color: red;
}

.card.clubs .rank,
.card.clubs .suit {
    color: black;
}

.card.spades .rank,
.card.spades .suit {
    color: black;
}

#controls {
    margin-top: 20px;
    text-align: center;
}

#new-game-button,
#hint-button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    background-color: #abc1ac;
    color: white;
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

#new-game-button:hover,
#hint-button:hover {
    background-color: #bad2bb;
}

#win-message {
    margin-top: 20px;
    font-size: 24px;
    color: white;
}

.hidden {
    display: none;
}
