.game-header {
    margin-bottom: 20px;
}

.game-header h1 {
    font-size: 1.5rem;
}

.controls {
    gap: 10px;
}

.controls button {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.score {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-color);
}

.related-games {
    width: 100%;
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 12px 16px;
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.related-label {
    font-weight: 600;
    color: var(--accent-color);
    margin-right: 6px;
}

.related-link {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s;
}

.related-link:hover {
    color: var(--accent-gold);
    text-decoration: underline;
}

.top-row {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.foundations {
    display: flex;
    gap: var(--card-gap);
}

.foundation {
    width: var(--card-width);
    height: var(--card-height);
    border-radius: 6px;
    border: 2px dashed rgba(255, 255, 255, 0.15);
    background: rgba(0,0,0,0.15);
    position: relative;
}

.foundation[data-suit="hearts"]::before {
    content: '♥';
}

.foundation[data-suit="diamonds"]::before {
    content: '♦';
}

.foundation[data-suit="clubs"]::before {
    content: '♣';
}

.foundation[data-suit="spades"]::before {
    content: '♠';
}

.foundation::before {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.12);
}

.foundation[data-suit]::after {
    content: 'A' '\A' attr(data-suit);
    white-space: pre;
    position: absolute;
    top: 2px;
    left: 4px;
    font-size: 0.65rem;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.2);
    z-index: 1;
    pointer-events: none;
    line-height: 1.1;
    text-transform: capitalize;
}

.foundation[data-suit="hearts"]::after { content: 'A' '\A' '♥'; }
.foundation[data-suit="diamonds"]::after { content: 'A' '\A' '♦'; }
.foundation[data-suit="clubs"]::after { content: 'A' '\A' '♣'; }
.foundation[data-suit="spades"]::after { content: 'A' '\A' '♠'; }

.foundation.ace-placed {
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.3);
}

.tableau {
    display: flex;
    gap: var(--card-gap);
    min-height: 400px;
    justify-content: space-between;
}

.tableau-column {
    flex: 1;
    position: relative;
    min-height: var(--card-height);
    max-width: var(--card-width);
}

@media (max-width: 768px) {
    :root {
        --card-width: clamp(35px, calc((100vw - 56px) / 7), 55px);
        --card-height: calc(var(--card-width) * 1.4);
        --card-gap: 2px;
    }

    .game-board {
        margin-left: 0;
        margin-right: 0;
        padding-left: 5px;
        padding-right: 5px;
    }

    .game-header {
        flex-wrap: wrap;
        gap: 10px;
    }

    .game-header h1 {
        width: 100%;
        text-align: center;
    }

    .tableau {
        min-height: 250px;
    }

    .tableau-column {
        min-width: var(--card-width);
        max-width: var(--card-width);
    }

    .game-card-face {
        padding: 3px;
        font-size: 0.6rem;
    }

    .game-card-center {
        font-size: 1rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    :root {
        --card-width: clamp(45px, calc((100vw - 80px) / 7), 70px);
        --card-height: calc(var(--card-width) * 1.4);
        --card-gap: 5px;
    }

    .tableau {
        min-height: 380px;
    }
}
