/*
 * Seahaven Towers - Game Styles
 * Based on FreeCell with 10 tableau columns
 */

/* Card sizing for 10 columns */
:root {
    --card-width: clamp(48px, calc((100vw - 140px) / 10), 70px);
    --card-height: calc(var(--card-width) * 1.4);
}

.game-board {
    padding: 15px;
}

.cells-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

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

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

.free-cell.drag-over {
    border-color: var(--accent-color);
    background: rgba(212, 175, 55, 0.1);
}

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

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

.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[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: 1.8rem;
    color: rgba(255, 255, 255, 0.12);
}

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

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

.tableau-column.drag-over {
    background: rgba(212, 175, 55, 0.1);
    border-radius: 6px;
}

.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;
}

@media (max-width: 768px) {
    :root {
        --card-width: clamp(32px, calc((100vw - 40px) / 10), 48px);
        --card-height: calc(var(--card-width) * 1.4);
    }

    .cells-row {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .free-cells {
        order: 2;
    }

    .foundations {
        order: 1;
    }

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