:root {
    --card-width: clamp(58px, calc((100vw - 180px) / 9), 82px);
    --card-height: calc(var(--card-width) * 1.4);
    --card-gap: clamp(5px, 0.8vw, 10px);
    --cascade-offset: clamp(20px, 3vw, 30px);
}

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

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

.game-board {
    min-width: 0;
    overflow-x: visible;
}

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

.scorpion-status {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 0 auto 1.25rem;
    color: var(--text-secondary, #aaa);
    font-size: 0.95rem;
}

.scorpion-status strong {
    color: var(--accent-gold, #d4af37);
}

.top-row {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.stock {
    width: var(--card-width);
    height: var(--card-height);
    border-radius: 6px;
    position: relative;
    cursor: pointer;
}

.stock.empty {
    border: 2px dashed rgba(255, 255, 255, 0.16);
    background: rgba(0, 0, 0, 0.15);
    cursor: default;
}

.stock.empty::after {
    content: '0';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.55);
    font-size: 1.8rem;
    font-weight: 700;
}

.tableau {
    display: grid;
    grid-template-columns: repeat(7, var(--card-width));
    justify-content: center;
    gap: var(--card-gap);
    min-height: calc(var(--card-height) + (var(--cascade-offset) * 12));
}

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

.game-card {
    width: var(--card-width);
    height: var(--card-height);
    min-width: var(--card-width);
    min-height: var(--card-height);
    border-radius: 10px;
    position: absolute;
    cursor: pointer;
    user-select: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s;
}

.game-card:hover {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35), 0 4px 8px rgba(0, 0, 0, 0.4);
}

.game-card.dragging {
    opacity: 0.5;
}

.game-card[draggable="true"] {
    cursor: grab;
}

.game-card[draggable="true"]:active {
    cursor: grabbing;
}

@media (max-width: 768px) {
    :root {
        --card-width: clamp(34px, calc((100vw - 36px) / 7), 48px);
        --card-height: calc(var(--card-width) * 1.4);
        --card-gap: 3px;
        --cascade-offset: clamp(15px, 4vw, 22px);
    }

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

    .game-header {
        justify-content: center;
    }

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

    .scorpion-status {
        gap: 0.65rem;
        font-size: 0.82rem;
    }

    .tableau {
        min-height: calc(var(--card-height) + (var(--cascade-offset) * 12));
    }

    .game-card-face {
        padding: 2px;
        font-size: 0.5rem;
    }

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