* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
    padding: 0;
    /* margin: 0; */
    /* overflow-x: hidden; */
    justify-content: center;
    min-width: 100%;
    display: flex;
    align-items: center;
    overflow: auto;

}

#game-container {
    /* max-width: 900px;
    width: 100%; */
    width: 900px;
    /* position: relative;
    left: 50%;
    transform: translateX(-50%); */
    margin: 20px auto;
}

#top-area {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

#stock-waste {
    display: flex;
    gap: 20px;
}

#foundations {
    display: flex;
    gap: 10px;
}

.pile {
    width: 80px;
    height: 110px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    position: relative;
    background: rgba(255, 255, 255, 0.1);
}

.pile.foundation {
    border-color: rgba(255, 215, 0, 0.4);
}

#tableau {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tableau-pile {
    flex: 1;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card {
    width: 80px;
    height: 110px;
    background: white;
    border: 1px solid #333;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    transition: transform 0.1s, box-shadow 0.1s;
    user-select: none;
}

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

.card.selected {
    box-shadow: 0 0 0 3px #ffd700, 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

.card.red {
    color: #d32f2f;
}

.card.black {
    color: #000;
}

.card.face-down {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    color: transparent;
}

.card.face-down::before {
    content: '🂠';
    color: white;
    font-size: 48px;
}

.card-value {
    font-size: 20px;
    line-height: 1;
}

.card-suit {
    font-size: 32px;
    line-height: 1;
}

#status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-size: 16px;
}

#status span {
    margin-right: 20px;
}

#new-game {
    background: #4caf50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background 0.2s;
}

#new-game:hover {
    background: #45a049;
}

#new-game:active {
    background: #3d8b40;
}

.card-corner {
    position: absolute;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
}

.card-corner.top-left {
    top: 5px;
    left: 5px;
}

.card-corner.bottom-right {
    bottom: 5px;
    right: 5px;
    transform: rotate(180deg);
}

.card-corner.top-right {
    top: 5px;
    right: 5px;
}

.card-corner.bottom-left {
    bottom: 5px;
    left: 5px;
    transform: rotate(180deg);
}
