:root {
    --card-width: 80px;
    --card-height: 112px;
    --card-gap: 12px;
}

.game-board {
    display: flex;
    flex-direction: row;
    padding: 15px;
}

.left-column {
    display: flex;
    flex-direction: column;
    margin-right: 15px;
}

.right-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}

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

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

.stock, .waste, .foundation {
    width: var(--card-width);
    height: var(--card-height);
    border-radius: 6px;
    position: relative;
}

.stock {
    background: var(--card-back);
    border: 2px solid var(--card-back-border);
    cursor: pointer;
}

.stock.empty::after {
    content: '↺';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.5);
}

.stock.empty {
    cursor: pointer;
}

.waste {
    border: 2px dashed rgba(255, 255, 255, 0.15);
    background: rgba(0,0,0,0.15);
    overflow: visible;
    position: relative;
}

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

.foundation {
    border: 2px dashed rgba(255, 255, 255, 0.15);
    background: rgba(0,0,0,0.15);
    position: relative;
}

.foundation-indicator {
    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;
    white-space: pre;
}

.foundation .game-card .foundation-indicator {
    display: none;
}

.reserve {
    position: relative;
    width: var(--card-width);
    min-height: var(--card-height);
}

.reserve .game-card {
    position: absolute;
    top: 0;
    left: 0;
}

.tableau {
    display: flex;
    gap: 10px;
    min-height: 350px;
    justify-content: center;
}

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

@media (max-width: 768px) {
    .game-board {
        display: flex;
        flex-direction: row;
        padding: 6px 0;
        overflow-x: auto;
    }

    :root {
        --card-width: clamp(32px, calc((100vw - 60px) / 5), 45px);
        --card-height: calc(var(--card-width) * 1.4);
        --card-gap: 2px;
        --left-width: calc(var(--card-width) * 1.1);
    }

    .left-column {
        width: var(--left-width);
        flex-shrink: 0;
        margin-right: 4px;
    }

    .right-column {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 6px;
        min-width: 0;
    }

    /* Row 1: Foundations - 4 foundations centered */
    .foundations-row {
        display: flex;
        justify-content: center;
    }

    .foundations {
        display: flex;
        gap: 4px;
    }

    /* Row 2: Stock and Waste */
    .stock-waste-row {
        display: flex;
        justify-content: flex-start;
        padding-left: 4px;
    }

    .stock-waste {
        display: flex;
        gap: 4px;
    }

    /* Row 3: Tableau */
    .tableau {
        display: flex;
        justify-content: center;
        gap: 4px;
        min-height: 150px;
    }

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

    .stock, .waste, .foundation {
        width: var(--card-width);
        height: var(--card-height);
    }

    .game-card-face {
        padding: 1px;
        font-size: 0.45rem;
    }

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

@media (min-width: 769px) and (max-width: 1024px) {
    :root {
        --card-width: 60px;
        --card-height: 84px;
        --card-gap: 8px;
    }
}
