/* === Rummy Styles === */
.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    min-height: calc(100vh - var(--nav-height));
    padding-top: calc(var(--nav-height) + var(--space-4));
}

.card-row {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0 var(--space-2);
    min-height: 80px;
}

.opponent-hand {
    opacity: 0.7;
}

.rm-card {
    width: 48px;
    height: 68px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.rm-card--face {
    background: linear-gradient(145deg, #f8fafc, #e2e8f0);
    color: #1f2937;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.rm-card--red {
    color: #dc2626;
}

.rm-card--black {
    color: #1f2937;
}

.rm-card--back {
    background: linear-gradient(145deg, #1e40af, #3b82f6);
    color: rgba(255, 255, 255, 0.3);
    font-size: 24px;
}

.rm-card--selected {
    transform: translateY(-12px);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.5);
    border-color: #6366f1;
}

.rm-card:hover:not(.rm-card--back) {
    transform: translateY(-4px);
}

.table-area {
    display: flex;
    gap: var(--space-6);
    align-items: center;
    justify-content: center;
    padding: var(--space-3);
}

.pile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    cursor: pointer;
}

.pile .card-back,
.pile .card-face {
    width: 52px;
    height: 72px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.15s ease;
}

.pile .card-back {
    background: linear-gradient(145deg, #1e40af, #3b82f6);
    color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.pile .card-face {
    background: linear-gradient(145deg, #f8fafc, #e2e8f0);
    color: #1f2937;
    font-weight: bold;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.pile:hover .card-back,
.pile:hover .card-face {
    transform: translateY(-3px);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.4);
}

.pile span {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.melds-area {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
    justify-content: center;
    padding: var(--space-2);
    min-height: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
    max-width: 600px;
}

.meld-group {
    display: flex;
    gap: 2px;
    padding: 4px;
    border-radius: 8px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.meld-group .rm-card {
    width: 36px;
    height: 52px;
    font-size: 11px;
    cursor: default;
}

.info-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.info-modal__card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    max-width: 420px;
    width: 90%;
}

.info-modal__card h2 {
    margin-bottom: var(--space-4);
    color: var(--text-primary);
}

.info-modal__card ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-bottom: var(--space-5);
}

.info-modal__card li {
    color: var(--text-secondary);
    padding-left: var(--space-4);
    position: relative;
}

.info-modal__card li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent-primary-bright);
}

@media (max-width: 480px) {
    .rm-card {
        width: 38px;
        height: 56px;
        font-size: 11px;
    }

    .card-row {
        gap: 2px;
    }
}