/* Модальне вікно бонусів */
.powerup-modal {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.powerup-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

.powerup-item {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.powerup-item:hover {
    border-color: #667eea;
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.powerup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.powerup-header h4 {
    margin: 0;
    color: #333;
    font-size: 1.1rem;
}

.powerup-cost {
    background: #ffc107;
    color: #212529;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-weight: bold;
    font-size: 0.9rem;
}

.powerup-description {
    color: #666;
    margin: 0.5rem 0;
    line-height: 1.4;
}

.powerup-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.75rem 0;
    font-size: 0.85rem;
}

.uses-left {
    color: #28a745;
    font-weight: bold;
}

.cooldown {
    color: #6c757d;
}

.use-powerup-btn {
    width: 100%;
    padding: 0.75rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: background 0.3s;
}

.use-powerup-btn:hover {
    background: #5a6fd8;
}

.use-powerup-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* Модальні вікна вибору */
.target-modal, .card-modal {
    max-width: 400px;
    text-align: center;
}

.target-list, .card-list {
    margin: 1.5rem 0;
}

.target-player-btn, .card-value-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    margin: 0.5rem 0;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.target-player-btn:hover, .card-value-btn:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateY(-1px);
}

.card-selection {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin: 1rem 0;
}

.card-value-btn {
    padding: 0.75rem;
    font-size: 1.1rem;
    font-weight: bold;
}

/* Адаптивність */
@media (max-width: 768px) {
    .powerup-modal {
        margin: 1rem;
        width: calc(100% - 2rem);
    }
    
    .powerup-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .card-selection {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .powerup-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
}


/* Стилі для результатів бонусів */
.hint-modal, .probability-modal {
    max-width: 500px;
}

.hint-result, .probability-result {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.hint-message, .probability-message {
    line-height: 1.6;
    margin-bottom: 1rem;
}

.hint-details {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.card-preview {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

.hint-card {
    width: 80px;
    height: 120px;
    border: 2px solid #333;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.hint-card.hearts, .hint-card.diamonds {
    border-color: #dc3545;
    color: #dc3545;
}

.hint-card.clubs, .hint-card.spades {
    border-color: #212529;
    color: #212529;
}

.card-value {
    font-size: 1.2rem;
    font-weight: bold;
    align-self: flex-start;
}

.card-suit {
    font-size: 1.5rem;
}

.recommendation {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    color: #856404;
}

/* Анімації для бонусів */
@keyframes powerupGlow {
    0% { box-shadow: 0 0 5px rgba(102, 126, 234, 0.5); }
    50% { box-shadow: 0 0 20px rgba(102, 126, 234, 0.8); }
    100% { box-shadow: 0 0 5px rgba(102, 126, 234, 0.5); }
}

.powerup-item.used {
    opacity: 0.6;
    position: relative;
}

.powerup-item.used::after {
    content: "✓";
    position: absolute;
    top: 10px;
    right: 10px;
    background: #28a745;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Індикатори активних бонусів */
.active-powerups {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 1000;
}

.powerup-indicator {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    animation: powerupGlow 2s infinite;
}

.powerup-indicator.extra-turn {
    border-color: #28a745;
    color: #28a745;
}

.powerup-indicator.protection {
    border-color: #ffc107;
    color: #856404;
}