/* ========== Дурак: полноценная карточная игра ========== */
.durak-overlay {
    position: fixed;
    inset: 0;
    z-index: 999997;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(10px);
    animation: durak-fadeIn 0.25s ease-out;
}
@keyframes durak-fadeIn { from { opacity: 0; } to { opacity: 1; } }

.durak-panel {
    background: linear-gradient(165deg, #1a1d2e 0%, #252836 50%, #1e212e 100%);
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.06);
    padding: 20px 24px;
    max-width: 560px;
    width: 95%;
    animation: durak-scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes durak-scaleIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }

.durak-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    color: #e8eaed;
}
.durak-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}
.durak-title i { color: #eab308; }
.durak-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: #a0a4ab;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.15s;
}
.durak-close:hover {
    background: rgba(239,68,68,0.2);
    color: #f87171;
    transform: scale(1.05);
}

.durak-status {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 12px;
    min-height: 1.4em;
}
.durak-status.your-turn { color: #34d399; font-weight: 600; }

.durak-trump {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: #94a3b8;
}
.durak-trump .durak-trump-suit { font-size: 1.2rem; }
.durak-trump .durak-trump-label { margin-right: 4px; }

.durak-table {
    min-height: 100px;
    background: rgba(0,0,0,0.25);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: center;
    border: 1px dashed rgba(255,255,255,0.15);
}

.durak-deck {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: #94a3b8;
}

.durak-hand {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    min-height: 90px;
    padding: 8px 0;
}

.durak-card {
    width: 56px;
    height: 78px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    flex-shrink: 0;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    user-select: none;
}
.durak-card.red { color: #ef4444; background: #fff; border: 1px solid #e5e7eb; }
.durak-card.black { color: #1f2937; background: #fff; border: 1px solid #e5e7eb; }
.durak-card.trump { border-color: #eab308; box-shadow: 0 0 0 2px rgba(234,179,8,0.4); }
.durak-card.playable { cursor: pointer; }
.durak-card.playable:hover { transform: translateY(-4px); box-shadow: 0 6px 16px rgba(0,0,0,0.4); }
.durak-card.playable:active { transform: translateY(-2px); }
.durak-card.disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.durak-card .durak-card-rank { font-size: 1rem; line-height: 1.1; }
.durak-card .durak-card-suit { font-size: 1.1rem; margin-top: 2px; }
.durak-card.table-attack { animation: durak-cardPlay 0.2s ease-out; }
.durak-card.table-defend { animation: durak-cardPlay 0.25s ease-out 0.05s both; }
@keyframes durak-cardPlay {
    from { opacity: 0; transform: scale(0.8) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.durak-pair { display: flex; flex-direction: column; gap: 2px; align-items: center; }

.durak-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 12px;
}
.durak-btn {
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: transform 0.1s, filter 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.durak-btn:hover:not(:disabled) { filter: brightness(1.1); transform: scale(1.02); }
.durak-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.durak-btn-primary { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; }
.durak-btn-danger { background: linear-gradient(135deg, #dc2626, #b91c1c); color: #fff; }
.durak-btn-success { background: linear-gradient(135deg, #059669, #047857); color: #fff; }

.durak-waiting {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
}
.durak-waiting i { font-size: 2rem; margin-bottom: 12px; opacity: 0.7; }

.durak-end {
    text-align: center;
    padding: 24px;
}
.durak-end h3 { font-size: 1.3rem; margin-bottom: 8px; color: #fff; }
.durak-end.win h3 { color: #34d399; }
.durak-end.lose h3 { color: #f87171; }
.durak-end p { color: #94a3b8; margin-bottom: 16px; }
